@threadlabs/looma 0.1.27 → 0.1.28
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/{chunk-RLELJVBL.js → chunk-G5AWV77V.js} +33 -33
- package/dist/{chunk-YHXJC5M5.js → chunk-M7FPK6GN.js} +17 -12
- package/dist/cjs/{positioning-i0WrCAdF.js → positioning-D5q9DM-0.js} +19 -12
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +2 -2
- package/dist/cjs/ui-popover.cjs.entry.js +2 -2
- package/dist/cjs/ui-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ui-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.css +1 -0
- package/dist/collection/components/ui-menu/ui-menu.css +7 -2
- package/dist/collection/components/ui-popover/ui-popover.css +6 -2
- package/dist/collection/overlay/positioning.js +21 -14
- package/dist/components/{p-DZRtXH6j.js → p-B1macZOS.js} +1 -1
- package/dist/components/{p-BKzrrab4.js → p-DiyiodGX.js} +1 -1
- package/dist/components/p-Drw41pSY.js +1 -0
- package/dist/components/{p-D0wBI-9r.js → p-d5fk1vBI.js} +1 -1
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-combobox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-multi-combobox.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/esm/{positioning-Bu0dmLBE.js → positioning-Drmwg-C1.js} +19 -12
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-chip_2.entry.js +1 -1
- package/dist/esm/ui-context-menu.entry.js +1 -1
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +2 -2
- package/dist/esm/ui-popover.entry.js +2 -2
- package/dist/esm/ui-toast-region.entry.js +1 -1
- package/dist/esm/ui-tooltip.entry.js +1 -1
- package/dist/index.cjs +54 -36
- package/dist/index.js +26 -13
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-0fd60103.entry.js → p-311e54d4.entry.js} +1 -1
- package/dist/looma/{p-72338f53.entry.js → p-32c85198.entry.js} +1 -1
- package/dist/looma/{p-a939c00f.entry.js → p-3957f7ef.entry.js} +1 -1
- package/dist/looma/{p-66c6b6dd.entry.js → p-4a10a875.entry.js} +1 -1
- package/dist/looma/{p-77dcfa6f.entry.js → p-4f68f939.entry.js} +1 -1
- package/dist/looma/p-63a9159f.entry.js +1 -0
- package/dist/looma/{p-85a6716e.entry.js → p-82de1112.entry.js} +1 -1
- package/dist/looma/{p-b75aff63.entry.js → p-88e61cab.entry.js} +1 -1
- package/dist/looma/p-Drmwg-C1.js +1 -0
- package/dist/{ui-affordance-scope.entry-7H6GIQEK.js → ui-affordance-scope.entry-X5526PRP.js} +2 -2
- package/dist/{ui-avatar-group.entry-QB25IUWA.js → ui-avatar-group.entry-U72MPB5K.js} +1 -1
- package/dist/{ui-avatar.entry-L377CWPR.js → ui-avatar.entry-OC4J3LTV.js} +1 -1
- package/dist/{ui-badge.entry-QHC3KI5S.js → ui-badge.entry-4MSUQRQV.js} +1 -1
- package/dist/{ui-button.entry-MZGTPU22.js → ui-button.entry-22DESWN4.js} +1 -1
- package/dist/{ui-callout.entry-2D4LO74K.js → ui-callout.entry-LOGODDM5.js} +1 -1
- package/dist/{ui-checkbox.entry-B2O5DREC.js → ui-checkbox.entry-XAGW3BW4.js} +1 -1
- package/dist/{ui-chip_2.entry-OOSON72O.js → ui-chip_2.entry-JCPHPXAG.js} +2 -2
- package/dist/{ui-context-menu.entry-UY76G7HM.js → ui-context-menu.entry-24YOHF7L.js} +2 -2
- package/dist/{ui-dialog.entry-345V7IJ3.js → ui-dialog.entry-XKNYDWOQ.js} +2 -2
- package/dist/{ui-disclosure.entry-RUU7VNDN.js → ui-disclosure.entry-2AWCGZ4C.js} +1 -1
- package/dist/{ui-editable.entry-WWFFHOMP.js → ui-editable.entry-HLEWO7BN.js} +1 -1
- package/dist/{ui-floating-action-button.entry-Y2TLDJO4.js → ui-floating-action-button.entry-2NJDB4YN.js} +1 -1
- package/dist/{ui-form-field.entry-C63GZMQR.js → ui-form-field.entry-FJ5HYCTN.js} +1 -1
- package/dist/{ui-icon-button.entry-35MJYYEI.js → ui-icon-button.entry-YZHJQ5YR.js} +1 -1
- package/dist/{ui-input.entry-3FAXEH5M.js → ui-input.entry-JMBLMNP6.js} +1 -1
- package/dist/{ui-menu-item.entry-3J42XLCJ.js → ui-menu-item.entry-VBGXM66D.js} +1 -1
- package/dist/{ui-menu.entry-YDABO3OO.js → ui-menu.entry-I2N5H3YC.js} +3 -3
- package/dist/{ui-multi-combobox.entry-XXLS4V3I.js → ui-multi-combobox.entry-MEX7MU7P.js} +1 -1
- package/dist/{ui-popover.entry-YP7R6FQO.js → ui-popover.entry-7JRSJM5S.js} +3 -3
- package/dist/{ui-radio-group.entry-TYXAN7G5.js → ui-radio-group.entry-Q2XB7P3B.js} +1 -1
- package/dist/{ui-radio.entry-JW7HX3LW.js → ui-radio.entry-NJO4NA4M.js} +1 -1
- package/dist/{ui-search-result-row.entry-MKQYGNFO.js → ui-search-result-row.entry-RPMNDSRN.js} +1 -1
- package/dist/{ui-search-shell.entry-KHIQTT4J.js → ui-search-shell.entry-FMIMYD3B.js} +1 -1
- package/dist/{ui-select.entry-R235Y3IL.js → ui-select.entry-7NDBWNAU.js} +1 -1
- package/dist/{ui-switch.entry-BJ6FIEPB.js → ui-switch.entry-YUCPIZE4.js} +1 -1
- package/dist/{ui-tabs.entry-ZBP3FLR2.js → ui-tabs.entry-FXZWV665.js} +1 -1
- package/dist/{ui-textarea.entry-2YW7TCEU.js → ui-textarea.entry-HHLQR5GG.js} +1 -1
- package/dist/{ui-toast-region.entry-ZSCMMIKQ.js → ui-toast-region.entry-PIIBHNYA.js} +2 -2
- package/dist/{ui-tooltip.entry-VG4AWEBD.js → ui-tooltip.entry-AQ6UPBUP.js} +2 -2
- package/dist/{ui-top-bar.entry-CZW3MLC6.js → ui-top-bar.entry-S2L7ZM4U.js} +1 -1
- package/dist/{ui-tree-item.entry-CU2SWAOK.js → ui-tree-item.entry-UID7IJPA.js} +1 -1
- package/dist/{ui-tree.entry-M6KXK7GJ.js → ui-tree.entry-UMD3DNG5.js} +1 -1
- package/package.json +1 -1
- package/styles.css +6 -4
- package/dist/components/p-DOulVJT7.js +0 -1
- package/dist/looma/p-8f102407.entry.js +0 -1
- package/dist/looma/p-Bu0dmLBE.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=16;let n=0;const o=new WeakMap;function a(t){try{return t.matches(":popover-open")}catch{return!t.hidden}}function i(t){if(t.setAttribute("popover","manual"),t.hidden=!1,"function"==typeof t.showPopover&&!a(t))try{t.showPopover()}catch{}}function e(t){if("function"==typeof t.hidePopover&&a(t))try{t.hidePopover()}catch{}t.hidden=!0}function r(t){return t.setAttribute("popover","manual"),t.dataset.uiPositioning="viewport",{show(){i(t)},hide(){e(t)},destroy(){e(t)}}}function l(t,n,o,a,i,e=t.getBoundingClientRect()){const r=c(t.ownerDocument.defaultView??window),l=o.startsWith("top"),u=o.endsWith("end"),h=r.bottom-n.bottom-i,p=n.top-r.top-i,f=(l?!(p<e.height+a&&h>p):h<e.height+a&&p>h)?n.top-e.height-a:n.bottom+a,d=u?n.right-e.width:n.left,m=s({left:d,top:f,width:e.width,height:e.height},r,i);t.style.left=`${Math.round(d+m.x)}px`,t.style.top=`${Math.round(f+m.y)}px`,t.style.right="auto",t.style.bottom="auto"}function u(t,a={}){const r=t.ownerDocument.defaultView??window,u=a.placement??"bottom-start",h=Math.max(0,a.gap??4),p=Math.max(0,a.viewportGap??8),f=function(t){const n=t.CSS;return"function"==typeof n?.supports&&n.supports("anchor-name: --ui-anchor-test")&&n.supports("position-anchor: --ui-anchor-test")&&n.supports("top: anchor(bottom)")}(r),d="--ui-anchor-"+ ++n;let m=a.anchor??null,g=null,y=!1,v=null,w=null;t.setAttribute("popover","manual"),t.dataset.uiPositioning=f?"anchor":"fallback",t.style.position="fixed",t.style.margin="0";const b=n=>{m&&function(t,n){const a=o.get(t);if(a)if(a.names.delete(n),a.names.size){const n=[a.original,...a.names].filter(Boolean);t.style.setProperty("anchor-name",n.join(", "))}else a.original?t.style.setProperty("anchor-name",a.original):t.style.removeProperty("anchor-name"),o.delete(t)}(m,d),m=n,m?(function(t,n){const a=o.get(t)??{original:t.style.getPropertyValue("anchor-name"),names:new Set};a.names.add(n),o.set(t,a);const i=[a.original,...a.names].filter(Boolean);t.style.setProperty("anchor-name",i.join(", "))}(m,d),t.style.setProperty("position-anchor",d)):t.style.removeProperty("position-anchor")},M=()=>{if(v=null,!y)return;if(g)return void l(t,{left:g.x,right:g.x,top:g.y,bottom:g.y},"bottom-start",h,p);if(!m)return;let n;if(f){(()=>{const n=u.startsWith("bottom"),o=u.endsWith("end");t.style.top=n?`calc(anchor(bottom) + ${h}px)`:"auto",t.style.bottom=n?"auto":`calc(anchor(top) + ${h}px)`,t.style.left=o?"auto":"anchor(left)",t.style.right=o?"anchor(right)":"auto",t.style.setProperty("position-try-fallbacks","flip-block, flip-inline")})();const o=c(r);n=t.getBoundingClientRect();const a=s(n,o,p);if(0===a.x&&0===a.y)return}l(t,m.getBoundingClientRect(),u,h,p,n)},x=()=>{y&&null===v&&(v=r.requestAnimationFrame(M))},A=()=>{if(!y||null===g&&null===m)return w?.abort(),void(w=null);if(w)return;w=new AbortController;const t=w.signal;r.addEventListener("resize",x,{passive:!0,signal:t}),r.addEventListener("scroll",x,{passive:!0,capture:!0,signal:t}),r.visualViewport?.addEventListener("resize",x,{passive:!0,signal:t}),r.visualViewport?.addEventListener("scroll",x,{passive:!0,signal:t})};return b(m),{setAnchor(t){g=null,b(t),A(),x()},show(){g=null,y=!0,A(),i(t),M()},showAtPoint(n){g=n,y=!0,A(),i(t),M()},hide(){y=!1,g=null,A(),null!==v&&r.cancelAnimationFrame(v),v=null,e(t)},refresh:x,destroy(){y=!1,w?.abort(),w=null,null!==v&&r.cancelAnimationFrame(v),v=null,e(t),b(null)}}}function c(t=window){const n=t.visualViewport,o=n?.offsetLeft??0,a=n?.offsetTop??0,i=n?.width??t.innerWidth,e=n?.height??t.innerHeight;return{left:o,top:a,right:o+i,bottom:a+e,width:i,height:e}}function s(t,n=c(),o=0){const a=Math.max(0,n.width-2*o),i=Math.max(0,n.height-2*o),e=t.width>a?n.left+o:Math.min(Math.max(t.left,n.left+o),n.right-o-t.width),r=t.height>i?n.top+o:Math.min(Math.max(t.top,n.top+o),n.bottom-o-t.height);return{x:e-t.left,y:r-t.top}}function h(t,n){const o=Math.max(n.left-t.x,0,t.x-n.right),a=Math.max(n.top-t.y,0,t.y-n.bottom);return Math.hypot(o,a)}function p(t,n={}){const o=t.ownerDocument.defaultView??window,a=n.pointerTarget??t,i=n.anchorSelector??"[data-ui-affordance]",e=n.nearRadius??16,r=Number.isFinite(e)?Math.max(0,e):16,l=new AbortController;let u=[],c=null,s=null,p=!1;const f=()=>{for(const{element:t}of u)t.hasAttribute("data-ui-proximity")&&t.removeAttribute("data-ui-proximity");t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},d=()=>{u=Array.from(t.querySelectorAll(i)).filter((t=>!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled"))).map((t=>({element:t,rect:t.getBoundingClientRect()}))),p=!1},m=()=>{if(c=null,p&&d(),!s)return void f();let n=!1;for(const t of u){const o=h(s,t.rect)<=r;o&&"near"!==t.element.getAttribute("data-ui-proximity")?t.element.setAttribute("data-ui-proximity","near"):!o&&t.element.hasAttribute("data-ui-proximity")&&t.element.removeAttribute("data-ui-proximity"),n||=o}n&&"engaged"!==t.getAttribute("data-ui-interaction")?t.setAttribute("data-ui-interaction","engaged"):!n&&t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},g=()=>{null===c&&(c=o.requestAnimationFrame(m))},y=()=>{p=!0,g()};return a.addEventListener("pointermove",(t=>{s="touch"===t.pointerType?null:{x:t.clientX,y:t.clientY},g()}),{passive:!0,signal:l.signal}),o.addEventListener("resize",y,{passive:!0,signal:l.signal}),o.addEventListener("scroll",y,{passive:!0,capture:!0,signal:l.signal}),o.visualViewport?.addEventListener("resize",y,{passive:!0,signal:l.signal}),o.visualViewport?.addEventListener("scroll",y,{passive:!0,signal:l.signal}),d(),{refresh:y,destroy(){l.abort(),null!==c&&o.cancelAnimationFrame(c),c=null,s=null,f(),u=[]}}}export{t as D,p as a,r as b,u as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,c as s,t as
|
|
1
|
+
import{p as e,H as t,h as i,c as s,t as r}from"./p-Bh_1GxOD.js";import{d as a,e as o}from"./p-JwSoedEO.js";import{o as n,c as l,r as c}from"./p-C-0syqXZ.js";import{i as u,c as h}from"./p-BnGhGgTH.js";import{c as p}from"./p-Drw41pSY.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-menu-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){u(this.open)&&(this.internalOpen=this.open)}resetSurface(){this.setupSurface(),this.syncSurface()}syncSurface(){this.syncAnchorState(),this.surface&&(this.internalOpen?(this.surface.show(),n({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,t)=>this.closeMenu(e,t)})):(this.surface.hide(),l(this.overlayId)))}componentDidLoad(){this.internalOpen=h(this.open,this.defaultOpen),this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncSurface()}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,l(this.overlayId)}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=p(this.host,{anchor:this.anchor,placement:this.placement}))}syncAnchorState(){this.anchor&&(this.anchor.setAttribute("aria-haspopup","menu"),this.anchor.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}closeMenu(e,t){this.internalOpen&&(u(this.open)||(this.internalOpen=!1),a(this.host,"close",{open:!1,reason:e,trigger:t}),"escape"===e&&this.anchor?.focus())}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";a(this.host,"select",{value:i,trigger:o(e)}),a(this.host,"close",{open:!1,reason:"action",trigger:o(e)}),u(this.open)||(this.internalOpen=!1)};onKeydown=e=>{if("Escape"===e.key)return e.preventDefault(),void c("escape","keyboard");const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const s=e.target.closest?.("ui-menu-item"),r=s&&s instanceof t?i.indexOf(s):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?r<0?0:Math.min(r+1,i.length-1):r<=0?i.length-1:r-1].focus());else if(e.preventDefault(),s&&r>=0){const e=s.getAttribute("value")??s.getAttribute("data-value")??"";a(this.host,"select",{value:e,trigger:"keyboard"}),a(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),u(this.open)||(this.internalOpen=!1)}};render(){return i(s,{key:"22689ca1b0514bb27a76bfb9a702c0d4ce49d136",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("div",{key:"cff891a33348f077631f1b92f1167285aafd25f1",class:"menu__surface"},i("slot",{key:"3a0e9ff4f36b1afbe5f879e0e51ff4943279b5b5"})))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}}static get style(){return":host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;max-inline-size:inherit;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-block-size:inherit;overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:visible;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%}"}},[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}]);function m(){"undefined"!=typeof customElements&&["ui-menu"].forEach((e=>{"ui-menu"===e&&(customElements.get(r(e))||customElements.define(r(e),d))}))}export{d as U,m as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,t,H as a,h as n,c as o}from"./p-Bh_1GxOD.js";import{D as s,a as
|
|
1
|
+
import{p as e,t,H as a,h as n,c as o}from"./p-Bh_1GxOD.js";import{D as s,a as r}from"./p-Drw41pSY.js";const i=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}nearRadius=s;coordinator=null;componentDidLoad(){this.connectCoordinator()}disconnectedCallback(){this.coordinator?.destroy(),this.coordinator=null}connectCoordinator(){this.coordinator?.destroy(),this.coordinator=r(this.host,{nearRadius:this.nearRadius})}onSlotChange=()=>{this.coordinator?.refresh()};render(){return n(o,{key:"f500fa48554ed6224efd2dbe9632880bf0a15a19"},n("slot",{key:"37c5c5b7925b260ff8f9edd411ee6c90a12a4909",onSlotchange:this.onSlotChange}))}static get watchers(){return{nearRadius:[{connectCoordinator:0}]}}static get style(){return":host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}"}},[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},void 0,{nearRadius:[{connectCoordinator:0}]}]),c=i,d=function(){"undefined"!=typeof customElements&&["ui-affordance-scope"].forEach((e=>{"ui-affordance-scope"===e&&(customElements.get(t(e))||customElements.define(t(e),i))}))};export{c as UiAffordanceScope,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as
|
|
1
|
+
import{U as o,d as s}from"./p-DiyiodGX.js";const i=o,p=s;export{i as UiCombobox,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,c as s,t as n}from"./p-Bh_1GxOD.js";import{o,c as r,r as a}from"./p-C-0syqXZ.js";import{d as h}from"./p-JwSoedEO.js";import{c}from"./p-
|
|
1
|
+
import{p as t,H as e,h as i,c as s,t as n}from"./p-Bh_1GxOD.js";import{o,c as r,r as a}from"./p-C-0syqXZ.js";import{d as h}from"./p-JwSoedEO.js";import{c}from"./p-Drw41pSY.js";import{d as u}from"./p-d5fk1vBI.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;for;internalOpen=!1;focusTrigger="programmatic";overlayId="ui-context-menu-"+Math.random().toString(36).slice(2,11);trigger=null;contextTarget=null;pointerX=0;pointerY=0;pointPositioned=!1;surface=null;syncFromProp(){this.internalOpen=this.open}syncTarget(){this.resolveTargets(),this.attachTargetListeners()}syncOverlay(){this.syncTriggerState(),this.internalOpen?(this.pointPositioned?this.surface?.showAtPoint({x:this.pointerX,y:this.pointerY}):this.surface?.show(),o({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(t,e)=>this.closeMenu(t,e)})):(this.surface?.hide(),r(this.overlayId))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.resolveTargets(),this.attachTargetListeners(),this.setupSurface(),this.syncTriggerState(),this.syncOverlay()}componentDidUpdate(){this.resolveTargets(),this.attachTargetListeners(),this.pointPositioned||this.surface?.setAnchor(this.trigger),this.syncTriggerState()}disconnectedCallback(){this.detachTargetListeners(),this.surface?.destroy(),this.surface=null,r(this.overlayId)}setupSurface(){const t=this.host.shadowRoot?.querySelector(".menu");t&&(this.surface?.destroy(),this.surface=c(t,{anchor:this.trigger,placement:"bottom-start"}))}resolveTargets(){const t=this.trigger,e=this.contextTarget,i=this.host.querySelector('[slot="trigger"]'),s=this.for?document.getElementById(this.for):null;this.trigger=i,this.contextTarget=s??i??this.host.parentElement,t===this.trigger&&e===this.contextTarget||(t?.removeEventListener("click",this.onTriggerClick),t?.removeEventListener("keydown",this.onTriggerKeydown),e?.removeEventListener("contextmenu",this.onContextMenu))}attachTargetListeners(){this.detachTargetListeners(),this.trigger?.addEventListener("click",this.onTriggerClick),this.trigger?.addEventListener("keydown",this.onTriggerKeydown),this.contextTarget?.addEventListener("contextmenu",this.onContextMenu)}detachTargetListeners(){this.trigger?.removeEventListener("click",this.onTriggerClick),this.trigger?.removeEventListener("keydown",this.onTriggerKeydown),this.contextTarget?.removeEventListener("contextmenu",this.onContextMenu)}syncTriggerState(){this.trigger&&(this.trigger.setAttribute("aria-haspopup","menu"),this.trigger.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item")).filter((t=>!this.isItemDisabled(t)))}focusFirstItem(){requestAnimationFrame((()=>this.getItems()[0]?.focus()))}openMenu(t,e,i){this.pointerX=t,this.pointerY=e,this.focusTrigger=i,this.pointPositioned=!0,this.surface?.showAtPoint({x:t,y:e}),this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:i}),this.focusFirstItem()}openFromTrigger(t){this.trigger&&(this.pointPositioned=!1,this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:t}),this.focusFirstItem())}closeMenu(t,e,i=!0){this.internalOpen&&(this.internalOpen=!1,h(this.host,"close",{open:!1,reason:t,trigger:e}),i&&this.trigger?.focus())}onTriggerClick=t=>{this.internalOpen?this.closeMenu("action",0===t.detail?"keyboard":"pointer"):this.openFromTrigger(0===t.detail?"keyboard":"pointer")};onTriggerKeydown=t=>{"Enter"!==t.key&&" "!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.internalOpen?this.focusFirstItem():this.openFromTrigger("keyboard"))};onContextMenu=t=>{t.preventDefault(),this.openMenu(t.clientX,t.clientY,"pointer")};isItemDisabled(t){return"true"===t.getAttribute("aria-disabled")||t.hasAttribute("disabled")||"true"===t.getAttribute("disabled")||!0===t.disabled}onKeydown=t=>{if(this.internalOpen){if(this.focusTrigger="keyboard","Escape"===t.key)return t.preventDefault(),void a("escape","keyboard");if("Enter"===t.key||" "===t.key){const e=t.target.closest?.("ui-menu-item");if(!e||this.isItemDisabled(e))return;t.preventDefault();const i=e.getAttribute("value")??e.getAttribute("data-value")??"";h(this.host,"select",{value:i,trigger:"keyboard"}),this.closeMenu("action","keyboard")}}};onItemClick=t=>{const e=t.target.closest?.("ui-menu-item");if(!e||this.isItemDisabled(e))return;const i=e.getAttribute("value")??e.getAttribute("data-value")??"";h(this.host,"select",{value:i,trigger:"pointer"}),this.closeMenu("action","pointer")};render(){return i(s,{key:"292937da8010dc741e3e845b6f7fd0fef6b8bda3","data-open":this.internalOpen?"":void 0,"data-focus-trigger":this.internalOpen?this.focusTrigger:void 0,onKeyDown:this.onKeydown,onClick:this.onItemClick},i("slot",{key:"4f08876237d1919803200226d956e67de35fffab",name:"trigger"}),i("div",{key:"c2cc0218165d02cc4c7fd11bdc52a51d39897546",class:"menu","data-open":this.internalOpen?"":void 0},i("ui-menu",{key:"1c2c6e62c86f3a38f014976843f3354d312d0744",open:this.internalOpen},i("slot",{key:"baeca960ac6d2277a60dc567f6e4110904d67b5e"}))))}static get watchers(){return{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}}static get style(){return":host{display:contents}:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus){outline:none}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}"}},[769,"ui-context-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],internalOpen:[32],focusTrigger:[32]},void 0,{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}]),m=d,l=function(){"undefined"!=typeof customElements&&["ui-context-menu","ui-menu"].forEach((t=>{switch(t){case"ui-context-menu":customElements.get(n(t))||customElements.define(n(t),d);break;case"ui-menu":customElements.get(n(t))||u()}}))};export{m as UiContextMenu,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as i,H as a,h as o,c as e,t}from"./p-Bh_1GxOD.js";import{o as s,c as r,r as n}from"./p-C-0syqXZ.js";import{d as l}from"./p-JwSoedEO.js";import{i as d,c}from"./p-BnGhGgTH.js";const u=i(class extends a{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}get host(){return this}open;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;accessibleLabel="Dialog";overlayId="ui-dialog-"+Math.random().toString(36).slice(2,11);dialogRef;contentObserver=null;syncFromProp(){d(this.open)&&(this.internalOpen=this.open)}syncLabelFromProp(){this.syncAccessibleLabel()}componentWillLoad(){this.syncAccessibleLabel()}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),s({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),r(this.overlayId)))}componentDidLoad(){this.contentObserver=new MutationObserver(this.syncAccessibleLabel),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,characterData:!0}),this.internalOpen=c(this.open,this.defaultOpen),this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncAccessibleLabel(),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),this.contentObserver?.disconnect(),this.contentObserver=null,r(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){d(this.open)||(this.internalOpen=!1),l(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(d(this.open)?requestAnimationFrame((()=>this.syncOpen())):(this.internalOpen=!1,r(this.overlayId)),l(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&n("escape","keyboard")};syncAccessibleLabel=()=>{const i=this.label?.trim(),a=this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6'),o=a?.textContent?.trim(),e=i||o||"Dialog";this.accessibleLabel!==e&&(this.accessibleLabel=e)};render(){return o(e,{key:"f5b4441f54505e40851dd239d12cf8ed09daabfe","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"6896de6166cc085d9bd581dc053705fbce6328d8",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.accessibleLabel},o("slot",{key:"07515a7b8da25ccbd18bcde226129a569c999af7"})))}static get watchers(){return{open:[{syncFromProp:0}],label:[{syncLabelFromProp:0}],internalOpen:[{syncOpen:0}]}}static get style(){return":host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}"}},[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32],accessibleLabel:[32]},void 0,{open:[{syncFromProp:0}],label:[{syncLabelFromProp:0}],internalOpen:[{syncOpen:0}]}]),h=u,p=function(){"undefined"!=typeof customElements&&["ui-dialog"].forEach((i=>{"ui-dialog"===i&&(customElements.get(t(i))||customElements.define(t(i),u))}))};export{h as UiDialog,p as defineCustomElement}
|
|
1
|
+
import{p as i,H as a,h as o,c as e,t}from"./p-Bh_1GxOD.js";import{o as s,c as r,r as n}from"./p-C-0syqXZ.js";import{d as l}from"./p-JwSoedEO.js";import{i as d,c}from"./p-BnGhGgTH.js";const u=i(class extends a{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}get host(){return this}open;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;accessibleLabel="Dialog";overlayId="ui-dialog-"+Math.random().toString(36).slice(2,11);dialogRef;contentObserver=null;syncFromProp(){d(this.open)&&(this.internalOpen=this.open)}syncLabelFromProp(){this.syncAccessibleLabel()}componentWillLoad(){this.syncAccessibleLabel()}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),s({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),r(this.overlayId)))}componentDidLoad(){this.contentObserver=new MutationObserver(this.syncAccessibleLabel),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,characterData:!0}),this.internalOpen=c(this.open,this.defaultOpen),this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncAccessibleLabel(),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),this.contentObserver?.disconnect(),this.contentObserver=null,r(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){d(this.open)||(this.internalOpen=!1),l(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(d(this.open)?requestAnimationFrame((()=>this.syncOpen())):(this.internalOpen=!1,r(this.overlayId)),l(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&n("escape","keyboard")};syncAccessibleLabel=()=>{const i=this.label?.trim(),a=this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6'),o=a?.textContent?.trim(),e=i||o||"Dialog";this.accessibleLabel!==e&&(this.accessibleLabel=e)};render(){return o(e,{key:"f5b4441f54505e40851dd239d12cf8ed09daabfe","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"6896de6166cc085d9bd581dc053705fbce6328d8",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.accessibleLabel},o("slot",{key:"07515a7b8da25ccbd18bcde226129a569c999af7"})))}static get watchers(){return{open:[{syncFromProp:0}],label:[{syncLabelFromProp:0}],internalOpen:[{syncOpen:0}]}}static get style(){return":host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;box-sizing:border-box;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}"}},[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32],accessibleLabel:[32]},void 0,{open:[{syncFromProp:0}],label:[{syncLabelFromProp:0}],internalOpen:[{syncOpen:0}]}]),h=u,p=function(){"undefined"!=typeof customElements&&["ui-dialog"].forEach((i=>{"ui-dialog"===i&&(customElements.get(t(i))||customElements.define(t(i),u))}))};export{h as UiDialog,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as o,d as
|
|
1
|
+
import{U as o,d as s}from"./p-d5fk1vBI.js";const p=o,r=s;export{p as UiMenu,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,d as i,h as s,c as o,t as a}from"./p-Bh_1GxOD.js";import{d as r}from"./p-Vc4ExHFc.js";import{d as n}from"./p-
|
|
1
|
+
import{p as e,H as t,d as i,h as s,c as o,t as a}from"./p-Bh_1GxOD.js";import{d as r}from"./p-Vc4ExHFc.js";import{d as n}from"./p-DiyiodGX.js";import{d as c}from"./p-B1macZOS.js";const h=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.queryChange=i(this,"query-change"),this.addItem=i(this,"add-item"),this.removeItem=i(this,"remove-item"),this.createItem=i(this,"create-item"),this.optionsChange=i(this,"options-change")}get host(){return this}label="";placeholder="";items=[];config={};query;defaultQuery="";tokenSeparators=[];disabled=!1;readOnly=!1;required=!1;name="";queryChange;addItem;removeItem;createItem;optionsChange;raw="";rows=[];combobox;filteredConfig;filteredConfigSource;filteredSelection="";componentWillLoad(){this.raw=this.query??this.defaultQuery}syncQuery(){void 0!==this.query&&(this.raw=this.query)}get selectedValues(){return new Set(this.items.map((e=>e.value)))}get comboboxConfig(){const e=this.items.map((e=>e.value)).join("\0");if(this.filteredConfig&&this.filteredConfigSource===this.config&&this.filteredSelection===e)return this.filteredConfig;const t=this.config.filter,i=this.selectedValues;return this.filteredConfigSource=this.config,this.filteredSelection=e,this.filteredConfig={...this.config,filter:(e,s,o)=>!i.has(e.value)&&(t?t(e,s,o):e.label.toLocaleLowerCase().includes(s.toLocaleLowerCase()))},this.filteredConfig}setQuery(e,t){void 0===this.query&&(this.raw=e),this.queryChange.emit({query:e,display:e,trigger:t})}clearCommittedQuery(e,t){e.value="",this.raw="",this.setQuery("",t)}onQueryChange=e=>{e.stopPropagation(),this.setQuery(e.detail.query,e.detail.trigger)};onOptionsChange=e=>{e.stopPropagation(),this.rows=e.detail,this.optionsChange.emit(e.detail)};onValueChange=e=>{e.stopPropagation(),"selection"===e.detail.kind&&e.detail.option&&(this.addItem.emit({item:e.detail.option,index:this.items.length,trigger:e.detail.trigger}),queueMicrotask((()=>this.setQuery("",e.detail.trigger))))};onCreateEntry=e=>{e.stopPropagation();const t=e.detail.query.trim();t&&(this.setQuery("",e.detail.trigger),this.createItem.emit({query:t,trigger:e.detail.trigger}))};commitQuery(e,t){const i=this.raw.trim();if(!i)return;const s=i.toLocaleLowerCase(),o=this.rows.find((e=>e.label.trim().toLocaleLowerCase()===s));o?(this.clearCommittedQuery(e,t),this.addItem.emit({item:o,index:this.items.length,trigger:t})):this.config.allowCreate&&(this.clearCommittedQuery(e,t),this.createItem.emit({query:i,trigger:t}))}remove(e,t){const i=this.items[e];!i||i.disabled||this.disabled||this.readOnly||(this.removeItem.emit({item:i,index:e,trigger:t}),requestAnimationFrame((()=>{const t=this.host.shadowRoot?.querySelectorAll('[part="item"]')??[],s=t[Math.min(e,t.length-1)]??t[e-1];s&&s.dataset.value!==i.value?s.focus():this.focusInput()})))}focusItem(e){this.host.shadowRoot?.querySelectorAll('[part="item"]')[e]?.focus()}onItemKeyDown=(e,t)=>{e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||("ArrowLeft"===e.key?(e.preventDefault(),e.stopPropagation(),this.focusItem(Math.max(0,t-1))):"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),t===this.items.length-1?this.focusInput():this.focusItem(t+1)):"Backspace"!==e.key&&"Delete"!==e.key||(e.preventDefault(),e.stopPropagation(),this.remove(t,"keyboard")))};onKeyDown=e=>{if(e.defaultPrevented||e.isComposing||this.disabled||this.readOnly||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const t=e.composedPath().find((e=>e instanceof HTMLInputElement));return t?this.tokenSeparators.includes(e.key)?(e.preventDefault(),e.stopPropagation(),void this.commitQuery(t,"keyboard")):void(this.raw||(t.selectionStart??0)>0||("ArrowLeft"===e.key&&this.items.length?(e.preventDefault(),this.focusItem(this.items.length-1)):"Backspace"===e.key&&this.items.length&&(e.preventDefault(),this.remove(this.items.length-1,"keyboard")))):void 0};async focusInput(){await(this.combobox?.focusInput())}render(){return s(o,{key:"ba4db0fdca6cae344fe6b0bf06c933a9a90d2d3f",onKeyDown:this.onKeyDown},s("ui-combobox",{key:"f5901b0b078b479425114d998618828cc458e7dd",ref:e=>this.combobox=e,label:this.label,"label-visibility":"sr-only",placeholder:this.placeholder,name:this.name,value:null,query:this.raw,config:this.comboboxConfig,size:"sm",disabled:this.disabled,readOnly:this.readOnly,required:this.required,"onQuery-change":this.onQueryChange,"onValue-change":this.onValueChange,"onCreate-entry":this.onCreateEntry,"onOptions-change":this.onOptionsChange},s("div",{key:"374c80862302d5c36f4849f42e5ed13222addd1c",slot:"start",class:"items",role:"group","aria-label":"Selected "+this.label},this.items.map(((e,t)=>s("button",{type:"button",part:"item",class:"item","data-value":e.value,tabIndex:-1,disabled:this.disabled||this.readOnly||e.disabled,"aria-label":e.label+", press Delete or Backspace to remove",onKeyDown:e=>this.onItemKeyDown(e,t)},s("slot",{name:"item-"+e.id},s("ui-chip",{appearance:"pill"},e.label)))))),this.rows.map((e=>s("span",{slot:"option-"+e.id},s("slot",{name:"option-"+e.id},e.label)))),s("span",{key:"a23781c153e154cdff7066868c2da956e26b7d52",slot:"create"},s("slot",{key:"e3bde0d1e549e785fff877a1a7aac10df308f7a3",name:"create"},"Create “",this.raw,"”")),s("span",{key:"5837c4cde35d5984aaf1d364f1b850b9d63ff8ca",slot:"loading"},s("slot",{key:"1bdfa30849bea752bc5c93268b3427c964d1b5d3",name:"loading"},"Loading suggestions…")),s("span",{key:"519d7b1a7f28f9d19cd441598a690c8b4fdacf5b",slot:"empty"},s("slot",{key:"3163150e0f1edebb50509a5dacd576e4568eaaae",name:"empty"},"No suggestions.")),s("span",{key:"655e4f85d70eb97f0f0ecb2bac7b4228f5cf580f",slot:"error"},s("slot",{key:"a22667db30ee30003855ee69774eff3a4aab8566",name:"error"},"Unable to load suggestions.")),s("div",{key:"b01b74f3fc7136a3bf1875c81b9f3a662f3e993c",slot:"footer"},s("slot",{key:"7565ee0798072eebc6d1c458f89ce6c7941577dd",name:"footer"}))))}static get watchers(){return{query:[{syncQuery:0}]}}static get style(){return":host{display:block;min-inline-size:0;color:var(--ui-text-primary);font:inherit}ui-combobox::part(field){flex-wrap:wrap;align-items:center;gap:var(--ui-space-1);min-block-size:var(--ui-multi-combobox-min-block-size, 2.5rem);padding:var(--ui-space-1)}ui-combobox::part(input){flex:1 0 var(--ui-multi-combobox-input-min-inline-size, 5rem);width:auto;min-block-size:1.75rem;padding:var(--ui-space-0-5) var(--ui-space-1)}.items{display:contents}.item{appearance:none;display:inline-flex;min-inline-size:0;max-inline-size:min(100%, var(--ui-multi-combobox-item-max-inline-size, 12rem));overflow:hidden;padding:0;border:0;border-radius:var(--ui-radius-1);background:transparent;color:inherit;font:inherit;cursor:default}.item>slot{display:block;min-inline-size:0;max-inline-size:100%;overflow:hidden}.item>slot::slotted(*){min-inline-size:0;max-inline-size:100%}.item:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:1px}.item:disabled{opacity:.6}"}},[769,"ui-multi-combobox",{label:[1],placeholder:[1],items:[16],config:[16],query:[1],defaultQuery:[1,"default-query"],tokenSeparators:[16],disabled:[4],readOnly:[4,"readonly"],required:[4],name:[1],raw:[32],rows:[32],focusInput:[64]},void 0,{query:[{syncQuery:0}]}]),l=h,d=function(){"undefined"!=typeof customElements&&["ui-multi-combobox","ui-chip","ui-combobox","ui-tooltip"].forEach((e=>{switch(e){case"ui-multi-combobox":customElements.get(a(e))||customElements.define(a(e),h);break;case"ui-chip":customElements.get(a(e))||r();break;case"ui-combobox":customElements.get(a(e))||n();break;case"ui-tooltip":customElements.get(a(e))||c()}}))};export{l as UiMultiCombobox,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as o,c as s,t as r}from"./p-Bh_1GxOD.js";import{o as i,c as a,r as n}from"./p-C-0syqXZ.js";import{d as p}from"./p-JwSoedEO.js";import{i as c,c as
|
|
1
|
+
import{p as e,H as t,h as o,c as s,t as r}from"./p-Bh_1GxOD.js";import{o as i,c as a,r as n}from"./p-C-0syqXZ.js";import{d as p}from"./p-JwSoedEO.js";import{i as c,c as h}from"./p-BnGhGgTH.js";import{c as d}from"./p-Drw41pSY.js";const l=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId="ui-popover-"+Math.random().toString(36).slice(2,11);anchor=null;surface=null;syncFromProp(){c(this.open)&&(this.internalOpen=this.open)}onOpenChange(){this.syncOverlay(),this.internalOpen?p(this.host,"open",{open:!0,reason:"programmatic",trigger:"programmatic"}):p(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"})}resetSurface(){this.setupSurface(),this.syncSurface()}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=d(this.host,{anchor:this.anchor,placement:this.placement}))}syncSurface(){this.surface&&(this.internalOpen?this.surface.show():this.surface.hide())}syncOverlay(){this.syncSurface(),this.internalOpen?i({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,t)=>this.handleRequestClose(e,t)}):a(this.overlayId)}componentDidLoad(){this.internalOpen=h(this.open,this.defaultOpen),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncOverlay()}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,a(this.overlayId)}componentDidUpdate(){this.syncOverlay()}handleRequestClose(e,t){c(this.open)||(this.internalOpen=!1),p(this.host,"close",{open:!1,reason:e,trigger:t})}onKeydown=e=>{"Escape"===e.key&&n("escape","keyboard")};render(){return o(s,{key:"f63907b8e49b8264c291048c509b6164fdd60ca4","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("div",{key:"2425f4394749d994693f4a256256bd9e2f5daf60",class:"popover__surface"},o("slot",{key:"3b6f925da371d43e828842c4027cddee673d7ab3"})))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}]}}static get style(){return":host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}.popover__surface{box-sizing:border-box;max-inline-size:inherit;max-block-size:inherit;overflow:auto;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}"}},[769,"ui-popover",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}]}]),u=l,m=function(){"undefined"!=typeof customElements&&["ui-popover"].forEach((e=>{"ui-popover"===e&&(customElements.get(r(e))||customElements.define(r(e),l))}))};export{u as UiPopover,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as i,c as e,t as a}from"./p-Bh_1GxOD.js";import{d as r,e as o}from"./p-JwSoedEO.js";import{b as n}from"./p-
|
|
1
|
+
import{p as t,H as s,h as i,c as e,t as a}from"./p-Bh_1GxOD.js";import{d as r,e as o}from"./p-JwSoedEO.js";import{b as n}from"./p-Drw41pSY.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!0;internalOpen=!1;surface=null;contentObserver=null;pendingDismiss=null;syncFromProp(){this.syncContents()}syncSurface(){this.internalOpen?this.surface?.show():this.surface?.hide()}componentDidLoad(){this.surface=n(this.host),this.contentObserver=new MutationObserver(this.syncContents),this.contentObserver.observe(this.host,{childList:!0,subtree:!0}),this.syncContents(),this.syncSurface(),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("click",this.onClick),this.contentObserver?.disconnect(),this.contentObserver=null,this.surface?.destroy(),this.surface=null}getToasts(){return Array.from(this.host.querySelectorAll("[data-ui-toast]"))}syncContents=()=>{const t=this.open&&this.getToasts().length>0,s=this.internalOpen,i=this.pendingDismiss&&!this.host.contains(this.pendingDismiss.toast)?this.pendingDismiss:null;this.internalOpen=t,s&&!t&&i&&r(this.host,"close",{open:!1,reason:"action",trigger:i.trigger}),!i&&this.open||(this.pendingDismiss=null)};onClick=t=>{const s=t.target.closest?.("[data-ui-toast-dismiss]");if(!s)return;const i=s.closest?.("[data-ui-toast]");if(!i)return;const e=i.id??"",a=o(t);this.pendingDismiss={toast:i,trigger:a},r(this.host,"dismiss",{id:e,reason:"action",trigger:a})};render(){return i(e,{key:"e3a71de7854b5937cc3f74858fc69f202fd93c71",role:"region","aria-label":"Notifications","aria-live":"polite","data-open":this.internalOpen?"":void 0},i("slot",{key:"cdf6ea0118199d149ac08820c69ec8b54654be91"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncSurface:0}]}}static get style(){return":host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host([popover]){right:auto;bottom:auto;margin:0}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}"}},[769,"ui-toast-region",{open:[4],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],internalOpen:[{syncSurface:0}]}]),u=c,d=function(){"undefined"!=typeof customElements&&["ui-toast-region"].forEach((t=>{"ui-toast-region"===t&&(customElements.get(a(t))||customElements.define(a(t),c))}))};export{u as UiToastRegion,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as o,d as s}from"./p-
|
|
1
|
+
import{U as o,d as s}from"./p-B1macZOS.js";const a=o,m=s;export{a as UiTooltip,m as defineCustomElement}
|
|
@@ -86,28 +86,27 @@ function createViewportSurface(surface) {
|
|
|
86
86
|
},
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function fallbackPosition(surface, anchor, placement, gap, viewportGap) {
|
|
89
|
+
function fallbackPosition(surface, anchor, placement, gap, viewportGap, surfaceRect = surface.getBoundingClientRect()) {
|
|
90
90
|
const owner = surface.ownerDocument.defaultView ?? window;
|
|
91
91
|
const viewport = getVisualViewportRect(owner);
|
|
92
|
-
const rect = surface.getBoundingClientRect();
|
|
93
92
|
const preferTop = placement.startsWith("top");
|
|
94
93
|
const preferEnd = placement.endsWith("end");
|
|
95
94
|
const spaceBelow = viewport.bottom - anchor.bottom - viewportGap;
|
|
96
95
|
const spaceAbove = anchor.top - viewport.top - viewportGap;
|
|
97
96
|
const useTop = preferTop
|
|
98
|
-
? !(spaceAbove <
|
|
99
|
-
: spaceBelow <
|
|
97
|
+
? !(spaceAbove < surfaceRect.height + gap && spaceBelow > spaceAbove)
|
|
98
|
+
: spaceBelow < surfaceRect.height + gap && spaceAbove > spaceBelow;
|
|
100
99
|
const unclampedTop = useTop
|
|
101
|
-
? anchor.top -
|
|
100
|
+
? anchor.top - surfaceRect.height - gap
|
|
102
101
|
: anchor.bottom + gap;
|
|
103
102
|
const unclampedLeft = preferEnd
|
|
104
|
-
? anchor.right -
|
|
103
|
+
? anchor.right - surfaceRect.width
|
|
105
104
|
: anchor.left;
|
|
106
105
|
const shifted = clampRectToViewport({
|
|
107
106
|
left: unclampedLeft,
|
|
108
107
|
top: unclampedTop,
|
|
109
|
-
width:
|
|
110
|
-
height:
|
|
108
|
+
width: surfaceRect.width,
|
|
109
|
+
height: surfaceRect.height,
|
|
111
110
|
}, viewport, viewportGap);
|
|
112
111
|
surface.style.left = `${Math.round(unclampedLeft + shifted.x)}px`;
|
|
113
112
|
surface.style.top = `${Math.round(unclampedTop + shifted.y)}px`;
|
|
@@ -170,10 +169,16 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
170
169
|
}
|
|
171
170
|
if (!anchor)
|
|
172
171
|
return;
|
|
173
|
-
|
|
172
|
+
let surfaceRect;
|
|
173
|
+
if (nativeAnchor) {
|
|
174
174
|
positionNative();
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
const viewport = getVisualViewportRect(owner);
|
|
176
|
+
surfaceRect = surface.getBoundingClientRect();
|
|
177
|
+
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
178
|
+
if (shift.x === 0 && shift.y === 0)
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
fallbackPosition(surface, anchor.getBoundingClientRect(), placement, gap, viewportGap, surfaceRect);
|
|
177
182
|
};
|
|
178
183
|
const schedule = () => {
|
|
179
184
|
if (!open || frame !== null)
|
|
@@ -181,7 +186,9 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
181
186
|
frame = owner.requestAnimationFrame(position);
|
|
182
187
|
};
|
|
183
188
|
const syncFallbackListeners = () => {
|
|
184
|
-
|
|
189
|
+
// Native anchor positioning handles ordinary placement, but the shared
|
|
190
|
+
// controller still owns viewport containment when neither side can fit.
|
|
191
|
+
const needsListeners = open && (point !== null || anchor !== null);
|
|
185
192
|
if (!needsListeners) {
|
|
186
193
|
listenerAbort?.abort();
|
|
187
194
|
listenerAbort = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
|
|
2
|
-
import { D as DEFAULT_AFFORDANCE_NEAR_RADIUS, c as createProximityCoordinator } from './positioning-
|
|
2
|
+
import { D as DEFAULT_AFFORDANCE_NEAR_RADIUS, c as createProximityCoordinator } from './positioning-Drmwg-C1.js';
|
|
3
3
|
|
|
4
4
|
const uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-8BGiMGQ0.js';
|
|
2
|
-
import { a as createAnchoredSurface } from './positioning-
|
|
2
|
+
import { a as createAnchoredSurface } from './positioning-Drmwg-C1.js';
|
|
3
3
|
import { c as closeOverlay, o as openOverlay } from './manager-C-0syqXZ.js';
|
|
4
4
|
|
|
5
5
|
const uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;min-width:0;max-width:100%}:host([data-size='sm']){--ui-chip-font-size:var(--ui-font-size-sm)}.chip__surface{display:inline-flex;align-items:center;box-sizing:border-box;min-width:0;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important}.chip__label{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
|
|
2
2
|
import { o as openOverlay, c as closeOverlay, r as requestTopOverlayClose } from './manager-C-0syqXZ.js';
|
|
3
3
|
import { d as dispatchDetail } from './events-JwSoedEO.js';
|
|
4
|
-
import { a as createAnchoredSurface } from './positioning-
|
|
4
|
+
import { a as createAnchoredSurface } from './positioning-Drmwg-C1.js';
|
|
5
5
|
|
|
6
6
|
const uiContextMenuCss = () => `:host{display:contents}:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus){outline:none}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}`;
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import { o as openOverlay, c as closeOverlay, r as requestTopOverlayClose } from
|
|
|
3
3
|
import { d as dispatchDetail } from './events-JwSoedEO.js';
|
|
4
4
|
import { i as isControlled, c as controlledOrDefault } from './controlled-state-BnGhGgTH.js';
|
|
5
5
|
|
|
6
|
-
const uiDialogCss = () => `:host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
|
|
6
|
+
const uiDialogCss = () => `:host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;box-sizing:border-box;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
|
|
7
7
|
|
|
8
8
|
const UIDialog = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, g as getElement, h, H as Host } from './index-8B
|
|
|
2
2
|
import { d as dispatchDetail, e as eventToTrigger } from './events-JwSoedEO.js';
|
|
3
3
|
import { o as openOverlay, c as closeOverlay, r as requestTopOverlayClose } from './manager-C-0syqXZ.js';
|
|
4
4
|
import { i as isControlled, c as controlledOrDefault } from './controlled-state-BnGhGgTH.js';
|
|
5
|
-
import { a as createAnchoredSurface } from './positioning-
|
|
5
|
+
import { a as createAnchoredSurface } from './positioning-Drmwg-C1.js';
|
|
6
6
|
|
|
7
|
-
const uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:0;border:0;border-radius:0;background:transparent;box-shadow:
|
|
7
|
+
const uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;max-inline-size:inherit;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-block-size:inherit;overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:visible;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%}`;
|
|
8
8
|
|
|
9
9
|
const UIMenu = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, g as getElement, h, H as Host } from './index-8B
|
|
|
2
2
|
import { o as openOverlay, c as closeOverlay, r as requestTopOverlayClose } from './manager-C-0syqXZ.js';
|
|
3
3
|
import { d as dispatchDetail } from './events-JwSoedEO.js';
|
|
4
4
|
import { i as isControlled, c as controlledOrDefault } from './controlled-state-BnGhGgTH.js';
|
|
5
|
-
import { a as createAnchoredSurface } from './positioning-
|
|
5
|
+
import { a as createAnchoredSurface } from './positioning-Drmwg-C1.js';
|
|
6
6
|
|
|
7
|
-
const uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:
|
|
7
|
+
const uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}.popover__surface{box-sizing:border-box;max-inline-size:inherit;max-block-size:inherit;overflow:auto;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
|
|
8
8
|
|
|
9
9
|
const UIPopover = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
|
|
2
2
|
import { d as dispatchDetail, e as eventToTrigger } from './events-JwSoedEO.js';
|
|
3
|
-
import { b as createViewportSurface } from './positioning-
|
|
3
|
+
import { b as createViewportSurface } from './positioning-Drmwg-C1.js';
|
|
4
4
|
|
|
5
5
|
const uiToastRegionCss = () => `:host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host([popover]){right:auto;bottom:auto;margin:0}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}`;
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, g as getElement, h, H as Host
|
|
|
2
2
|
import { o as openOverlay, c as closeOverlay } from './manager-C-0syqXZ.js';
|
|
3
3
|
import { d as dispatchDetail } from './events-JwSoedEO.js';
|
|
4
4
|
import { i as isControlled, c as controlledOrDefault } from './controlled-state-BnGhGgTH.js';
|
|
5
|
-
import { a as createAnchoredSurface } from './positioning-
|
|
5
|
+
import { a as createAnchoredSurface } from './positioning-Drmwg-C1.js';
|
|
6
6
|
|
|
7
7
|
const uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
|
|
8
8
|
|