@vertexvis/ui 0.0.16-canary.0 → 0.1.0-testing.1
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/{auto-resize-textarea-56a57fd3.js → auto-resize-textarea-deb05359.js} +2 -14
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{draggable-popover-ee0db70b.js → draggable-popover-edf23d3a.js} +4 -9
- package/dist/cjs/{icon-092d8624.js → icon-53d62a46.js} +1 -1
- package/dist/cjs/{icon-button-0671f42e.js → icon-button-5e74c757.js} +1 -1
- package/dist/cjs/{icon-helper-546f9a04.js → icon-helper-caf2699e.js} +2 -2
- package/dist/cjs/index.cjs.js +13 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{menu-0579351b.js → menu-d1ecf43b.js} +4 -3
- package/dist/cjs/popover-d9ec8e10.js +1684 -0
- package/dist/cjs/{result-list-77ba2fa9.js → result-list-1e592c3c.js} +1 -1
- package/dist/cjs/{search-bar-81ca45b3.js → search-bar-bb40cfa7.js} +1 -1
- package/dist/cjs/slots-fb5ac359.js +29 -0
- package/dist/cjs/{templates-4e22ccc0.js → templates-e7b3ffbb.js} +3 -32
- package/dist/cjs/tooltip-31b596f5.js +2152 -0
- package/dist/cjs/tslib.es6-838fd860.js +68 -0
- package/dist/cjs/vertex-auto-resize-textarea.cjs.entry.js +2 -1
- package/dist/cjs/vertex-draggable-popover.cjs.entry.js +1 -1
- 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-menu.cjs.entry.js +1 -1
- package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-result-list.cjs.entry.js +3 -2
- package/dist/cjs/vertex-search-bar.cjs.entry.js +3 -2
- package/dist/cjs/vertex-tooltip.cjs.entry.js +3 -1
- package/dist/collection/components/draggable-popover/draggable-popover.js +4 -9
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/collection/components/help-tooltip/help-tooltip.js +1 -1
- package/dist/collection/components/icon/icons/invert.js +1 -1
- package/dist/collection/components/menu/menu.js +28 -4
- package/dist/collection/components/popover/middleware.js +26 -0
- package/dist/collection/components/popover/popover.css +1 -1
- package/dist/collection/components/popover/popover.js +147 -115
- package/dist/collection/components/popover/util.js +9 -0
- package/dist/collection/components/result-list/result-list.js +1 -1
- package/dist/collection/components/search-bar/search-bar.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +4 -0
- package/dist/collection/components/tooltip/tooltip.js +60 -4
- package/dist/collection/util/components/dom.js +10 -0
- package/dist/collection/util/components/slots.js +12 -0
- 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-0517ca62.entry.js +1 -0
- package/dist/components/p-1356f525.js +1 -0
- package/dist/components/{p-73e2e8f4.js → p-17b97932.js} +1 -1
- package/dist/components/p-19318fee.entry.js +1 -0
- package/dist/components/p-2d065b0a.entry.js +1 -0
- package/dist/components/p-41a7564c.js +1 -0
- package/dist/components/{p-5a93c1b6.js → p-4224c2ad.js} +1 -1
- package/dist/components/p-45cfd66e.entry.js +1 -0
- package/dist/components/{p-60ca5d84.js → p-52739247.js} +1 -1
- package/dist/components/p-59032668.js +1 -0
- package/dist/components/p-6505cdb3.js +1 -0
- package/dist/components/p-79fd6fb6.entry.js +1 -0
- package/dist/components/p-7b75e004.js +1 -0
- package/dist/components/{p-ddb5a066.js → p-94168b92.js} +1 -1
- package/dist/components/p-9c384f6c.entry.js +1 -0
- package/dist/components/p-ae6a3c46.entry.js +1 -0
- package/dist/components/{p-76ef57b9.js → p-afd1c978.js} +1 -1
- package/dist/components/p-b2c7b113.js +1 -0
- package/dist/components/p-bec53c3a.js +1 -0
- package/dist/components/p-da0a7b57.js +1 -0
- package/dist/components/p-e576818b.entry.js +1 -0
- package/dist/components/p-e7336466.entry.js +1 -0
- package/dist/esm/{auto-resize-textarea-ac4b5f3b.js → auto-resize-textarea-087fecdb.js} +1 -13
- package/dist/esm/components.js +1 -1
- package/dist/esm/{draggable-popover-5f14cca5.js → draggable-popover-8ef3aec6.js} +4 -9
- package/dist/esm/{icon-a2d4cafb.js → icon-2630793d.js} +1 -1
- package/dist/esm/{icon-button-53bc2b56.js → icon-button-3000a0dc.js} +1 -1
- package/dist/esm/{icon-helper-aa2001ba.js → icon-helper-10a99d95.js} +2 -2
- package/dist/esm/index.js +13 -11
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{menu-f35637ca.js → menu-daa7f9c9.js} +4 -3
- package/dist/esm/popover-67c88e4b.js +1682 -0
- package/dist/esm/{result-list-9c83f22a.js → result-list-36cfb08a.js} +1 -1
- package/dist/esm/{search-bar-600fb8d9.js → search-bar-59cc151d.js} +1 -1
- package/dist/esm/slots-fbb5afb3.js +26 -0
- package/dist/esm/{templates-51212dae.js → templates-797420bf.js} +1 -30
- package/dist/esm/tooltip-14b65fb5.js +2150 -0
- package/dist/esm/tslib.es6-99cd0de8.js +65 -0
- package/dist/esm/vertex-auto-resize-textarea.entry.js +2 -1
- package/dist/esm/vertex-draggable-popover.entry.js +1 -1
- package/dist/esm/vertex-icon-button.entry.js +2 -2
- package/dist/esm/vertex-icon.entry.js +2 -2
- package/dist/esm/vertex-menu.entry.js +1 -1
- package/dist/esm/vertex-popover.entry.js +1 -1
- package/dist/esm/vertex-result-list.entry.js +3 -2
- package/dist/esm/vertex-search-bar.entry.js +3 -2
- package/dist/esm/vertex-tooltip.entry.js +3 -1
- package/dist/types/components/menu/menu.d.ts +2 -1
- package/dist/types/components/popover/middleware.d.ts +3 -0
- package/dist/types/components/popover/popover.d.ts +39 -23
- package/dist/types/components/popover/util.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +10 -0
- package/dist/types/components.d.ts +31 -15
- package/dist/types/util/components/dom.d.ts +3 -0
- package/dist/types/util/components/slots.d.ts +1 -0
- package/package.json +5 -4
- package/dist/cjs/popover-34e1a386.js +0 -2029
- package/dist/cjs/tooltip-afebbca8.js +0 -46
- package/dist/components/p-0ec0a007.entry.js +0 -1
- package/dist/components/p-30f5b948.entry.js +0 -1
- package/dist/components/p-4226645b.js +0 -1
- package/dist/components/p-58f8a354.js +0 -1
- package/dist/components/p-7c31f30e.js +0 -1
- package/dist/components/p-852be06f.js +0 -1
- package/dist/components/p-8764954b.js +0 -1
- package/dist/components/p-939391df.entry.js +0 -1
- package/dist/components/p-990852f6.entry.js +0 -1
- package/dist/components/p-a1d160cc.entry.js +0 -1
- package/dist/components/p-c8df41df.entry.js +0 -1
- package/dist/components/p-dd94aaef.entry.js +0 -1
- package/dist/components/p-e8e6ee3f.js +0 -1
- package/dist/components/p-eff16591.entry.js +0 -1
- package/dist/components/p-f98b2ecb.entry.js +0 -1
- package/dist/esm/popover-4375db1b.js +0 -2027
- package/dist/esm/tooltip-e78d2c7a.js +0 -44
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as t,w as a,p as
|
|
1
|
+
import{d as e,N as t,w as a,p as o,a as r,b as i}from"./p-6834631c.js";export{s as setNonce}from"./p-6834631c.js";(()=>{const i=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),n={};return n.resourcesUrl=new URL(".",new URL(i.getAttribute("data-resources-url")||i.src,a.location.href)).href,((o,i)=>{const n=`__sc_import_${t.replace(/\s|-/g,"_")}`;try{a[n]=new Function("w",`return import(w);//${Math.random()}`)}catch(t){const l=new Map;a[n]=t=>{var c;const s=new URL(t,o).href;let p=l.get(s);if(!p){const t=e.createElement("script");t.type="module",t.crossOrigin=i.crossOrigin,t.src=URL.createObjectURL(new Blob([`import * as m from '${s}'; window.${n}.m = m;`],{type:"application/javascript"}));const o=null!==(c=r.t)&&void 0!==c?c:function(e){var t,a,o;return null!==(o=null===(a=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===a?void 0:a.getAttribute("content"))&&void 0!==o?o:void 0}(e);null!=o&&t.setAttribute("nonce",o),p=new Promise((e=>{t.onload=()=>{e(a[n].m),t.remove()}})),l.set(s,p),e.head.appendChild(t)}return p}}})(n.resourcesUrl,i),a.customElements?o(n):__sc_import_components("./p-c3ec6642.js").then((()=>n))})().then((e=>i([["p-24c72960",[[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"]}]]],["p-226e83a6",[[1,"vertex-collapsible",{label:[1],open:[1540]}]]],["p-41ced35c",[[1,"vertex-context-menu",{targetSelector:[1,"target-selector"],animated:[4],position:[32],open:[32]}]]],["p-0f8b9ede",[[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"]]]]],["p-e7336466",[[1,"vertex-draggable-popover",{position:[1],boundarySelector:[1,"boundary-selector"],boundaryPadding:[2,"boundary-padding"],anchorPosition:[32],lastPosition:[32],dragging:[32]}]]],["p-e3d0c2d1",[[1,"vertex-dropdown-menu",{animated:[4],placement:[1],open:[32]}]]],["p-fe7e7a74",[[1,"vertex-help-tooltip",{animated:[4],placement:[1],open:[32]}]]],["p-ae6a3c46",[[6,"vertex-search-bar",{variant:[1],resultItems:[16],triggerCharacters:[16],triggerCharacter:[1,"trigger-character"],breakCharacters:[16],debounce:[2],placeholder:[1],placement:[1],cursorPosition:[32],open:[32],triggerKey:[32],triggerRange:[32],replaceTriggeredValue:[64],getEditableContent:[64]}]]],["p-ebabee40",[[1,"vertex-select",{value:[513],placeholder:[513],disabled:[516],animated:[4],resizeObserverFactory:[16],open:[32],position:[32],displayValue:[32]}]]],["p-16719272",[[1,"vertex-slider",{min:[2],max:[2],valueLabelDisplay:[1,"value-label-display"],step:[8],size:[1],value:[1026],disabled:[4]}]]],["p-756c9977",[[1,"vertex-toast",{content:[1],placement:[1],duration:[2],animated:[4],open:[4],type:[1],isOpen:[32]}]]],["p-7f64b251",[[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]}]]],["p-35e7ab78",[[1,"vertex-color-picker",{value:[1537],disabled:[4]}]]],["p-53515813",[[1,"vertex-toggle",{variant:[1],disabled:[4],checked:[1540]}]]],["p-bca6275a",[[1,"vertex-avatar",{firstName:[1,"first-name"],lastName:[1,"last-name"],value:[1],active:[4],variant:[1]}]]],["p-91123ff6",[[1,"vertex-avatar-group"]]],["p-9a46c8b6",[[1,"vertex-button",{type:[1],color:[1],variant:[1],size:[1],expand:[1],href:[1],target:[1],disabled:[516]}]]],["p-6d4f055b",[[1,"vertex-card",{mode:[1]}]]],["p-211c1186",[[1,"vertex-card-group",{selected:[516],hovered:[516],expanded:[516]}]]],["p-d7c0c287",[[1,"vertex-chip",{variant:[1],color:[1]}]]],["p-a2018217",[[1,"vertex-logo-loading"]]],["p-cc2e3192",[[1,"vertex-menu-divider"]]],["p-573b8ec6",[[1,"vertex-menu-item",{disabled:[516]}]]],["p-33400eed",[[2,"vertex-radio",{disabled:[516],value:[513],label:[513],name:[513],checked:[516]}]]],["p-8b85ea4a",[[1,"vertex-radio-group",{name:[513],value:[1537]}]]],["p-ea4a2f74",[[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]}]]],["p-69375605",[[1,"vertex-spinner",{color:[1],size:[1]}]]],["p-80c989fa",[[1,"vertex-expandable",{expanded:[1540],expanding:[1540],collapsing:[1540],controlled:[516],expandType:[513,"expand-type"],animated:[4],contentScrollHeight:[32]}]]],["p-19318fee",[[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]}]]],["p-209db2ba",[[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]}]]],["p-45cfd66e",[[1,"vertex-tooltip",{content:[1],disabled:[4],placement:[1],delay:[2],animated:[4],open:[32]}]]],["p-20a74d5d",[[1,"vertex-color-circle",{color:[513],supplementalColor:[513,"supplemental-color"],theme:[513],lightenPercentage:[2,"lighten-percentage"],darkenPercentage:[2,"darken-percentage"],lightened:[1537],darkened:[1537]}]]],["p-9c384f6c",[[1,"vertex-auto-resize-textarea",{textareaSelector:[1,"textarea-selector"],initialValue:[1,"initial-value"],minRows:[514,"min-rows"],maxRows:[514,"max-rows"],textValue:[32]}]]],["p-0517ca62",[[1,"vertex-menu",{animated:[4],open:[1540],placement:[1],fallbackPlacements:[16],backdrop:[4],position:[1040],popoverProps:[16]}]]],["p-2d065b0a",[[1,"vertex-icon-button",{iconName:[1,"icon-name"],disabled:[516],variant:[1],iconColor:[1,"icon-color"],iconSize:[1,"icon-size"]}]]],["p-79fd6fb6",[[1,"vertex-icon",{name:[1],size:[1]}]]],["p-e576818b",[[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"],opened:[32],computedPlacement:[32]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AutoResizeTextArea}from"./p-
|
|
1
|
+
export{A as AutoResizeTextArea}from"./p-bec53c3a.js";export{A as Avatar}from"./p-c2c076f1.js";export{A as AvatarGroup}from"./p-81cb4da4.js";export{B as Button}from"./p-87de6fc5.js";export{C as Card}from"./p-a3c04bbd.js";export{C as CardGroup}from"./p-ff4a1c3a.js";export{C as Chip}from"./p-a6614625.js";export{C as ClickToEditTextField}from"./p-0e628c05.js";export{C as Collapsible}from"./p-8fe0084d.js";export{C as ColorCircle}from"./p-d9b9aebe.js";export{C as ColorCirclePicker}from"./p-9374ef6c.js";export{C as ColorPicker}from"./p-8434602f.js";export{C as ContextMenu}from"./p-f2bc7ec5.js";export{D as Dialog}from"./p-165aed7d.js";export{D as DraggablePopover}from"./p-41a7564c.js";export{D as DropdownMenu}from"./p-39133bc7.js";export{E as Expandable}from"./p-6a640a2c.js";export{H as HelpTooltip}from"./p-2cff3285.js";export{I as Icon}from"./p-17b97932.js";export{I as IconButton}from"./p-afd1c978.js";export{L as LogoLoading}from"./p-817bf6ff.js";export{M as Menu}from"./p-7b75e004.js";export{M as MenuDivider}from"./p-c939fa4e.js";export{M as MenuItem}from"./p-988058f9.js";export{P as Popover}from"./p-6505cdb3.js";export{R as Radio}from"./p-36c853c4.js";export{R as RadioGroup}from"./p-f693e6f8.js";export{R as Resizable}from"./p-6ec189d2.js";export{R as ResultList}from"./p-52739247.js";export{S as SearchBar}from"./p-4224c2ad.js";export{S as Select}from"./p-552c128f.js";export{S as Slider}from"./p-cd6ddb10.js";export{S as Spinner}from"./p-09ba50c3.js";export{T as TextField}from"./p-bd11e7d1.js";export{T as Toast}from"./p-3dd08a0f.js";export{T as Toggle}from"./p-59fb829f.js";export{T as Tooltip}from"./p-da0a7b57.js";import"./p-6834631c.js";import"./p-b2c7b113.js";import"./p-fe062eb0.js";import"./p-94168b92.js";import"./p-1356f525.js";import"./p-59032668.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{M as vertex_menu}from"./p-7b75e004.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as t}from"./p-59032668.js";function n(t){return t.toLowerCase()}var s=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],i=/[^A-Z0-9]+/gi;function r(t,n,s){return n instanceof RegExp?t.replace(n,s):n.reduce((function(t,n){return t.replace(n,s)}),t)}function o(t,n){var s=t.charAt(0),i=t.substr(1).toLowerCase();return n>0&&s>="0"&&s<="9"?"_"+s+i:""+s.toUpperCase()+i}function e(t,n){return 0===n?t.toLowerCase():o(t,n)}function c(c,u){return void 0===u&&(u={}),function(e,c){return void 0===c&&(c={}),function(t,o){void 0===o&&(o={});for(var e=o.splitRegexp,c=o.stripRegexp,u=void 0===c?i:c,f=o.transform,h=void 0===f?n:f,l=o.delimiter,d=void 0===l?" ":l,a=r(r(t,void 0===e?s:e,"$1\0$2"),u,"\0"),v=0,p=a.length;"\0"===a.charAt(v);)v++;for(;"\0"===a.charAt(p-1);)p--;return a.slice(v,p).split("\0").map(h).join(d)}(e,t({delimiter:"",transform:o},c))}(c,t({transform:e},u))}const u=/{{(.+)}}/;class f{constructor(t){this.bindings=t}bind(t){this.bindings.forEach((n=>n.bind(t)))}}class h{constructor(t,n){this.node=t,this.expr=n}}class l extends h{constructor(t,n){super(t,n)}bind(t){const n=g(t,this.expr);n!==this.node.textContent&&(this.node.textContent=n)}}class d extends h{constructor(t,n,s){super(t,n),this.attr=s}bind(t){const n=g(t,this.expr);this.node.getAttribute(this.attr)!==n&&this.node.setAttribute(this.attr,n)}}class a extends h{constructor(t,n,s){super(t,n),this.prop=s}bind(t){const n=function(t,n){const s=b(n);return null!=s?m(t,s,!0):n}(t,this.expr);this.node[this.prop]!==n&&(this.node[this.prop]=n)}}class v extends h{constructor(t,n,s){super(t,n),this.eventName=s}bind(t){var n;const s=b(this.expr);if(null!=s){null===(n=this.disposable)||void 0===n||n.dispose();const i=m(t,s,!0);this.node.addEventListener(this.eventName,i),this.disposable={dispose:()=>{this.node.removeEventListener(this.eventName,i)}}}}}function p(t){const n=[];if(t.nodeType===Node.ELEMENT_NODE){const s=t;Array.from(s.attributes).filter((t=>u.test(t.value))).forEach((t=>{if(t.name.startsWith("event:")){const i=c(t.name.replace("event:",""));n.push(new v(s,t.value,i))}else if(t.name.startsWith("attr:"))n.push(new d(s,t.value,t.name.replace("attr:","")));else if(t.name.startsWith("prop:")){const i=c(t.name.replace("prop:",""));n.push(new a(s,t.value,i))}}))}else t.nodeType===Node.TEXT_NODE&&null!=t.textContent&&u.test(t.textContent)&&n.push(new l(t,t.textContent));for(let s=0;s<t.childNodes.length;s++)n.push(...p(t.childNodes[s]));return n}function b(t){const n=u.exec(t);return null!=n?n[1]:void 0}function g(t,n){const s=b(n);if(null!=s){const i=m(t,s,!0);return n.replace(`{{${s}}}`,null==i?void 0:i.toString())}return n}function m(t,n,s=!1){const[i,...r]=n.split(".");if(s&&0===r.length)return t;if(s&&r.length>0)return m(t,r.join("."),!1);{const n=t[i];return r.length>0?m(n,r.join("."),!1):n}}function x(t){const n=t.content.cloneNode(!0);return{element:n.firstElementChild,bindings:new f(p(n))}}export{x as g}
|
|
@@ -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-94168b92.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-52739247.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-1356f525.js";import"./p-59032668.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{I as vertex_icon_button}from"./p-afd1c978.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-94168b92.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,e as t,c as o,h as n}from"./p-6834631c.js";import{c as s}from"./p-fe062eb0.js";const e=class{constructor(n){i(this,n),this.positionChanged=t(this,"positionChanged",7),this.handlePointerDown=i=>{this.updateAnchorPosition(),this.lastPosition={x:i.clientX,y:i.clientY},this.dragging=!0,window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp)},this.handlePointerMove=i=>{const t={x:i.clientX,y:i.clientY};this.anchorPosition={x:this.anchorPosition.x+(t.x-this.lastPosition.x),y:this.anchorPosition.y+(t.y-this.lastPosition.y)},this.lastPosition=t},this.handlePointerUp=()=>{this.updateAnchorPosition(),this.lastPosition=this.anchorPosition,this.dragging=!1,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp)},this.updateAnchorPosition=()=>{o((()=>{if(null!=this.containerEl){const i=this.containerEl.getBoundingClientRect();this.anchorPosition={x:i.x,y:i.y}}}))},this.position=void 0,this.boundarySelector=void 0,this.boundaryPadding=void 0,this.anchorPosition={x:0,y:0},this.lastPosition={x:0,y:0},this.dragging=!1}connectedCallback(){this.updatePosition(this.position)}updatePosition(i){null!=i&&(this.anchorPosition="object"==typeof i?i:JSON.parse(i),this.lastPosition=this.anchorPosition)}lastPositionChanged(){this.positionChanged.emit(this.anchorPosition)}render(){return n("vertex-popover",{position:this.anchorPosition,boundarySelector:this.boundarySelector,backdrop:!1,open:!0,resizeBehavior:"fixed",updateOnResize:!this.dragging,overflowBehavior:{altBoundary:!0,padding:this.boundaryPadding},flipBehavior:{fallbackPlacements:[],fallbackStrategy:"initialPlacement"}},n("div",{ref:i=>this.containerEl=i,class:s("container",{dragging:this.dragging})},n("div",{class:"icon-container"},n("div",{class:"icon",onPointerDown:this.handlePointerDown},n("slot",{name:"drag-icon"},n("vertex-icon",{size:"sm",name:"drag-indicator"})))),n("slot",null)))}static get watchers(){return{position:["updatePosition"],lastPosition:["lastPositionChanged"]}}};e.style="button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{position:fixed;top:0;left:0;white-space:nowrap;--background-color:var(--vertex-ui-white);--color:var(--vertex-ui-neutral-700);--font-family:var(--vertex-ui-font-family);--font-size:var(--vertex-ui-text-base);--drag-icon:all-scroll;--dragging-icon:all-scroll}.container{display:flex;column-gap:0.5rem;padding:0.8125rem 0.5625rem 1rem 0.625rem;background-color:var(--background-color);opacity:0.95;border-radius:0.5rem;box-shadow:0 0 5px rgba(0, 0, 0, 0.25);color:var(--color);font-family:var(--font-family);font-size:var(--font-size)}.container:not(.dragging) .icon{cursor:var(--drag-icon)}.container.dragging{cursor:var(--dragging-icon)}.container.dragging *{user-select:none}.icon-container{display:flex;flex-direction:column}.icon-button{display:flex;align-items:center}";export{e as D}
|
|
@@ -1 +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-7c31f30e.js";const o=()=>{if("undefined"!=typeof window)return window.getSelection()},l=e=>e instanceof Text,h=e=>"true"===(null==e?void 0:e.getAttribute("data-replaced")),c=e=>new Text(null!=e&&""!==e?e:" "),d=class{constructor(r){e(this,r),this.triggerCharacterPressed=t(this,"triggerCharacterPressed",7),this.valueChanged=t(this,"valueChanged",7),this.inputFocus=t(this,"inputFocus",7),this.inputBlur=t(this,"inputBlur",7),this.resultsEnterPressed=t(this,"resultsEnterPressed",7),this.handleKeyDown=e=>{if(!this.triggerCharacters.includes(e.key)&&this.triggerCharacter!==e.key||null!=this.triggerKey?this.restartTriggerInput():(this.triggerKey=e.key,this.updateCursorPosition(),this.triggerCharacterPressed.emit("")),"Backspace"===e.key){const e=o();e&&(null==e?void 0:e.rangeCount)>0&&e.getRangeAt(0).deleteContents()}this.valueChanged.emit()},this.handleKeyUp=e=>{"Backspace"===e.key&&this.updateTriggerState(this.getSelectionSubstring()),"Enter"===e.key&&this.clearTriggerState(),this.valueChanged.emit()},this.updateTriggerValue=e=>{var t,r,s,i,a;if(null!=this.triggerKey&&null!=this.triggerRange&&this.triggerRange.startContainer===this.triggerRange.endContainer){const n=this.triggerRange.startContainer;if(l(n)){const o=c(null===(t=n.textContent)||void 0===t?void 0:t.slice(0,this.triggerRange.startOffset-1)),l=c(null===(r=n.textContent)||void 0===r?void 0:r.slice(this.triggerRange.endOffset)),h=this.createReplacedElement(e);null===(s=n.parentElement)||void 0===s||s.insertBefore(o,n),null===(i=n.parentElement)||void 0===i||i.insertBefore(l,n.nextSibling),null===(a=n.parentElement)||void 0===a||a.insertBefore(h,l),n.remove(),this.moveCursorToNodeEnd(l,!0)}}},this.triggerText=()=>{var e,t;return null!=this.triggerKey&&null!=this.triggerRange&&this.triggerRange.startContainer===this.triggerRange.endContainer&&null!==(t=null===(e=this.triggerRange.startContainer.textContent)||void 0===e?void 0:e.slice(this.triggerRange.startOffset,this.triggerRange.endOffset))&&void 0!==t?t:""},this.restartTriggerInput=()=>{this.clearTriggerTimeout(),this.triggerTimeout=setTimeout((()=>{null!=this.triggerRange&&null!=this.triggerKey&&this.triggerCharacterPressed.emit(this.triggerText()),this.triggerTimeout=void 0}),this.debounce)},this.clearTriggerTimeout=()=>{null!=this.triggerTimeout&&(clearTimeout(this.triggerTimeout),this.triggerTimeout=void 0)},this.updateCursorPosition=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0).getBoundingClientRect(),s=null===(e=this.contentEl)||void 0===e?void 0:e.getBoundingClientRect(),i=r.bottom||(null==s?void 0:s.bottom)||0,a=r.top||(null==s?void 0:s.top)||0;this.cursorPosition={x:r.left||(null==s?void 0:s.left)||0,y:this.placement.includes("top")?a:i}}},this.moveCursorToNodeEnd=(e,t=!1)=>{const r=o();if(null!=r){const s=document.createRange();s.selectNodeContents(e),s.collapse(t),r.removeAllRanges(),r.addRange(s)}},this.updateInputCursorPosition=e=>{if((e=>e instanceof HTMLElement)(e)){const t=h(e.parentElement)?e.parentElement:e;h(t)&&this.insertAdjacentTextNode(t)}},this.createReplacedElement=e=>{const t=this.hostEl.querySelector('template[slot="replaced"]');if(null!=t){const r=n(t);return r.bindings.bind(e),r.element.style.display="inline-block",r.element.contentEditable="false",r.element.setAttribute("data-replaced","true"),r.element}throw new Error("Replaced template not defined.")},this.handleSelectionChange=()=>{this.updateTriggerState(this.getSelectionSubstring())},this.getSelectionSubstring=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0);if(this.updateTriggerRange(),null!=r&&r.startOffset===r.endOffset&&l(r.startContainer)&&null!=r.startContainer.textContent&&!h(r.startContainer.parentElement)&&(null===(e=this.contentEl)||void 0===e?void 0:e.contains(r.startContainer)))return r.startContainer.textContent.slice(this.lastIndexOfBreakCharacter(r.startContainer.textContent.slice(0,r.startOffset))+1,r.startOffset)}return""},this.insertAdjacentTextNode=e=>{e.insertAdjacentText("afterend",""),null!=e.nextSibling&&this.moveCursorToNodeEnd(e.nextSibling)},this.updateTriggerState=e=>{const t=(null!=this.triggerCharacter?[...this.triggerCharacters,this.triggerCharacter]:this.triggerCharacters).find((t=>e.includes(t)));null!=t?(this.restartTriggerInput(),this.triggerKey=t,this.updateTriggerRange(),null==this.cursorPosition&&this.updateCursorPosition(),this.open=!0):this.clearTriggerState()},this.updateTriggerRange=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0);null!=this.triggerKey&&(this.triggerRange=null!==(e=this.triggerRange)&&void 0!==e?e:r.cloneRange(),this.triggerRange.setEnd(r.endContainer,r.endOffset))}},this.clearTriggerState=()=>{this.triggerKey=void 0,this.triggerRange=void 0,this.cursorPosition=void 0,this.open=!1,this.clearTriggerTimeout()},this.lastIndexOfBreakCharacter=e=>this.breakCharacters.reduce(((t,r)=>{const s=e.replace(String.fromCharCode(160)," ").lastIndexOf(r);return s>t?s:t}),-1),this.handleFocus=e=>{this.inputFocus.emit(e)},this.handleBlur=e=>{this.open=!1,this.inputBlur.emit(e)},this.handleInputPointerEvent=e=>{null!=e.target&&this.updateInputCursorPosition(e.target)},this.handleResultPointerDown=e=>{e.preventDefault()},this.variant="standard",this.resultItems=void 0,this.triggerCharacters=[],this.triggerCharacter=void 0,this.breakCharacters=[" "],this.debounce=100,this.placeholder=void 0,this.placement="bottom-start",this.cursorPosition=void 0,this.open=!1,this.triggerKey=void 0,this.triggerRange=void 0}componentWillLoad(){document.addEventListener("selectionchange",this.handleSelectionChange)}disconnectedCallback(){document.removeEventListener("selectionchange",this.handleSelectionChange)}async replaceTriggeredValue(e){this.updateTriggerValue(e),this.clearTriggerState(),this.valueChanged.emit()}async getEditableContent(){var e;return null===(e=this.contentEl)||void 0===e?void 0:e.childNodes}render(){var e;const t=a("wrapper",{standard:"standard"===this.variant,filled:"filled"===this.variant,underlined:"underlined"===this.variant,blank:"blank"===this.variant});return r(s,null,r("div",{class:t},r("span",{class:"content-input",ref:e=>this.contentEl=e,role:"textbox",contenteditable:"true","aria-multiline":"true","data-placeholder":this.placeholder,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onBlur:this.handleBlur,onFocus:this.handleFocus,onPointerDown:this.handleInputPointerEvent,onPointerUp:this.handleInputPointerEvent})),r("vertex-result-list",{position:this.cursorPosition,placement:this.placement,open:this.open&&null!=this.resultItems&&this.resultItems.length>0&&null!=this.cursorPosition,items:null!==(e=this.resultItems)&&void 0!==e?e:[],onPointerDown:this.handleResultPointerDown,onEnterPressed:e=>this.resultsEnterPressed.emit(e.detail)},r("slot",{name:"results"})),r("slot",{name:"replaced"}))}get hostEl(){return i(this)}};d.style=".wrapper.sc-vertex-search-bar{display:flex;align-items:center;width:100%;box-sizing:border-box;background:none;border:1px solid transparent;border-radius:4px;font-family:var(--vertex-ui-font-family);font-size:0.875rem;line-height:1.4}.test-mention.sc-vertex-search-bar{display:inline-block;color:blue}.hidden.sc-vertex-search-bar{visibility:hidden}.content-input.sc-vertex-search-bar{width:100%;box-sizing:border-box;padding:6px 0.5em 7px;border:1px solid transparent;background:none;font-family:var(--vertex-ui-font-family);font-weight:var(--vertex-ui-font-weight-base);font-size:0.875rem;line-height:1.4;white-space:pre-line}.textarea.sc-vertex-search-bar{overflow:hidden;outline:none;box-shadow:none;resize:none}.content-input.sc-vertex-search-bar:focus{outline:none}.standard.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);color:var(--vertex-ui-neutral-800)}.standard.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.standard.sc-vertex-search-bar:hover:not(.disabled),.standard.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-500)}.standard.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.standard.disabled.sc-vertex-search-bar,.standard.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.blank.sc-vertex-search-bar{color:var(--vertex-ui-neutral-800)}.blank.sc-vertex-search-bar:not(:hover) .content-input.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.blank.sc-vertex-search-bar:hover:not(.disabled) .content-input.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.blank.disabled.sc-vertex-search-bar,.blank.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);color:var(--vertex-ui-neutral-800)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.filled.sc-vertex-search-bar:hover:not(.disabled),.filled.sc-vertex-search-bar:focus{border-bottom-color:var(--vertex-ui-blue-600)}.filled.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-100)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar{background-color:var(--vertex-ui-white);border-color:var(--vertex-ui-white) var(--vertex-ui-white) var(--vertex-ui-neutral-400) var(--vertex-ui-white);color:var(--vertex-ui-neutral-800)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.underlined.sc-vertex-search-bar:hover:not(.disabled),.underlined.sc-vertex-search-bar:focus{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);border-bottom-color:var(--vertex-ui-blue-600)}.underlined.disabled.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-neutral-200)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.has-error.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-red-600)}";export{d as S}
|
|
1
|
+
import{r as e,e as t,h as r,H as s,g as i}from"./p-6834631c.js";import{c as a}from"./p-fe062eb0.js";import{g as n}from"./p-1356f525.js";const o=()=>{if("undefined"!=typeof window)return window.getSelection()},l=e=>e instanceof Text,h=e=>"true"===(null==e?void 0:e.getAttribute("data-replaced")),c=e=>new Text(null!=e&&""!==e?e:" "),d=class{constructor(r){e(this,r),this.triggerCharacterPressed=t(this,"triggerCharacterPressed",7),this.valueChanged=t(this,"valueChanged",7),this.inputFocus=t(this,"inputFocus",7),this.inputBlur=t(this,"inputBlur",7),this.resultsEnterPressed=t(this,"resultsEnterPressed",7),this.handleKeyDown=e=>{if(!this.triggerCharacters.includes(e.key)&&this.triggerCharacter!==e.key||null!=this.triggerKey?this.restartTriggerInput():(this.triggerKey=e.key,this.updateCursorPosition(),this.triggerCharacterPressed.emit("")),"Backspace"===e.key){const e=o();e&&(null==e?void 0:e.rangeCount)>0&&e.getRangeAt(0).deleteContents()}this.valueChanged.emit()},this.handleKeyUp=e=>{"Backspace"===e.key&&this.updateTriggerState(this.getSelectionSubstring()),"Enter"===e.key&&this.clearTriggerState(),this.valueChanged.emit()},this.updateTriggerValue=e=>{var t,r,s,i,a;if(null!=this.triggerKey&&null!=this.triggerRange&&this.triggerRange.startContainer===this.triggerRange.endContainer){const n=this.triggerRange.startContainer;if(l(n)){const o=c(null===(t=n.textContent)||void 0===t?void 0:t.slice(0,this.triggerRange.startOffset-1)),l=c(null===(r=n.textContent)||void 0===r?void 0:r.slice(this.triggerRange.endOffset)),h=this.createReplacedElement(e);null===(s=n.parentElement)||void 0===s||s.insertBefore(o,n),null===(i=n.parentElement)||void 0===i||i.insertBefore(l,n.nextSibling),null===(a=n.parentElement)||void 0===a||a.insertBefore(h,l),n.remove(),this.moveCursorToNodeEnd(l,!0)}}},this.triggerText=()=>{var e,t;return null!=this.triggerKey&&null!=this.triggerRange&&this.triggerRange.startContainer===this.triggerRange.endContainer&&null!==(t=null===(e=this.triggerRange.startContainer.textContent)||void 0===e?void 0:e.slice(this.triggerRange.startOffset,this.triggerRange.endOffset))&&void 0!==t?t:""},this.restartTriggerInput=()=>{this.clearTriggerTimeout(),this.triggerTimeout=setTimeout((()=>{null!=this.triggerRange&&null!=this.triggerKey&&this.triggerCharacterPressed.emit(this.triggerText()),this.triggerTimeout=void 0}),this.debounce)},this.clearTriggerTimeout=()=>{null!=this.triggerTimeout&&(clearTimeout(this.triggerTimeout),this.triggerTimeout=void 0)},this.updateCursorPosition=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0).getBoundingClientRect(),s=null===(e=this.contentEl)||void 0===e?void 0:e.getBoundingClientRect(),i=r.bottom||(null==s?void 0:s.bottom)||0,a=r.top||(null==s?void 0:s.top)||0;this.cursorPosition={x:r.left||(null==s?void 0:s.left)||0,y:this.placement.includes("top")?a:i}}},this.moveCursorToNodeEnd=(e,t=!1)=>{const r=o();if(null!=r){const s=document.createRange();s.selectNodeContents(e),s.collapse(t),r.removeAllRanges(),r.addRange(s)}},this.updateInputCursorPosition=e=>{if((e=>e instanceof HTMLElement)(e)){const t=h(e.parentElement)?e.parentElement:e;h(t)&&this.insertAdjacentTextNode(t)}},this.createReplacedElement=e=>{const t=this.hostEl.querySelector('template[slot="replaced"]');if(null!=t){const r=n(t);return r.bindings.bind(e),r.element.style.display="inline-block",r.element.contentEditable="false",r.element.setAttribute("data-replaced","true"),r.element}throw new Error("Replaced template not defined.")},this.handleSelectionChange=()=>{this.updateTriggerState(this.getSelectionSubstring())},this.getSelectionSubstring=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0);if(this.updateTriggerRange(),null!=r&&r.startOffset===r.endOffset&&l(r.startContainer)&&null!=r.startContainer.textContent&&!h(r.startContainer.parentElement)&&(null===(e=this.contentEl)||void 0===e?void 0:e.contains(r.startContainer)))return r.startContainer.textContent.slice(this.lastIndexOfBreakCharacter(r.startContainer.textContent.slice(0,r.startOffset))+1,r.startOffset)}return""},this.insertAdjacentTextNode=e=>{e.insertAdjacentText("afterend",""),null!=e.nextSibling&&this.moveCursorToNodeEnd(e.nextSibling)},this.updateTriggerState=e=>{const t=(null!=this.triggerCharacter?[...this.triggerCharacters,this.triggerCharacter]:this.triggerCharacters).find((t=>e.includes(t)));null!=t?(this.restartTriggerInput(),this.triggerKey=t,this.updateTriggerRange(),null==this.cursorPosition&&this.updateCursorPosition(),this.open=!0):this.clearTriggerState()},this.updateTriggerRange=()=>{var e;const t=o();if(null!=t&&t.rangeCount>0){const r=t.getRangeAt(0);null!=this.triggerKey&&(this.triggerRange=null!==(e=this.triggerRange)&&void 0!==e?e:r.cloneRange(),this.triggerRange.setEnd(r.endContainer,r.endOffset))}},this.clearTriggerState=()=>{this.triggerKey=void 0,this.triggerRange=void 0,this.cursorPosition=void 0,this.open=!1,this.clearTriggerTimeout()},this.lastIndexOfBreakCharacter=e=>this.breakCharacters.reduce(((t,r)=>{const s=e.replace(String.fromCharCode(160)," ").lastIndexOf(r);return s>t?s:t}),-1),this.handleFocus=e=>{this.inputFocus.emit(e)},this.handleBlur=e=>{this.open=!1,this.inputBlur.emit(e)},this.handleInputPointerEvent=e=>{null!=e.target&&this.updateInputCursorPosition(e.target)},this.handleResultPointerDown=e=>{e.preventDefault()},this.variant="standard",this.resultItems=void 0,this.triggerCharacters=[],this.triggerCharacter=void 0,this.breakCharacters=[" "],this.debounce=100,this.placeholder=void 0,this.placement="bottom-start",this.cursorPosition=void 0,this.open=!1,this.triggerKey=void 0,this.triggerRange=void 0}componentWillLoad(){document.addEventListener("selectionchange",this.handleSelectionChange)}disconnectedCallback(){document.removeEventListener("selectionchange",this.handleSelectionChange)}async replaceTriggeredValue(e){this.updateTriggerValue(e),this.clearTriggerState(),this.valueChanged.emit()}async getEditableContent(){var e;return null===(e=this.contentEl)||void 0===e?void 0:e.childNodes}render(){var e;const t=a("wrapper",{standard:"standard"===this.variant,filled:"filled"===this.variant,underlined:"underlined"===this.variant,blank:"blank"===this.variant});return r(s,null,r("div",{class:t},r("span",{class:"content-input",ref:e=>this.contentEl=e,role:"textbox",contenteditable:"true","aria-multiline":"true","data-placeholder":this.placeholder,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onBlur:this.handleBlur,onFocus:this.handleFocus,onPointerDown:this.handleInputPointerEvent,onPointerUp:this.handleInputPointerEvent})),r("vertex-result-list",{position:this.cursorPosition,placement:this.placement,open:this.open&&null!=this.resultItems&&this.resultItems.length>0&&null!=this.cursorPosition,items:null!==(e=this.resultItems)&&void 0!==e?e:[],onPointerDown:this.handleResultPointerDown,onEnterPressed:e=>this.resultsEnterPressed.emit(e.detail)},r("slot",{name:"results"})),r("slot",{name:"replaced"}))}get hostEl(){return i(this)}};d.style=".wrapper.sc-vertex-search-bar{display:flex;align-items:center;width:100%;box-sizing:border-box;background:none;border:1px solid transparent;border-radius:4px;font-family:var(--vertex-ui-font-family);font-size:0.875rem;line-height:1.4}.test-mention.sc-vertex-search-bar{display:inline-block;color:blue}.hidden.sc-vertex-search-bar{visibility:hidden}.content-input.sc-vertex-search-bar{width:100%;box-sizing:border-box;padding:6px 0.5em 7px;border:1px solid transparent;background:none;font-family:var(--vertex-ui-font-family);font-weight:var(--vertex-ui-font-weight-base);font-size:0.875rem;line-height:1.4;white-space:pre-line}.textarea.sc-vertex-search-bar{overflow:hidden;outline:none;box-shadow:none;resize:none}.content-input.sc-vertex-search-bar:focus{outline:none}.standard.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);color:var(--vertex-ui-neutral-800)}.standard.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.standard.sc-vertex-search-bar:hover:not(.disabled),.standard.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-500)}.standard.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.standard.disabled.sc-vertex-search-bar,.standard.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.blank.sc-vertex-search-bar{color:var(--vertex-ui-neutral-800)}.blank.sc-vertex-search-bar:not(:hover) .content-input.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.blank.sc-vertex-search-bar:hover:not(.disabled) .content-input.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.blank.disabled.sc-vertex-search-bar,.blank.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);color:var(--vertex-ui-neutral-800)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.filled.sc-vertex-search-bar:hover:not(.disabled),.filled.sc-vertex-search-bar:focus{border-bottom-color:var(--vertex-ui-blue-600)}.filled.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-100)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar{background-color:var(--vertex-ui-white);border-color:var(--vertex-ui-white) var(--vertex-ui-white) var(--vertex-ui-neutral-400) var(--vertex-ui-white);color:var(--vertex-ui-neutral-800)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.underlined.sc-vertex-search-bar:hover:not(.disabled),.underlined.sc-vertex-search-bar:focus{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);border-bottom-color:var(--vertex-ui-blue-600)}.underlined.disabled.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-neutral-200)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.has-error.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-red-600)}";export{d as S}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{T as vertex_tooltip}from"./p-da0a7b57.js";import"./p-6834631c.js";import"./p-59032668.js";import"./p-fe062eb0.js";import"./p-b2c7b113.js";
|
|
@@ -1 +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 o}from"./p-
|
|
1
|
+
import{r as t,e as s,h as i,H as h,g as e}from"./p-6834631c.js";import{c as n}from"./p-fe062eb0.js";import{g as o}from"./p-1356f525.js";class l{constructor(t,s){this.container=t,this.elementFactory=s,this.instanceMap=new Map,this.elements=[]}swapHeadToTail(t){const s=this.elements.splice(0,t);return this.elements.splice(this.elements.length,0,...s),this.elements.concat()}swapTailToHead(t){const s=this.elements.splice(-t,t);return this.elements.splice(0,0,...s),this.elements.concat()}updateElements(t){const s=t-this.elements.length;if(s>0)for(let t=0;t<s;t++)this.createElement();else for(let t=0;t<-s;t++)this.deleteElement();return this.elements.concat()}updateData(t){this.elements.forEach(((s,i)=>{const h=this.instanceMap.get(s),e=t(i);null==h||h.bindings.bind(e)}))}updateElementFactory(t){this.elementFactory=t,this.updateElements(0)}iterateElements(t){this.elements.forEach(((s,i)=>{const h=this.instanceMap.get(s);if(null==h)throw new Error("Binding not found for element.");t(s,h.bindings,i)}))}createElement(){const t=this.elementFactory();return this.elements.push(t.element),this.instanceMap.set(t.element,t),this.container.append(t.element),t}deleteElement(){const t=this.elements.pop();null!=t&&(this.instanceMap.delete(t),t.remove())}}const r=(t,s,i)=>{null==t||t.scrollTo({top:null!=s&&null!=i?s*i:0})},a=class{constructor(i){t(this,i),this.enterPressed=s(this,"enterPressed",7),this.computeResultHeight=()=>{if(null==this.computedResultHeight){const t=this.hostEl.querySelector('*[slot="result"]');null!=t&&(this.resultHeight=t.clientHeight,this.computedResultHeight=t.clientHeight)}},this.ensureTemplateDefined=()=>{const t=this.hostEl.querySelector("template");if(null==t){const t=document.createElement("template");t.innerHTML='\n <div class="result">{{data.value}}</div>\n ',this.hostEl.appendChild(t),this.stateMap.resultTemplate=t}else this.stateMap.resultTemplate=t},this.createResultPool=()=>{this.stateMap.resultPool=new l(this.hostEl,(()=>this.createResultInstance()))},this.createResultInstance=()=>{if(null!=this.stateMap.resultTemplate){const t=o(this.stateMap.resultTemplate);return t.element.slot="result",t}throw new Error("Result template not defined.")},this.layoutResults=()=>{var t,s,i,h;const e=this.viewportEndIndex-this.viewportStartIndex+1,n=this.viewportStartIndex-this.lastStartIndex;this.lastStartIndex=this.viewportStartIndex,null===(t=this.stateMap.resultPool)||void 0===t||t.updateElements(e),n>0?null===(s=this.stateMap.resultPool)||void 0===s||s.swapHeadToTail(n):null===(i=this.stateMap.resultPool)||void 0===i||i.swapTailToHead(-n),null===(h=this.stateMap.resultPool)||void 0===h||h.iterateElements(((t,s,i)=>{const h=this.parsedResults[i+this.viewportStartIndex];null!=h&&(t.style.position="absolute",t.style.boxSizing="border-box",t.style.top=(this.viewportStartIndex+i)*this.resultHeight+"px",t.style.width="100%",t.setAttribute("is-focused",`${this.viewportStartIndex+i===this.lastFocusedIndex}`),s.bind(h))}))},this.handleScroll=t=>{this.scrollTop=t.target.scrollTop},this.handleKeyDown=t=>{this.open&&("ArrowUp"===t.key?(t.preventDefault(),this.lastFocusedIndex=Math.min(0,this.lastFocusedIndex-1),r(this.resultsScrollEl,this.lastFocusedIndex,this.resultHeight)):"ArrowDown"===t.key&&(t.preventDefault(),this.lastFocusedIndex=Math.min(this.lastFocusedIndex+1,this.items.length),r(this.resultsScrollEl,this.lastFocusedIndex,this.resultHeight)),"Enter"===t.key&&null!=this.lastFocusedIndex&&(t.preventDefault(),this.enterPressed.emit(this.items[this.lastFocusedIndex]),this.lastFocusedIndex=0,r(this.resultsScrollEl)))},this.items=[],this.itemsJson=void 0,this.viewportStartIndex=0,this.viewportEndIndex=0,this.resultHeight=32,this.overScanCount=25,this.placement="bottom-start",this.position=void 0,this.open=!1,this.listHeight=void 0,this.parsedResults=[],this.scrollTop=0,this.lastStartIndex=0,this.lastFocusedIndex=0,this.stateMap={}}handleResultsChanged(t){"string"==typeof t?this.parsedResults=JSON.parse(t):null!=t&&(this.parsedResults=t)}handleOpenChanged(){this.open||0===this.scrollTop||r(this.resultsScrollEl)}componentWillLoad(){var t;this.resizeObserver=new ResizeObserver((()=>{this.listHeight=void 0})),window.addEventListener("keydown",this.handleKeyDown),this.ensureTemplateDefined(),this.createResultPool(),this.handleResultsChanged(null!==(t=this.itemsJson)&&void 0!==t?t:this.items)}componentDidLoad(){this.resizeObserver.observe(this.hostEl)}componentWillRender(){this.computeViewportResults()}componentDidRender(){this.layoutResults(),this.computeResultHeight()}disconnectedCallback(){this.resizeObserver.disconnect(),window.removeEventListener("keydown",this.handleKeyDown)}render(){return i(h,null,i("div",{class:n("wrapper",{hidden:!this.open||null==this.computedResultHeight})},i("vertex-popover",{position:this.position,placement:this.placement,open:this.open,backdrop:!1},i("div",{class:"results-scroll",ref:t=>this.resultsScrollEl=t,onScroll:this.handleScroll},i("div",{class:"results",style:{height:this.parsedResults.length*this.resultHeight+"px"}},i("slot",null),i("slot",{name:"result"}))))))}computeViewportResults(){const t=this.getListHeight();if(null!=t&&this.resultHeight>0){const s=Math.ceil(t/this.resultHeight),i=Math.floor(this.scrollTop/this.resultHeight),h=i+s,e=Math.max(0,i-this.overScanCount),n=Math.min(this.parsedResults.length-1,h+this.overScanCount);this.viewportStartIndex=e,this.viewportEndIndex=n}}getListHeight(){return null==this.listHeight&&(this.listHeight=this.hostEl.clientHeight),this.listHeight}get hostEl(){return e(this)}static get watchers(){return{items:["handleResultsChanged"],open:["handleOpenChanged"]}}};a.style=":host{--max-height:300px;--width:500px;--box-shadow:0 2px 5px rgba(0, 0, 0, 0.5)}.hidden{visibility:hidden;position:fixed;pointer-events:none}.results{position:relative;height:100%}.results-scroll{overflow-y:auto;max-height:var(--max-height);width:var(--width);box-shadow:var(--box-shadow);background-color:white}";export{a as R}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(n,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])},r(n,t)};function n(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var t=function(){return t=Object.assign||function(r){for(var n,t=1,o=arguments.length;t<o;t++)for(var e in n=arguments[t])Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e]);return r},t.apply(this,arguments)};function o(r,n){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var o,e,f=t.call(r),i=[];try{for(;(void 0===n||n-- >0)&&!(o=f.next()).done;)i.push(o.value)}catch(r){e={error:r}}finally{try{o&&!o.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return i}"function"==typeof SuppressedError&&SuppressedError;export{n as _,o as a,t as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,e as n,h as e,H as i,g as o}from"./p-6834631c.js";import{c as r}from"./p-fe062eb0.js";const s=Math.min,a=Math.max,l=Math.round,c=Math.floor,u=t=>({x:t,y:t}),f={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function d(t,n,e){return a(t,s(n,e))}function m(t,n){return"function"==typeof t?t(n):t}function p(t){return t.split("-")[0]}function v(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function g(t){return"y"===t?"height":"width"}function w(t){return["top","bottom"].includes(p(t))?"y":"x"}function b(t){return y(w(t))}function x(t){return t.replace(/start|end/g,(t=>h[t]))}function A(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function k(t){const{x:n,y:e,width:i,height:o}=t;return{width:i,height:o,top:e,left:n,right:n+i,bottom:e+o,x:n,y:e}}function R(t,n,e){let{reference:i,floating:o}=t;const r=w(n),s=b(n),a=g(s),l=p(n),c="y"===r,u=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-o.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}switch(v(n)){case"start":d[s]-=h*(e&&c?-1:1);break;case"end":d[s]+=h*(e&&c?-1:1)}return d}async function S(t,n){var e;void 0===n&&(n={});const{x:i,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=m(n,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(d),v=a[h?"floating"===f?"reference":"floating":f],y=k(await r.getClippingRect({element:null==(e=await(null==r.isElement?void 0:r.isElement(v)))||e?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===f?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},x=k(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:(y.top-x.top+p.top)/b.y,bottom:(x.bottom-y.bottom+p.bottom)/b.y,left:(y.left-x.left+p.left)/b.x,right:(x.right-y.right+p.right)/b.x}}function P(t){return O(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function C(t){var n;return null==(n=(O(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function O(t){return t instanceof Node||t instanceof M(t).Node}function T(t){return t instanceof Element||t instanceof M(t).Element}function z(t){return t instanceof HTMLElement||t instanceof M(t).HTMLElement}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof M(t).ShadowRoot)}function F(t){const{overflow:n,overflowX:e,overflowY:i,display:o}=j(t);return/auto|scroll|overlay|hidden|clip/.test(n+i+e)&&!["inline","contents"].includes(o)}function B(t){return["table","td","th"].includes(P(t))}function E(t){const n=L(),e=j(t);return"none"!==e.transform||"none"!==e.perspective||!!e.containerType&&"normal"!==e.containerType||!n&&!!e.backdropFilter&&"none"!==e.backdropFilter||!n&&!!e.filter&&"none"!==e.filter||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function L(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(t){return["html","body","#document"].includes(P(t))}function j(t){return M(t).getComputedStyle(t)}function X(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(t){if("html"===P(t))return t;const n=t.assignedSlot||t.parentNode||D(t)&&t.host||C(t);return D(n)?n.host:n}function N(t){const n=Y(t);return $(n)?t.ownerDocument?t.ownerDocument.body:t.body:z(n)&&F(n)?n:N(n)}function I(t,n,e){var i;void 0===n&&(n=[]),void 0===e&&(e=!0);const o=N(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=M(o);return r?n.concat(s,s.visualViewport||[],F(o)?o:[],s.frameElement&&e?I(s.frameElement):[]):n.concat(o,I(o,[],e))}function V(t){const n=j(t);let e=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=z(t),r=o?t.offsetWidth:e,s=o?t.offsetHeight:i,a=l(e)!==r||l(i)!==s;return a&&(e=r,i=s),{width:e,height:i,$:a}}function q(t){return T(t)?t:t.contextElement}function H(t){const n=q(t);if(!z(n))return u(1);const e=n.getBoundingClientRect(),{width:i,height:o,$:r}=V(n);let s=(r?l(e.width):e.width)/i,a=(r?l(e.height):e.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const U=u(0);function J(t){const n=M(t);return L()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:U}function W(t,n,e,i){void 0===n&&(n=!1),void 0===e&&(e=!1);const o=t.getBoundingClientRect(),r=q(t);let s=u(1);n&&(i?T(i)&&(s=H(i)):s=H(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==M(t))&&n}(r,e,i)?J(r):u(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(r){const t=M(r),n=i&&T(i)?M(i):i;let e=t,o=e.frameElement;for(;o&&i&&n!==e;){const t=H(o),n=o.getBoundingClientRect(),i=j(o),r=n.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=n.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,h*=t.y,l+=r,c+=s,e=M(o),o=e.frameElement}}return k({width:f,height:h,x:l,y:c})}const _=[":popover-open",":modal"];function G(t){return _.some((n=>{try{return t.matches(n)}catch(t){return!1}}))}function K(t){return W(C(t)).left+X(t).scrollLeft}function Q(t,n,e){let i;if("viewport"===n)i=function(t,n){const e=M(t),i=C(t),o=e.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=L();(!t||t&&"fixed"===n)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,e);else if("document"===n)i=function(t){const n=C(t),e=X(t),i=t.ownerDocument.body,o=a(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),r=a(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let s=-e.scrollLeft+K(t);const l=-e.scrollTop;return"rtl"===j(i).direction&&(s+=a(n.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:l}}(C(t));else if(T(n))i=function(t,n){const e=W(t,!0,"fixed"===n),i=e.top+t.clientTop,o=e.left+t.clientLeft,r=z(t)?H(t):u(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(n,e);else{const e=J(t);i={...n,x:n.x-e.x,y:n.y-e.y}}return k(i)}function Z(t,n){const e=Y(t);return!(e===n||!T(e)||$(e))&&("fixed"===j(e).position||Z(e,n))}function tt(t,n,e){const i=z(n),o=C(n),r="fixed"===e,s=W(t,!0,r,n);let a={scrollLeft:0,scrollTop:0};const l=u(0);if(i||!i&&!r)if(("body"!==P(n)||F(o))&&(a=X(n)),i){const t=W(n,!0,r,n);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else o&&(l.x=K(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function nt(t){return"static"===j(t).position}function et(t,n){return z(t)&&"fixed"!==j(t).position?n?n(t):t.offsetParent:null}function it(t,n){const e=M(t);if(G(t))return e;if(!z(t)){let n=Y(t);for(;n&&!$(n);){if(T(n)&&!nt(n))return n;n=Y(n)}return e}let i=et(t,n);for(;i&&B(i)&&nt(i);)i=et(i,n);return i&&$(i)&&nt(i)&&!E(i)?e:i||function(t){let n=Y(t);for(;z(n)&&!$(n);){if(E(n))return n;n=Y(n)}return null}(t)||e}const ot={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=C(i),a=!!n&&G(n.floating);if(i===s||a&&r)return e;let l={scrollLeft:0,scrollTop:0},c=u(1);const f=u(0),h=z(i);if((h||!h&&!r)&&(("body"!==P(i)||F(s))&&(l=X(i)),z(i))){const t=W(i);c=H(i),f.x=t.x+i.clientLeft,f.y=t.y+i.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+f.x,y:e.y*c.y-l.scrollTop*c.y+f.y}},getDocumentElement:C,getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===e?G(n)?[]:function(t,n){const e=n.get(t);if(e)return e;let i=I(t,[],!1).filter((t=>T(t)&&"body"!==P(t))),o=null;const r="fixed"===j(t).position;let s=r?Y(t):t;for(;T(s)&&!$(s);){const n=j(s),e=E(s);e||"fixed"!==n.position||(o=null),(r?!e&&!o:!e&&"static"===n.position&&o&&["absolute","fixed"].includes(o.position)||F(s)&&!e&&Z(t,s))?i=i.filter((t=>t!==s)):o=n,s=Y(s)}return n.set(t,i),i}(n,this._c):[].concat(e),i],l=r.reduce(((t,e)=>{const i=Q(n,e,o);return t.top=a(i.top,t.top),t.right=s(i.right,t.right),t.bottom=s(i.bottom,t.bottom),t.left=a(i.left,t.left),t}),Q(n,r[0],o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:it,getElementRects:async function(t){const n=this.getOffsetParent||it,e=this.getDimensions,i=await e(t.floating);return{reference:tt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=V(t);return{width:n,height:e}},getScale:H,isElement:T,isRTL:function(t){return"rtl"===j(t).direction}};const rt=S,st=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:i,placement:o}=n,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=m(t,n),c={x:e,y:i},u=await S(n,l),f=w(p(o)),h=y(f);let v=c[h],g=c[f];r&&(v=d(v+u["y"===h?"top":"left"],v,v-u["y"===h?"bottom":"right"])),s&&(g=d(g+u["y"===f?"top":"left"],g,g-u["y"===f?"bottom":"right"]));const b=a.fn({...n,[h]:v,[f]:g});return{...b,data:{x:b.x-e,y:b.y-i}}}}},at=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=n,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0,...k}=m(t,n);if(null!=(e=r.arrow)&&e.alignmentOffset)return{};const R=p(o),P=p(a)===a,M=await(null==l.isRTL?void 0:l.isRTL(c.floating)),C=h||(P||!w?[A(a)]:function(t){const n=A(t);return[x(t),n,x(n)]}(a));h||"none"===y||C.push(...function(t,n,e,i){const o=v(t);let r=function(t,n,e){const i=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return e?n?o:i:n?i:o;case"left":case"right":return n?r:s;default:return[]}}(p(t),"start"===e,i);return o&&(r=r.map((t=>t+"-"+o)),n&&(r=r.concat(r.map(x)))),r}(a,w,y,M));const O=[a,...C],T=await S(n,k),z=[];let D=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&z.push(T[R]),f){const t=function(t,n,e){void 0===e&&(e=!1);const i=v(t),o=b(t),r=g(o);let s="x"===o?i===(e?"end":"start")?"right":"left":"start"===i?"bottom":"top";return n.reference[r]>n.floating[r]&&(s=A(s)),[s,A(s)]}(o,s,M);z.push(T[t[0]],T[t[1]])}if(D=[...D,{placement:o,overflows:z}],!z.every((t=>t<=0))){var F,B;const t=((null==(F=r.flip)?void 0:F.index)||0)+1,n=O[t];if(n)return{data:{index:t,overflows:D},reset:{placement:n}};let e=null==(B=D.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:B.placement;if(!e)switch(d){case"bestFit":{var E;const t=null==(E=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0];t&&(e=t);break}case"initialPlacement":e=a}if(o!==e)return{reset:{placement:e}}}return{}}}};function lt(t,n,e){return[(i=null!=t?t:4,void 0===i&&(i=0),{name:"offset",options:i,async fn(t){var n,e;const{x:o,y:r,placement:s,middlewareData:a}=t,l=await async function(t,n){const{placement:e,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=p(e),a=v(e),l="y"===w(e),c=["left","top"].includes(s)?-1:1,u=r&&l?-1:1,f=m(n,t);let{mainAxis:h,crossAxis:d,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof y&&(d="end"===a?-1*y:y),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}(t,i);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(e=a.arrow)&&e.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}),null==n&&at(e),st(),null!=n&&ct(n)].filter((t=>"boolean"!=typeof t));var i}function ct(t){return{name:"boundaryContain",fn:async n=>{const e=await rt(n,t);return{x:n.x+(e.left>0?e.left:0)-(e.right>0?e.right:0),y:n.y+(e.top>0?e.top:0)-(e.bottom>0?e.bottom:0)}}}}const ut=class{constructor(e){t(this,e),this.dismissed=n(this,"dismissed",7),this.shouldUpdatePosition=!1,this.middleware=[],this.partialWindow=window,this.open=!1,this.placement="bottom-start",this.position=void 0,this.anchorBounds=void 0,this.backdrop=!0,this.animated=!1,this.anchorSelector=void 0,this.boundarySelector=void 0,this.resizeBehavior="dynamic",this.overflowBehavior=void 0,this.flipBehavior=void 0,this.offsetBehavior=void 0,this.updateOnResize=!1,this.opened=!1,this.computedPlacement=this.placement,this.updateListener=this.updateListener.bind(this),this.handlePositionUpdate=this.handlePositionUpdate.bind(this),this.handleResize=this.handleResize.bind(this),this.setWindow=this.setWindow.bind(this)}connectedCallback(){this.updatePosition(this.position)}componentDidUpdate(){this.shouldUpdatePosition&&(this.shouldUpdatePosition=!1,null!=this.updateDispose?this.handlePositionUpdate():this.updateListener())}componentDidLoad(){this.updateViewport(),this.handleMiddlewareChange(),this.updateListener(),"dynamic"===this.resizeBehavior&&window.addEventListener("resize",this.handleResize)}disconnectedCallback(){this.viewportWidth=void 0,this.viewportHeight=void 0,this.opened=!1,"dynamic"===this.resizeBehavior&&window.removeEventListener("resize",this.handleResize)}updatePosition(t){null!=t&&(this.anchorPosition="object"==typeof t?t:JSON.parse(t),this.shouldUpdatePosition=!0)}updatePlacement(){this.updatePosition(this.position)}updateOpened(t){t&&(this.opened=!0),this.updateListener()}updateAnimated(){this.opened=this.open}updateMiddleware(){this.handleMiddlewareChange()}setWindow(t){this.partialWindow=t}render(){var t,n;return e(i,null,this.open&&this.backdrop&&e("div",{class:"backdrop",onPointerDown:()=>{this.open=!1,this.dismissed.emit()}}),this.anchorPosition&&e("div",{ref:t=>this.anchorPointRef=t,class:"anchor",style:{left:`${(null===(t=this.anchorPosition)||void 0===t?void 0:t.x)||0}px`,top:`${(null===(n=this.anchorPosition)||void 0===n?void 0:n.y)||0}px`}}),e("slot",{name:"anchor"}),e("div",{ref:t=>this.wrapperRef=t,class:r("popper",{hidden:!this.open,open:this.open})},e("div",{class:r("content",{"hidden-animated":!this.open&&this.opened&&this.animated,"open-animated":this.open&&this.animated},this.getTransformClass()),onAnimationEnd:()=>{this.opened=this.open}},e("slot",null))))}updateListener(){var t,n,e,i;const o=null!==(n=null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.anchorPointRef)&&void 0!==n?n:this.getAnchorBoundsVirtualElement();this.open&&null!=o&&null!=this.wrapperRef?(null===(e=this.updateDispose)||void 0===e||e.call(this),this.updateDispose=function(t,n,e,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=i,h=q(t),d=o||r?[...h?I(h):[],...I(n)]:[];d.forEach((t=>{o&&t.addEventListener("scroll",e,{passive:!0}),r&&t.addEventListener("resize",e)}));const m=h&&u?function(t,n){let e,i=null;const o=C(t);function r(){var t;clearTimeout(e),null==(t=i)||t.disconnect(),i=null}return function l(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),r();const{left:h,top:d,width:m,height:p}=t.getBoundingClientRect();if(u||n(),!m||!p)return;const v={rootMargin:-c(d)+"px "+-c(o.clientWidth-(h+m))+"px "+-c(o.clientHeight-(d+p))+"px "+-c(h)+"px",threshold:a(0,s(1,f))||1};let y=!0;function g(t){const n=t[0].intersectionRatio;if(n!==f){if(!y)return l();n?l(!1,n):e=setTimeout((()=>{l(!1,1e-7)}),1e3)}y=!1}try{i=new IntersectionObserver(g,{...v,root:o.ownerDocument})}catch(t){i=new IntersectionObserver(g,v)}i.observe(t)}(!0),r}(h,e):null;let p,v=-1,y=null;l&&(y=new ResizeObserver((t=>{let[i]=t;i&&i.target===h&&y&&(y.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(n)}))),e()})),h&&!f&&y.observe(h),y.observe(n));let g=f?W(t):null;return f&&function n(){const i=W(t);!g||i.x===g.x&&i.y===g.y&&i.width===g.width&&i.height===g.height||e(),g=i,p=requestAnimationFrame(n)}(),e(),()=>{var t;d.forEach((t=>{o&&t.removeEventListener("scroll",e),r&&t.removeEventListener("resize",e)})),null==m||m(),null==(t=y)||t.disconnect(),y=null,f&&cancelAnimationFrame(p)}}(o,this.wrapperRef,this.handlePositionUpdate),this.handlePositionUpdate()):null===(i=this.updateDispose)||void 0===i||i.call(this)}async handlePositionUpdate(){var t,n,e;const i=null!==(n=null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.anchorPointRef)&&void 0!==n?n:this.getAnchorBoundsVirtualElement();if(null!=i&&null!=this.wrapperRef){const t=await async function(t,n,e,i){return await((t,n,e)=>{const i=new Map,o={platform:ot,...e},r={...o.platform,_c:i};return(async(t,n,e)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=e,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(n));let c=await s.getElementRects({reference:t,floating:n,strategy:o}),{x:u,y:f}=R(c,i,l),h=i,d={},m=0;for(let e=0;e<a.length;e++){const{name:r,fn:p}=a[e],{x:v,y,data:g,reset:w}=await p({x:u,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:n}});u=null!=v?v:u,f=null!=y?y:f,d={...d,[r]:{...d[r],...g}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(c=!0===w.rects?await s.getElementRects({reference:t,floating:n,strategy:o}):w.rects),({x:u,y:f}=R(c,h,l))),e=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}})(t,n,{...o,platform:r})})(t,n,{placement:e,middleware:i,strategy:"fixed"})}(i,this.wrapperRef,this.placement,this.middleware);this.computedPlacement=t.placement,null===(e=this.wrapperRef)||void 0===e||e.setAttribute("style",`left: ${t.x}px; top: ${t.y}px;`)}}handleMiddlewareChange(){var t,n,e;const i=null!=(null!==(t=this.getSlottedAnchorElement())&&void 0!==t?t:this.getAnchorBoundsVirtualElement())?4:0,o=null!=this.boundarySelector&&null!==(n=document.querySelector(this.boundarySelector))&&void 0!==n?n:void 0;this.middleware=lt(null!==(e=this.offsetBehavior)&&void 0!==e?e:i,null!=o?Object.assign({boundary:o},this.overflowBehavior):this.overflowBehavior,this.flipBehavior),this.updateListener()}getSlottedAnchorElement(){var t,n,e;if(null!=this.anchorSelector)return(null===(t=this.hostElement.shadowRoot)||void 0===t?void 0:t.querySelector(this.anchorSelector))||this.hostElement.querySelector(this.anchorSelector)||void 0;{const t=(null===(n=this.hostElement.shadowRoot)||void 0===n?void 0:n.querySelector('slot[name="anchor"]'))||void 0;if(null===(e=null==t?void 0:t.assignedElements)||void 0===e?void 0:e.call(t).length)return null==t?void 0:t.assignedElements()[0]}}getAnchorBoundsVirtualElement(){if(null!=this.anchorBounds)return{getBoundingClientRect:()=>DOMRect.fromRect(this.anchorBounds)}}handleResize(){null!=this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.open&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=void 0,null!=this.anchorPosition&&null!=this.viewportWidth&&null!=this.viewportHeight&&(this.position={x:this.partialWindow.innerWidth*(this.anchorPosition.x/this.viewportWidth),y:this.partialWindow.innerHeight*(this.anchorPosition.y/this.viewportHeight)}),this.updateViewport()}),200))}updateViewport(){this.viewportWidth=this.partialWindow.innerWidth,this.viewportHeight=this.partialWindow.innerHeight}getTransformClass(){if(this.animated)switch(this.computedPlacement){case"top":return"center-bottom";case"top-start":case"right-end":return"left-bottom";case"top-end":case"left-end":return"right-bottom";case"bottom":return"center-top";case"bottom-start":case"right-start":return"left-top";case"bottom-end":case"left-start":return"right-top";case"right":return"left-center";case"left":return"right-center"}}get hostElement(){return o(this)}static get watchers(){return{position:["updatePosition"],placement:["updatePlacement"],open:["updateOpened"],animated:["updateAnimated"],boundarySelector:["updateMiddleware"],overflowBehavior:["updateMiddleware"],flipBehavior:["updateMiddleware"],offsetBehavior:["updateMiddleware"]}}};ut.style=":host{--open-animation-name:open-scale-all;--open-animation:var(--open-animation-name) 0.1s ease-out 1;--close-animation-name:close-scale-all;--close-animation:var(--close-animation-name) 0.2s ease-in-out 1;--transform-origin:var(--none)}.open-animated{animation:var(--open-animation)}.hidden-animated{animation:var(--close-animation)}.hidden>.content{opacity:0;width:0;height:0;visibility:hidden}.hidden{pointer-events:none}.open{z-index:var(--vertex-ui-context-menu-layer)}.anchor{position:fixed}.backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:var(--backdrop-color, white);opacity:var(--backdrop-opacity, 0);z-index:var(--vertex-ui-context-menu-layer)}.popper{position:fixed}.center-bottom{transform-origin:var(--transform-origin, center bottom)}.left-bottom{transform-origin:var(--transform-origin, left bottom)}.right-bottom{transform-origin:var(--transform-origin, right bottom)}.center-top{transform-origin:var(--transform-origin, center top)}.left-top{transform-origin:var(--transform-origin, left top)}.right-top{transform-origin:var(--transform-origin, right top)}.left-center{transform-origin:var(--transform-origin, left center)}.left-top{transform-origin:var(--transform-origin, left top)}.left-bottom{transform-origin:var(--transform-origin, left bottom)}.right-center{transform-origin:var(--transform-origin, right center)}.right-top{transform-origin:var(--transform-origin, right top)}.right-bottom{transform-origin:var(--transform-origin, right bottom)}@keyframes open-fade-in{from{opacity:0}to{opacity:1}}@keyframes close-fade-out{from{visibility:visible;height:auto;width:auto;opacity:1}to{opacity:0;height:auto;width:auto}}@keyframes open-scale-all{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes close-scale-all{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scale(1)}to{opacity:0;height:auto;width:auto;transform:scale(0)}}@keyframes open-scale-y{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@keyframes close-scale-y{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scaleY(1)}to{opacity:0;height:auto;width:auto;transform:scaleY(0)}}@keyframes open-scale-x{from{opacity:0;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}@keyframes close-scale-x{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scaleX(1)}to{opacity:0;height:auto;width:auto;transform:scaleX(0)}}";export{ut as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{I as vertex_icon}from"./p-17b97932.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-94168b92.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,e as i,h as t,g as e}from"./p-6834631c.js";import{c as o}from"./p-fe062eb0.js";const r=class{constructor(t){s(this,t),this.menuClosed=i(this,"menuClosed",7),this.animated=!0,this.open=!1,this.placement=void 0,this.fallbackPlacements=void 0,this.backdrop=!0,this.position=void 0,this.popoverProps=void 0,this.handlePopoverDismiss=this.handlePopoverDismiss.bind(this)}componentDidLoad(){var s;this.addEventListeners(),this.headerSlot=(null===(s=this.hostElement.shadowRoot)||void 0===s?void 0:s.querySelector('slot[name="header"]'))||void 0}disconnectedCallback(){this.removeEventListeners()}render(){return t("vertex-popover",Object.assign({ref:s=>{this.popoverRef=s},open:this.open,animated:this.animated,position:this.position,placement:this.placement,backdrop:this.backdrop,flipBehavior:null!=this.fallbackPlacements?{fallbackPlacements:this.fallbackPlacements}:void 0},this.popoverProps),null==this.position&&t("div",{slot:"anchor"},t("slot",{name:"anchor"})),t("div",{onClick:()=>{this.open=!1,this.menuClosed.emit()},class:o("root",{"has-header":null!=this.headerSlot})},t("slot",{name:"header"}),t("slot",null)))}addEventListeners(){var s;null===(s=this.popoverRef)||void 0===s||s.addEventListener("dismissed",this.handlePopoverDismiss)}removeEventListeners(){var s;null===(s=this.popoverRef)||void 0===s||s.removeEventListener("dismissed",this.handlePopoverDismiss)}handlePopoverDismiss(){this.open=!1,this.menuClosed.emit()}get hostElement(){return e(this)}};r.style=":host{--background-color:var(--vertex-ui-white);--menu-padding:0.19em 0}.root{padding:var(--menu-padding);border:1px solid var(--vertex-ui-neutral-400);border-radius: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%);background-color:var(--background-color);z-index:var(--vertex-ui-context-menu-layer)}.has-header{padding-top:0}";export{r as M}
|