@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
@@ -1 +0,0 @@
1
- export{C as vertex_color_picker}from"./p-8434602f.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- import{r as e,e as t,h as r,H as s,g as i}from"./p-6834631c.js";import{c as a}from"./p-fe062eb0.js";import{g as n}from"./p-1356f525.js";const o=()=>{if("undefined"!=typeof window)return window.getSelection()},l=e=>e instanceof Text,h=e=>"true"===(null==e?void 0:e.getAttribute("data-replaced")),c=e=>new Text(null!=e&&""!==e?e:" "),d=class{constructor(r){e(this,r),this.triggerCharacterPressed=t(this,"triggerCharacterPressed",7),this.valueChanged=t(this,"valueChanged",7),this.inputFocus=t(this,"inputFocus",7),this.inputBlur=t(this,"inputBlur",7),this.resultsEnterPressed=t(this,"resultsEnterPressed",7),this.handleKeyDown=e=>{if(!this.triggerCharacters.includes(e.key)&&this.triggerCharacter!==e.key||null!=this.triggerKey?this.restartTriggerInput():(this.triggerKey=e.key,this.updateCursorPosition(),this.triggerCharacterPressed.emit("")),"Backspace"===e.key){const e=o();e&&(null==e?void 0:e.rangeCount)>0&&e.getRangeAt(0).deleteContents()}this.valueChanged.emit()},this.handleKeyUp=e=>{"Backspace"===e.key&&this.updateTriggerState(this.getSelectionSubstring()),"Enter"===e.key&&this.clearTriggerState(),this.valueChanged.emit()},this.updateTriggerValue=e=>{var t,r,s,i,a;if(null!=this.triggerKey&&null!=this.triggerRange&&this.triggerRange.startContainer===this.triggerRange.endContainer){const n=this.triggerRange.startContainer;if(l(n)){const o=c(null===(t=n.textContent)||void 0===t?void 0:t.slice(0,this.triggerRange.startOffset-1)),l=c(null===(r=n.textContent)||void 0===r?void 0:r.slice(this.triggerRange.endOffset)),h=this.createReplacedElement(e);null===(s=n.parentElement)||void 0===s||s.insertBefore(o,n),null===(i=n.parentElement)||void 0===i||i.insertBefore(l,n.nextSibling),null===(a=n.parentElement)||void 0===a||a.insertBefore(h,l),n.remove(),this.moveCursorToNodeEnd(l,!0)}}},this.triggerText=()=>{var e,t;return null!=this.triggerKey&&null!=this.triggerRange&&this.triggerRange.startContainer===this.triggerRange.endContainer&&null!==(t=null===(e=this.triggerRange.startContainer.textContent)||void 0===e?void 0:e.slice(this.triggerRange.startOffset,this.triggerRange.endOffset))&&void 0!==t?t:""},this.restartTriggerInput=()=>{this.clearTriggerTimeout(),this.triggerTimeout=setTimeout((()=>{null!=this.triggerRange&&null!=this.triggerKey&&this.triggerCharacterPressed.emit(this.triggerText()),this.triggerTimeout=void 0}),this.debounce)},this.clearTriggerTimeout=()=>{null!=this.triggerTimeout&&(clearTimeout(this.triggerTimeout),this.triggerTimeout=void 0)},this.updateCursorPosition=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0).getBoundingClientRect(),s=null===(e=this.contentEl)||void 0===e?void 0:e.getBoundingClientRect(),i=r.bottom||(null==s?void 0:s.bottom)||0,a=r.top||(null==s?void 0:s.top)||0;this.cursorPosition={x:r.left||(null==s?void 0:s.left)||0,y:this.placement.includes("top")?a:i}}},this.moveCursorToNodeEnd=(e,t=!1)=>{const r=o();if(null!=r){const s=document.createRange();s.selectNodeContents(e),s.collapse(t),r.removeAllRanges(),r.addRange(s)}},this.updateInputCursorPosition=e=>{if((e=>e instanceof HTMLElement)(e)){const t=h(e.parentElement)?e.parentElement:e;h(t)&&this.insertAdjacentTextNode(t)}},this.createReplacedElement=e=>{const t=this.hostEl.querySelector('template[slot="replaced"]');if(null!=t){const r=n(t);return r.bindings.bind(e),r.element.style.display="inline-block",r.element.contentEditable="false",r.element.setAttribute("data-replaced","true"),r.element}throw new Error("Replaced template not defined.")},this.handleSelectionChange=()=>{this.updateTriggerState(this.getSelectionSubstring())},this.getSelectionSubstring=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0);if(this.updateTriggerRange(),null!=r&&r.startOffset===r.endOffset&&l(r.startContainer)&&null!=r.startContainer.textContent&&!h(r.startContainer.parentElement)&&(null===(e=this.contentEl)||void 0===e?void 0:e.contains(r.startContainer)))return r.startContainer.textContent.slice(this.lastIndexOfBreakCharacter(r.startContainer.textContent.slice(0,r.startOffset))+1,r.startOffset)}return""},this.insertAdjacentTextNode=e=>{e.insertAdjacentText("afterend",""),null!=e.nextSibling&&this.moveCursorToNodeEnd(e.nextSibling)},this.updateTriggerState=e=>{const t=(null!=this.triggerCharacter?[...this.triggerCharacters,this.triggerCharacter]:this.triggerCharacters).find((t=>e.includes(t)));null!=t?(this.restartTriggerInput(),this.triggerKey=t,this.updateTriggerRange(),null==this.cursorPosition&&this.updateCursorPosition(),this.open=!0):this.clearTriggerState()},this.updateTriggerRange=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0);null!=this.triggerKey&&(this.triggerRange=null!==(e=this.triggerRange)&&void 0!==e?e:r.cloneRange(),this.triggerRange.setEnd(r.endContainer,r.endOffset))}},this.clearTriggerState=()=>{this.triggerKey=void 0,this.triggerRange=void 0,this.cursorPosition=void 0,this.open=!1,this.clearTriggerTimeout()},this.lastIndexOfBreakCharacter=e=>this.breakCharacters.reduce(((t,r)=>{const s=e.replace(String.fromCharCode(160)," ").lastIndexOf(r);return s>t?s:t}),-1),this.handleFocus=e=>{this.inputFocus.emit(e)},this.handleBlur=e=>{this.open=!1,this.inputBlur.emit(e)},this.handleInputPointerEvent=e=>{null!=e.target&&this.updateInputCursorPosition(e.target)},this.handleResultPointerDown=e=>{e.preventDefault()},this.variant="standard",this.resultItems=void 0,this.triggerCharacters=[],this.triggerCharacter=void 0,this.breakCharacters=[" "],this.debounce=100,this.placeholder=void 0,this.placement="bottom-start",this.cursorPosition=void 0,this.open=!1,this.triggerKey=void 0,this.triggerRange=void 0}componentWillLoad(){document.addEventListener("selectionchange",this.handleSelectionChange)}disconnectedCallback(){document.removeEventListener("selectionchange",this.handleSelectionChange)}async replaceTriggeredValue(e){this.updateTriggerValue(e),this.clearTriggerState(),this.valueChanged.emit()}async getEditableContent(){var e;return null===(e=this.contentEl)||void 0===e?void 0:e.childNodes}render(){var e;const t=a("wrapper",{standard:"standard"===this.variant,filled:"filled"===this.variant,underlined:"underlined"===this.variant,blank:"blank"===this.variant});return r(s,null,r("div",{class:t},r("span",{class:"content-input",ref:e=>this.contentEl=e,role:"textbox",contenteditable:"true","aria-multiline":"true","data-placeholder":this.placeholder,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onBlur:this.handleBlur,onFocus:this.handleFocus,onPointerDown:this.handleInputPointerEvent,onPointerUp:this.handleInputPointerEvent})),r("vertex-result-list",{position:this.cursorPosition,placement:this.placement,open:this.open&&null!=this.resultItems&&this.resultItems.length>0&&null!=this.cursorPosition,items:null!==(e=this.resultItems)&&void 0!==e?e:[],onPointerDown:this.handleResultPointerDown,onEnterPressed:e=>this.resultsEnterPressed.emit(e.detail)},r("slot",{name:"results"})),r("slot",{name:"replaced"}))}get hostEl(){return i(this)}};d.style=".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}.test-mention.sc-vertex-search-bar{display:inline-block;color:blue}.hidden.sc-vertex-search-bar{visibility:hidden}.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}.textarea.sc-vertex-search-bar{overflow:hidden;outline:none;box-shadow:none;resize:none}.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)}";export{d as S}
@@ -1 +0,0 @@
1
- import{r as t,e as s,h as i,H as h,g as e}from"./p-6834631c.js";import{c as n}from"./p-fe062eb0.js";import{g as o}from"./p-1356f525.js";class l{constructor(t,s){this.container=t,this.elementFactory=s,this.instanceMap=new Map,this.elements=[]}swapHeadToTail(t){const s=this.elements.splice(0,t);return this.elements.splice(this.elements.length,0,...s),this.elements.concat()}swapTailToHead(t){const s=this.elements.splice(-t,t);return this.elements.splice(0,0,...s),this.elements.concat()}updateElements(t){const s=t-this.elements.length;if(s>0)for(let t=0;t<s;t++)this.createElement();else for(let t=0;t<-s;t++)this.deleteElement();return this.elements.concat()}updateData(t){this.elements.forEach(((s,i)=>{const h=this.instanceMap.get(s),e=t(i);null==h||h.bindings.bind(e)}))}updateElementFactory(t){this.elementFactory=t,this.updateElements(0)}iterateElements(t){this.elements.forEach(((s,i)=>{const h=this.instanceMap.get(s);if(null==h)throw new Error("Binding not found for element.");t(s,h.bindings,i)}))}createElement(){const t=this.elementFactory();return this.elements.push(t.element),this.instanceMap.set(t.element,t),this.container.append(t.element),t}deleteElement(){const t=this.elements.pop();null!=t&&(this.instanceMap.delete(t),t.remove())}}const r=(t,s,i)=>{null==t||t.scrollTo({top:null!=s&&null!=i?s*i:0})},a=class{constructor(i){t(this,i),this.enterPressed=s(this,"enterPressed",7),this.computeResultHeight=()=>{if(null==this.computedResultHeight){const t=this.hostEl.querySelector('*[slot="result"]');null!=t&&(this.resultHeight=t.clientHeight,this.computedResultHeight=t.clientHeight)}},this.ensureTemplateDefined=()=>{const t=this.hostEl.querySelector("template");if(null==t){const t=document.createElement("template");t.innerHTML='\n <div class="result">{{data.value}}</div>\n ',this.hostEl.appendChild(t),this.stateMap.resultTemplate=t}else this.stateMap.resultTemplate=t},this.createResultPool=()=>{this.stateMap.resultPool=new l(this.hostEl,(()=>this.createResultInstance()))},this.createResultInstance=()=>{if(null!=this.stateMap.resultTemplate){const t=o(this.stateMap.resultTemplate);return t.element.slot="result",t}throw new Error("Result template not defined.")},this.layoutResults=()=>{var t,s,i,h;const e=this.viewportEndIndex-this.viewportStartIndex+1,n=this.viewportStartIndex-this.lastStartIndex;this.lastStartIndex=this.viewportStartIndex,null===(t=this.stateMap.resultPool)||void 0===t||t.updateElements(e),n>0?null===(s=this.stateMap.resultPool)||void 0===s||s.swapHeadToTail(n):null===(i=this.stateMap.resultPool)||void 0===i||i.swapTailToHead(-n),null===(h=this.stateMap.resultPool)||void 0===h||h.iterateElements(((t,s,i)=>{const h=this.parsedResults[i+this.viewportStartIndex];null!=h&&(t.style.position="absolute",t.style.boxSizing="border-box",t.style.top=(this.viewportStartIndex+i)*this.resultHeight+"px",t.style.width="100%",t.setAttribute("is-focused",`${this.viewportStartIndex+i===this.lastFocusedIndex}`),s.bind(h))}))},this.handleScroll=t=>{this.scrollTop=t.target.scrollTop},this.handleKeyDown=t=>{this.open&&("ArrowUp"===t.key?(t.preventDefault(),this.lastFocusedIndex=Math.min(0,this.lastFocusedIndex-1),r(this.resultsScrollEl,this.lastFocusedIndex,this.resultHeight)):"ArrowDown"===t.key&&(t.preventDefault(),this.lastFocusedIndex=Math.min(this.lastFocusedIndex+1,this.items.length),r(this.resultsScrollEl,this.lastFocusedIndex,this.resultHeight)),"Enter"===t.key&&null!=this.lastFocusedIndex&&(t.preventDefault(),this.enterPressed.emit(this.items[this.lastFocusedIndex]),this.lastFocusedIndex=0,r(this.resultsScrollEl)))},this.items=[],this.itemsJson=void 0,this.viewportStartIndex=0,this.viewportEndIndex=0,this.resultHeight=32,this.overScanCount=25,this.placement="bottom-start",this.position=void 0,this.open=!1,this.listHeight=void 0,this.parsedResults=[],this.scrollTop=0,this.lastStartIndex=0,this.lastFocusedIndex=0,this.stateMap={}}handleResultsChanged(t){"string"==typeof t?this.parsedResults=JSON.parse(t):null!=t&&(this.parsedResults=t)}handleOpenChanged(){this.open||0===this.scrollTop||r(this.resultsScrollEl)}componentWillLoad(){var t;this.resizeObserver=new ResizeObserver((()=>{this.listHeight=void 0})),window.addEventListener("keydown",this.handleKeyDown),this.ensureTemplateDefined(),this.createResultPool(),this.handleResultsChanged(null!==(t=this.itemsJson)&&void 0!==t?t:this.items)}componentDidLoad(){this.resizeObserver.observe(this.hostEl)}componentWillRender(){this.computeViewportResults()}componentDidRender(){this.layoutResults(),this.computeResultHeight()}disconnectedCallback(){this.resizeObserver.disconnect(),window.removeEventListener("keydown",this.handleKeyDown)}render(){return i(h,null,i("div",{class:n("wrapper",{hidden:!this.open||null==this.computedResultHeight})},i("vertex-popover",{position:this.position,placement:this.placement,open:this.open,backdrop:!1},i("div",{class:"results-scroll",ref:t=>this.resultsScrollEl=t,onScroll:this.handleScroll},i("div",{class:"results",style:{height:this.parsedResults.length*this.resultHeight+"px"}},i("slot",null),i("slot",{name:"result"}))))))}computeViewportResults(){const t=this.getListHeight();if(null!=t&&this.resultHeight>0){const s=Math.ceil(t/this.resultHeight),i=Math.floor(this.scrollTop/this.resultHeight),h=i+s,e=Math.max(0,i-this.overScanCount),n=Math.min(this.parsedResults.length-1,h+this.overScanCount);this.viewportStartIndex=e,this.viewportEndIndex=n}}getListHeight(){return null==this.listHeight&&(this.listHeight=this.hostEl.clientHeight),this.listHeight}get hostEl(){return e(this)}static get watchers(){return{items:["handleResultsChanged"],open:["handleOpenChanged"]}}};a.style=":host{--max-height:300px;--width:500px;--box-shadow:0 2px 5px rgba(0, 0, 0, 0.5)}.hidden{visibility:hidden;position:fixed;pointer-events:none}.results{position:relative;height:100%}.results-scroll{overflow-y:auto;max-height:var(--max-height);width:var(--width);box-shadow:var(--box-shadow);background-color:white}";export{a as R}
@@ -1 +0,0 @@
1
- import{r as i,e as t,h as s,c as e,g as o}from"./p-6834631c.js";import{c as n}from"./p-fe062eb0.js";const r=class{constructor(s){i(this,s),this.optionChanged=t(this,"optionChanged",7),this.removeListeners=[],this.controlled=!1,this.value=void 0,this.placeholder="Select an option...",this.disabled=!1,this.animated=!0,this.open=!1,this.position=void 0,this.displayValue=void 0,this.resizeObserverFactory=i=>new ResizeObserver(i),this.handleOpen=this.handleOpen.bind(this),this.handleDismiss=this.handleDismiss.bind(this),this.getBounds=this.getBounds.bind(this)}componentDidLoad(){var i;this.resizeObserver=this.resizeObserverFactory((()=>this.getBounds())),null!=this.rootRef&&this.resizeObserver.observe(this.rootRef),this.slotElement=(null===(i=this.hostElement.shadowRoot)||void 0===i?void 0:i.querySelector("slot"))||void 0,null!=this.value&&this.handleUpdateValue(this.value)}connectedCallback(){window.addEventListener("resize",this.getBounds)}disconnectedCallback(){var i;null===(i=this.resizeObserver)||void 0===i||i.disconnect(),window.removeEventListener("resize",this.getBounds),this.removeOptionListeners()}handleUpdateValue(i){null!=i&&i!==this.internalValue&&(this.internalValue=i,this.updateDisplayValue(i)),this.controlled=null!=i}render(){return s("div",{class:n("root",{disabled:this.disabled}),ref:i=>{this.rootRef=i},onClick:this.open||this.disabled?void 0:this.handleOpen},s("div",{class:n("target",{hidden:this.open,disabled:this.disabled})},this.displayValue||this.placeholder,s("div",{class:"icon"},s("vertex-icon",{name:"chevron-down",size:"sm"}))),s("vertex-popover",{position:this.position,open:this.open,animated:this.animated,resizeBehavior:"fixed",onDismissed:this.handleDismiss},s("div",{class:n("options",{hidden:!this.open,visible:this.open,animated:this.animated}),style:{minWidth:null!=this.width?`${this.width}px`:"var(--select-width)"}},s("div",{class:n("selected-option",{disabled:this.disabled}),onClick:this.handleDismiss},this.displayValue||this.placeholder,s("div",{class:"icon"},s("vertex-icon",{name:"chevron-down",size:"sm"}))),s("slot",null))))}handleOpen(){var i,t;null===(t=null===(i=this.slotElement)||void 0===i?void 0:i.assignedElements)||void 0===t||t.call(i).forEach((i=>{const t=()=>{var t;const s=i.getAttribute("data-value")||i.innerHTML,e=s!==this.internalValue;this.handleDismiss(),this.controlled||(this.displayValue=i.innerHTML,this.internalValue=s),e&&(null===(t=this.optionChanged)||void 0===t||t.emit(s))};i.addEventListener("click",t),this.removeListeners=[...this.removeListeners,()=>i.removeEventListener("click",t)]})),this.open=!0}handleDismiss(){this.removeOptionListeners(),this.open=!1}updateDisplayValue(i){var t,s;const e=null===(s=null===(t=this.slotElement)||void 0===t?void 0:t.assignedElements)||void 0===s?void 0:s.call(t).find((t=>t.getAttribute("data-value")===i||t.innerHTML===i));this.displayValue=null==e?void 0:e.innerHTML}removeOptionListeners(){this.removeListeners.forEach((i=>i())),this.removeListeners=[]}getBounds(){null!=this.getBoundsTimeout&&(clearTimeout(this.getBoundsTimeout),this.getBoundsTimeout=void 0),this.getBoundsTimeout=setTimeout((()=>{this.getBoundsTimeout=void 0,e((()=>{var i;const t=null===(i=this.rootRef)||void 0===i?void 0:i.getBoundingClientRect();null!=t&&(this.position={x:t.x,y:t.y},this.width=t.width)}))}),200)}get hostElement(){return o(this)}static get watchers(){return{value:["handleUpdateValue"]}}};r.style=":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}";export{r as S}
@@ -1 +0,0 @@
1
- import{r as t,e as n,h as e,H as i,g as o}from"./p-6834631c.js";import{c as r}from"./p-fe062eb0.js";const s=Math.min,a=Math.max,l=Math.round,c=Math.floor,u=t=>({x:t,y:t}),f={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function d(t,n,e){return a(t,s(n,e))}function m(t,n){return"function"==typeof t?t(n):t}function p(t){return t.split("-")[0]}function v(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function g(t){return"y"===t?"height":"width"}function w(t){return["top","bottom"].includes(p(t))?"y":"x"}function b(t){return y(w(t))}function x(t){return t.replace(/start|end/g,(t=>h[t]))}function A(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function k(t){const{x:n,y:e,width:i,height:o}=t;return{width:i,height:o,top:e,left:n,right:n+i,bottom:e+o,x:n,y:e}}function R(t,n,e){let{reference:i,floating:o}=t;const r=w(n),s=b(n),a=g(s),l=p(n),c="y"===r,u=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-o.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}switch(v(n)){case"start":d[s]-=h*(e&&c?-1:1);break;case"end":d[s]+=h*(e&&c?-1:1)}return d}async function S(t,n){var e;void 0===n&&(n={});const{x:i,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=m(n,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(d),v=a[h?"floating"===f?"reference":"floating":f],y=k(await r.getClippingRect({element:null==(e=await(null==r.isElement?void 0:r.isElement(v)))||e?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===f?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},x=k(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:(y.top-x.top+p.top)/b.y,bottom:(x.bottom-y.bottom+p.bottom)/b.y,left:(y.left-x.left+p.left)/b.x,right:(x.right-y.right+p.right)/b.x}}function P(t){return O(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function C(t){var n;return null==(n=(O(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function O(t){return t instanceof Node||t instanceof M(t).Node}function T(t){return t instanceof Element||t instanceof M(t).Element}function z(t){return t instanceof HTMLElement||t instanceof M(t).HTMLElement}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof M(t).ShadowRoot)}function F(t){const{overflow:n,overflowX:e,overflowY:i,display:o}=j(t);return/auto|scroll|overlay|hidden|clip/.test(n+i+e)&&!["inline","contents"].includes(o)}function B(t){return["table","td","th"].includes(P(t))}function E(t){const n=L(),e=j(t);return"none"!==e.transform||"none"!==e.perspective||!!e.containerType&&"normal"!==e.containerType||!n&&!!e.backdropFilter&&"none"!==e.backdropFilter||!n&&!!e.filter&&"none"!==e.filter||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function L(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(t){return["html","body","#document"].includes(P(t))}function j(t){return M(t).getComputedStyle(t)}function X(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(t){if("html"===P(t))return t;const n=t.assignedSlot||t.parentNode||D(t)&&t.host||C(t);return D(n)?n.host:n}function N(t){const n=Y(t);return $(n)?t.ownerDocument?t.ownerDocument.body:t.body:z(n)&&F(n)?n:N(n)}function I(t,n,e){var i;void 0===n&&(n=[]),void 0===e&&(e=!0);const o=N(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=M(o);return r?n.concat(s,s.visualViewport||[],F(o)?o:[],s.frameElement&&e?I(s.frameElement):[]):n.concat(o,I(o,[],e))}function V(t){const n=j(t);let e=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=z(t),r=o?t.offsetWidth:e,s=o?t.offsetHeight:i,a=l(e)!==r||l(i)!==s;return a&&(e=r,i=s),{width:e,height:i,$:a}}function q(t){return T(t)?t:t.contextElement}function H(t){const n=q(t);if(!z(n))return u(1);const e=n.getBoundingClientRect(),{width:i,height:o,$:r}=V(n);let s=(r?l(e.width):e.width)/i,a=(r?l(e.height):e.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const U=u(0);function J(t){const n=M(t);return L()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:U}function W(t,n,e,i){void 0===n&&(n=!1),void 0===e&&(e=!1);const o=t.getBoundingClientRect(),r=q(t);let s=u(1);n&&(i?T(i)&&(s=H(i)):s=H(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==M(t))&&n}(r,e,i)?J(r):u(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(r){const t=M(r),n=i&&T(i)?M(i):i;let e=t,o=e.frameElement;for(;o&&i&&n!==e;){const t=H(o),n=o.getBoundingClientRect(),i=j(o),r=n.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=n.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,h*=t.y,l+=r,c+=s,e=M(o),o=e.frameElement}}return k({width:f,height:h,x:l,y:c})}const _=[":popover-open",":modal"];function G(t){return _.some((n=>{try{return t.matches(n)}catch(t){return!1}}))}function K(t){return W(C(t)).left+X(t).scrollLeft}function Q(t,n,e){let i;if("viewport"===n)i=function(t,n){const e=M(t),i=C(t),o=e.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=L();(!t||t&&"fixed"===n)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,e);else if("document"===n)i=function(t){const n=C(t),e=X(t),i=t.ownerDocument.body,o=a(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),r=a(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let s=-e.scrollLeft+K(t);const l=-e.scrollTop;return"rtl"===j(i).direction&&(s+=a(n.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:l}}(C(t));else if(T(n))i=function(t,n){const e=W(t,!0,"fixed"===n),i=e.top+t.clientTop,o=e.left+t.clientLeft,r=z(t)?H(t):u(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(n,e);else{const e=J(t);i={...n,x:n.x-e.x,y:n.y-e.y}}return k(i)}function Z(t,n){const e=Y(t);return!(e===n||!T(e)||$(e))&&("fixed"===j(e).position||Z(e,n))}function tt(t,n,e){const i=z(n),o=C(n),r="fixed"===e,s=W(t,!0,r,n);let a={scrollLeft:0,scrollTop:0};const l=u(0);if(i||!i&&!r)if(("body"!==P(n)||F(o))&&(a=X(n)),i){const t=W(n,!0,r,n);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else o&&(l.x=K(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function nt(t){return"static"===j(t).position}function et(t,n){return z(t)&&"fixed"!==j(t).position?n?n(t):t.offsetParent:null}function it(t,n){const e=M(t);if(G(t))return e;if(!z(t)){let n=Y(t);for(;n&&!$(n);){if(T(n)&&!nt(n))return n;n=Y(n)}return e}let i=et(t,n);for(;i&&B(i)&&nt(i);)i=et(i,n);return i&&$(i)&&nt(i)&&!E(i)?e:i||function(t){let n=Y(t);for(;z(n)&&!$(n);){if(E(n))return n;n=Y(n)}return null}(t)||e}const ot={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=C(i),a=!!n&&G(n.floating);if(i===s||a&&r)return e;let l={scrollLeft:0,scrollTop:0},c=u(1);const f=u(0),h=z(i);if((h||!h&&!r)&&(("body"!==P(i)||F(s))&&(l=X(i)),z(i))){const t=W(i);c=H(i),f.x=t.x+i.clientLeft,f.y=t.y+i.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+f.x,y:e.y*c.y-l.scrollTop*c.y+f.y}},getDocumentElement:C,getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===e?G(n)?[]:function(t,n){const e=n.get(t);if(e)return e;let i=I(t,[],!1).filter((t=>T(t)&&"body"!==P(t))),o=null;const r="fixed"===j(t).position;let s=r?Y(t):t;for(;T(s)&&!$(s);){const n=j(s),e=E(s);e||"fixed"!==n.position||(o=null),(r?!e&&!o:!e&&"static"===n.position&&o&&["absolute","fixed"].includes(o.position)||F(s)&&!e&&Z(t,s))?i=i.filter((t=>t!==s)):o=n,s=Y(s)}return n.set(t,i),i}(n,this._c):[].concat(e),i],l=r.reduce(((t,e)=>{const i=Q(n,e,o);return t.top=a(i.top,t.top),t.right=s(i.right,t.right),t.bottom=s(i.bottom,t.bottom),t.left=a(i.left,t.left),t}),Q(n,r[0],o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:it,getElementRects:async function(t){const n=this.getOffsetParent||it,e=this.getDimensions,i=await e(t.floating);return{reference:tt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=V(t);return{width:n,height:e}},getScale:H,isElement:T,isRTL:function(t){return"rtl"===j(t).direction}};const rt=S,st=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:i,placement:o}=n,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=m(t,n),c={x:e,y:i},u=await S(n,l),f=w(p(o)),h=y(f);let v=c[h],g=c[f];r&&(v=d(v+u["y"===h?"top":"left"],v,v-u["y"===h?"bottom":"right"])),s&&(g=d(g+u["y"===f?"top":"left"],g,g-u["y"===f?"bottom":"right"]));const b=a.fn({...n,[h]:v,[f]:g});return{...b,data:{x:b.x-e,y:b.y-i}}}}},at=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=n,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0,...k}=m(t,n);if(null!=(e=r.arrow)&&e.alignmentOffset)return{};const R=p(o),P=p(a)===a,M=await(null==l.isRTL?void 0:l.isRTL(c.floating)),C=h||(P||!w?[A(a)]:function(t){const n=A(t);return[x(t),n,x(n)]}(a));h||"none"===y||C.push(...function(t,n,e,i){const o=v(t);let r=function(t,n,e){const i=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return e?n?o:i:n?i:o;case"left":case"right":return n?r:s;default:return[]}}(p(t),"start"===e,i);return o&&(r=r.map((t=>t+"-"+o)),n&&(r=r.concat(r.map(x)))),r}(a,w,y,M));const O=[a,...C],T=await S(n,k),z=[];let D=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&z.push(T[R]),f){const t=function(t,n,e){void 0===e&&(e=!1);const i=v(t),o=b(t),r=g(o);let s="x"===o?i===(e?"end":"start")?"right":"left":"start"===i?"bottom":"top";return n.reference[r]>n.floating[r]&&(s=A(s)),[s,A(s)]}(o,s,M);z.push(T[t[0]],T[t[1]])}if(D=[...D,{placement:o,overflows:z}],!z.every((t=>t<=0))){var F,B;const t=((null==(F=r.flip)?void 0:F.index)||0)+1,n=O[t];if(n)return{data:{index:t,overflows:D},reset:{placement:n}};let e=null==(B=D.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:B.placement;if(!e)switch(d){case"bestFit":{var E;const t=null==(E=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0];t&&(e=t);break}case"initialPlacement":e=a}if(o!==e)return{reset:{placement:e}}}return{}}}};function lt(t,n,e){return[(i=null!=t?t:4,void 0===i&&(i=0),{name:"offset",options:i,async fn(t){var n,e;const{x:o,y:r,placement:s,middlewareData:a}=t,l=await async function(t,n){const{placement:e,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=p(e),a=v(e),l="y"===w(e),c=["left","top"].includes(s)?-1:1,u=r&&l?-1:1,f=m(n,t);let{mainAxis:h,crossAxis:d,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof y&&(d="end"===a?-1*y:y),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}(t,i);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(e=a.arrow)&&e.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}),null==n&&at(e),st(),null!=n&&ct(n)].filter((t=>"boolean"!=typeof t));var i}function ct(t){return{name:"boundaryContain",fn:async n=>{const e=await rt(n,t);return{x:n.x+(e.left>0?e.left:0)-(e.right>0?e.right:0),y:n.y+(e.top>0?e.top:0)-(e.bottom>0?e.bottom:0)}}}}const ut=class{constructor(e){t(this,e),this.dismissed=n(this,"dismissed",7),this.shouldUpdatePosition=!1,this.middleware=[],this.partialWindow=window,this.open=!1,this.placement="bottom-start",this.position=void 0,this.anchorBounds=void 0,this.backdrop=!0,this.animated=!1,this.anchorSelector=void 0,this.boundarySelector=void 0,this.resizeBehavior="dynamic",this.overflowBehavior=void 0,this.flipBehavior=void 0,this.offsetBehavior=void 0,this.updateOnResize=!1,this.opened=!1,this.computedPlacement=this.placement,this.updateListener=this.updateListener.bind(this),this.handlePositionUpdate=this.handlePositionUpdate.bind(this),this.handleResize=this.handleResize.bind(this),this.setWindow=this.setWindow.bind(this)}connectedCallback(){this.updatePosition(this.position)}componentDidUpdate(){this.shouldUpdatePosition&&(this.shouldUpdatePosition=!1,null!=this.updateDispose?this.handlePositionUpdate():this.updateListener())}componentDidLoad(){this.updateViewport(),this.handleMiddlewareChange(),this.updateListener(),"dynamic"===this.resizeBehavior&&window.addEventListener("resize",this.handleResize)}disconnectedCallback(){this.viewportWidth=void 0,this.viewportHeight=void 0,this.opened=!1,"dynamic"===this.resizeBehavior&&window.removeEventListener("resize",this.handleResize)}updatePosition(t){null!=t&&(this.anchorPosition="object"==typeof t?t:JSON.parse(t),this.shouldUpdatePosition=!0)}updatePlacement(){this.updatePosition(this.position)}updateOpened(t){t&&(this.opened=!0),this.updateListener()}updateAnimated(){this.opened=this.open}updateMiddleware(){this.handleMiddlewareChange()}setWindow(t){this.partialWindow=t}render(){var t,n;return e(i,null,this.open&&this.backdrop&&e("div",{class:"backdrop",onPointerDown:()=>{this.open=!1,this.dismissed.emit()}}),this.anchorPosition&&e("div",{ref:t=>this.anchorPointRef=t,class:"anchor",style:{left:`${(null===(t=this.anchorPosition)||void 0===t?void 0:t.x)||0}px`,top:`${(null===(n=this.anchorPosition)||void 0===n?void 0:n.y)||0}px`}}),e("slot",{name:"anchor"}),e("div",{ref:t=>this.wrapperRef=t,class:r("popper",{hidden:!this.open,open:this.open})},e("div",{class:r("content",{"hidden-animated":!this.open&&this.opened&&this.animated,"open-animated":this.open&&this.animated},this.getTransformClass()),onAnimationEnd:()=>{this.opened=this.open}},e("slot",null))))}updateListener(){var t,n,e,i;const o=null!==(n=null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.anchorPointRef)&&void 0!==n?n:this.getAnchorBoundsVirtualElement();this.open&&null!=o&&null!=this.wrapperRef?(null===(e=this.updateDispose)||void 0===e||e.call(this),this.updateDispose=function(t,n,e,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=i,h=q(t),d=o||r?[...h?I(h):[],...I(n)]:[];d.forEach((t=>{o&&t.addEventListener("scroll",e,{passive:!0}),r&&t.addEventListener("resize",e)}));const m=h&&u?function(t,n){let e,i=null;const o=C(t);function r(){var t;clearTimeout(e),null==(t=i)||t.disconnect(),i=null}return function l(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),r();const{left:h,top:d,width:m,height:p}=t.getBoundingClientRect();if(u||n(),!m||!p)return;const v={rootMargin:-c(d)+"px "+-c(o.clientWidth-(h+m))+"px "+-c(o.clientHeight-(d+p))+"px "+-c(h)+"px",threshold:a(0,s(1,f))||1};let y=!0;function g(t){const n=t[0].intersectionRatio;if(n!==f){if(!y)return l();n?l(!1,n):e=setTimeout((()=>{l(!1,1e-7)}),1e3)}y=!1}try{i=new IntersectionObserver(g,{...v,root:o.ownerDocument})}catch(t){i=new IntersectionObserver(g,v)}i.observe(t)}(!0),r}(h,e):null;let p,v=-1,y=null;l&&(y=new ResizeObserver((t=>{let[i]=t;i&&i.target===h&&y&&(y.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(n)}))),e()})),h&&!f&&y.observe(h),y.observe(n));let g=f?W(t):null;return f&&function n(){const i=W(t);!g||i.x===g.x&&i.y===g.y&&i.width===g.width&&i.height===g.height||e(),g=i,p=requestAnimationFrame(n)}(),e(),()=>{var t;d.forEach((t=>{o&&t.removeEventListener("scroll",e),r&&t.removeEventListener("resize",e)})),null==m||m(),null==(t=y)||t.disconnect(),y=null,f&&cancelAnimationFrame(p)}}(o,this.wrapperRef,this.handlePositionUpdate),this.handlePositionUpdate()):null===(i=this.updateDispose)||void 0===i||i.call(this)}async handlePositionUpdate(){var t,n,e;const i=null!==(n=null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.anchorPointRef)&&void 0!==n?n:this.getAnchorBoundsVirtualElement();if(null!=i&&null!=this.wrapperRef){const t=await async function(t,n,e,i){return await((t,n,e)=>{const i=new Map,o={platform:ot,...e},r={...o.platform,_c:i};return(async(t,n,e)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=e,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(n));let c=await s.getElementRects({reference:t,floating:n,strategy:o}),{x:u,y:f}=R(c,i,l),h=i,d={},m=0;for(let e=0;e<a.length;e++){const{name:r,fn:p}=a[e],{x:v,y,data:g,reset:w}=await p({x:u,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:n}});u=null!=v?v:u,f=null!=y?y:f,d={...d,[r]:{...d[r],...g}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(c=!0===w.rects?await s.getElementRects({reference:t,floating:n,strategy:o}):w.rects),({x:u,y:f}=R(c,h,l))),e=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}})(t,n,{...o,platform:r})})(t,n,{placement:e,middleware:i,strategy:"fixed"})}(i,this.wrapperRef,this.placement,this.middleware);this.computedPlacement=t.placement,null===(e=this.wrapperRef)||void 0===e||e.setAttribute("style",`left: ${t.x}px; top: ${t.y}px;`)}}handleMiddlewareChange(){var t,n,e;const i=null!=(null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.getAnchorBoundsVirtualElement())?4:0,o=null!=this.boundarySelector&&null!==(n=document.querySelector(this.boundarySelector))&&void 0!==n?n:void 0;this.middleware=lt(null!==(e=this.offsetBehavior)&&void 0!==e?e:i,null!=o?Object.assign({boundary:o},this.overflowBehavior):this.overflowBehavior,this.flipBehavior),this.updateListener()}getSlottedAnchorElement(){var t,n,e;if(null!=this.anchorSelector)return(null===(t=this.hostElement.shadowRoot)||void 0===t?void 0:t.querySelector(this.anchorSelector))||this.hostElement.querySelector(this.anchorSelector)||void 0;{const t=(null===(n=this.hostElement.shadowRoot)||void 0===n?void 0:n.querySelector('slot[name="anchor"]'))||void 0;if(null===(e=null==t?void 0:t.assignedElements)||void 0===e?void 0:e.call(t).length)return null==t?void 0:t.assignedElements()[0]}}getAnchorBoundsVirtualElement(){if(null!=this.anchorBounds)return{getBoundingClientRect:()=>DOMRect.fromRect(this.anchorBounds)}}handleResize(){null!=this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.open&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=void 0,null!=this.anchorPosition&&null!=this.viewportWidth&&null!=this.viewportHeight&&(this.position={x:this.partialWindow.innerWidth*(this.anchorPosition.x/this.viewportWidth),y:this.partialWindow.innerHeight*(this.anchorPosition.y/this.viewportHeight)}),this.updateViewport()}),200))}updateViewport(){this.viewportWidth=this.partialWindow.innerWidth,this.viewportHeight=this.partialWindow.innerHeight}getTransformClass(){if(this.animated)switch(this.computedPlacement){case"top":return"center-bottom";case"top-start":case"right-end":return"left-bottom";case"top-end":case"left-end":return"right-bottom";case"bottom":return"center-top";case"bottom-start":case"right-start":return"left-top";case"bottom-end":case"left-start":return"right-top";case"right":return"left-center";case"left":return"right-center"}}get hostElement(){return o(this)}static get watchers(){return{position:["updatePosition"],placement:["updatePlacement"],open:["updateOpened"],animated:["updateAnimated"],boundarySelector:["updateMiddleware"],overflowBehavior:["updateMiddleware"],flipBehavior:["updateMiddleware"],offsetBehavior:["updateMiddleware"]}}};ut.style=":host{--open-animation-name:open-scale-all;--open-animation:var(--open-animation-name) 0.1s ease-out 1;--close-animation-name:close-scale-all;--close-animation:var(--close-animation-name) 0.2s ease-in-out 1;--transform-origin:var(--none)}.open-animated{animation:var(--open-animation)}.hidden-animated{animation:var(--close-animation)}.hidden>.content{opacity:0;width:0;height:0;visibility:hidden}.hidden{pointer-events:none}.open{z-index:var(--vertex-ui-context-menu-layer)}.anchor{position:fixed}.backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:var(--backdrop-color, white);opacity:var(--backdrop-opacity, 0);z-index:var(--vertex-ui-context-menu-layer)}.popper{position:fixed}.center-bottom{transform-origin:var(--transform-origin, center bottom)}.left-bottom{transform-origin:var(--transform-origin, left bottom)}.right-bottom{transform-origin:var(--transform-origin, right bottom)}.center-top{transform-origin:var(--transform-origin, center top)}.left-top{transform-origin:var(--transform-origin, left top)}.right-top{transform-origin:var(--transform-origin, right top)}.left-center{transform-origin:var(--transform-origin, left center)}.left-top{transform-origin:var(--transform-origin, left top)}.left-bottom{transform-origin:var(--transform-origin, left bottom)}.right-center{transform-origin:var(--transform-origin, right center)}.right-top{transform-origin:var(--transform-origin, right top)}.right-bottom{transform-origin:var(--transform-origin, right bottom)}@keyframes open-fade-in{from{opacity:0}to{opacity:1}}@keyframes close-fade-out{from{visibility:visible;height:auto;width:auto;opacity:1}to{opacity:0;height:auto;width:auto}}@keyframes open-scale-all{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes close-scale-all{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scale(1)}to{opacity:0;height:auto;width:auto;transform:scale(0)}}@keyframes open-scale-y{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@keyframes close-scale-y{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scaleY(1)}to{opacity:0;height:auto;width:auto;transform:scaleY(0)}}@keyframes open-scale-x{from{opacity:0;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}@keyframes close-scale-x{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scaleX(1)}to{opacity:0;height:auto;width:auto;transform:scaleX(0)}}";export{ut as P}
@@ -1 +0,0 @@
1
- export{I as vertex_icon}from"./p-ca52a423.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-03dbb28c.js";
@@ -1 +0,0 @@
1
- export{C as vertex_color_circle_picker}from"./p-9374ef6c.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- import{r as e,e as t,h as i,H as s}from"./p-6834631c.js";import{c as o}from"./p-fe062eb0.js";const r=class{constructor(i){e(this,i),this.valueInput=t(this,"valueInput",7),this.valueChanged=t(this,"valueChanged",7),this.handleInput=e=>{this.value=e.target.value||""},this.handleChange=()=>{this.valueChanged.emit(this.value)},this.value=void 0,this.disabled=!1}valueChange(){this.valueInput.emit(this.value)}render(){return i(s,null,i("label",{class:o("color-picker",{disabled:this.disabled})},i("input",{type:"color",class:"input","data-testid":"input",disabled:this.disabled,value:this.value,onInput:this.handleInput,onChange:this.handleChange}),i("div",{class:"selected",style:{"background-color":this.value},title:this.value}),i("div",{class:"handle"},i("slot",{name:"handle-icon"},i("vertex-icon",{name:"chevron-down",size:"sm"})))))}static get watchers(){return{value:["valueChange"]}}};r.style=":host{--selected-color-width:30px;--selected-color-height:30px}.color-picker{display:inline-flex;position:relative;background:var(--vertex-ui-neutral-200);border-radius:4px;cursor:pointer}.color-picker.disabled{opacity:0.5;cursor:default}.selected{height:var(--selected-color-height);width:var(--selected-color-width);box-sizing:content-box;border:1px solid var(--vertex-ui-neutral-300);border-radius:4px}.handle{display:flex;align-items:center;padding:0 3px}.input{position:absolute;pointer-events:none;height:100%;width:100%;left:0;top:0;opacity:0}";export{r as C}
@@ -1 +0,0 @@
1
- export{S as vertex_search_bar}from"./p-4224c2ad.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-1356f525.js";import"./p-59032668.js";
@@ -1 +0,0 @@
1
- import{r as t,e as s,h as i,g as h}from"./p-6834631c.js";import{c as e}from"./p-fe062eb0.js";const l=class{constructor(i){t(this,i),this.inputFocus=s(this,"inputFocus",7),this.inputBlur=s(this,"inputBlur",7),this.inputInput=s(this,"inputInput",7),this.inputChange=s(this,"inputChange",7),this.textFieldKeyDown=s(this,"textFieldKeyDown",7),this.inputAutofill=s(this,"inputAutofill",7),this.handleFocus=t=>{this.inputFocus.emit(t)},this.handleBlur=t=>{this.inputBlur.emit(t)},this.handleKeyDown=t=>{"Enter"===t.key&&null!=this.nearbyForm?this.nearbyForm.dispatchEvent(new CustomEvent("submit",{bubbles:!0,cancelable:!0})):this.textFieldKeyDown.emit(t)},this.handleChanged=()=>{this.inputChange.emit({value:this.nativeInput.value})},this.handleInput=()=>{this.inputInput.emit({value:this.nativeInput.value})},this.type="text",this.name=void 0,this.variant="standard",this.fontSize="standard",this.multiline=!1,this.minRows=1,this.maxRows=void 0,this.placeholder=void 0,this.autoFocus=void 0,this.autoComplete=void 0,this.autoCorrect=void 0,this.value="",this.disabled=void 0,this.hasError=void 0}componentDidLoad(){var t;this.autoFocus&&(null===(t=this.nativeInput)||void 0===t||t.focus())}async updateInput(t){null!=this.nativeInput&&(this.nativeInput.value=t)}async blurInput(){var t;null===(t=this.nativeInput)||void 0===t||t.blur()}async getInputValue(){return this.nativeInput.value}async selectAll(){this.nativeInput.select()}render(){var t;const s=e("txt-wrapper",{"txt-standard":"standard"===this.variant,"txt-filled":"filled"===this.variant,"txt-underlined":"underlined"===this.variant,"txt-blank":"blank"===this.variant,"txt-size-standard":"standard"===this.fontSize,"txt-size-sm":"sm"===this.fontSize,"txt-size-md":"md"===this.fontSize,"txt-size-lg":"lg"===this.fontSize,"txt-size-xl":"xl"===this.fontSize,"txt-size-xxl":"xxl"===this.fontSize,disabled:this.disabled,"has-error":this.hasError}),h={class:"txt","data-testid":"text-field",name:this.name,ref:t=>{null!=t&&(this.nativeInput=t)},autoComplete:this.autoComplete,autoFocus:this.autoFocus,disabled:this.disabled,placeholder:this.placeholder,value:this.value||"",onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onInput:this.handleInput,onChange:this.handleChanged,onAnimationStart:t=>{["onAutoFillStart","onAutoFillCancel"].includes(t.animationName)&&this.inputAutofill.emit({value:this.nativeInput.value})}};return i("div",{class:s},i("div",{class:"txt-slot"},i("slot",{name:"left"})),this.multiline?i("vertex-auto-resize-textarea",{maxRows:this.maxRows,minRows:this.minRows,initialValue:(null===(t=this.value)||void 0===t?void 0:t.toString())||""},i("textarea",Object.assign({},h,{class:e(h.class,"txt-textarea",s),rows:this.minRows}))):i("input",Object.assign({},h,{type:this.type})),i("div",{class:"txt-slot"},i("slot",{name:"right"})))}connectedCallback(){null!=this.hostElement&&(this.nearbyForm=this.hostElement.closest("form"))}get hostElement(){return h(this)}};export{l as T}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as s}from"./p-6834631c.js";const h=class{constructor(e){t(this,e),this.color="#ffffff",this.supplementalColor=void 0,this.theme="dark",this.lightenPercentage=.25,this.darkenPercentage=.25,this.lightened=this.adjustColor(this.color,-this.lightenPercentage),this.darkened=this.adjustColor(this.color,this.darkenPercentage)}handleColorChanged(t){this.lightened=this.adjustColor(t,-this.lightenPercentage),this.darkened=this.adjustColor(t,this.darkenPercentage)}handleLightenPercentageChanged(t){this.lightened=this.adjustColor(this.color,-t)}handleDarkenPercentageChanged(t){this.darkened=this.adjustColor(this.color,t)}render(){const t=null!=this.supplementalColor&&this.supplementalColor.length>0?this.supplementalColor:"dark"===this.theme?this.darkened:this.lightened;return e(s,null,e("div",{class:"root",style:"dark"===this.theme?{backgroundColor:this.color,borderColor:t}:{backgroundColor:t,borderColor:this.color}}))}adjustColor(t,e){if(t.startsWith("#")&&7===t.length){const s=Number(`0x${t.slice(1,3)}`),h=Number(`0x${t.slice(3,5)}`),r=Number(`0x${t.slice(5,7)}`);return`#${this.padHexComponent(this.adjustComponent(s,e).toString(16))}${this.padHexComponent(this.adjustComponent(h,e).toString(16))}${this.padHexComponent(this.adjustComponent(r,e).toString(16))}`}return t}adjustComponent(t,e){return Math.max(0,Math.min(255,Math.floor(t-Math.floor((e<0?255-t:255)*e))))}padHexComponent(t){return`${"0".repeat(2-t.length)}${t}`}static get watchers(){return{color:["handleColorChanged"],lightenPercentage:["handleLightenPercentageChanged"],darkenPercentage:["handleDarkenPercentageChanged"]}}};h.style=":host{display:flex;--circle-size:24px}.root{border-radius:100%;border-width:2px;border-style:solid;width:var(--circle-size);height:var(--circle-size);box-sizing:border-box}";export{h as C}
@@ -1 +0,0 @@
1
- export{P as vertex_popover}from"./p-6505cdb3.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- export{S as vertex_select}from"./p-552c128f.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- import{r as t,h as n,H as r,g as e}from"./p-6834631c.js";import{_ as i,a as o}from"./p-59032668.js";import{c as u}from"./p-fe062eb0.js";import{a as s}from"./p-b2c7b113.js";var c;c=Error,i((function t(n){var r=c.call(this,"Validation error mapping object.")||this;return r.errors=n,Object.setPrototypeOf(r,t.prototype),r}),c);var f,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h={exports:{}};!function(t,n){var r="__lodash_hash_undefined__",e=9007199254740991,i="[object Arguments]",o="[object Array]",u="[object Boolean]",s="[object Date]",c="[object Error]",f="[object Function]",h="[object Map]",l="[object Number]",v="[object Object]",d="[object Promise]",p="[object RegExp]",b="[object Set]",y="[object String]",g="[object WeakMap]",j="[object ArrayBuffer]",m="[object DataView]",w=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[i]=_[o]=_[j]=_[u]=_[m]=_[s]=_[c]=_[f]=_[h]=_[l]=_[v]=_[p]=_[b]=_[y]=_[g]=!1;var B="object"==typeof a&&a&&a.Object===Object&&a,I="object"==typeof self&&self&&self.Object===Object&&self,O=B||I||Function("return this")(),E=n&&!n.nodeType&&n,A=E&&t&&!t.nodeType&&t,P=A&&A.exports===E,$=P&&B.process,k=function(){try{return $&&$.binding&&$.binding("util")}catch(t){}}(),S=k&&k.isTypedArray;function C(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1}function T(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function M(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}var U,D,F,L=Array.prototype,V=Object.prototype,R=O["__core-js_shared__"],N=Function.prototype.toString,W=V.hasOwnProperty,z=(U=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",G=V.toString,H=RegExp("^"+N.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=P?O.Buffer:void 0,J=O.Symbol,K=O.Uint8Array,Q=V.propertyIsEnumerable,X=L.splice,Y=J?J.toStringTag:void 0,Z=Object.getOwnPropertySymbols,tt=q?q.isBuffer:void 0,nt=(D=Object.keys,F=Object,function(t){return D(F(t))}),rt=Et(O,"DataView"),et=Et(O,"Map"),it=Et(O,"Promise"),ot=Et(O,"Set"),ut=Et(O,"WeakMap"),st=Et(Object,"create"),ct=kt(rt),ft=kt(et),at=kt(it),ht=kt(ot),lt=kt(ut),vt=J?J.prototype:void 0,dt=vt?vt.valueOf:void 0;function pt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function bt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function yt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function gt(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new yt;++n<r;)this.add(t[n])}function jt(t){var n=this.__data__=new bt(t);this.size=n.size}function mt(t,n){for(var r=t.length;r--;)if(St(t[r][0],n))return r;return-1}function wt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Y&&Y in Object(t)?function(t){var n=W.call(t,Y),r=t[Y];try{t[Y]=void 0;var e=!0}catch(t){}var i=G.call(t);return e&&(n?t[Y]=r:delete t[Y]),i}(t):function(t){return G.call(t)}(t)}function xt(t){return Lt(t)&&wt(t)==i}function _t(t,n,r,e,f){return t===n||(null==t||null==n||!Lt(t)&&!Lt(n)?t!=t&&n!=n:function(t,n,r,e,f,a){var d=Tt(t),g=Tt(n),w=d?o:Pt(t),x=g?o:Pt(n),_=(w=w==i?v:w)==v,B=(x=x==i?v:x)==v,I=w==x;if(I&&Mt(t)){if(!Mt(n))return!1;d=!0,_=!1}if(I&&!_)return a||(a=new jt),d||Vt(t)?Bt(t,n,r,e,f,a):function(t,n,r,e,i,o,f){switch(r){case m:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case j:return!(t.byteLength!=n.byteLength||!o(new K(t),new K(n)));case u:case s:case l:return St(+t,+n);case c:return t.name==n.name&&t.message==n.message;case p:case y:return t==n+"";case h:var a=T;case b:if(a||(a=M),t.size!=n.size&&!(1&e))return!1;var v=f.get(t);if(v)return v==n;e|=2,f.set(t,n);var d=Bt(a(t),a(n),e,i,o,f);return f.delete(t),d;case"[object Symbol]":if(dt)return dt.call(t)==dt.call(n)}return!1}(t,n,w,r,e,f,a);if(!(1&r)){var O=_&&W.call(t,"__wrapped__"),E=B&&W.call(n,"__wrapped__");if(O||E){var A=O?t.value():t,P=E?n.value():n;return a||(a=new jt),f(A,P,r,e,a)}}return!!I&&(a||(a=new jt),function(t,n,r,e,i,o){var u=1&r,s=It(t),c=s.length;if(c!=It(n).length&&!u)return!1;for(var f=c;f--;){var a=s[f];if(!(u?a in n:W.call(n,a)))return!1}var h=o.get(t);if(h&&o.get(n))return h==n;var l=!0;o.set(t,n),o.set(n,t);for(var v=u;++f<c;){var d=t[a=s[f]],p=n[a];if(e)var b=u?e(p,d,a,n,t,o):e(d,p,a,t,n,o);if(!(void 0===b?d===p||i(d,p,r,e,o):b)){l=!1;break}v||(v="constructor"==a)}if(l&&!v){var y=t.constructor,g=n.constructor;y==g||!("constructor"in t)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(l=!1)}return o.delete(t),o.delete(n),l}(t,n,r,e,f,a))}(t,n,r,e,_t,f))}function Bt(t,n,r,e,i,o){var u=1&r,s=t.length,c=n.length;if(s!=c&&!(u&&c>s))return!1;var f=o.get(t);if(f&&o.get(n))return f==n;var a=-1,h=!0,l=2&r?new gt:void 0;for(o.set(t,n),o.set(n,t);++a<s;){var v=t[a],d=n[a];if(e)var p=u?e(d,v,a,n,t,o):e(v,d,a,t,n,o);if(void 0!==p){if(p)continue;h=!1;break}if(l){if(!C(n,(function(t,n){if(!l.has(n)&&(v===t||i(v,t,r,e,o)))return l.push(n)}))){h=!1;break}}else if(v!==d&&!i(v,d,r,e,o)){h=!1;break}}return o.delete(t),o.delete(n),h}function It(t){return function(t,n,r){var e=n(t);return Tt(t)?e:function(t,n){for(var r=-1,e=n.length,i=t.length;++r<e;)t[i+r]=n[r];return t}(e,r(t))}(t,Rt,At)}function Ot(t,n){var r,e,i=t.__data__;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?i["string"==typeof n?"string":"hash"]:i.map}function Et(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return function(t){return!(!Ft(t)||function(t){return!!z&&z in t}(t))&&(Ut(t)?H:w).test(kt(t))}(r)?r:void 0}pt.prototype.clear=function(){this.__data__=st?st(null):{},this.size=0},pt.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},pt.prototype.get=function(t){var n=this.__data__;if(st){var e=n[t];return e===r?void 0:e}return W.call(n,t)?n[t]:void 0},pt.prototype.has=function(t){var n=this.__data__;return st?void 0!==n[t]:W.call(n,t)},pt.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=st&&void 0===n?r:n,this},bt.prototype.clear=function(){this.__data__=[],this.size=0},bt.prototype.delete=function(t){var n=this.__data__,r=mt(n,t);return!(r<0||(r==n.length-1?n.pop():X.call(n,r,1),--this.size,0))},bt.prototype.get=function(t){var n=this.__data__,r=mt(n,t);return r<0?void 0:n[r][1]},bt.prototype.has=function(t){return mt(this.__data__,t)>-1},bt.prototype.set=function(t,n){var r=this.__data__,e=mt(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this},yt.prototype.clear=function(){this.size=0,this.__data__={hash:new pt,map:new(et||bt),string:new pt}},yt.prototype.delete=function(t){var n=Ot(this,t).delete(t);return this.size-=n?1:0,n},yt.prototype.get=function(t){return Ot(this,t).get(t)},yt.prototype.has=function(t){return Ot(this,t).has(t)},yt.prototype.set=function(t,n){var r=Ot(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},gt.prototype.add=gt.prototype.push=function(t){return this.__data__.set(t,r),this},gt.prototype.has=function(t){return this.__data__.has(t)},jt.prototype.clear=function(){this.__data__=new bt,this.size=0},jt.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},jt.prototype.get=function(t){return this.__data__.get(t)},jt.prototype.has=function(t){return this.__data__.has(t)},jt.prototype.set=function(t,n){var r=this.__data__;if(r instanceof bt){var e=r.__data__;if(!et||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new yt(e)}return r.set(t,n),this.size=r.size,this};var At=Z?function(t){return null==t?[]:(t=Object(t),function(n){for(var r=-1,e=null==n?0:n.length,i=0,o=[];++r<e;){var u=n[r];Q.call(t,u)&&(o[i++]=u)}return o}(Z(t)))}:function(){return[]},Pt=wt;function $t(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||x.test(t))&&t>-1&&t%1==0&&t<n}function kt(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function St(t,n){return t===n||t!=t&&n!=n}(rt&&Pt(new rt(new ArrayBuffer(1)))!=m||et&&Pt(new et)!=h||it&&Pt(it.resolve())!=d||ot&&Pt(new ot)!=b||ut&&Pt(new ut)!=g)&&(Pt=function(t){var n=wt(t),r=n==v?t.constructor:void 0,e=r?kt(r):"";if(e)switch(e){case ct:return m;case ft:return h;case at:return d;case ht:return b;case lt:return g}return n});var Ct=xt(function(){return arguments}())?xt:function(t){return Lt(t)&&W.call(t,"callee")&&!Q.call(t,"callee")},Tt=Array.isArray,Mt=tt||function(){return!1};function Ut(t){if(!Ft(t))return!1;var n=wt(t);return n==f||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}function Ft(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function Lt(t){return null!=t&&"object"==typeof t}var Vt=S?function(t){return function(n){return t(n)}}(S):function(t){return Lt(t)&&Dt(t.length)&&!!_[wt(t)]};function Rt(t){return null!=(n=t)&&Dt(n.length)&&!Ut(n)?function(t,n){var r=Tt(t),e=!r&&Ct(t),i=!r&&!e&&Mt(t),o=!r&&!e&&!i&&Vt(t),u=r||e||i||o,s=u?function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}(t.length,String):[],c=s.length;for(var f in t)!n&&!W.call(t,f)||u&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||$t(f,c))||s.push(f);return s}(t):function(t){if((n=t)!==("function"==typeof(r=n&&n.constructor)&&r.prototype||V))return nt(t);var n,r,e=[];for(var i in Object(t))W.call(t,i)&&"constructor"!=i&&e.push(i);return e}(t);var n}t.exports=function(t,n){return _t(t,n)}}(h,h.exports);var l=new Uint8Array(16);function v(){if(!f&&!(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(l)}var d=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function p(t){return"string"==typeof t&&d.test(t)}for(var b=[],y=0;y<256;++y)b.push((y+256).toString(16).substr(1));function g(t,n,r){var e=(t=t||{}).random||(t.rng||v)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,n){r=r||0;for(var i=0;i<16;++i)n[r+i]=e[i];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(b[t[n+0]]+b[t[n+1]]+b[t[n+2]]+b[t[n+3]]+"-"+b[t[n+4]]+b[t[n+5]]+"-"+b[t[n+6]]+b[t[n+7]]+"-"+b[t[n+8]]+b[t[n+9]]+"-"+b[t[n+10]]+b[t[n+11]]+b[t[n+12]]+b[t[n+13]]+b[t[n+14]]+b[t[n+15]]).toLowerCase();if(!p(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var j=Object.freeze({__proto__:null,create:function(){return g()},fromMsbLsb:function(t,n){function r(t,n){var r=BigInt(1)<<n*BigInt(4);return(r|t&r-BigInt(1)).toString(16).substring(1)}var e="string"==typeof t?BigInt(t):t,i="string"==typeof n?BigInt(n):n,o=r(e>>BigInt(32),BigInt(8)),u=r(e>>BigInt(16),BigInt(4)),s=r(e,BigInt(4)),c=r(i>>BigInt(48),BigInt(4)),f=r(i,BigInt(12));return"".concat(o,"-").concat(u,"-").concat(s,"-").concat(c,"-").concat(f)},toMsbLsb:function(t){var n=o(t.split("-"),5),r=n[0],e=n[1],i=n[2],u=n[3],s=n[4];if(null==r||null==e||null==i||null==u||null==s)throw new Error("Invalid UUID string ".concat(t));var c=BigInt.asIntN(64,BigInt("0x".concat(r+e+i))),f=BigInt.asIntN(64,BigInt("0x".concat(u+s)));return{msb:c.toString(),lsb:f.toString()}}});const m=class{constructor(n){t(this,n),this.content=void 0,this.disabled=void 0,this.placement="bottom",this.delay=500,this.animated=!0,this.open=!1,this.handlePointerEnter=this.handlePointerEnter.bind(this),this.handlePointerLeave=this.handlePointerLeave.bind(this),this.tooltipId=`vertex-tooltip-${j.create()}`}disconnectedCallback(){this.removeElement(),this.clearOpenTimeout()}render(){return n(r,null,n("div",{class:"target",ref:t=>{this.targetElement=t},onPointerEnter:this.handlePointerEnter,onPointerLeave:this.handlePointerLeave},n("slot",null)),n("div",{class:"content-hidden",ref:t=>{this.contentElement=t}},n("slot",{name:"content"})))}addElement(){var t;if(null!=this.targetElement){const n=this.createPopoverElement(this.targetElement),r=this.createContentElement();this.displayedSlottedContent=null!==(t=s(this.contentElement))&&void 0!==t?t:this.displayedSlottedContent,null!=this.content?r.innerText=this.content:null!=this.displayedSlottedContent&&r.appendChild(this.displayedSlottedContent),n.appendChild(r),this.hostElement.ownerDocument.body.appendChild(n)}}removeElement(){const t=this.hostElement.ownerDocument.getElementById(this.tooltipId);null!=t&&t.remove()}createPopoverElement(t){const n=this.hostElement.ownerDocument.createElement("vertex-popover");return n.id=this.tooltipId,n.setAttribute("class","vertex-tooltip-popover"),n.open=this.open,n.resizeBehavior="fixed",n.backdrop=!1,n.placement=this.placement,n.animated=this.animated,n.anchorBounds=t.getBoundingClientRect(),n}createContentElement(){const t=this.hostElement.ownerDocument.createElement("div");return t.setAttribute("class",u("vertex-tooltip-content",{hidden:!this.open||this.disabled})),t}handlePointerEnter(){null!=this.openTimeout||this.disabled||(this.openTimeout=setTimeout((()=>{this.open=!0,this.openTimeout=void 0,this.addElement()}),this.delay))}handlePointerLeave(){this.clearOpenTimeout(),this.removeElement(),this.open=!1}clearOpenTimeout(){null!=this.openTimeout&&(clearTimeout(this.openTimeout),this.openTimeout=void 0)}get hostElement(){return e(this)}};m.style=":host{--tooltip-width:auto;--tooltip-white-space:normal;display:flex}.popover{width:100%;height:100%}.target{display:flex;width:100%;height:100%}.content-hidden{display:none}.tooltip{display:flex;justify-content:center;text-align:center;width:var(--tooltip-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-xxs);background-color:var(--vertex-ui-neutral-700);color:var(--vertex-ui-white);padding:0.25rem 0.5rem;border-radius:4px;pointer-events:none;white-space:var(--tooltip-white-space);user-select:none}.tooltip.hidden{display:none}";export{m as T}
@@ -1 +0,0 @@
1
- export{I as vertex_icon_button}from"./p-103249b4.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-03dbb28c.js";
@@ -1,35 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, H as Host } from './index-72f28b71.js';
2
- import { c as classnames } from './index-9c609209.js';
3
-
4
- const colorPickerCss = ":host{--selected-color-width:30px;--selected-color-height:30px}.color-picker{display:inline-flex;position:relative;background:var(--vertex-ui-neutral-200);border-radius:4px;cursor:pointer}.color-picker.disabled{opacity:0.5;cursor:default}.selected{height:var(--selected-color-height);width:var(--selected-color-width);box-sizing:content-box;border:1px solid var(--vertex-ui-neutral-300);border-radius:4px}.handle{display:flex;align-items:center;padding:0 3px}.input{position:absolute;pointer-events:none;height:100%;width:100%;left:0;top:0;opacity:0}";
5
-
6
- const ColorPicker = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.valueInput = createEvent(this, "valueInput", 7);
10
- this.valueChanged = createEvent(this, "valueChanged", 7);
11
- this.handleInput = (event) => {
12
- const input = event.target;
13
- this.value = input.value || '';
14
- };
15
- this.handleChange = (event) => {
16
- this.valueChanged.emit(this.value);
17
- };
18
- this.value = undefined;
19
- this.disabled = false;
20
- }
21
- valueChange() {
22
- this.valueInput.emit(this.value);
23
- }
24
- render() {
25
- return (h(Host, null, h("label", { class: classnames('color-picker', { disabled: this.disabled }) }, h("input", { type: "color", class: "input", "data-testid": "input", disabled: this.disabled, value: this.value, onInput: this.handleInput, onChange: this.handleChange }), h("div", { class: "selected", style: {
26
- 'background-color': this.value,
27
- }, title: this.value }), h("div", { class: "handle" }, h("slot", { name: "handle-icon" }, h("vertex-icon", { name: "chevron-down", size: "sm" }))))));
28
- }
29
- static get watchers() { return {
30
- "value": ["valueChange"]
31
- }; }
32
- };
33
- ColorPicker.style = colorPickerCss;
34
-
35
- export { ColorPicker as C };
@@ -1,288 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, H as Host, g as getElement } from './index-72f28b71.js';
2
- import { c as classnames } from './index-9c609209.js';
3
- import { g as generateInstanceFromTemplate } from './templates-797420bf.js';
4
-
5
- const getWindowSelection = () => {
6
- if (typeof window !== 'undefined') {
7
- return window.getSelection();
8
- }
9
- return undefined;
10
- };
11
- const createDocumentRange = () => {
12
- return document.createRange();
13
- };
14
- const isTextNode = (node) => {
15
- return node instanceof Text;
16
- };
17
- const isHtmlElement = (target) => {
18
- return target instanceof HTMLElement;
19
- };
20
- const isReplacedElement = (el) => {
21
- return (el === null || el === void 0 ? void 0 : el.getAttribute('data-replaced')) === 'true';
22
- };
23
- const createTextNode = (text) => {
24
- return new Text(text != null && text !== '' ? text : ' ');
25
- };
26
-
27
- 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}.test-mention.sc-vertex-search-bar{display:inline-block;color:blue}.hidden.sc-vertex-search-bar{visibility:hidden}.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}.textarea.sc-vertex-search-bar{overflow:hidden;outline:none;box-shadow:none;resize:none}.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)}";
28
-
29
- const SearchBar = class {
30
- constructor(hostRef) {
31
- registerInstance(this, hostRef);
32
- this.triggerCharacterPressed = createEvent(this, "triggerCharacterPressed", 7);
33
- this.valueChanged = createEvent(this, "valueChanged", 7);
34
- this.inputFocus = createEvent(this, "inputFocus", 7);
35
- this.inputBlur = createEvent(this, "inputBlur", 7);
36
- this.resultsEnterPressed = createEvent(this, "resultsEnterPressed", 7);
37
- this.handleKeyDown = (event) => {
38
- if ((this.triggerCharacters.includes(event.key) ||
39
- this.triggerCharacter === event.key) &&
40
- this.triggerKey == null) {
41
- this.triggerKey = event.key;
42
- this.updateCursorPosition();
43
- this.triggerCharacterPressed.emit('');
44
- }
45
- else {
46
- this.restartTriggerInput();
47
- }
48
- if (event.key === 'Backspace') {
49
- const selection = getWindowSelection();
50
- if (selection && (selection === null || selection === void 0 ? void 0 : selection.rangeCount) > 0) {
51
- const range = selection.getRangeAt(0);
52
- range.deleteContents();
53
- }
54
- }
55
- this.valueChanged.emit();
56
- };
57
- this.handleKeyUp = (event) => {
58
- if (event.key === 'Backspace') {
59
- this.updateTriggerState(this.getSelectionSubstring());
60
- }
61
- if (event.key === 'Enter') {
62
- this.clearTriggerState();
63
- }
64
- this.valueChanged.emit();
65
- };
66
- this.updateTriggerValue = (data) => {
67
- var _a, _b, _c, _d, _e;
68
- if (this.triggerKey != null &&
69
- this.triggerRange != null &&
70
- this.triggerRange.startContainer === this.triggerRange.endContainer) {
71
- const triggerRangeNode = this.triggerRange.startContainer;
72
- if (isTextNode(triggerRangeNode)) {
73
- const before = createTextNode((_a = triggerRangeNode.textContent) === null || _a === void 0 ? void 0 : _a.slice(0, this.triggerRange.startOffset - 1));
74
- const after = createTextNode((_b = triggerRangeNode.textContent) === null || _b === void 0 ? void 0 : _b.slice(this.triggerRange.endOffset));
75
- const replaced = this.createReplacedElement(data);
76
- (_c = triggerRangeNode.parentElement) === null || _c === void 0 ? void 0 : _c.insertBefore(before, triggerRangeNode);
77
- (_d = triggerRangeNode.parentElement) === null || _d === void 0 ? void 0 : _d.insertBefore(after, triggerRangeNode.nextSibling);
78
- (_e = triggerRangeNode.parentElement) === null || _e === void 0 ? void 0 : _e.insertBefore(replaced, after);
79
- triggerRangeNode.remove();
80
- this.moveCursorToNodeEnd(after, true);
81
- }
82
- }
83
- };
84
- this.triggerText = () => {
85
- var _a, _b;
86
- if (this.triggerKey != null &&
87
- this.triggerRange != null &&
88
- this.triggerRange.startContainer === this.triggerRange.endContainer) {
89
- const triggerRangeNode = this.triggerRange.startContainer;
90
- return ((_b = (_a = triggerRangeNode.textContent) === null || _a === void 0 ? void 0 : _a.slice(this.triggerRange.startOffset, this.triggerRange.endOffset)) !== null && _b !== void 0 ? _b : '');
91
- }
92
- return '';
93
- };
94
- this.restartTriggerInput = () => {
95
- this.clearTriggerTimeout();
96
- this.triggerTimeout = setTimeout(() => {
97
- if (this.triggerRange != null && this.triggerKey != null) {
98
- this.triggerCharacterPressed.emit(this.triggerText());
99
- }
100
- this.triggerTimeout = undefined;
101
- }, this.debounce);
102
- };
103
- this.clearTriggerTimeout = () => {
104
- if (this.triggerTimeout != null) {
105
- clearTimeout(this.triggerTimeout);
106
- this.triggerTimeout = undefined;
107
- }
108
- };
109
- this.updateCursorPosition = () => {
110
- var _a;
111
- const selection = getWindowSelection();
112
- if (selection != null && selection.rangeCount > 0) {
113
- const cursorBounds = selection.getRangeAt(0).getBoundingClientRect();
114
- const inputBounds = (_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
115
- const cursorBottom = cursorBounds.bottom || (inputBounds === null || inputBounds === void 0 ? void 0 : inputBounds.bottom) || 0;
116
- const cursorTop = cursorBounds.top || (inputBounds === null || inputBounds === void 0 ? void 0 : inputBounds.top) || 0;
117
- this.cursorPosition = {
118
- x: cursorBounds.left || (inputBounds === null || inputBounds === void 0 ? void 0 : inputBounds.left) || 0,
119
- y: this.placement.includes('top') ? cursorTop : cursorBottom,
120
- };
121
- }
122
- };
123
- this.moveCursorToNodeEnd = (node, collapseToStart = false) => {
124
- const selection = getWindowSelection();
125
- if (selection != null) {
126
- const range = createDocumentRange();
127
- range.selectNodeContents(node);
128
- range.collapse(collapseToStart);
129
- selection.removeAllRanges();
130
- selection.addRange(range);
131
- }
132
- };
133
- this.updateInputCursorPosition = (target) => {
134
- if (isHtmlElement(target)) {
135
- const targetElement = isReplacedElement(target.parentElement)
136
- ? target.parentElement
137
- : target;
138
- if (isReplacedElement(targetElement)) {
139
- this.insertAdjacentTextNode(targetElement);
140
- }
141
- }
142
- };
143
- this.createReplacedElement = (data) => {
144
- const template = this.hostEl.querySelector('template[slot="replaced"]');
145
- if (template != null) {
146
- const instance = generateInstanceFromTemplate(template);
147
- instance.bindings.bind(data);
148
- instance.element.style.display = 'inline-block';
149
- instance.element.contentEditable = 'false';
150
- instance.element.setAttribute('data-replaced', 'true');
151
- return instance.element;
152
- }
153
- else {
154
- throw new Error('Replaced template not defined.');
155
- }
156
- };
157
- this.handleSelectionChange = () => {
158
- this.updateTriggerState(this.getSelectionSubstring());
159
- };
160
- this.getSelectionSubstring = () => {
161
- var _a;
162
- const selection = getWindowSelection();
163
- if (selection != null && selection.rangeCount > 0) {
164
- const range = selection.getRangeAt(0);
165
- this.updateTriggerRange();
166
- if (range != null &&
167
- range.startOffset === range.endOffset &&
168
- isTextNode(range.startContainer) &&
169
- range.startContainer.textContent != null &&
170
- !isReplacedElement(range.startContainer.parentElement) &&
171
- ((_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.contains(range.startContainer))) {
172
- return range.startContainer.textContent.slice(this.lastIndexOfBreakCharacter(range.startContainer.textContent.slice(0, range.startOffset)) + 1, range.startOffset);
173
- }
174
- }
175
- return '';
176
- };
177
- this.insertAdjacentTextNode = (el) => {
178
- el.insertAdjacentText('afterend', '');
179
- if (el.nextSibling != null) {
180
- this.moveCursorToNodeEnd(el.nextSibling);
181
- }
182
- };
183
- this.updateTriggerState = (text) => {
184
- const triggers = this.triggerCharacter != null
185
- ? [...this.triggerCharacters, this.triggerCharacter]
186
- : this.triggerCharacters;
187
- const trigger = triggers.find((tc) => text.includes(tc));
188
- if (trigger != null) {
189
- this.restartTriggerInput();
190
- this.triggerKey = trigger;
191
- this.updateTriggerRange();
192
- if (this.cursorPosition == null) {
193
- this.updateCursorPosition();
194
- }
195
- this.open = true;
196
- }
197
- else {
198
- this.clearTriggerState();
199
- }
200
- };
201
- this.updateTriggerRange = () => {
202
- var _a;
203
- const selection = getWindowSelection();
204
- if (selection != null && selection.rangeCount > 0) {
205
- const range = selection.getRangeAt(0);
206
- if (this.triggerKey != null) {
207
- this.triggerRange = (_a = this.triggerRange) !== null && _a !== void 0 ? _a : range.cloneRange();
208
- this.triggerRange.setEnd(range.endContainer, range.endOffset);
209
- }
210
- }
211
- };
212
- this.clearTriggerState = () => {
213
- this.triggerKey = undefined;
214
- this.triggerRange = undefined;
215
- this.cursorPosition = undefined;
216
- this.open = false;
217
- this.clearTriggerTimeout();
218
- };
219
- this.lastIndexOfBreakCharacter = (search) => {
220
- const index = this.breakCharacters.reduce((index, bc) => {
221
- const searchIndex = search
222
- .replace(String.fromCharCode(160), ' ')
223
- .lastIndexOf(bc);
224
- return searchIndex > index ? searchIndex : index;
225
- }, -1);
226
- return index;
227
- };
228
- this.handleFocus = (ev) => {
229
- this.inputFocus.emit(ev);
230
- };
231
- this.handleBlur = (ev) => {
232
- this.open = false;
233
- this.inputBlur.emit(ev);
234
- };
235
- this.handleInputPointerEvent = (ev) => {
236
- if (ev.target != null) {
237
- this.updateInputCursorPosition(ev.target);
238
- }
239
- };
240
- this.handleResultPointerDown = (ev) => {
241
- ev.preventDefault();
242
- };
243
- this.variant = 'standard';
244
- this.resultItems = undefined;
245
- this.triggerCharacters = [];
246
- this.triggerCharacter = undefined;
247
- this.breakCharacters = [' '];
248
- this.debounce = 100;
249
- this.placeholder = undefined;
250
- this.placement = 'bottom-start';
251
- this.cursorPosition = undefined;
252
- this.open = false;
253
- this.triggerKey = undefined;
254
- this.triggerRange = undefined;
255
- }
256
- componentWillLoad() {
257
- document.addEventListener('selectionchange', this.handleSelectionChange);
258
- }
259
- disconnectedCallback() {
260
- document.removeEventListener('selectionchange', this.handleSelectionChange);
261
- }
262
- async replaceTriggeredValue(data) {
263
- this.updateTriggerValue(data);
264
- this.clearTriggerState();
265
- this.valueChanged.emit();
266
- }
267
- async getEditableContent() {
268
- var _a;
269
- return (_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.childNodes;
270
- }
271
- render() {
272
- var _a;
273
- const classes = classnames('wrapper', {
274
- standard: this.variant === 'standard',
275
- filled: this.variant === 'filled',
276
- underlined: this.variant === 'underlined',
277
- blank: this.variant === 'blank',
278
- });
279
- return (h(Host, null, h("div", { class: classes }, h("span", { class: "content-input", ref: (ref) => (this.contentEl = ref), role: "textbox", contenteditable: "true", "aria-multiline": "true", "data-placeholder": this.placeholder, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onBlur: this.handleBlur, onFocus: this.handleFocus, onPointerDown: this.handleInputPointerEvent, onPointerUp: this.handleInputPointerEvent })), h("vertex-result-list", { position: this.cursorPosition, placement: this.placement, open: this.open &&
280
- this.resultItems != null &&
281
- this.resultItems.length > 0 &&
282
- this.cursorPosition != null, items: (_a = this.resultItems) !== null && _a !== void 0 ? _a : [], onPointerDown: this.handleResultPointerDown, onEnterPressed: (event) => this.resultsEnterPressed.emit(event.detail) }, h("slot", { name: "results" })), h("slot", { name: "replaced" })));
283
- }
284
- get hostEl() { return getElement(this); }
285
- };
286
- SearchBar.style = searchBarCss;
287
-
288
- export { SearchBar as S };
@@ -1,2 +0,0 @@
1
- export { C as vertex_color_circle } from './color-circle-842f3321.js';
2
- import './index-72f28b71.js';