@vertexvis/ui 0.1.0-testing.3 → 0.1.0-testing.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/badge-d39ac1fc.js +23 -0
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{icon-53d62a46.js → icon-460fd0f5.js} +1 -1
- package/dist/cjs/icon-button-786427d6.js +43 -0
- package/dist/cjs/{icon-helper-caf2699e.js → icon-helper-ba408f49.js} +7 -0
- package/dist/cjs/index.cjs.js +11 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popover-d9ec8e10.js → popover-942209b8.js} +23 -1
- package/dist/cjs/{result-list-1e592c3c.js → result-list-241ffe8d.js} +46 -2
- package/dist/cjs/search-bar-a321b3e1.js +353 -0
- package/dist/cjs/{select-0eb7203f.js → select-5f8aecfe.js} +27 -4
- package/dist/cjs/{text-field-0397fb34.js → text-field-bccbde1f.js} +1 -0
- package/dist/cjs/{tooltip-31b596f5.js → tooltip-e9f63631.js} +58 -19
- package/dist/cjs/vertex-badge.cjs.entry.js +11 -0
- package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
- package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-result-list.cjs.entry.js +1 -1
- package/dist/cjs/vertex-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/vertex-select.cjs.entry.js +1 -1
- package/dist/cjs/vertex-textfield.cjs.entry.js +1 -1
- package/dist/cjs/vertex-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/badge/badge.css +18 -0
- package/dist/collection/components/badge/badge.js +69 -0
- package/dist/collection/components/icon/icon-helper.js +3 -0
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/comment-filled.js +2 -0
- package/dist/collection/components/icon-button/icon-button.css +16 -1
- package/dist/collection/components/icon-button/icon-button.js +2 -2
- package/dist/collection/components/index.js +1 -0
- package/dist/collection/components/menu/menu.js +1 -1
- package/dist/collection/components/popover/popover.js +51 -0
- package/dist/collection/components/result-list/result-list.js +47 -3
- package/dist/collection/components/search-bar/dom.js +12 -0
- package/dist/collection/components/search-bar/lib.js +23 -15
- package/dist/collection/components/search-bar/search-bar.css +2 -29
- package/dist/collection/components/search-bar/search-bar.js +352 -326
- package/dist/collection/components/select/select.css +16 -0
- package/dist/collection/components/select/select.js +49 -2
- package/dist/collection/components/text-field/text-field.js +1 -0
- package/dist/collection/components/tooltip/tooltip.css +2 -0
- package/dist/collection/components/tooltip/tooltip.js +62 -18
- package/dist/collection/types/icon.js +1 -0
- package/dist/collection/util/templates/element-pool.js +19 -1
- package/dist/components/components.css +1 -1
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/p-03dbb28c.js +1 -0
- package/dist/components/p-0b1cdc8a.entry.js +1 -0
- package/dist/components/p-0b4406fa.entry.js +1 -0
- package/dist/components/p-103249b4.js +1 -0
- package/dist/components/p-29d7697f.js +1 -0
- package/dist/components/p-406e73da.entry.js +1 -0
- package/dist/components/p-43b1b3f9.js +1 -0
- package/dist/components/p-606596de.entry.js +1 -0
- package/dist/components/p-6b862967.js +1 -0
- package/dist/components/p-7cfb3736.entry.js +1 -0
- package/dist/components/p-7dba2574.entry.js +1 -0
- package/dist/components/p-912f6e24.js +1 -0
- package/dist/components/p-92930f2a.js +1 -0
- package/dist/components/p-c2706288.js +1 -0
- package/dist/components/p-c4518377.entry.js +1 -0
- package/dist/components/{p-17b97932.js → p-ca52a423.js} +1 -1
- package/dist/components/p-ee496965.entry.js +1 -0
- package/dist/components/p-f064f911.js +1 -0
- package/dist/components/p-f71fc166.entry.js +1 -0
- package/dist/esm/badge-6d27ca92.js +21 -0
- package/dist/esm/components.js +1 -1
- package/dist/esm/icon-button-aad3c0e7.js +41 -0
- package/dist/esm/{icon-2630793d.js → icon-d37150b4.js} +1 -1
- package/dist/esm/{icon-helper-10a99d95.js → icon-helper-83f10f73.js} +7 -0
- package/dist/esm/index.js +10 -9
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popover-67c88e4b.js → popover-6e806354.js} +23 -1
- package/dist/esm/{result-list-36cfb08a.js → result-list-16c6afbd.js} +46 -2
- package/dist/esm/search-bar-6fad2f2e.js +351 -0
- package/dist/esm/{select-75ed5653.js → select-d4e135b7.js} +27 -4
- package/dist/esm/{text-field-e542da25.js → text-field-32ac877e.js} +1 -0
- package/dist/esm/{tooltip-14b65fb5.js → tooltip-933da261.js} +58 -19
- package/dist/esm/vertex-badge.entry.js +3 -0
- package/dist/esm/vertex-icon-button.entry.js +2 -2
- package/dist/esm/vertex-icon.entry.js +2 -2
- package/dist/esm/vertex-popover.entry.js +1 -1
- package/dist/esm/vertex-result-list.entry.js +1 -1
- package/dist/esm/vertex-search-bar.entry.js +1 -1
- package/dist/esm/vertex-select.entry.js +1 -1
- package/dist/esm/vertex-textfield.entry.js +1 -1
- package/dist/esm/vertex-tooltip.entry.js +1 -1
- package/dist/types/components/badge/badge.d.ts +14 -0
- package/dist/types/components/icon/icons/comment-filled.d.ts +3 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts +7 -0
- package/dist/types/components/result-list/result-list.d.ts +9 -1
- package/dist/types/components/search-bar/dom.d.ts +3 -0
- package/dist/types/components/search-bar/lib.d.ts +12 -6
- package/dist/types/components/search-bar/search-bar.d.ts +98 -41
- package/dist/types/components/select/select.d.ts +8 -0
- package/dist/types/components/tooltip/tooltip.d.ts +7 -0
- package/dist/types/components.d.ts +111 -16
- package/dist/types/types/icon.d.ts +1 -0
- package/dist/types/util/templates/element-pool.d.ts +10 -1
- package/package.json +2 -2
- package/dist/cjs/icon-button-f868bf06.js +0 -43
- package/dist/cjs/search-bar-bb40cfa7.js +0 -290
- package/dist/components/p-19318fee.entry.js +0 -1
- package/dist/components/p-209db2ba.entry.js +0 -1
- package/dist/components/p-4224c2ad.js +0 -1
- package/dist/components/p-45cfd66e.entry.js +0 -1
- package/dist/components/p-52739247.js +0 -1
- package/dist/components/p-552c128f.js +0 -1
- package/dist/components/p-6505cdb3.js +0 -1
- package/dist/components/p-79fd6fb6.entry.js +0 -1
- package/dist/components/p-94168b92.js +0 -1
- package/dist/components/p-ae6a3c46.entry.js +0 -1
- package/dist/components/p-bd11e7d1.js +0 -1
- package/dist/components/p-da0a7b57.js +0 -1
- package/dist/components/p-e576818b.entry.js +0 -1
- package/dist/components/p-ebabee40.entry.js +0 -1
- package/dist/components/p-ee8b96b2.js +0 -1
- package/dist/components/p-f900d0f4.entry.js +0 -1
- package/dist/esm/icon-button-25edf617.js +0 -41
- package/dist/esm/search-bar-59cc151d.js +0 -288
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,h as o,H as e}from"./p-6834631c.js";import{c as i}from"./p-fe062eb0.js";import{g as a}from"./p-03dbb28c.js";const t=class{constructor(o){r(this,o),this.iconName=void 0,this.disabled=void 0,this.variant="default",this.iconColor="default",this.iconSize="md"}render(){return o(e,{onClick:r=>this.handleClick(r)},o("button",{ref:r=>this.buttonEl=r,disabled:this.disabled,class:i("container",{disabled:this.disabled,floating:"floating"===this.variant,plain:"plain"===this.variant,primary:"primary"===this.iconColor,secondary:"secondary"===this.iconColor})},o("slot",{name:"left"}),o("div",{class:i("icon-button",{xs:"xs"===this.iconSize,sm:"sm"===this.iconSize,md:"md"===this.iconSize,lg:"lg"===this.iconSize})},a(this.iconName),o("div",{class:"badge"},o("slot",{name:"badge"}))),o("slot",null)))}handleClick(r){var o;this.disabled&&(r.preventDefault(),r.stopPropagation()),null===(o=this.buttonEl)||void 0===o||o.blur()}};t.style="button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{--enabled-cursor:pointer;--disabled-cursor:not-allowed;--hover-background-color:var(--vertex-ui-neutral-300);--active-background-color:var(--vertex-ui-neutral-400);--focus-background-color:var(--vertex-ui-neutral-400);--hover-box-shadow:0 2px 2px rgb(0 0 0 / 20%);--active-box-shadow:none;--focus-box-shadow:0 0 0 1px var(--vertex-ui-neutral-900);--icon-margin:0px}.container{display:flex;justify-content:center;align-items:center;outline:none;fill:currentColor;color:currentColor;cursor:var(--enabled-cursor)}.container:not(.plain){border-radius:4px;padding:0.25rem}.icon-button{display:flex;position:relative;justify-content:center;align-items:center;fill:currentColor;height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.icon-button svg{width:100%;height:100%;margin:var(--icon-margin, 0px)}.badge{position:absolute;top:0px;right:4px;justify-content:flex-end;align-items:flex-end}.floating{background-color:var(--vertex-ui-neutral-100);box-shadow:var(--vertex-ui-overlay-shadow);color:var(--vertex-ui-neutral-700);fill:var(--vertex-ui-neutral-700);opacity:0.95}.floating.disabled{color:var(--vertex-ui-neutral-400);cursor:var(--disabled-cursor)}.container:not(.disabled):not(.plain):hover{background-color:var(--hover-background-color);box-shadow:var(--hover-box-shadow)}.container:not(.disabled):not(.plain):active{background-color:var(--active-background-color);box-shadow:var(--active-box-shadow)}.container:not(.disabled):not(.plain):focus-visible{background-color:var(--focus-background-color);box-shadow:var(--focus-box-shadow);color:var(--vertex-ui-neutral-900)}.container.disabled:not(.floating){cursor:var(--disabled-cursor);color:var(--vertex-ui-neutral-400)}.container.primary:not(.disabled){color:var(--vertex-ui-blue-700)}.container.secondary:not(.disabled){color:var(--vertex-ui-neutral-800)}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}";export{t as I}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,h as e,H as i}from"./p-6834631c.js";import{c as t}from"./p-fe062eb0.js";const a=class{constructor(e){r(this,e),this.badgeText=void 0,this.badgeColor="primary"}render(){return e(i,null,e("div",{class:t("string-overlay",{primary:"primary"===this.badgeColor,secondary:"secondary"===this.badgeColor})},this.badgeText))}};a.style=".string-overlay{width:100%;line-height:1.0rem;margin-left:5px;margin-right:5px;border-radius:10px;font-size:var(--vertex-ui-text-xxs)}.string-overlay.primary{color:var(--vertex-ui-white);background-color:var(--vertex-ui-blue-600)}.string-overlay.secondary{color:var(--vertex-ui-black);background-color:var(--vertex-ui-neutral-300)}";export{a as B}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{T as vertex_textfield}from"./p-43b1b3f9.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
|
|
@@ -0,0 +1 @@
|
|
|
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 a=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-wrapper-border":!this.multiline,"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{a as T}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as vertex_popover}from"./p-c2706288.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
|
|
@@ -0,0 +1 @@
|
|
|
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 l}from"./p-1356f525.js";class o{constructor(t,s,i){this.container=t,this.elementFactory=s,this.eventHandlerFactory=i,this.instanceMap=new Map,this.handlerMap=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),this.addEventListeners(t.element),t}addEventListeners(t){var s;const i=null===(s=this.eventHandlerFactory)||void 0===s?void 0:s.call(this,t);null==i||i.forEach((s=>{t.addEventListener(s.type,s.handler)})),this.handlerMap.set(t,null!=i?i:[])}deleteElement(){const t=this.elements.pop();null!=t&&(this.instanceMap.delete(t),t.remove(),this.removeEventListeners(t))}removeEventListeners(t){var s;null===(s=this.handlerMap.get(t))||void 0===s||s.forEach((s=>{t.removeEventListener(s.type,s.handler)}))}}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.resultClick=s(this,"resultClick",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 o(this.hostEl,(()=>this.createResultInstance()),(()=>this.createResultHandlers()))},this.createResultInstance=()=>{if(null!=this.stateMap.resultTemplate){const t=l(this.stateMap.resultTemplate);return t.element.slot="result",t}throw new Error("Result template not defined.")},this.createResultHandlers=()=>[{type:"pointerdown",handler:this.handlePointerDown},{type:"click",handler:this.handleResultClick}],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}`),t.setAttribute("data-result-id",h.id),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={},this.handleResultClick=this.handleResultClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}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"}))))))}handlePointerDown(t){t.preventDefault()}handleResultClick(t){const s=t.target.closest("[data-result-id]"),i=this.parsedResults.find((t=>t.id===(null==s?void 0:s.getAttribute("data-result-id"))));null!=i&&this.resultClick.emit(i)}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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{S as vertex_select}from"./p-912f6e24.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{I as vertex_icon}from"./p-ca52a423.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-03dbb28c.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,e as i,h as e,c as s,g as o}from"./p-6834631c.js";import{c as l}from"./p-fe062eb0.js";const a=class{constructor(e){t(this,e),this.optionChanged=i(this,"optionChanged",7),this.removeListeners=[],this.controlled=!1,this.value=void 0,this.placeholder="Select an option...",this.disabled=!1,this.animated=!0,this.hideSelected=!0,this.open=!1,this.position=void 0,this.displayValue=void 0,this.resizeObserverFactory=t=>new ResizeObserver(t),this.handleOpen=this.handleOpen.bind(this),this.handleDismiss=this.handleDismiss.bind(this),this.getBounds=this.getBounds.bind(this)}componentDidLoad(){var t;this.resizeObserver=this.resizeObserverFactory((()=>this.getBounds())),null!=this.rootRef&&this.resizeObserver.observe(this.rootRef),this.slotElement=(null===(t=this.hostElement.shadowRoot)||void 0===t?void 0:t.querySelector("slot"))||void 0,null!=this.value?this.handleUpdateValue(this.value):this.handleUpdateDisplayValue()}connectedCallback(){window.addEventListener("resize",this.getBounds)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),window.removeEventListener("resize",this.getBounds),this.removeOptionListeners()}handleUpdateValue(t){null!=t&&t!==this.internalValue&&(this.internalValue=t,this.updateDisplayValue(t)),this.controlled=null!=t}handleUpdateDisplayValue(){var t;this.clearSelectedOptionFlag(),this.hideSelected&&(null===(t=this.getSelectedOption())||void 0===t||t.setAttribute("data-selected","true"))}render(){return e("div",{class:l("root",{disabled:this.disabled}),ref:t=>{this.rootRef=t},onClick:this.open||this.disabled?void 0:this.handleOpen},e("div",{class:l("target",{hidden:this.open,disabled:this.disabled})},e("div",{class:"text"},this.displayValue||this.placeholder),e("div",{class:"icon"},e("vertex-icon",{name:"chevron-down",size:"sm"}))),e("vertex-popover",{position:this.position,open:this.open,animated:this.animated,resizeBehavior:"fixed",onDismissed:this.handleDismiss},e("div",{class:l("options",{hidden:!this.open,visible:this.open,animated:this.animated}),style:{minWidth:null!=this.width?`${this.width}px`:"var(--select-width)"}},e("div",{class:l("selected-option",{disabled:this.disabled}),onClick:this.handleDismiss},e("div",{class:"text"},this.displayValue||this.placeholder),e("div",{class:"icon"},e("vertex-icon",{name:"chevron-down",size:"sm"}))),e("slot",null))))}handleOpen(){var t,i;null===(i=null===(t=this.slotElement)||void 0===t?void 0:t.assignedElements)||void 0===i||i.call(t).forEach((t=>{const i=()=>{var i;const e=t.getAttribute("data-value")||t.innerHTML,s=e!==this.internalValue;this.handleDismiss(),this.controlled||(this.displayValue=t.innerHTML,this.internalValue=e),s&&(null===(i=this.optionChanged)||void 0===i||i.emit(e))};t.addEventListener("click",i),this.removeListeners=[...this.removeListeners,()=>t.removeEventListener("click",i)]})),this.open=!0}handleDismiss(){this.removeOptionListeners(),this.open=!1}updateDisplayValue(t){var i,e;const s=null===(e=null===(i=this.slotElement)||void 0===i?void 0:i.assignedElements)||void 0===e?void 0:e.call(i).find((i=>i.getAttribute("data-value")===t||i.innerHTML===t));this.displayValue=null==s?void 0:s.innerHTML}removeOptionListeners(){this.removeListeners.forEach((t=>t())),this.removeListeners=[]}clearSelectedOptionFlag(){var t,i;null===(i=null===(t=this.slotElement)||void 0===t?void 0:t.assignedElements)||void 0===i||i.call(t).forEach((t=>t.removeAttribute("data-selected")))}getSelectedOption(){var t,i,e;const s=null!==(t=this.displayValue)&&void 0!==t?t:this.placeholder;return null===(e=null===(i=this.slotElement)||void 0===i?void 0:i.assignedElements)||void 0===e?void 0:e.call(i).find((t=>t.getAttribute("data-value")===s||t.innerHTML===s))}getBounds(){null!=this.getBoundsTimeout&&(clearTimeout(this.getBoundsTimeout),this.getBoundsTimeout=void 0),this.getBoundsTimeout=setTimeout((()=>{this.getBoundsTimeout=void 0,s((()=>{var t;const i=null===(t=this.rootRef)||void 0===t?void 0:t.getBoundingClientRect();null!=i&&(this.position={x:i.x,y:i.y},this.width=i.width)}))}),200)}get hostElement(){return o(this)}static get watchers(){return{value:["handleUpdateValue"],displayValue:["handleUpdateDisplayValue"],hideSelected:["handleUpdateDisplayValue"],placeholder:["handleUpdateDisplayValue"]}}};a.style=':host{--select-width:100%;--select-option-white-space:normal}.root{display:inline-block;color:var(--vertex-ui-neutral-700);width:var(--select-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-base);overflow:hidden;user-select:none}.root:not(.disabled):hover{color:var(--vertex-ui-neutral-800)}.root.disabled{color:var(--vertex-ui-neutral-400)}.target,.selected-option{background-color:var(--vertex-ui-neutral-200);width:100%;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;padding:0.375rem 0.75rem 0.375rem 0.75rem}.target.hidden{box-shadow:0px 2px 4px -1px rgb(0 0 0 / 20%),\n 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)}.selected-option.disabled,.target.disabled{background-color:var(--vertex-ui-neutral-100);cursor:default}.target{border-radius:4px}.text{white-space:var(--select-option-white-space);overflow:hidden;text-overflow:ellipsis}.icon{padding-left:1rem;margin-left:auto}.options{position:relative;cursor:pointer;background-color:var(--vertex-ui-white);border-radius:4px;padding:0.25rem 0;top:-0.25rem;box-shadow:0px 2px 4px -1px rgb(0 0 0 / 20%),\n 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)}.options.animated{transition:opacity 0.1s ease-in 0.05s;opacity:0}.options.hidden{background-color:transparent}.options.visible{opacity:1}.options>*,.options>slot::slotted(*){padding:0.375rem 0.75rem 0.375rem 0.75rem}.options.hidden>*,.options.hidden>slot::slotted(*){opacity:0}.options>slot::slotted(:hover){background-color:var(--vertex-ui-neutral-200)}.options>slot::slotted([data-selected="true"]){display:none}vertex-popover{--transform-origin:top left;--open-animation-name:open-scale-y;--close-animation-name:close-scale-y}';export{a as S}
|
|
@@ -0,0 +1 @@
|
|
|
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 a;a=Error,i((function t(n){var r=a.call(this,"Validation error mapping object.")||this;return r.errors=n,Object.setPrototypeOf(r,t.prototype),r}),a);var c,f="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]",a="[object Error]",c="[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]",m="[object ArrayBuffer]",j="[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]=_[m]=_[u]=_[j]=_[s]=_[a]=_[c]=_[h]=_[l]=_[v]=_[p]=_[b]=_[y]=_[g]=!1;var B="object"==typeof f&&f&&f.Object===Object&&f,I="object"==typeof self&&self&&self.Object===Object&&self,C=B||I||Function("return this")(),O=n&&!n.nodeType&&n,E=O&&t&&!t.nodeType&&t,A=E&&E.exports===O,P=A&&B.process,S=function(){try{return P&&P.binding&&P.binding("util")}catch(t){}}(),$=S&&S.isTypedArray;function k(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 D(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}var M,U,F,L=Array.prototype,V=Object.prototype,R=C["__core-js_shared__"],N=Function.prototype.toString,W=V.hasOwnProperty,z=(M=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",G=V.toString,H=RegExp("^"+N.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=A?C.Buffer:void 0,J=C.Symbol,K=C.Uint8Array,Q=V.propertyIsEnumerable,X=L.splice,Y=J?J.toStringTag:void 0,Z=Object.getOwnPropertySymbols,tt=q?q.isBuffer:void 0,nt=(U=Object.keys,F=Object,function(t){return U(F(t))}),rt=Ot(C,"DataView"),et=Ot(C,"Map"),it=Ot(C,"Promise"),ot=Ot(C,"Set"),ut=Ot(C,"WeakMap"),st=Ot(Object,"create"),at=St(rt),ct=St(et),ft=St(it),ht=St(ot),lt=St(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 mt(t){var n=this.__data__=new bt(t);this.size=n.size}function jt(t,n){for(var r=t.length;r--;)if($t(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,c){return t===n||(null==t||null==n||!Lt(t)&&!Lt(n)?t!=t&&n!=n:function(t,n,r,e,c,f){var d=Tt(t),g=Tt(n),w=d?o:At(t),x=g?o:At(n),_=(w=w==i?v:w)==v,B=(x=x==i?v:x)==v,I=w==x;if(I&&Dt(t)){if(!Dt(n))return!1;d=!0,_=!1}if(I&&!_)return f||(f=new mt),d||Vt(t)?Bt(t,n,r,e,c,f):function(t,n,r,e,i,o,c){switch(r){case j:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case m:return!(t.byteLength!=n.byteLength||!o(new K(t),new K(n)));case u:case s:case l:return $t(+t,+n);case a:return t.name==n.name&&t.message==n.message;case p:case y:return t==n+"";case h:var f=T;case b:if(f||(f=D),t.size!=n.size&&!(1&e))return!1;var v=c.get(t);if(v)return v==n;e|=2,c.set(t,n);var d=Bt(f(t),f(n),e,i,o,c);return c.delete(t),d;case"[object Symbol]":if(dt)return dt.call(t)==dt.call(n)}return!1}(t,n,w,r,e,c,f);if(!(1&r)){var C=_&&W.call(t,"__wrapped__"),O=B&&W.call(n,"__wrapped__");if(C||O){var E=C?t.value():t,A=O?n.value():n;return f||(f=new mt),c(E,A,r,e,f)}}return!!I&&(f||(f=new mt),function(t,n,r,e,i,o){var u=1&r,s=It(t),a=s.length;if(a!=It(n).length&&!u)return!1;for(var c=a;c--;){var f=s[c];if(!(u?f in n:W.call(n,f)))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;++c<a;){var d=t[f=s[c]],p=n[f];if(e)var b=u?e(p,d,f,n,t,o):e(d,p,f,t,n,o);if(!(void 0===b?d===p||i(d,p,r,e,o):b)){l=!1;break}v||(v="constructor"==f)}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,c,f))}(t,n,r,e,_t,c))}function Bt(t,n,r,e,i,o){var u=1&r,s=t.length,a=n.length;if(s!=a&&!(u&&a>s))return!1;var c=o.get(t);if(c&&o.get(n))return c==n;var f=-1,h=!0,l=2&r?new gt:void 0;for(o.set(t,n),o.set(n,t);++f<s;){var v=t[f],d=n[f];if(e)var p=u?e(d,v,f,n,t,o):e(v,d,f,t,n,o);if(void 0!==p){if(p)continue;h=!1;break}if(l){if(!k(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,Et)}function Ct(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 Ot(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))&&(Mt(t)?H:w).test(St(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=jt(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=jt(n,t);return r<0?void 0:n[r][1]},bt.prototype.has=function(t){return jt(this.__data__,t)>-1},bt.prototype.set=function(t,n){var r=this.__data__,e=jt(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=Ct(this,t).delete(t);return this.size-=n?1:0,n},yt.prototype.get=function(t){return Ct(this,t).get(t)},yt.prototype.has=function(t){return Ct(this,t).has(t)},yt.prototype.set=function(t,n){var r=Ct(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)},mt.prototype.clear=function(){this.__data__=new bt,this.size=0},mt.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},mt.prototype.get=function(t){return this.__data__.get(t)},mt.prototype.has=function(t){return this.__data__.has(t)},mt.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 Et=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[]},At=wt;function Pt(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||x.test(t))&&t>-1&&t%1==0&&t<n}function St(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function $t(t,n){return t===n||t!=t&&n!=n}(rt&&At(new rt(new ArrayBuffer(1)))!=j||et&&At(new et)!=h||it&&At(it.resolve())!=d||ot&&At(new ot)!=b||ut&&At(new ut)!=g)&&(At=function(t){var n=wt(t),r=n==v?t.constructor:void 0,e=r?St(r):"";if(e)switch(e){case at:return j;case ct:return h;case ft:return d;case ht:return b;case lt:return g}return n});var kt=xt(function(){return arguments}())?xt:function(t){return Lt(t)&&W.call(t,"callee")&&!Q.call(t,"callee")},Tt=Array.isArray,Dt=tt||function(){return!1};function Mt(t){if(!Ft(t))return!1;var n=wt(t);return n==c||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Ut(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=$?function(t){return function(n){return t(n)}}($):function(t){return Lt(t)&&Ut(t.length)&&!!_[wt(t)]};function Rt(t){return null!=(n=t)&&Ut(n.length)&&!Mt(n)?function(t,n){var r=Tt(t),e=!r&&kt(t),i=!r&&!e&&Dt(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):[],a=s.length;for(var c in t)!n&&!W.call(t,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Pt(c,a))||s.push(c);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(!c&&!(c="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 c(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 m=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)),a=r(i>>BigInt(48),BigInt(4)),c=r(i,BigInt(12));return"".concat(o,"-").concat(u,"-").concat(s,"-").concat(a,"-").concat(c)},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 a=BigInt.asIntN(64,BigInt("0x".concat(r+e+i))),c=BigInt.asIntN(64,BigInt("0x".concat(u+s)));return{msb:a.toString(),lsb:c.toString()}}});const j=class{constructor(n){t(this,n),this.pointerEntered=!1,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.handleContentChange=this.handleContentChange.bind(this),this.handleDisabledChange=this.handleDisabledChange.bind(this),this.tooltipId=`vertex-tooltip-${m.create()}`}disconnectedCallback(){this.removeElement(),this.clearOpenTimeout(),this.pointerEntered=!1}handleContentChange(){null!=this.internalContentElement&&this.updateContentElementChildren(this.internalContentElement)}handleDisabledChange(){null!=this.internalContentElement&&this.updateContentElementClass(this.internalContentElement),!this.disabled&&this.pointerEntered&&this.handlePointerEnter()}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",onSlotchange:this.handleContentChange})))}addElement(){if(null!=this.targetElement){const t=this.createPopoverElement(this.targetElement),n=this.createContentElement();this.updateContentElementChildren(n),t.appendChild(n),this.hostElement.ownerDocument.body.appendChild(t)}}removeElement(){const t=this.hostElement.ownerDocument.getElementById(this.tooltipId);null!=t&&t.remove(),this.internalContentElement=void 0}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(){return this.internalContentElement=this.hostElement.ownerDocument.createElement("div"),this.internalContentElement.setAttribute("class",u("vertex-tooltip-content",{hidden:!this.open||this.disabled})),this.internalContentElement}updateContentElementClass(t){t.setAttribute("class",u("vertex-tooltip-content",{hidden:!this.open||this.disabled}))}updateContentElementChildren(t){var n;this.displayedSlottedContent=null!==(n=s(this.contentElement))&&void 0!==n?n:this.displayedSlottedContent,null!=this.content?t.innerText=this.content:null!=this.displayedSlottedContent&&t.appendChild(this.displayedSlottedContent)}handlePointerEnter(){null!=this.openTimeout||this.disabled?null==this.openTimeout&&(this.pointerEntered=!0):this.createOpenTimeout()}handlePointerLeave(){this.clearOpenTimeout(),this.removeElement(),this.open=!1,this.pointerEntered=!1}createOpenTimeout(){this.openTimeout=setTimeout((()=>{this.open=!0,this.openTimeout=void 0,this.addElement()}),this.delay),this.pointerEntered=!1}clearOpenTimeout(){null!=this.openTimeout&&(clearTimeout(this.openTimeout),this.openTimeout=void 0)}get hostElement(){return e(this)}static get watchers(){return{content:["handleContentChange"],disabled:["handleDisabledChange"]}}};j.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{j as T}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,e,h as n,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}),h={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function d(t,e,n){return a(t,s(e,n))}function m(t,e){return"function"==typeof t?t(e):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=>f[t]))}function A(t){return t.replace(/left|right|bottom|top/g,(t=>h[t]))}function k(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function R(t,e,n){let{reference:i,floating:o}=t;const r=w(e),s=b(e),a=g(s),l=p(e),c="y"===r,u=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,f=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:h};break;case"left":d={x:i.x-o.width,y:h};break;default:d={x:i.x,y:i.y}}switch(v(e)){case"start":d[s]-=f*(n&&c?-1:1);break;case"end":d[s]+=f*(n&&c?-1:1)}return d}async function O(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:d=0}=m(e,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[f?"floating"===h?"reference":"floating":h],y=k(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(v)))||n?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===h?{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 S(t){return M(t)?(t.nodeName||"").toLowerCase():"#document"}function z(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function P(t){var e;return null==(e=(M(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function M(t){return t instanceof Node||t instanceof z(t).Node}function C(t){return t instanceof Element||t instanceof z(t).Element}function T(t){return t instanceof HTMLElement||t instanceof z(t).HTMLElement}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof z(t).ShadowRoot)}function F(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=j(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function B(t){return["table","td","th"].includes(S(t))}function E(t){const e=L(),n=j(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function L(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(t){return["html","body","#document"].includes(S(t))}function j(t){return z(t).getComputedStyle(t)}function X(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(t){if("html"===S(t))return t;const e=t.assignedSlot||t.parentNode||D(t)&&t.host||P(t);return D(e)?e.host:e}function N(t){const e=Y(t);return $(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&F(e)?e:N(e)}function I(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=N(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=z(o);return r?e.concat(s,s.visualViewport||[],F(o)?o:[],s.frameElement&&n?I(s.frameElement):[]):e.concat(o,I(o,[],n))}function V(t){const e=j(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=T(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,a=l(n)!==r||l(i)!==s;return a&&(n=r,i=s),{width:n,height:i,$:a}}function q(t){return C(t)?t:t.contextElement}function H(t){const e=q(t);if(!T(e))return u(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=V(e);let s=(r?l(n.width):n.width)/i,a=(r?l(n.height):n.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 e=z(t);return L()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:U}function W(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=q(t);let s=u(1);e&&(i?C(i)&&(s=H(i)):s=H(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==z(t))&&e}(r,n,i)?J(r):u(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,h=o.width/s.x,f=o.height/s.y;if(r){const t=z(r),e=i&&C(i)?z(i):i;let n=t,o=n.frameElement;for(;o&&i&&e!==n;){const t=H(o),e=o.getBoundingClientRect(),i=j(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,f*=t.y,l+=r,c+=s,n=z(o),o=n.frameElement}}return k({width:h,height:f,x:l,y:c})}const _=[":popover-open",":modal"];function G(t){return _.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function K(t){return W(P(t)).left+X(t).scrollLeft}function Q(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=z(t),i=P(t),o=n.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"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,n);else if("document"===e)i=function(t){const e=P(t),n=X(t),i=t.ownerDocument.body,o=a(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=a(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+K(t);const l=-n.scrollTop;return"rtl"===j(i).direction&&(s+=a(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:l}}(P(t));else if(C(e))i=function(t,e){const n=W(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=T(t)?H(t):u(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=J(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return k(i)}function Z(t,e){const n=Y(t);return!(n===e||!C(n)||$(n))&&("fixed"===j(n).position||Z(n,e))}function tt(t,e,n){const i=T(e),o=P(e),r="fixed"===n,s=W(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=u(0);if(i||!i&&!r)if(("body"!==S(e)||F(o))&&(a=X(e)),i){const t=W(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.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 et(t){return"static"===j(t).position}function nt(t,e){return T(t)&&"fixed"!==j(t).position?e?e(t):t.offsetParent:null}function it(t,e){const n=z(t);if(G(t))return n;if(!T(t)){let e=Y(t);for(;e&&!$(e);){if(C(e)&&!et(e))return e;e=Y(e)}return n}let i=nt(t,e);for(;i&&B(i)&&et(i);)i=nt(i,e);return i&&$(i)&&et(i)&&!E(i)?n:i||function(t){let e=Y(t);for(;T(e)&&!$(e);){if(E(e))return e;e=Y(e)}return null}(t)||n}const ot={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=P(i),a=!!e&&G(e.floating);if(i===s||a&&r)return n;let l={scrollLeft:0,scrollTop:0},c=u(1);const h=u(0),f=T(i);if((f||!f&&!r)&&(("body"!==S(i)||F(s))&&(l=X(i)),T(i))){const t=W(i);c=H(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+h.x,y:n.y*c.y-l.scrollTop*c.y+h.y}},getDocumentElement:P,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?G(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=I(t,[],!1).filter((t=>C(t)&&"body"!==S(t))),o=null;const r="fixed"===j(t).position;let s=r?Y(t):t;for(;C(s)&&!$(s);){const e=j(s),n=E(s);n||"fixed"!==e.position||(o=null),(r?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||F(s)&&!n&&Z(t,s))?i=i.filter((t=>t!==s)):o=e,s=Y(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],l=r.reduce(((t,n)=>{const i=Q(e,n,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(e,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 e=this.getOffsetParent||it,n=this.getDimensions,i=await n(t.floating);return{reference:tt(t.reference,await e(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:e,height:n}=V(t);return{width:e,height:n}},getScale:H,isElement:C,isRTL:function(t){return"rtl"===j(t).direction}};const rt=O,st=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=m(t,e),c={x:n,y:i},u=await O(e,l),h=w(p(o)),f=y(h);let v=c[f],g=c[h];r&&(v=d(v+u["y"===f?"top":"left"],v,v-u["y"===f?"bottom":"right"])),s&&(g=d(g+u["y"===h?"top":"left"],g,g-u["y"===h?"bottom":"right"]));const b=a.fn({...e,[f]:v,[h]:g});return{...b,data:{x:b.x-n,y:b.y-i}}}}},at=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0,...k}=m(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const R=p(o),S=p(a)===a,z=await(null==l.isRTL?void 0:l.isRTL(c.floating)),P=f||(S||!w?[A(a)]:function(t){const e=A(t);return[x(t),e,x(e)]}(a));f||"none"===y||P.push(...function(t,e,n,i){const o=v(t);let r=function(t,e,n){const i=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?r:s;default:return[]}}(p(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(x)))),r}(a,w,y,z));const M=[a,...P],C=await O(e,k),T=[];let D=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&T.push(C[R]),h){const t=function(t,e,n){void 0===n&&(n=!1);const i=v(t),o=b(t),r=g(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=A(s)),[s,A(s)]}(o,s,z);T.push(C[t[0]],C[t[1]])}if(D=[...D,{placement:o,overflows:T}],!T.every((t=>t<=0))){var F,B;const t=((null==(F=r.flip)?void 0:F.index)||0)+1,e=M[t];if(e)return{data:{index:t,overflows:D},reset:{placement:e}};let n=null==(B=D.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:B.placement;if(!n)switch(d){case"bestFit":{var E;const t=null==(E=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:E[0];t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};function lt(t,e,n){return[(i=null!=t?t:4,void 0===i&&(i=0),{name:"offset",options:i,async fn(t){var e,n;const{x:o,y:r,placement:s,middlewareData:a}=t,l=await async function(t,e){const{placement:n,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=p(n),a=v(n),l="y"===w(n),c=["left","top"].includes(s)?-1:1,u=r&&l?-1:1,h=m(e,t);let{mainAxis:f,crossAxis:d,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof y&&(d="end"===a?-1*y:y),l?{x:d*u,y:f*c}:{x:f*c,y:d*u}}(t,i);return s===(null==(e=a.offset)?void 0:e.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}),null==e&&at(n),st(),null!=e&&ct(e)].filter((t=>"boolean"!=typeof t));var i}function ct(t){return{name:"boundaryContain",fn:async e=>{const n=await rt(e,t);return{x:e.x+(n.left>0?n.left:0)-(n.right>0?n.right:0),y:e.y+(n.top>0?n.top:0)-(n.bottom>0?n.bottom:0)}}}}const ut=class{constructor(n){t(this,n),this.dismissed=e(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.resizeObserverFactory=t=>new ResizeObserver(t),this.updateListener=this.updateListener.bind(this),this.handlePositionUpdate=this.handlePositionUpdate.bind(this),this.handleResize=this.handleResize.bind(this),this.handleMiddlewareChange=this.handleMiddlewareChange.bind(this),this.setWindow=this.setWindow.bind(this),this.updateResizeObserver=this.updateResizeObserver.bind(this)}connectedCallback(){this.updatePosition(this.position),this.updateResizeObserver()}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(){var t;this.viewportWidth=void 0,this.viewportHeight=void 0,this.opened=!1,"dynamic"===this.resizeBehavior&&window.removeEventListener("resize",this.handleResize),null===(t=this.boundaryResizeObserver)||void 0===t||t.disconnect()}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()}updateResizeObserver(){const t=this.getOrCreateResizeObserver();if(t.disconnect(),null!=this.boundarySelector){const e=document.querySelector(this.boundarySelector);null!=e&&t.observe(e)}}setWindow(t){this.partialWindow=t}render(){var t,e;return n(i,null,this.open&&this.backdrop&&n("div",{class:"backdrop",onPointerDown:()=>{this.open=!1,this.dismissed.emit()}}),this.anchorPosition&&n("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===(e=this.anchorPosition)||void 0===e?void 0:e.y)||0}px`}}),n("slot",{name:"anchor"}),n("div",{ref:t=>this.wrapperRef=t,class:r("popper",{hidden:!this.open,open:this.open})},n("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}},n("slot",null))))}updateListener(){var t,e,n,i;const o=null!==(e=null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.anchorPointRef)&&void 0!==e?e:this.getAnchorBoundsVirtualElement();this.open&&null!=o&&null!=this.wrapperRef?(null===(n=this.updateDispose)||void 0===n||n.call(this),this.updateDispose=function(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:h=!1}=i,f=q(t),d=o||r?[...f?I(f):[],...I(e)]:[];d.forEach((t=>{o&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));const m=f&&u?function(t,e){let n,i=null;const o=P(t);function r(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function l(u,h){void 0===u&&(u=!1),void 0===h&&(h=1),r();const{left:f,top:d,width:m,height:p}=t.getBoundingClientRect();if(u||e(),!m||!p)return;const v={rootMargin:-c(d)+"px "+-c(o.clientWidth-(f+m))+"px "+-c(o.clientHeight-(d+p))+"px "+-c(f)+"px",threshold:a(0,s(1,h))||1};let y=!0;function g(t){const e=t[0].intersectionRatio;if(e!==h){if(!y)return l();e?l(!1,e):n=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}(f,n):null;let p,v=-1,y=null;l&&(y=new ResizeObserver((t=>{let[i]=t;i&&i.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(e)}))),n()})),f&&!h&&y.observe(f),y.observe(e));let g=h?W(t):null;return h&&function e(){const i=W(t);!g||i.x===g.x&&i.y===g.y&&i.width===g.width&&i.height===g.height||n(),g=i,p=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach((t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==m||m(),null==(t=y)||t.disconnect(),y=null,h&&cancelAnimationFrame(p)}}(o,this.wrapperRef,this.handlePositionUpdate),this.handlePositionUpdate()):null===(i=this.updateDispose)||void 0===i||i.call(this)}async handlePositionUpdate(){var t,e,n;const i=null!==(e=null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.anchorPointRef)&&void 0!==e?e:this.getAnchorBoundsVirtualElement();if(null!=i&&null!=this.wrapperRef){const t=await async function(t,e,n,i){return await((t,e,n)=>{const i=new Map,o={platform:ot,...n},r={...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:h}=R(c,i,l),f=i,d={},m=0;for(let n=0;n<a.length;n++){const{name:r,fn:p}=a[n],{x:v,y,data:g,reset:w}=await p({x:u,y:h,initialPlacement:i,placement:f,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});u=null!=v?v:u,h=null!=y?y:h,d={...d,[r]:{...d[r],...g}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),({x:u,y:h}=R(c,f,l))),n=-1)}return{x:u,y:h,placement:f,strategy:o,middlewareData:d}})(t,e,{...o,platform:r})})(t,e,{placement:n,middleware:i,strategy:"fixed"})}(i,this.wrapperRef,this.placement,this.middleware);this.computedPlacement=t.placement,null===(n=this.wrapperRef)||void 0===n||n.setAttribute("style",`left: ${t.x}px; top: ${t.y}px;`)}}handleMiddlewareChange(){var t,e,n;const i=null!=(null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.getAnchorBoundsVirtualElement())?4:0,o=null!=this.boundarySelector&&null!==(e=document.querySelector(this.boundarySelector))&&void 0!==e?e:void 0;this.middleware=lt(null!==(n=this.offsetBehavior)&&void 0!==n?n:i,null!=o?Object.assign({boundary:o},this.overflowBehavior):this.overflowBehavior,this.flipBehavior),this.updateListener()}getSlottedAnchorElement(){var t,e,n;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===(e=this.hostElement.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="anchor"]'))||void 0;if(null===(n=null==t?void 0:t.assignedElements)||void 0===n?void 0:n.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}getOrCreateResizeObserver(){return null==this.boundaryResizeObserver&&(this.boundaryResizeObserver=this.resizeObserverFactory(this.handleMiddlewareChange)),this.boundaryResizeObserver}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","updateResizeObserver"],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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{S as vertex_search_bar}from"./p-f064f911.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-1356f525.js";import"./p-59032668.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as e}from"./p-6834631c.js";import{c as s}from"./p-fe062eb0.js";import{g as t}from"./p-
|
|
1
|
+
import{r as i,h as e}from"./p-6834631c.js";import{c as s}from"./p-fe062eb0.js";import{g as t}from"./p-03dbb28c.js";const r=class{constructor(e){i(this,e),this.name=void 0,this.size="md"}render(){return e("div",{class:"container"},e("div",{class:s("icon",{xs:"xs"===this.size,sm:"sm"===this.size,md:"md"===this.size,lg:"lg"===this.size})},t(this.name)))}};r.style=".container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.icon{display:flex;justify-content:center;align-items:center;fill:currentColor}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}svg{position:relative;width:100%}";export{r as I}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{R as vertex_result_list}from"./p-6b862967.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-1356f525.js";import"./p-59032668.js";
|
|
@@ -0,0 +1 @@
|
|
|
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 l=()=>{if("undefined"!=typeof window)return window.getSelection()},o=e=>new Text(null!=e&&""!==e?e:" "),h=e=>`${e.type}:${e.id}`,c=(e,t,r)=>{const s=h(e);return{before:o(t),beforeSpace:o(u()),result:o(s),afterSpace:null!=r?o(v()):void 0,after:null!=r?o(r):void 0}},d=e=>Object.keys(e).map((t=>e[t])).filter((e=>null!=e)),u=()=>String.fromCharCode(8202),v=()=>String.fromCharCode(160),b=class{constructor(r){e(this,r),this.searchChanged=t(this,"searchChanged",7),this.inputChanged=t(this,"inputChanged",7),this.resultReplaced=t(this,"resultReplaced",7),this.inputFocus=t(this,"inputFocus",7),this.inputBlur=t(this,"inputBlur",7),this.rawElements=[],this.isIdenticalElement=(e,t)=>e===this.triggeredElement||this.getTextContent(e)===this.getTextContent(t),this.getTextContent=e=>{var t;return e instanceof HTMLElement?e.innerText:null!==(t=e.textContent)&&void 0!==t?t:""},this.handleCursorPositionUpdate=()=>{var e,t,r;const s=null===(e=l())||void 0===e?void 0:e.getRangeAt(0);if(null!=s)if(this.hasTriggered){if(this.hasTriggered){const e=this.readTriggerValue(null!==(r=s.commonAncestorContainer.textContent)&&void 0!==r?r:"",s.startOffset);null!=e?(this.triggeredRange=s,this.triggeredElement=s.commonAncestorContainer,this.searchChanged.emit(e.replace(this.triggerCharacter,""))):(this.hasTriggered=!1,this.triggeredRange=void 0,this.triggeredElement=void 0)}}else{const e=this.readTriggerValue(null!==(t=s.commonAncestorContainer.textContent)&&void 0!==t?t:"",s.startOffset);null!=e&&(this.hasTriggered=!0,this.triggeredRange=s,this.triggeredElement=s.commonAncestorContainer,this.searchChanged.emit(e.replace(this.triggerCharacter,"")))}this.cursorPosition=this.getCursorPosition()},this.readTriggerValue=(e,t)=>{const r=e.replace(String.fromCharCode(160)," "),s=r.substring(0,t),i=r.substring(t),a=`${s.includes(this.triggerCharacter)?s.substring(s.lastIndexOf(this.triggerCharacter)):""}${i.substring(0,this.firstIndexOfBreakCharacter(i))}`;return a.includes(this.triggerCharacter)&&!this.includesBreakCharacter(a)?a:void 0},this.includesBreakCharacter=e=>this.breakCharacters.some((t=>e.includes(t))),this.firstIndexOfBreakCharacter=e=>{const t=this.breakCharacters.map((t=>e.indexOf(t))).filter((e=>e>=0));return t.length>0?Math.min(...t):e.length},this.moveCursorToNodeEnd=(e,t=!1)=>{const r=l();if(null!=r){const s=document.createRange();s.selectNodeContents(e),s.collapse(t),r.removeAllRanges(),r.addRange(s)}},this.getContentAsString=()=>null!=this.contentEl?Array.from(this.contentEl.childNodes).reduce(((e,t)=>{var r;return t instanceof HTMLElement&&"true"===t.getAttribute("data-replaced")?`${e}${t.getAttribute("data-original")}`:t instanceof HTMLElement?`${e}${t.innerText}`:`${e}${null!==(r=t.textContent)&&void 0!==r?r:""}`}),"").replace(/[\u200A]/g,"").replace(/[\u00A0]/g," "):"",this.createReplacedElement=(e,t)=>{const r=this.hostEl.querySelector('template[slot="replaced"]');if(null!=r){const s=n(r);return s.bindings.bind(t),s.element.id=t.id,s.element.style.display="inline-block",s.element.contentEditable="false",s.element.tabIndex=-1,s.element.setAttribute("data-replaced","true"),s.element.setAttribute("data-original",e),s.element}throw new Error("Replaced template not defined.")},this.variant="standard",this.disabled=!1,this.triggerCharacter="@",this.breakCharacters=[" ","\n"],this.resultItems=void 0,this.placement="bottom-start",this.value=void 0,this.placeholder=void 0,this.replacements=[],this.cursorPosition={x:0,y:0},this.displayedElements=[],this.hasTriggered=!1,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleResultClick=this.handleResultClick.bind(this),this.handleClick=this.handleClick.bind(this),this.handleWindowClick=this.handleWindowClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleCursorPositionUpdate=this.handleCursorPositionUpdate.bind(this),this.updateContent=this.updateContent.bind(this),this.replaceContent=this.replaceContent.bind(this)}componentDidLoad(){this.replaceContent(this.value)}connectedCallback(){window.addEventListener("click",this.handleWindowClick)}disconnectedCallback(){window.removeEventListener("click",this.handleWindowClick)}replaceContent(e,t){if(null!=e&&e!==t){const t=e.match(/[a-z]*:[0-9a-z-]{36}/g),r=this.replacements.reduce(((e,t)=>Object.assign(Object.assign({},e),{[h(t)]:t})),{});let s=e;const i=null!=t?null==t?void 0:t.reduce(((e,t)=>{if(null!=r[t]){const i=h(r[t]),a=s.indexOf(i),n=s.substring(0,a),l=s.substring(a+i.length),o=c(r[t],n);return s=l,[...e,o.before,o.beforeSpace,o.result]}return e}),[]):[];this.rawElements=[...i,o(s)],this.updateContent()}}updateContent(){null!=this.contentEl&&(this.contentEl.innerHTML="",this.displayedElements=this.rawElements.map((e=>{const t=e instanceof HTMLElement?e.innerText:e.textContent,r=this.replacements.find((e=>null==t?void 0:t.includes(e.id)));return null!=t&&null!=r?this.createReplacedElement(t,r):e})),this.displayedElements.forEach((e=>{var t;null===(t=this.contentEl)||void 0===t||t.appendChild("string"==typeof e?o(e):e)})),null!=this.lastReplacedSpace&&this.moveCursorToNodeEnd(this.lastReplacedSpace),this.inputChanged.emit(this.getContentAsString()))}render(){var e;const t=a("wrapper",{standard:"standard"===this.variant,filled:"filled"===this.variant,underlined:"underlined"===this.variant,blank:"blank"===this.variant,disabled:this.disabled});return r(s,null,r("div",{class:t},r("span",{class:"content-input",role:"textbox",contentEditable:"true","aria-multiline":"true","data-placeholder":this.placeholder,ref:e=>this.contentEl=e,onKeyDown:this.handleKeyDown,onKeyUp:this.handleCursorPositionUpdate,onClick:this.handleCursorPositionUpdate,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur})),r("vertex-result-list",{position:this.cursorPosition,placement:this.placement,open:this.hasTriggered&&null!=this.resultItems&&this.resultItems.length>0,items:null!==(e=this.resultItems)&&void 0!==e?e:[],onEnterPressed:this.handleResultClick,onResultClick:this.handleResultClick},r("slot",{name:"results"})),r("slot",{name:"replaced"}))}handleKeyDown(e){this.hasTriggered&&this.breakCharacters.includes(e.key)&&(this.hasTriggered=!1,this.triggeredRange=void 0,this.triggeredElement=void 0)}handleKeyUp(e){this.handleCursorPositionUpdate(),this.cursorPosition=this.getCursorPosition()}async handleInput(){this.inputChanged.emit(this.getContentAsString())}handleClick(){this.handleCursorPositionUpdate()}handleWindowClick(e){e.target instanceof HTMLElement&&"true"===e.target.getAttribute("data-replaced")&&null!=e.target.nextSibling&&this.moveCursorToNodeEnd(e.target.nextSibling,!0)}handleFocus(e){this.inputFocus.emit(e)}handleBlur(e){this.hasTriggered=!1,this.inputBlur.emit(e)}handleResultClick(e){var t;const r=this.triggeredRange,s=this.triggeredElement,i=s instanceof HTMLElement?s.innerText:null==s?void 0:s.textContent;if(null!=this.contentEl&&null!=r&&null!=s&&null!=i){const a=null!==(t=this.readTriggerValue(i,r.startOffset))&&void 0!==t?t:"",n=i.split(a),l=c(e.detail,n[0],n[1]);this.lastReplacedSpace=l.afterSpace,this.rawElements=Array.from(this.contentEl.childNodes).reduce(((e,t)=>this.isIdenticalElement(t,s)?[...e,...d(l)]:[...e,t]),[]),this.hasTriggered=!1,this.replacements=[...this.replacements.filter((t=>t.id!==e.detail.id)),e.detail],this.resultReplaced.emit(e.detail)}}getCursorPosition(){var e;const t=l();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;return{x:r.left||(null==s?void 0:s.left)||0,y:this.placement.includes("top")?a:i}}throw new Error("Unable to retrieve window selection.")}get hostEl(){return i(this)}static get watchers(){return{value:["replaceContent"],replacements:["updateContent"]}}};b.style=".wrapper.sc-vertex-search-bar{display:flex;border:1px solid var(--vertex-ui-neutral-600);border-radius:0.5rem}.content-input.sc-vertex-search-bar{width:100%;box-sizing:border-box;padding:6px 0.5em 7px;border:1px solid transparent;background:none;font-family:var(--vertex-ui-font-family);font-weight:var(--vertex-ui-font-weight-base);font-size:0.875rem;line-height:1.4;white-space:pre-line}.standard.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);color:var(--vertex-ui-neutral-800)}.standard.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.standard.sc-vertex-search-bar:hover:not(.disabled),.standard.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-500)}.standard.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.standard.disabled.sc-vertex-search-bar,.standard.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.blank.sc-vertex-search-bar{color:var(--vertex-ui-neutral-800)}.blank.sc-vertex-search-bar:not(:hover) .content-input.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.blank.sc-vertex-search-bar:hover:not(.disabled) .content-input.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.blank.disabled.sc-vertex-search-bar,.blank.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);color:var(--vertex-ui-neutral-800)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.filled.sc-vertex-search-bar:hover:not(.disabled),.filled.sc-vertex-search-bar:focus{border-bottom-color:var(--vertex-ui-blue-600)}.filled.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-100)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar{background-color:var(--vertex-ui-white);border-color:var(--vertex-ui-white) var(--vertex-ui-white) var(--vertex-ui-neutral-400) var(--vertex-ui-white);color:var(--vertex-ui-neutral-800)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.underlined.sc-vertex-search-bar:hover:not(.disabled),.underlined.sc-vertex-search-bar:focus{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);border-bottom-color:var(--vertex-ui-blue-600)}.underlined.disabled.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-neutral-200)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.has-error.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-red-600)}";export{b as S}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{I as vertex_icon_button}from"./p-103249b4.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-03dbb28c.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-72f28b71.js';
|
|
2
|
+
import { c as classnames } from './index-9c609209.js';
|
|
3
|
+
|
|
4
|
+
const badgeCss = ".string-overlay{width:100%;line-height:1.0rem;margin-left:5px;margin-right:5px;border-radius:10px;font-size:var(--vertex-ui-text-xxs)}.string-overlay.primary{color:var(--vertex-ui-white);background-color:var(--vertex-ui-blue-600)}.string-overlay.secondary{color:var(--vertex-ui-black);background-color:var(--vertex-ui-neutral-300)}";
|
|
5
|
+
|
|
6
|
+
const Badge = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.badgeText = undefined;
|
|
10
|
+
this.badgeColor = 'primary';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, null, h("div", { class: classnames('string-overlay', {
|
|
14
|
+
primary: this.badgeColor === 'primary',
|
|
15
|
+
secondary: this.badgeColor === 'secondary',
|
|
16
|
+
}) }, this.badgeText)));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
Badge.style = badgeCss;
|
|
20
|
+
|
|
21
|
+
export { Badge as B };
|
package/dist/esm/components.js
CHANGED
|
@@ -85,5 +85,5 @@ const patchDynamicImport = (base, orgScriptElm) => {
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
patchBrowser().then(options => {
|
|
88
|
-
return bootstrapLazy([["vertex-click-to-edit-textfield",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar",[[6,"vertex-search-bar",{"variant":[1],"
|
|
88
|
+
return bootstrapLazy([["vertex-click-to-edit-textfield",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar",[[6,"vertex-search-bar",{"variant":[1],"disabled":[4],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"resultItems":[16],"placement":[1],"value":[1],"placeholder":[1],"replacements":[1040],"cursorPosition":[32],"displayedElements":[32],"hasTriggered":[32]}]]],["vertex-select",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"hideSelected":[4,"hide-selected"],"resizeObserverFactory":[16],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-slider",[[1,"vertex-slider",{"min":[2],"max":[2],"valueLabelDisplay":[1,"value-label-display"],"step":[8],"size":[1],"value":[1026],"disabled":[4]}]]],["vertex-toast",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-circle-picker",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["vertex-color-picker",[[1,"vertex-color-picker",{"value":[1537],"disabled":[4]}]]],["vertex-toggle",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-avatar",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group",[[1,"vertex-avatar-group"]]],["vertex-badge",[[1,"vertex-badge",{"badgeText":[1,"badge-text"],"badgeColor":[1,"badge-color"]}]]],["vertex-button",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group",[[1,"vertex-card-group",{"selected":[516],"hovered":[516],"expanded":[516]}]]],["vertex-chip",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading",[[1,"vertex-logo-loading"]]],["vertex-menu-divider",[[1,"vertex-menu-divider"]]],["vertex-menu-item",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"dimensionsComputed":[1540,"dimensions-computed"],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-spinner",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-expandable",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-textfield",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"fontSize":[1,"font-size"],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-tooltip",[[1,"vertex-tooltip",{"content":[1],"disabled":[4],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-color-circle",[[1,"vertex-color-circle",{"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-auto-resize-textarea",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"initialValue":[1,"initial-value"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-menu",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"backdrop":[4],"position":[1040],"popoverProps":[16]}]]],["vertex-icon-button",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon",[[1,"vertex-icon",{"name":[1],"size":[1]}]]],["vertex-popover",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"anchorBounds":[16],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16],"offsetBehavior":[2,"offset-behavior"],"updateOnResize":[4,"update-on-resize"],"resizeObserverFactory":[16],"opened":[32],"computedPlacement":[32]}]]]], options);
|
|
89
89
|
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-72f28b71.js';
|
|
2
|
+
import { c as classnames } from './index-9c609209.js';
|
|
3
|
+
import { g as getSvg } from './icon-helper-83f10f73.js';
|
|
4
|
+
|
|
5
|
+
const iconButtonCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{--enabled-cursor:pointer;--disabled-cursor:not-allowed;--hover-background-color:var(--vertex-ui-neutral-300);--active-background-color:var(--vertex-ui-neutral-400);--focus-background-color:var(--vertex-ui-neutral-400);--hover-box-shadow:0 2px 2px rgb(0 0 0 / 20%);--active-box-shadow:none;--focus-box-shadow:0 0 0 1px var(--vertex-ui-neutral-900);--icon-margin:0px}.container{display:flex;justify-content:center;align-items:center;outline:none;fill:currentColor;color:currentColor;cursor:var(--enabled-cursor)}.container:not(.plain){border-radius:4px;padding:0.25rem}.icon-button{display:flex;position:relative;justify-content:center;align-items:center;fill:currentColor;height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.icon-button svg{width:100%;height:100%;margin:var(--icon-margin, 0px)}.badge{position:absolute;top:0px;right:4px;justify-content:flex-end;align-items:flex-end}.floating{background-color:var(--vertex-ui-neutral-100);box-shadow:var(--vertex-ui-overlay-shadow);color:var(--vertex-ui-neutral-700);fill:var(--vertex-ui-neutral-700);opacity:0.95}.floating.disabled{color:var(--vertex-ui-neutral-400);cursor:var(--disabled-cursor)}.container:not(.disabled):not(.plain):hover{background-color:var(--hover-background-color);box-shadow:var(--hover-box-shadow)}.container:not(.disabled):not(.plain):active{background-color:var(--active-background-color);box-shadow:var(--active-box-shadow)}.container:not(.disabled):not(.plain):focus-visible{background-color:var(--focus-background-color);box-shadow:var(--focus-box-shadow);color:var(--vertex-ui-neutral-900)}.container.disabled:not(.floating){cursor:var(--disabled-cursor);color:var(--vertex-ui-neutral-400)}.container.primary:not(.disabled){color:var(--vertex-ui-blue-700)}.container.secondary:not(.disabled){color:var(--vertex-ui-neutral-800)}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}";
|
|
6
|
+
|
|
7
|
+
const IconButton = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.iconName = undefined;
|
|
11
|
+
this.disabled = undefined;
|
|
12
|
+
this.variant = 'default';
|
|
13
|
+
this.iconColor = 'default';
|
|
14
|
+
this.iconSize = 'md';
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h(Host, { onClick: (e) => this.handleClick(e) }, h("button", { ref: (el) => (this.buttonEl = el), disabled: this.disabled, class: classnames('container', {
|
|
18
|
+
disabled: this.disabled,
|
|
19
|
+
floating: this.variant === 'floating',
|
|
20
|
+
plain: this.variant === 'plain',
|
|
21
|
+
primary: this.iconColor === 'primary',
|
|
22
|
+
secondary: this.iconColor === 'secondary',
|
|
23
|
+
}) }, h("slot", { name: "left" }), h("div", { class: classnames('icon-button', {
|
|
24
|
+
xs: this.iconSize === 'xs',
|
|
25
|
+
sm: this.iconSize === 'sm',
|
|
26
|
+
md: this.iconSize === 'md',
|
|
27
|
+
lg: this.iconSize === 'lg',
|
|
28
|
+
}) }, getSvg(this.iconName), h("div", { class: "badge" }, h("slot", { name: "badge" }))), h("slot", null))));
|
|
29
|
+
}
|
|
30
|
+
handleClick(event) {
|
|
31
|
+
var _a;
|
|
32
|
+
if (this.disabled) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
event.stopPropagation();
|
|
35
|
+
}
|
|
36
|
+
(_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.blur();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
IconButton.style = iconButtonCss;
|
|
40
|
+
|
|
41
|
+
export { IconButton as I };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-72f28b71.js';
|
|
2
2
|
import { c as classnames } from './index-9c609209.js';
|
|
3
|
-
import { g as getSvg } from './icon-helper-
|
|
3
|
+
import { g as getSvg } from './icon-helper-83f10f73.js';
|
|
4
4
|
|
|
5
5
|
const iconCss = ".container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.icon{display:flex;justify-content:center;align-items:center;fill:currentColor}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}svg{position:relative;width:100%}";
|
|
6
6
|
|
|
@@ -128,6 +128,11 @@ const Columns = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox:
|
|
|
128
128
|
const CommentAdd = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", "data-testid": "comment-add" },
|
|
129
129
|
h("path", { d: "M10.5,6.7h-5c-.3,0-.5.2-.5.5s.2.5.5.5h5c.3,0,.5-.2.5-.5s-.2-.5-.5-.5ZM7.5,5v4.4c0,.3.2.5.5.5s.5-.2.5-.5v-4.4c0-.3-.2-.5-.5-.5s-.5.2-.5.5ZM13.5,2H2.5c-.8,0-1.5.7-1.5,1.5v7c0,.8.7,1.5,1.5,1.5h5.8l2.9,2.9c.1.1.4.2.5.1.2,0,.3-.3.3-.5v-2.5h1.5c.8,0,1.5-.7,1.5-1.5V3.5c0-.8-.7-1.5-1.5-1.5ZM14,10.5c0,.3-.2.5-.5.5h-2c-.3,0-.5.2-.5.5v1.8l-2.1-2.1s-.2-.2-.4-.1H2.5c-.3,0-.5-.2-.5-.5V3.5c0-.3.2-.5.5-.5h11c.3,0,.5.2.5.5v7Z" })));
|
|
130
130
|
|
|
131
|
+
const CommentFilled = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", "data-testid": "comment-filled" },
|
|
132
|
+
h("path", { d: "M2.5 2A1.5 1.5 0 0 0 1 3.5v7A1.5 1.5 0 0 0 2.5 12h5.79l2.86 2.85a.47.47 0 0 0 .54.11.5.5 0 0 0 .31-.46V12h1.5a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 13.5 2Zm0 1h11a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-2a.51.51 0 0 0-.5.5v1.79l-2.15-2.14A.47.47 0 0 0 8.5 11h-6a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5Z" }),
|
|
133
|
+
h("path", { d: "M11.306 14.941c-.085-.042-.422-.367-1.55-1.497L8.314 12H5.431c-1.806 0-2.955-.009-3.075-.022a1.49 1.49 0 0 1-1.257-.98l-.07-.18-.005-3.756c-.006-4.202-.018-3.888.152-4.233a1.18 1.18 0 0 1 .276-.369c.204-.204.374-.307.651-.393l.163-.05h11.468l.163.05c.271.085.448.19.64.383s.288.34.375.578l.058.159v7.631l-.069.18c-.168.436-.495.76-.911.905-.225.078-.465.097-1.269.097h-.73l-.007 1.319-.006 1.319-.065.106c-.135.217-.394.301-.607.197zm-.223-3.68a.527.527 0 0 1 .31-.235c.056-.015.46-.023 1.155-.023 1.178 0 1.157.002 1.303-.137a.616.616 0 0 0 .113-.156c.039-.083.04-.227.04-3.708l.001-3.622-.057-.115a.476.476 0 0 0-.335-.26c-.152-.033-11.074-.033-11.226 0a.476.476 0 0 0-.335.26l-.057.115v3.617c0 3.994-.011 3.697.136 3.85.15.158-.147.144 3.343.156 3.026.01 3.147.012 3.22.051.042.023.578.54 1.192 1.15l1.117 1.108.01-.976.011-.976z", stroke: "currentColor", "stroke-width": ".0216802" }),
|
|
134
|
+
h("path", { d: "M9.888 12.26c-.799-.783-1.159-1.121-1.23-1.156l-.103-.05-3.264-.01-3.265-.011-.106-.062a.477.477 0 0 1-.17-.166l-.062-.104V3.238l.068-.096a.722.722 0 0 1 .179-.162l.11-.067h11.729l.093.049a.58.58 0 0 1 .25.266c.024.058.03.714.03 3.75v3.68l-.058.114a.527.527 0 0 1-.247.24c-.025.011-.58.025-1.231.031-1.167.011-1.188.012-1.279.06a.697.697 0 0 0-.265.27c-.018.04-.03.35-.038 1.026l-.011.968z", stroke: "currentColor", "stroke-width": "2.36182", "stroke-miterlimit": "4", "stroke-dasharray": "none" })));
|
|
135
|
+
|
|
131
136
|
const CommentReopen = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", "data-testid": "comment-reopen" },
|
|
132
137
|
h("path", { d: "M13.5,2H11.81l.57,1H13.5a.5.5,0,0,1,.5.5v7a.5.5,0,0,1-.5.5h-2a.51.51,0,0,0-.5.5v1.79L8.85,11.15A.47.47,0,0,0,8.5,11h-6a.5.5,0,0,1-.5-.5v-7A.5.5,0,0,1,2.5,3H8.62l.57-1H2.5A1.5,1.5,0,0,0,1,3.5v7A1.5,1.5,0,0,0,2.5,12H8.29l2.86,2.85a.47.47,0,0,0,.54.11A.5.5,0,0,0,12,14.5V12h1.5A1.5,1.5,0,0,0,15,10.5v-7A1.5,1.5,0,0,0,13.5,2ZM7.11,5.21a.5.5,0,0,0,.22-.67.49.49,0,0,0-.67-.22A3,3,0,1,0,11,7V5.08h1.49l-2-3.45-2,3.45H10V7A2,2,0,1,1,7.11,5.21Z" })));
|
|
133
138
|
|
|
@@ -455,6 +460,8 @@ function getSvg(name) {
|
|
|
455
460
|
return h(Columns, null);
|
|
456
461
|
case 'comment-add':
|
|
457
462
|
return h(CommentAdd, null);
|
|
463
|
+
case 'comment-filled':
|
|
464
|
+
return h(CommentFilled, null);
|
|
458
465
|
case 'comment-reopen':
|
|
459
466
|
return h(CommentReopen, null);
|
|
460
467
|
case 'comment-resolve':
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { A as AutoResizeTextArea } from './auto-resize-textarea-087fecdb.js';
|
|
2
2
|
export { A as Avatar } from './avatar-775455a5.js';
|
|
3
3
|
export { A as AvatarGroup } from './avatar-group-e5ca86bf.js';
|
|
4
|
+
export { B as Badge } from './badge-6d27ca92.js';
|
|
4
5
|
export { B as Button } from './button-547336b8.js';
|
|
5
6
|
export { C as Card } from './card-1e8790aa.js';
|
|
6
7
|
export { C as CardGroup } from './card-group-4e8e0421.js';
|
|
@@ -16,28 +17,28 @@ export { D as DraggablePopover } from './draggable-popover-8ef3aec6.js';
|
|
|
16
17
|
export { D as DropdownMenu } from './dropdown-menu-1598ba20.js';
|
|
17
18
|
export { E as Expandable } from './expandable-b487cb00.js';
|
|
18
19
|
export { H as HelpTooltip } from './help-tooltip-c2f0d996.js';
|
|
19
|
-
export { I as Icon } from './icon-
|
|
20
|
-
export { I as IconButton } from './icon-button-
|
|
20
|
+
export { I as Icon } from './icon-d37150b4.js';
|
|
21
|
+
export { I as IconButton } from './icon-button-aad3c0e7.js';
|
|
21
22
|
export { L as LogoLoading } from './logo-loading-3c7fa23d.js';
|
|
22
23
|
export { M as Menu } from './menu-daa7f9c9.js';
|
|
23
24
|
export { M as MenuDivider } from './menu-divider-87c888cb.js';
|
|
24
25
|
export { M as MenuItem } from './menu-item-c33aa9dd.js';
|
|
25
|
-
export { P as Popover } from './popover-
|
|
26
|
+
export { P as Popover } from './popover-6e806354.js';
|
|
26
27
|
export { R as Radio } from './radio-39c11ba4.js';
|
|
27
28
|
export { R as RadioGroup } from './radio-group-7c35d2f0.js';
|
|
28
29
|
export { R as Resizable } from './resizable-a147709b.js';
|
|
29
|
-
export { R as ResultList } from './result-list-
|
|
30
|
-
export { S as SearchBar } from './search-bar-
|
|
31
|
-
export { S as Select } from './select-
|
|
30
|
+
export { R as ResultList } from './result-list-16c6afbd.js';
|
|
31
|
+
export { S as SearchBar } from './search-bar-6fad2f2e.js';
|
|
32
|
+
export { S as Select } from './select-d4e135b7.js';
|
|
32
33
|
export { S as Slider } from './slider-dcdb388f.js';
|
|
33
34
|
export { S as Spinner } from './spinner-afccea51.js';
|
|
34
|
-
export { T as TextField } from './text-field-
|
|
35
|
+
export { T as TextField } from './text-field-32ac877e.js';
|
|
35
36
|
export { T as Toast } from './toast-255648ff.js';
|
|
36
37
|
export { T as Toggle } from './toggle-1fe22e4f.js';
|
|
37
|
-
export { T as Tooltip } from './tooltip-
|
|
38
|
+
export { T as Tooltip } from './tooltip-933da261.js';
|
|
38
39
|
import './index-72f28b71.js';
|
|
39
40
|
import './slots-fbb5afb3.js';
|
|
40
41
|
import './index-9c609209.js';
|
|
41
|
-
import './icon-helper-
|
|
42
|
+
import './icon-helper-83f10f73.js';
|
|
42
43
|
import './templates-797420bf.js';
|
|
43
44
|
import './tslib.es6-99cd0de8.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["vertex-click-to-edit-textfield",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar",[[6,"vertex-search-bar",{"variant":[1],"
|
|
14
|
+
return bootstrapLazy([["vertex-click-to-edit-textfield",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar",[[6,"vertex-search-bar",{"variant":[1],"disabled":[4],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"resultItems":[16],"placement":[1],"value":[1],"placeholder":[1],"replacements":[1040],"cursorPosition":[32],"displayedElements":[32],"hasTriggered":[32]}]]],["vertex-select",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"hideSelected":[4,"hide-selected"],"resizeObserverFactory":[16],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-slider",[[1,"vertex-slider",{"min":[2],"max":[2],"valueLabelDisplay":[1,"value-label-display"],"step":[8],"size":[1],"value":[1026],"disabled":[4]}]]],["vertex-toast",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-circle-picker",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["vertex-color-picker",[[1,"vertex-color-picker",{"value":[1537],"disabled":[4]}]]],["vertex-toggle",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-avatar",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group",[[1,"vertex-avatar-group"]]],["vertex-badge",[[1,"vertex-badge",{"badgeText":[1,"badge-text"],"badgeColor":[1,"badge-color"]}]]],["vertex-button",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group",[[1,"vertex-card-group",{"selected":[516],"hovered":[516],"expanded":[516]}]]],["vertex-chip",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading",[[1,"vertex-logo-loading"]]],["vertex-menu-divider",[[1,"vertex-menu-divider"]]],["vertex-menu-item",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"dimensionsComputed":[1540,"dimensions-computed"],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-spinner",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-expandable",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-textfield",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"fontSize":[1,"font-size"],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-tooltip",[[1,"vertex-tooltip",{"content":[1],"disabled":[4],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-color-circle",[[1,"vertex-color-circle",{"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-auto-resize-textarea",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"initialValue":[1,"initial-value"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-menu",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"backdrop":[4],"position":[1040],"popoverProps":[16]}]]],["vertex-icon-button",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon",[[1,"vertex-icon",{"name":[1],"size":[1]}]]],["vertex-popover",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"anchorBounds":[16],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16],"offsetBehavior":[2,"offset-behavior"],"updateOnResize":[4,"update-on-resize"],"resizeObserverFactory":[16],"opened":[32],"computedPlacement":[32]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -1473,13 +1473,17 @@ const Popover = class {
|
|
|
1473
1473
|
this.updateOnResize = false;
|
|
1474
1474
|
this.opened = false;
|
|
1475
1475
|
this.computedPlacement = this.placement;
|
|
1476
|
+
this.resizeObserverFactory = (cb) => new ResizeObserver(cb);
|
|
1476
1477
|
this.updateListener = this.updateListener.bind(this);
|
|
1477
1478
|
this.handlePositionUpdate = this.handlePositionUpdate.bind(this);
|
|
1478
1479
|
this.handleResize = this.handleResize.bind(this);
|
|
1480
|
+
this.handleMiddlewareChange = this.handleMiddlewareChange.bind(this);
|
|
1479
1481
|
this.setWindow = this.setWindow.bind(this);
|
|
1482
|
+
this.updateResizeObserver = this.updateResizeObserver.bind(this);
|
|
1480
1483
|
}
|
|
1481
1484
|
connectedCallback() {
|
|
1482
1485
|
this.updatePosition(this.position);
|
|
1486
|
+
this.updateResizeObserver();
|
|
1483
1487
|
}
|
|
1484
1488
|
componentDidUpdate() {
|
|
1485
1489
|
if (this.shouldUpdatePosition) {
|
|
@@ -1501,12 +1505,14 @@ const Popover = class {
|
|
|
1501
1505
|
}
|
|
1502
1506
|
}
|
|
1503
1507
|
disconnectedCallback() {
|
|
1508
|
+
var _a;
|
|
1504
1509
|
this.viewportWidth = undefined;
|
|
1505
1510
|
this.viewportHeight = undefined;
|
|
1506
1511
|
this.opened = false;
|
|
1507
1512
|
if (this.resizeBehavior === 'dynamic') {
|
|
1508
1513
|
window.removeEventListener('resize', this.handleResize);
|
|
1509
1514
|
}
|
|
1515
|
+
(_a = this.boundaryResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1510
1516
|
}
|
|
1511
1517
|
updatePosition(position) {
|
|
1512
1518
|
if (position != null) {
|
|
@@ -1530,6 +1536,16 @@ const Popover = class {
|
|
|
1530
1536
|
updateMiddleware() {
|
|
1531
1537
|
this.handleMiddlewareChange();
|
|
1532
1538
|
}
|
|
1539
|
+
updateResizeObserver() {
|
|
1540
|
+
const observer = this.getOrCreateResizeObserver();
|
|
1541
|
+
observer.disconnect();
|
|
1542
|
+
if (this.boundarySelector != null) {
|
|
1543
|
+
const element = document.querySelector(this.boundarySelector);
|
|
1544
|
+
if (element != null) {
|
|
1545
|
+
observer.observe(element);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1533
1549
|
/**
|
|
1534
1550
|
* @private Used for internals or testing.
|
|
1535
1551
|
*/
|
|
@@ -1635,6 +1651,12 @@ const Popover = class {
|
|
|
1635
1651
|
this.viewportWidth = this.partialWindow.innerWidth;
|
|
1636
1652
|
this.viewportHeight = this.partialWindow.innerHeight;
|
|
1637
1653
|
}
|
|
1654
|
+
getOrCreateResizeObserver() {
|
|
1655
|
+
if (this.boundaryResizeObserver == null) {
|
|
1656
|
+
this.boundaryResizeObserver = this.resizeObserverFactory(this.handleMiddlewareChange);
|
|
1657
|
+
}
|
|
1658
|
+
return this.boundaryResizeObserver;
|
|
1659
|
+
}
|
|
1638
1660
|
getTransformClass() {
|
|
1639
1661
|
if (this.animated) {
|
|
1640
1662
|
switch (this.computedPlacement) {
|
|
@@ -1671,7 +1693,7 @@ const Popover = class {
|
|
|
1671
1693
|
"placement": ["updatePlacement"],
|
|
1672
1694
|
"open": ["updateOpened"],
|
|
1673
1695
|
"animated": ["updateAnimated"],
|
|
1674
|
-
"boundarySelector": ["updateMiddleware"],
|
|
1696
|
+
"boundarySelector": ["updateMiddleware", "updateResizeObserver"],
|
|
1675
1697
|
"overflowBehavior": ["updateMiddleware"],
|
|
1676
1698
|
"flipBehavior": ["updateMiddleware"],
|
|
1677
1699
|
"offsetBehavior": ["updateMiddleware"]
|