@threadlabs/looma 0.1.9 → 0.1.10
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-UMFO4QNN.js → chunk-DYIMEQY7.js} +27 -26
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +152 -0
- package/dist/cjs/ui-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ui-badge.cjs.entry.js +1 -1
- package/dist/cjs/ui-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-checkbox.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-disclosure.cjs.entry.js +1 -1
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-icon-button.cjs.entry.js +4 -2
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-popover.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +2 -2
- package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ui-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +8 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +70 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +1 -1
- package/dist/collection/components/ui-badge/ui-badge.js +1 -1
- package/dist/collection/components/ui-button/ui-button.js +1 -1
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +1 -1
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
- package/dist/collection/components/ui-icon-button/ui-icon-button.css +53 -0
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +23 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-menu/ui-menu.js +1 -1
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-radio/ui-radio.js +1 -1
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-switch/ui-switch.js +2 -2
- package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/overlay/positioning.js +135 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-gHC_Ei92.js → p-QiwSQmKJ.js} +1 -1
- package/dist/components/ui-affordance-scope.d.ts +11 -0
- package/dist/components/ui-affordance-scope.js +1 -0
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-floating-action-button.js +1 -1
- package/dist/components/ui-form-field.js +1 -1
- package/dist/components/ui-icon-button.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-menu-item.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/ui-affordance-scope.entry.js +150 -0
- package/dist/esm/ui-avatar-group.entry.js +1 -1
- package/dist/esm/ui-avatar.entry.js +1 -1
- package/dist/esm/ui-badge.entry.js +1 -1
- package/dist/esm/ui-button.entry.js +1 -1
- package/dist/esm/ui-checkbox.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-disclosure.entry.js +1 -1
- package/dist/esm/ui-floating-action-button.entry.js +1 -1
- package/dist/esm/ui-form-field.entry.js +1 -1
- package/dist/esm/ui-icon-button.entry.js +4 -2
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-menu-item.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +1 -1
- package/dist/esm/ui-popover.entry.js +1 -1
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-radio.entry.js +1 -1
- package/dist/esm/ui-search-result-row.entry.js +1 -1
- package/dist/esm/ui-search-shell.entry.js +1 -1
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +2 -2
- package/dist/esm/ui-tabs.entry.js +1 -1
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-toast-region.entry.js +1 -1
- package/dist/esm/ui-tooltip.entry.js +1 -1
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/index.cjs +306 -29
- package/dist/index.d.cts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +127 -2
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-0198bb21.entry.js +1 -0
- package/dist/looma/{p-d39905f9.entry.js → p-051f578c.entry.js} +1 -1
- package/dist/looma/{p-c14233bc.entry.js → p-0584a051.entry.js} +1 -1
- package/dist/looma/{p-cb15e8e3.entry.js → p-078f9fb8.entry.js} +1 -1
- package/dist/looma/{p-dc857ed4.entry.js → p-0f45c5f0.entry.js} +1 -1
- package/dist/looma/{p-201243dc.entry.js → p-1681b218.entry.js} +1 -1
- package/dist/looma/{p-41d62a83.entry.js → p-2ae73d5b.entry.js} +1 -1
- package/dist/looma/{p-5a645647.entry.js → p-2ed7e241.entry.js} +1 -1
- package/dist/looma/{p-5717a4c4.entry.js → p-34417499.entry.js} +1 -1
- package/dist/looma/{p-610b2eca.entry.js → p-4b422d40.entry.js} +1 -1
- package/dist/looma/{p-15e619fd.entry.js → p-5ba9d496.entry.js} +1 -1
- package/dist/looma/p-5d4713a6.entry.js +1 -0
- package/dist/looma/{p-96de71ad.entry.js → p-624ba086.entry.js} +1 -1
- package/dist/looma/{p-01425a37.entry.js → p-65c25c94.entry.js} +1 -1
- package/dist/looma/{p-66a203a1.entry.js → p-7e94d90d.entry.js} +1 -1
- package/dist/looma/p-8c09c724.entry.js +1 -0
- package/dist/looma/{p-4c54d489.entry.js → p-8d5adb17.entry.js} +1 -1
- package/dist/looma/p-95340a13.entry.js +1 -0
- package/dist/looma/{p-07167650.entry.js → p-95cd639d.entry.js} +1 -1
- package/dist/looma/{p-03f0594b.entry.js → p-96f73d07.entry.js} +1 -1
- package/dist/looma/p-a33522a2.entry.js +1 -0
- package/dist/looma/{p-ee31c7b4.entry.js → p-a5127c7d.entry.js} +1 -1
- package/dist/looma/{p-dfcb2cca.entry.js → p-a9f46811.entry.js} +1 -1
- package/dist/looma/{p-93ce1c62.entry.js → p-b7aa4488.entry.js} +1 -1
- package/dist/looma/{p-5df568d8.entry.js → p-c6721aba.entry.js} +1 -1
- package/dist/looma/{p-3ecd7120.entry.js → p-d273b857.entry.js} +1 -1
- package/dist/looma/{p-24d7aa5b.entry.js → p-ed5abf6d.entry.js} +1 -1
- package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +11 -0
- package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +2 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/overlay/positioning.d.ts +40 -0
- package/dist/ui-affordance-scope.entry-ZKUJ5AT4.js +144 -0
- package/dist/{ui-avatar-group.entry-S6DFXYB7.js → ui-avatar-group.entry-I4XM44BI.js} +2 -2
- package/dist/{ui-avatar.entry-MDRGXLWQ.js → ui-avatar.entry-ZZAMZAVF.js} +2 -2
- package/dist/{ui-badge.entry-RLL4YKPD.js → ui-badge.entry-DQXYMC3E.js} +2 -2
- package/dist/{ui-button.entry-IYMYLBFY.js → ui-button.entry-DM7BUZLI.js} +2 -2
- package/dist/{ui-checkbox.entry-K5FGWDG2.js → ui-checkbox.entry-X3PPWKIJ.js} +2 -2
- package/dist/{ui-context-menu.entry-KWXXJ3ZV.js → ui-context-menu.entry-KAW4NIFE.js} +2 -2
- package/dist/{ui-dialog.entry-RKHLQLQM.js → ui-dialog.entry-D23SNXWB.js} +2 -2
- package/dist/{ui-disclosure.entry-FRZKGEJP.js → ui-disclosure.entry-DOG6JZU7.js} +2 -2
- package/dist/{ui-floating-action-button.entry-BH4FDSTL.js → ui-floating-action-button.entry-VPQ7VBFS.js} +2 -2
- package/dist/{ui-form-field.entry-3CR2KSUH.js → ui-form-field.entry-SYZ6XSCG.js} +2 -2
- package/dist/ui-icon-button.entry-2SZBOIH5.js +26 -0
- package/dist/{ui-input.entry-5PQR37HS.js → ui-input.entry-PALICYLZ.js} +2 -2
- package/dist/{ui-menu-item.entry-2T3QWHLK.js → ui-menu-item.entry-W6TEFP5Y.js} +2 -2
- package/dist/{ui-menu.entry-Q5Z5YO5P.js → ui-menu.entry-7NARDV6S.js} +2 -2
- package/dist/{ui-popover.entry-4P2NWWAY.js → ui-popover.entry-ZXYHLDTP.js} +2 -2
- package/dist/{ui-radio-group.entry-QKPRNV26.js → ui-radio-group.entry-XEUKMD6J.js} +2 -2
- package/dist/{ui-radio.entry-O4DOMFNU.js → ui-radio.entry-4ABBHDLN.js} +2 -2
- package/dist/{ui-search-result-row.entry-BR5O3UCH.js → ui-search-result-row.entry-3HHM7OV4.js} +2 -2
- package/dist/{ui-search-shell.entry-2ZBP7SA3.js → ui-search-shell.entry-PJTFOBPT.js} +2 -2
- package/dist/{ui-select.entry-L75HQY72.js → ui-select.entry-A3RI5XCG.js} +2 -2
- package/dist/{ui-switch.entry-L5QWD3BT.js → ui-switch.entry-JNRS2YTN.js} +3 -3
- package/dist/{ui-tabs.entry-KWRD6Y7J.js → ui-tabs.entry-MQ4V5XCP.js} +2 -2
- package/dist/{ui-textarea.entry-JC3HPEBS.js → ui-textarea.entry-JJXJQZQR.js} +2 -2
- package/dist/{ui-toast-region.entry-C6KK4OM4.js → ui-toast-region.entry-STHVESL5.js} +2 -2
- package/dist/{ui-tooltip.entry-G5EOCWP4.js → ui-tooltip.entry-4W7CRIKI.js} +2 -2
- package/dist/{ui-top-bar.entry-YLKVAQFH.js → ui-top-bar.entry-WM3SS2HR.js} +2 -2
- package/editor/{chunk-OK5NARJI.js → chunk-4VGVEHU2.js} +244 -70
- package/editor/{chunk-NJ2KAMS2.js → chunk-CCDKTWYA.js} +70 -34
- package/editor/extensions/index.d.ts +2 -2
- package/editor/extensions/index.js +1 -1
- package/editor/index.d.ts +1 -1
- package/editor/index.js +7 -2
- package/editor/table-overlay-jjvdARTJ.d.ts +95 -0
- package/editor/ui.d.ts +1 -1
- package/editor/ui.js +7 -2
- package/editor.css +232 -73
- package/layout/index.cjs +5 -0
- package/layout/index.css +22 -3
- package/layout/index.js +5 -0
- package/layout.css +24 -3
- package/package.json +1 -1
- package/tokens.css +9 -0
- package/vue/{chunk-5ELJ4UPG.js → chunk-YN4IUYVY.js} +14 -2
- package/vue/editor/index.js +94 -37
- package/vue/index.d.ts +5 -1
- package/vue/index.js +3 -1
- package/dist/looma/p-754cfff3.entry.js +0 -1
- package/dist/looma/p-940a931a.entry.js +0 -1
- package/dist/looma/p-941221ad.entry.js +0 -1
- package/dist/looma/p-955fb814.entry.js +0 -1
- package/dist/ui-icon-button.entry-LB54U25M.js +0 -24
- package/editor/table-overlay-Bq0F5xPg.d.ts +0 -64
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as a,h as e,H as i}from"./p-CEeiinfk.js";function n(t,a){const e=Math.max(a.left-t.x,0,t.x-a.right),i=Math.max(a.top-t.y,0,t.y-a.bottom);return Math.hypot(e,i)}const o=class{constructor(a){t(this,a)}get host(){return a(this)}nearRadius=32;coordinator=null;componentDidLoad(){this.connectCoordinator()}disconnectedCallback(){this.coordinator?.destroy(),this.coordinator=null}connectCoordinator(){this.coordinator?.destroy(),this.coordinator=function(t,a={}){const e=t.ownerDocument.defaultView??window,i=a.pointerTarget??t,o=a.anchorSelector??"[data-ui-affordance]",r=a.nearRadius??32,s=Number.isFinite(r)?Math.max(0,r):32,c=new AbortController;let d=[],l=null,u=null,h=!1;const f=()=>{for(const{element:t}of d)t.hasAttribute("data-ui-proximity")&&t.removeAttribute("data-ui-proximity");t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},p=()=>{d=Array.from(t.querySelectorAll(o)).filter((t=>!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled"))).map((t=>({element:t,rect:t.getBoundingClientRect()}))),h=!1},g=()=>{if(l=null,h&&p(),!u)return void f();let a=!1;for(const t of d){const e=n(u,t.rect)<=s;e&&"near"!==t.element.getAttribute("data-ui-proximity")?t.element.setAttribute("data-ui-proximity","near"):!e&&t.element.hasAttribute("data-ui-proximity")&&t.element.removeAttribute("data-ui-proximity"),a||=e}a&&"engaged"!==t.getAttribute("data-ui-interaction")?t.setAttribute("data-ui-interaction","engaged"):!a&&t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},m=()=>{null===l&&(l=e.requestAnimationFrame(g))},y=()=>{h=!0,m()};return i.addEventListener("pointermove",(t=>{u="touch"===t.pointerType?null:{x:t.clientX,y:t.clientY},m()}),{passive:!0,signal:c.signal}),e.addEventListener("resize",y,{passive:!0,signal:c.signal}),e.addEventListener("scroll",y,{passive:!0,capture:!0,signal:c.signal}),e.visualViewport?.addEventListener("resize",y,{passive:!0,signal:c.signal}),e.visualViewport?.addEventListener("scroll",y,{passive:!0,signal:c.signal}),p(),{refresh:y,destroy(){c.abort(),null!==l&&e.cancelAnimationFrame(l),l=null,u=null,f(),d=[]}}}(this.host,{nearRadius:this.nearRadius})}onSlotChange=()=>{this.coordinator?.refresh()};render(){return e(i,{key:"2bc861652826e6227deaba6d1030ecf43753f575"},e("slot",{key:"5e0544939e6b20747f12023dbb45329eb3853715",onSlotchange:this.onSlotChange}))}static get watchers(){return{nearRadius:[{connectCoordinator:0}]}}};o.style=":host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}";export{o as ui_affordance_scope}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,g as o,h as r,H as s}from"./p-CEeiinfk.js";import{o as
|
|
1
|
+
import{r as e,g as o,h as r,H as s}from"./p-CEeiinfk.js";import{o as i,c as a,r as t}from"./p-CR7f2MQC.js";import{d as n}from"./p-JwSoedEO.js";const p=class{constructor(o){e(this,o)}get host(){return o(this)}open=!1;defaultOpen=!1;internalOpen=!1;overlayId=`ui-popover-${Math.random().toString(36).slice(2,11)}`;syncFromProp(){this.internalOpen=this.open}onOpenChange(){this.syncOverlay(),this.internalOpen?n(this.host,"open",{open:!0,reason:"programmatic",trigger:"programmatic"}):n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"})}syncOverlay(){this.internalOpen?i({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(e,o)=>this.handleRequestClose(e,o)}):a(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("keydown",this.onKeydown),this.syncOverlay()}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),a(this.overlayId)}componentDidUpdate(){this.syncOverlay()}handleRequestClose(e,o){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:e,trigger:o})}onKeydown=e=>{"Escape"===e.key&&t("escape","keyboard")};render(){return r(s,{key:"67e7f52220db9d997fb11b686d6abcbdf9557a8d","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},r("slot",{key:"d7c1fa2ab75994fe0a7dd63f8289754c7754c30f"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}]}}};p.style=":host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);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);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:auto}";export{p as ui_popover}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as i,h as s,H as e}from"./p-CEeiinfk.js";import{o,c as r,r as n}from"./p-CR7f2MQC.js";import{d as h}from"./p-JwSoedEO.js";const a=class{constructor(i){t(this,i)}get host(){return i(this)}for="";open=!1;defaultOpen=!1;internalOpen=!1;overlayId=`ui-tooltip-${Math.random().toString(36).slice(2,11)}`;trigger=null;syncFromProp(){this.internalOpen=this.open}syncOverlay(){this.internalOpen?o({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(t,i)=>this.handleRequestClose(t,i)}):r(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.resolveTrigger(),this.attachTriggerListeners(),this.host.addEventListener("keydown",this.onKeydown),this.syncOverlay()}componentDidUpdate(){this.resolveTrigger(),this.attachTriggerListeners(),this.syncOverlay()}disconnectedCallback(){this.detachTriggerListeners(),this.host.removeEventListener("keydown",this.onKeydown),r(this.overlayId)}resolveTrigger(){this.trigger=this.for?document.getElementById(this.for):this.host.previousElementSibling}attachTriggerListeners(){this.detachTriggerListeners(),this.trigger&&(this.trigger.addEventListener("pointerenter",this.onTriggerEnter),this.trigger.addEventListener("pointerleave",this.onTriggerLeave),this.trigger.addEventListener("focusin",this.onTriggerFocusIn),this.trigger.addEventListener("focusout",this.onTriggerFocusOut))}detachTriggerListeners(){this.trigger&&(this.trigger.removeEventListener("pointerenter",this.onTriggerEnter),this.trigger.removeEventListener("pointerleave",this.onTriggerLeave),this.trigger.removeEventListener("focusin",this.onTriggerFocusIn),this.trigger.removeEventListener("focusout",this.onTriggerFocusOut))}onTriggerEnter=()=>{this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:"pointer"}),this.syncOverlay()};onTriggerLeave=()=>{this.internalOpen=!1,h(this.host,"close",{open:!1,reason:"action",trigger:"pointer"}),this.syncOverlay()};onTriggerFocusIn=()=>{this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:"keyboard"}),this.syncOverlay()};onTriggerFocusOut=t=>{const i=t.relatedTarget;i&&this.host.contains(i)||(this.internalOpen=!1,h(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.syncOverlay())};handleRequestClose(t,i){"escape"===t&&(this.internalOpen=!1,h(this.host,"close",{open:!1,reason:"escape",trigger:i}),this.trigger?.focus())}onKeydown=t=>{"Escape"===t.key&&n("escape","keyboard")};render(){return s(e,{key:"
|
|
1
|
+
import{r as t,g as i,h as s,H as e}from"./p-CEeiinfk.js";import{o,c as r,r as n}from"./p-CR7f2MQC.js";import{d as h}from"./p-JwSoedEO.js";const a=class{constructor(i){t(this,i)}get host(){return i(this)}for="";open=!1;defaultOpen=!1;internalOpen=!1;overlayId=`ui-tooltip-${Math.random().toString(36).slice(2,11)}`;trigger=null;syncFromProp(){this.internalOpen=this.open}syncOverlay(){this.internalOpen?o({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(t,i)=>this.handleRequestClose(t,i)}):r(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.resolveTrigger(),this.attachTriggerListeners(),this.host.addEventListener("keydown",this.onKeydown),this.syncOverlay()}componentDidUpdate(){this.resolveTrigger(),this.attachTriggerListeners(),this.syncOverlay()}disconnectedCallback(){this.detachTriggerListeners(),this.host.removeEventListener("keydown",this.onKeydown),r(this.overlayId)}resolveTrigger(){this.trigger=this.for?document.getElementById(this.for):this.host.previousElementSibling}attachTriggerListeners(){this.detachTriggerListeners(),this.trigger&&(this.trigger.addEventListener("pointerenter",this.onTriggerEnter),this.trigger.addEventListener("pointerleave",this.onTriggerLeave),this.trigger.addEventListener("focusin",this.onTriggerFocusIn),this.trigger.addEventListener("focusout",this.onTriggerFocusOut))}detachTriggerListeners(){this.trigger&&(this.trigger.removeEventListener("pointerenter",this.onTriggerEnter),this.trigger.removeEventListener("pointerleave",this.onTriggerLeave),this.trigger.removeEventListener("focusin",this.onTriggerFocusIn),this.trigger.removeEventListener("focusout",this.onTriggerFocusOut))}onTriggerEnter=()=>{this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:"pointer"}),this.syncOverlay()};onTriggerLeave=()=>{this.internalOpen=!1,h(this.host,"close",{open:!1,reason:"action",trigger:"pointer"}),this.syncOverlay()};onTriggerFocusIn=()=>{this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:"keyboard"}),this.syncOverlay()};onTriggerFocusOut=t=>{const i=t.relatedTarget;i&&this.host.contains(i)||(this.internalOpen=!1,h(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.syncOverlay())};handleRequestClose(t,i){"escape"===t&&(this.internalOpen=!1,h(this.host,"close",{open:!1,reason:"escape",trigger:i}),this.trigger?.focus())}onKeydown=t=>{"Escape"===t.key&&n("escape","keyboard")};render(){return s(e,{key:"64b5f4e7a56cbf5560edc6d7118022a49d5e2786",role:"tooltip",hidden:!this.internalOpen,"data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},s("slot",{key:"cf6f96689021a42a01b782f0e1d0730b5a9aa1f8"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncOverlay:0}]}}};a.style=":host{display:inline-block;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([hidden]){display:none !important}";export{a as ui_tooltip}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,g as a,h as i,H as t}from"./p-CEeiinfk.js";function s(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||Boolean(e.textContent?.trim())))}const n=class{constructor(a){e(this,a)}get host(){return a(this)}hasLeading=!1;hasSearch=!1;hasActions=!1;leadingSlot;searchSlot;actionsSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasLeading=s(this.leadingSlot),this.hasSearch=s(this.searchSlot),this.hasActions=s(this.actionsSlot)};render(){return i(t,{key:"15c840c082724df0ec39ab6ad4e55f99192df5be"},i("header",{key:"790afaeecdb3e598b8365391f57ee1e2d8ca69a2",class:"top-bar",part:"base"},i("div",{key:"fab822f5875c7e3b8e267be42c075597d79374fa",class:"top-bar__leading",hidden:!this.hasLeading},i("slot",{key:"0723013c4b674964e4029442b715daa9eb0036db",name:"leading",ref:e=>this.leadingSlot=e,onSlotchange:this.syncSlots})),i("div",{key:"77fc006257b7fa6a191191d9969ea66445b8bc3e",class:"top-bar__title"},i("slot",{key:"e8a07f1f767c1c0fa1244abcf3bb0e697e36a4fe"})),i("div",{key:"bde5cdf797ae898f68eddeab362b8395f89bdf28",class:"top-bar__search",hidden:!this.hasSearch},i("slot",{key:"8b059d6123e94f3b7e18c15c88828ee9c6436136",name:"search",ref:e=>this.searchSlot=e,onSlotchange:this.syncSlots})),i("div",{key:"c262446cf29873903530ea3f840de4de9db3de82",class:"top-bar__actions",hidden:!this.hasActions},i("slot",{key:"f417dbc8cc0115a455a72ce0feb5f32b323ce68f",name:"actions",ref:e=>this.actionsSlot=e,onSlotchange:this.syncSlots}))))}};n.style=":host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}";export{n as ui_top_bar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,g as t,h as i,H as a}from"./p-CEeiinfk.js";import{d as r,e as s}from"./p-JwSoedEO.js";const o=class{constructor(t){e(this,t)}get host(){return t(this)}value="";defaultValue="";disabled=!1;invalid=!1;required=!1;internalValue="";slotRef;syncFromProp(){this.internalValue=this.value}syncToSelect(){const e=this.getSelect();e&&(this.host.dataset.invalid=this.invalid?"true":"",e.value=this.internalValue||this.defaultValue,e.disabled=this.disabled,e.required=this.required,e.setAttribute("aria-invalid",this.invalid?"true":"false"))}componentDidLoad(){this.syncFromProp(),this.slotRef?.addEventListener("slotchange",(()=>this.syncToSelect())),this.syncToSelect();const e=this.getSelect();e?.addEventListener("input",this.onInput),e?.addEventListener("change",this.onChange)}disconnectedCallback(){const e=this.getSelect();e?.removeEventListener("input",this.onInput),e?.removeEventListener("change",this.onChange)}componentDidUpdate(){this.syncToSelect()}getSelect(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>"SELECT"===e.tagName))??null}onInput=e=>{const t=e.target;t&&(this.internalValue=t.value,r(this.host,"input",{value:this.internalValue,trigger:s(e)}))};onChange=e=>{const t=this.getSelect();t&&(this.internalValue=t.value,r(this.host,"change",{value:this.internalValue,trigger:s(e)}))};render(){return i(a,{key:"
|
|
1
|
+
import{r as e,g as t,h as i,H as a}from"./p-CEeiinfk.js";import{d as r,e as s}from"./p-JwSoedEO.js";const o=class{constructor(t){e(this,t)}get host(){return t(this)}value="";defaultValue="";disabled=!1;invalid=!1;required=!1;internalValue="";slotRef;syncFromProp(){this.internalValue=this.value}syncToSelect(){const e=this.getSelect();e&&(this.host.dataset.invalid=this.invalid?"true":"",e.value=this.internalValue||this.defaultValue,e.disabled=this.disabled,e.required=this.required,e.setAttribute("aria-invalid",this.invalid?"true":"false"))}componentDidLoad(){this.syncFromProp(),this.slotRef?.addEventListener("slotchange",(()=>this.syncToSelect())),this.syncToSelect();const e=this.getSelect();e?.addEventListener("input",this.onInput),e?.addEventListener("change",this.onChange)}disconnectedCallback(){const e=this.getSelect();e?.removeEventListener("input",this.onInput),e?.removeEventListener("change",this.onChange)}componentDidUpdate(){this.syncToSelect()}getSelect(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>"SELECT"===e.tagName))??null}onInput=e=>{const t=e.target;t&&(this.internalValue=t.value,r(this.host,"input",{value:this.internalValue,trigger:s(e)}))};onChange=e=>{const t=this.getSelect();t&&(this.internalValue=t.value,r(this.host,"change",{value:this.internalValue,trigger:s(e)}))};render(){return i(a,{key:"65420b700d6a80e3575efa25d72ccbf4b0398805","data-invalid":this.invalid?"":void 0},i("slot",{key:"fa6b175770fcbf9ec904a528f0d41aa04f4e9c01",ref:e=>this.slotRef=e}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}}};o.style=":host{display:inline-flex;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background-color:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(select:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}";export{o as ui_select}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as s,h as i,H as e}from"./p-CEeiinfk.js";import{c as n}from"./p-hgBUJRDa.js";import{d as o,e as r,i as h}from"./p-JwSoedEO.js";const a=class{constructor(s){t(this,s)}get host(){return s(this)}open=!1;defaultOpen=!1;disabled=!1;internalOpen=!1;contentId="";trigger=null;content=null;syncFromProp(){this.internalOpen=this.open}syncState(){this.trigger&&this.trigger.setAttribute("aria-expanded",String(this.internalOpen)),this.content&&(this.content.hidden=!this.internalOpen)}componentDidLoad(){this.resolveParts(),this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.syncState(),this.trigger?.addEventListener("click",this.onTriggerClick),this.trigger?.addEventListener("keydown",this.onTriggerKeydown)}disconnectedCallback(){this.trigger?.removeEventListener("click",this.onTriggerClick),this.trigger?.removeEventListener("keydown",this.onTriggerKeydown)}componentDidUpdate(){this.syncState()}resolveParts(){this.trigger=this.host.querySelector("[data-ui-disclosure-trigger], button, [aria-controls]");const t=this.trigger?.getAttribute("aria-controls")??"";if(t)this.content=document.getElementById(t);else{const t=Array.from(this.host.children);this.content=t.find((t=>t!==this.trigger))??null}this.trigger&&this.content&&(this.content.id||(this.content.id=n("disclosure-content")),this.trigger.setAttribute("aria-controls",this.content.id),this.contentId=this.content.id),this.trigger instanceof HTMLButtonElement?this.trigger.disabled=this.disabled:this.trigger&&this.trigger.setAttribute("aria-disabled",String(this.disabled))}setOpen(t,s){this.internalOpen!==t&&(this.internalOpen=t,o(this.host,t?"open":"close",{open:t,reason:s.reason,trigger:s.trigger}))}onTriggerClick=t=>{this.disabled?t.preventDefault():this.setOpen(!this.internalOpen,{reason:"action",trigger:r(t)})};onTriggerKeydown=t=>{!this.disabled&&h(t)&&(t.preventDefault(),this.setOpen(!this.internalOpen,{reason:"action",trigger:"keyboard"}))};render(){return i(e,{key:"
|
|
1
|
+
import{r as t,g as s,h as i,H as e}from"./p-CEeiinfk.js";import{c as n}from"./p-hgBUJRDa.js";import{d as o,e as r,i as h}from"./p-JwSoedEO.js";const a=class{constructor(s){t(this,s)}get host(){return s(this)}open=!1;defaultOpen=!1;disabled=!1;internalOpen=!1;contentId="";trigger=null;content=null;syncFromProp(){this.internalOpen=this.open}syncState(){this.trigger&&this.trigger.setAttribute("aria-expanded",String(this.internalOpen)),this.content&&(this.content.hidden=!this.internalOpen)}componentDidLoad(){this.resolveParts(),this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.syncState(),this.trigger?.addEventListener("click",this.onTriggerClick),this.trigger?.addEventListener("keydown",this.onTriggerKeydown)}disconnectedCallback(){this.trigger?.removeEventListener("click",this.onTriggerClick),this.trigger?.removeEventListener("keydown",this.onTriggerKeydown)}componentDidUpdate(){this.syncState()}resolveParts(){this.trigger=this.host.querySelector("[data-ui-disclosure-trigger], button, [aria-controls]");const t=this.trigger?.getAttribute("aria-controls")??"";if(t)this.content=document.getElementById(t);else{const t=Array.from(this.host.children);this.content=t.find((t=>t!==this.trigger))??null}this.trigger&&this.content&&(this.content.id||(this.content.id=n("disclosure-content")),this.trigger.setAttribute("aria-controls",this.content.id),this.contentId=this.content.id),this.trigger instanceof HTMLButtonElement?this.trigger.disabled=this.disabled:this.trigger&&this.trigger.setAttribute("aria-disabled",String(this.disabled))}setOpen(t,s){this.internalOpen!==t&&(this.internalOpen=t,o(this.host,t?"open":"close",{open:t,reason:s.reason,trigger:s.trigger}))}onTriggerClick=t=>{this.disabled?t.preventDefault():this.setOpen(!this.internalOpen,{reason:"action",trigger:r(t)})};onTriggerKeydown=t=>{!this.disabled&&h(t)&&(t.preventDefault(),this.setOpen(!this.internalOpen,{reason:"action",trigger:"keyboard"}))};render(){return i(e,{key:"7fbc83614f8e988a43d1baac0379a6dc8826b1d5"},i("slot",{key:"6ef33ca7bce5c4d83ab65642f52a9d17febb794d"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}}};a.style=":host{display:block}::slotted([hidden]){display:none !important}";export{a as ui_disclosure}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,g as t,h as i,H as r}from"./p-CEeiinfk.js";import{d as o}from"./p-JwSoedEO.js";const a=class{constructor(t){e(this,t)}get host(){return t(this)}checked=!1;defaultChecked=!1;disabled=!1;required=!1;value="on";internalChecked=!1;syncFromProp(){this.internalChecked=this.checked}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked}toggle=e=>{this.disabled||(this.internalChecked=!this.internalChecked,o(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:e}))};onKeydown=e=>{" "!==e.key||this.disabled||(e.preventDefault(),this.toggle("keyboard"))};onClick=e=>{e.target!==this.host?.shadowRoot?.querySelector("input")&&this.toggle("pointer")};render(){return i(r,{key:"
|
|
1
|
+
import{r as e,g as t,h as i,H as r}from"./p-CEeiinfk.js";import{d as o}from"./p-JwSoedEO.js";const a=class{constructor(t){e(this,t)}get host(){return t(this)}checked=!1;defaultChecked=!1;disabled=!1;required=!1;value="on";internalChecked=!1;syncFromProp(){this.internalChecked=this.checked}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked}toggle=e=>{this.disabled||(this.internalChecked=!this.internalChecked,o(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:e}))};onKeydown=e=>{" "!==e.key||this.disabled||(e.preventDefault(),this.toggle("keyboard"))};onClick=e=>{e.target!==this.host?.shadowRoot?.querySelector("input")&&this.toggle("pointer")};render(){return i(r,{key:"7dccbc5d5b97f5659decd5feda31b37e42e6f83e",role:"switch","aria-checked":String(this.internalChecked),"aria-disabled":String(this.disabled),"data-disabled":this.disabled?"":void 0,tabIndex:this.disabled?-1:0,onKeyDown:this.onKeydown,onClick:this.onClick},i("input",{key:"7841f4d20a50d1899c27ab232a9a34411a0c2d67",type:"checkbox",checked:this.internalChecked,disabled:this.disabled,required:this.required,value:this.value,"aria-hidden":"true",tabIndex:-1,onChange:e=>{this.internalChecked=e.target.checked,o(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:"pointer"})}}),i("slot",{key:"f3c2f5758e73f2a81f4a7ea4da734de0cb9a61c6"}))}static get watchers(){return{checked:[{syncFromProp:0}]}}};a.style=":host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}";export{a as ui_switch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,g as a,h as o,H as e}from"./p-CEeiinfk.js";import{o as r,c as t,r as s}from"./p-CR7f2MQC.js";import{d as n}from"./p-JwSoedEO.js";const d=class{constructor(a){i(this,a)}get host(){return a(this)}open=!1;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;overlayId=`ui-dialog-${Math.random().toString(36).slice(2,11)}`;dialogRef;syncFromProp(){this.internalOpen=this.open}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),r({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),t(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),t(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(this.internalOpen=!1,t(this.overlayId),n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&s("escape","keyboard")};render(){return o(e,{key:"
|
|
1
|
+
import{r as i,g as a,h as o,H as e}from"./p-CEeiinfk.js";import{o as r,c as t,r as s}from"./p-CR7f2MQC.js";import{d as n}from"./p-JwSoedEO.js";const d=class{constructor(a){i(this,a)}get host(){return a(this)}open=!1;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;overlayId=`ui-dialog-${Math.random().toString(36).slice(2,11)}`;dialogRef;syncFromProp(){this.internalOpen=this.open}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),r({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),t(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),t(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(this.internalOpen=!1,t(this.overlayId),n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&s("escape","keyboard")};render(){return o(e,{key:"c10f9063a1c2677caff3b8d1f26b37bf25978a77","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"a7111bd363cab94f394cca526bf34ea8081e5228",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.label},o("slot",{key:"b0a9699fe0be09e331cfea81b6bbeaec11d48956"})))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}}};d.style=":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}}";export{d as ui_dialog}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as
|
|
1
|
+
import{r as e,h as s}from"./p-CEeiinfk.js";function a(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||Boolean(e.textContent?.trim())))}const l=class{constructor(s){e(this,s)}hasStatus=!1;hasFooter=!1;statusSlot;footerSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasStatus=a(this.statusSlot),this.hasFooter=a(this.footerSlot)};render(){return s("div",{key:"946e3575a3b48f83315a5299d144a10647c31189",class:"search-shell",part:"base"},s("slot",{key:"6146d441648a9cafca12b764e94373252b3940be",name:"backdrop"}),s("div",{key:"e4389c8f39994209e1f8dc4dbf913e3728295545",class:"search-shell__panel",part:"panel"},s("div",{key:"8c660767d3ac12e1d94086bb80bb459e2f45d173",class:"search-shell__search",part:"search"},s("slot",{key:"c870a4266f689654c76a1fc9e2bc23bf690a931c",name:"search"})),s("div",{key:"b5a68d509a92fec24603008514e938ba27655f4d",class:"search-shell__status",part:"status",hidden:!this.hasStatus},s("slot",{key:"bc3233c23289cb56ca8d4217c9b3c37df9570abc",name:"status",ref:e=>this.statusSlot=e,onSlotchange:this.syncSlots})),s("div",{key:"291b357ed1c7949001952813c950fbaab24cd0fc",class:"search-shell__body",part:"body"},s("slot",{key:"72ecf55e7267cef21e612c1aff840fef67442fb5",name:"body"})),s("div",{key:"e393d0cc4bd0bbbf349a135d9f352ec08bd523cb",class:"search-shell__footer",part:"footer",hidden:!this.hasFooter},s("slot",{key:"2468bdafc67f01094a4461a1a1e2fd474a88ffcf",name:"footer",ref:e=>this.footerSlot=e,onSlotchange:this.syncSlots}))))}};l.style=":host{position:fixed;inset:0;z-index:var(--ui-search-shell-z-index, 400);display:block}.search-shell{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-block-start:var(--ui-search-shell-padding-top, 10vh)}.search-shell__panel{position:relative;inline-size:min( calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)), var(--ui-search-shell-max-width, 640px) );max-block-size:var(--ui-search-shell-max-height, 80vh);display:flex;flex-direction:column;overflow:hidden;background:var(--ui-search-shell-bg, var(--ui-surface, #ffffff));border:1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));border-radius:var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));box-shadow:var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)))}.search-shell__search,.search-shell__status,.search-shell__footer{flex-shrink:0}.search-shell__body{flex:1;min-block-size:0}[hidden]{display:none}@media (max-width: 767px){.search-shell{padding-block-start:0;align-items:stretch}.search-shell__panel{inline-size:100%;block-size:100vh;block-size:100dvh;max-block-size:none;border-radius:0;border-inline:none;border-block-start:none}}";export{l as ui_search_shell}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as e,h as a,H as i}from"./p-CEeiinfk.js";const o=class{constructor(a){e(this,a)}disabled=!1;value="";render(){return a(i,{key:"c0024d4bb84224019121b98a6fec36bfdad00864",role:"menuitem",tabIndex:this.disabled?-1:0,"aria-disabled":this.disabled?"true":void 0,"data-value":this.value||void 0},a("slot",{key:"00eee7c496dfaf71e8ec158606ebc6641e2ef0d8"}))}};o.style=":host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}";export{o as ui_menu_item}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class UIAffordanceScope {
|
|
2
|
+
host: HTMLElement;
|
|
3
|
+
/** Distance outside each registered affordance that reveals its near state. */
|
|
4
|
+
nearRadius: number;
|
|
5
|
+
private coordinator;
|
|
6
|
+
componentDidLoad(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
connectCoordinator(): void;
|
|
9
|
+
private onSlotChange;
|
|
10
|
+
render(): any;
|
|
11
|
+
}
|
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
|
+
interface UiAffordanceScope {
|
|
10
|
+
/**
|
|
11
|
+
* Distance outside each registered affordance that reveals its near state.
|
|
12
|
+
* @default 32
|
|
13
|
+
*/
|
|
14
|
+
"nearRadius": number;
|
|
15
|
+
}
|
|
9
16
|
interface UiAvatar {
|
|
10
17
|
/**
|
|
11
18
|
* @default ''
|
|
@@ -156,6 +163,11 @@ export namespace Components {
|
|
|
156
163
|
"required": boolean;
|
|
157
164
|
}
|
|
158
165
|
interface UiIconButton {
|
|
166
|
+
/**
|
|
167
|
+
* Reveals this control through a surrounding ui-affordance-scope.
|
|
168
|
+
* @default false
|
|
169
|
+
*/
|
|
170
|
+
"anticipatory": boolean;
|
|
159
171
|
/**
|
|
160
172
|
* @default false
|
|
161
173
|
*/
|
|
@@ -393,6 +405,12 @@ export namespace Components {
|
|
|
393
405
|
}
|
|
394
406
|
}
|
|
395
407
|
declare global {
|
|
408
|
+
interface HTMLUiAffordanceScopeElement extends Components.UiAffordanceScope, HTMLStencilElement {
|
|
409
|
+
}
|
|
410
|
+
var HTMLUiAffordanceScopeElement: {
|
|
411
|
+
prototype: HTMLUiAffordanceScopeElement;
|
|
412
|
+
new (): HTMLUiAffordanceScopeElement;
|
|
413
|
+
};
|
|
396
414
|
interface HTMLUiAvatarElement extends Components.UiAvatar, HTMLStencilElement {
|
|
397
415
|
}
|
|
398
416
|
var HTMLUiAvatarElement: {
|
|
@@ -550,6 +568,7 @@ declare global {
|
|
|
550
568
|
new (): HTMLUiTopBarElement;
|
|
551
569
|
};
|
|
552
570
|
interface HTMLElementTagNameMap {
|
|
571
|
+
"ui-affordance-scope": HTMLUiAffordanceScopeElement;
|
|
553
572
|
"ui-avatar": HTMLUiAvatarElement;
|
|
554
573
|
"ui-avatar-group": HTMLUiAvatarGroupElement;
|
|
555
574
|
"ui-badge": HTMLUiBadgeElement;
|
|
@@ -579,6 +598,13 @@ declare global {
|
|
|
579
598
|
}
|
|
580
599
|
}
|
|
581
600
|
declare namespace LocalJSX {
|
|
601
|
+
interface UiAffordanceScope {
|
|
602
|
+
/**
|
|
603
|
+
* Distance outside each registered affordance that reveals its near state.
|
|
604
|
+
* @default 32
|
|
605
|
+
*/
|
|
606
|
+
"nearRadius"?: number;
|
|
607
|
+
}
|
|
582
608
|
interface UiAvatar {
|
|
583
609
|
/**
|
|
584
610
|
* @default ''
|
|
@@ -729,6 +755,11 @@ declare namespace LocalJSX {
|
|
|
729
755
|
"required"?: boolean;
|
|
730
756
|
}
|
|
731
757
|
interface UiIconButton {
|
|
758
|
+
/**
|
|
759
|
+
* Reveals this control through a surrounding ui-affordance-scope.
|
|
760
|
+
* @default false
|
|
761
|
+
*/
|
|
762
|
+
"anticipatory"?: boolean;
|
|
732
763
|
/**
|
|
733
764
|
* @default false
|
|
734
765
|
*/
|
|
@@ -965,6 +996,9 @@ declare namespace LocalJSX {
|
|
|
965
996
|
interface UiTopBar {
|
|
966
997
|
}
|
|
967
998
|
|
|
999
|
+
interface UiAffordanceScopeAttributes {
|
|
1000
|
+
"nearRadius": number;
|
|
1001
|
+
}
|
|
968
1002
|
interface UiAvatarAttributes {
|
|
969
1003
|
"src": string;
|
|
970
1004
|
"alt": string;
|
|
@@ -1024,6 +1058,7 @@ declare namespace LocalJSX {
|
|
|
1024
1058
|
"label": string;
|
|
1025
1059
|
"size": 'sm' | 'md' | 'lg';
|
|
1026
1060
|
"variant": 'ghost' | 'outline' | 'solid';
|
|
1061
|
+
"anticipatory": boolean;
|
|
1027
1062
|
}
|
|
1028
1063
|
interface UiInputAttributes {
|
|
1029
1064
|
"value": string;
|
|
@@ -1100,6 +1135,7 @@ declare namespace LocalJSX {
|
|
|
1100
1135
|
}
|
|
1101
1136
|
|
|
1102
1137
|
interface IntrinsicElements {
|
|
1138
|
+
"ui-affordance-scope": Omit<UiAffordanceScope, keyof UiAffordanceScopeAttributes> & { [K in keyof UiAffordanceScope & keyof UiAffordanceScopeAttributes]?: UiAffordanceScope[K] } & { [K in keyof UiAffordanceScope & keyof UiAffordanceScopeAttributes as `attr:${K}`]?: UiAffordanceScopeAttributes[K] } & { [K in keyof UiAffordanceScope & keyof UiAffordanceScopeAttributes as `prop:${K}`]?: UiAffordanceScope[K] };
|
|
1103
1139
|
"ui-avatar": Omit<UiAvatar, keyof UiAvatarAttributes> & { [K in keyof UiAvatar & keyof UiAvatarAttributes]?: UiAvatar[K] } & { [K in keyof UiAvatar & keyof UiAvatarAttributes as `attr:${K}`]?: UiAvatarAttributes[K] } & { [K in keyof UiAvatar & keyof UiAvatarAttributes as `prop:${K}`]?: UiAvatar[K] };
|
|
1104
1140
|
"ui-avatar-group": Omit<UiAvatarGroup, keyof UiAvatarGroupAttributes> & { [K in keyof UiAvatarGroup & keyof UiAvatarGroupAttributes]?: UiAvatarGroup[K] } & { [K in keyof UiAvatarGroup & keyof UiAvatarGroupAttributes as `attr:${K}`]?: UiAvatarGroupAttributes[K] } & { [K in keyof UiAvatarGroup & keyof UiAvatarGroupAttributes as `prop:${K}`]?: UiAvatarGroup[K] };
|
|
1105
1141
|
"ui-badge": Omit<UiBadge, keyof UiBadgeAttributes> & { [K in keyof UiBadge & keyof UiBadgeAttributes]?: UiBadge[K] } & { [K in keyof UiBadge & keyof UiBadgeAttributes as `attr:${K}`]?: UiBadgeAttributes[K] } & { [K in keyof UiBadge & keyof UiBadgeAttributes as `prop:${K}`]?: UiBadge[K] };
|
|
@@ -1132,6 +1168,7 @@ export { LocalJSX as JSX };
|
|
|
1132
1168
|
declare module "@stencil/core" {
|
|
1133
1169
|
export namespace JSX {
|
|
1134
1170
|
interface IntrinsicElements {
|
|
1171
|
+
"ui-affordance-scope": LocalJSX.IntrinsicElements["ui-affordance-scope"] & JSXBase.HTMLAttributes<HTMLUiAffordanceScopeElement>;
|
|
1135
1172
|
"ui-avatar": LocalJSX.IntrinsicElements["ui-avatar"] & JSXBase.HTMLAttributes<HTMLUiAvatarElement>;
|
|
1136
1173
|
"ui-avatar-group": LocalJSX.IntrinsicElements["ui-avatar-group"] & JSXBase.HTMLAttributes<HTMLUiAvatarGroupElement>;
|
|
1137
1174
|
"ui-badge": LocalJSX.IntrinsicElements["ui-badge"] & JSXBase.HTMLAttributes<HTMLUiBadgeElement>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ViewportRect {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
right: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export interface RectLike extends ViewportRect {
|
|
10
|
+
}
|
|
11
|
+
export interface Point {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ProximityCoordinatorOptions {
|
|
16
|
+
/** Event surface for pointer tracking. Defaults to the interaction scope. */
|
|
17
|
+
pointerTarget?: EventTarget;
|
|
18
|
+
/** Descendants participating in proximity. */
|
|
19
|
+
anchorSelector?: string;
|
|
20
|
+
/** Distance outside an anchor that activates its anticipatory state. */
|
|
21
|
+
nearRadius?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ProximityCoordinator {
|
|
24
|
+
/** Refreshes the anchor list and its cached geometry after a layout change. */
|
|
25
|
+
refresh(): void;
|
|
26
|
+
/** Removes the scope-level listeners and all reflected interaction state. */
|
|
27
|
+
destroy(): void;
|
|
28
|
+
}
|
|
29
|
+
export declare function getVisualViewportRect(owner?: Window): ViewportRect;
|
|
30
|
+
export declare function clampRectToViewport(rect: RectLike, viewport?: ViewportRect, gutter?: number): Point;
|
|
31
|
+
export declare function distanceFromPointToRect(point: Point, rect: RectLike): number;
|
|
32
|
+
/**
|
|
33
|
+
* Coordinates anticipatory UI within one interaction scope.
|
|
34
|
+
*
|
|
35
|
+
* The coordinator deliberately owns one pointer listener and one animation-frame
|
|
36
|
+
* update for the whole scope. Anchors remain the only hit-testable controls; the
|
|
37
|
+
* reflected state is presentation-only, so overlapping near regions do not steal
|
|
38
|
+
* pointer input from each other or from surrounding content.
|
|
39
|
+
*/
|
|
40
|
+
export declare function createProximityCoordinator(scope: HTMLElement, options?: ProximityCoordinatorOptions): ProximityCoordinator;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
getElement,
|
|
4
|
+
h,
|
|
5
|
+
registerInstance
|
|
6
|
+
} from "./chunk-DYIMEQY7.js";
|
|
7
|
+
|
|
8
|
+
// dist/esm/ui-affordance-scope.entry.js
|
|
9
|
+
function distanceFromPointToRect(point, rect) {
|
|
10
|
+
const dx = Math.max(rect.left - point.x, 0, point.x - rect.right);
|
|
11
|
+
const dy = Math.max(rect.top - point.y, 0, point.y - rect.bottom);
|
|
12
|
+
return Math.hypot(dx, dy);
|
|
13
|
+
}
|
|
14
|
+
function createProximityCoordinator(scope, options = {}) {
|
|
15
|
+
const owner = scope.ownerDocument.defaultView ?? window;
|
|
16
|
+
const pointerTarget = options.pointerTarget ?? scope;
|
|
17
|
+
const anchorSelector = options.anchorSelector ?? "[data-ui-affordance]";
|
|
18
|
+
const configuredRadius = options.nearRadius ?? 32;
|
|
19
|
+
const nearRadius = Number.isFinite(configuredRadius) ? Math.max(0, configuredRadius) : 32;
|
|
20
|
+
const abort = new AbortController();
|
|
21
|
+
let anchors = [];
|
|
22
|
+
let frame = null;
|
|
23
|
+
let point = null;
|
|
24
|
+
let geometryDirty = false;
|
|
25
|
+
const clear = () => {
|
|
26
|
+
for (const { element } of anchors) {
|
|
27
|
+
if (element.hasAttribute("data-ui-proximity")) {
|
|
28
|
+
element.removeAttribute("data-ui-proximity");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (scope.hasAttribute("data-ui-interaction")) {
|
|
32
|
+
scope.removeAttribute("data-ui-interaction");
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const measure = () => {
|
|
36
|
+
anchors = Array.from(scope.querySelectorAll(anchorSelector)).filter((element) => !element.hasAttribute("disabled") && element.getAttribute("aria-disabled") !== "true").map((element) => ({ element, rect: element.getBoundingClientRect() }));
|
|
37
|
+
geometryDirty = false;
|
|
38
|
+
};
|
|
39
|
+
const update = () => {
|
|
40
|
+
frame = null;
|
|
41
|
+
if (geometryDirty)
|
|
42
|
+
measure();
|
|
43
|
+
if (!point) {
|
|
44
|
+
clear();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
let engaged = false;
|
|
48
|
+
for (const anchor of anchors) {
|
|
49
|
+
const near = distanceFromPointToRect(point, anchor.rect) <= nearRadius;
|
|
50
|
+
if (near && anchor.element.getAttribute("data-ui-proximity") !== "near") {
|
|
51
|
+
anchor.element.setAttribute("data-ui-proximity", "near");
|
|
52
|
+
} else if (!near && anchor.element.hasAttribute("data-ui-proximity")) {
|
|
53
|
+
anchor.element.removeAttribute("data-ui-proximity");
|
|
54
|
+
}
|
|
55
|
+
engaged ||= near;
|
|
56
|
+
}
|
|
57
|
+
if (engaged && scope.getAttribute("data-ui-interaction") !== "engaged") {
|
|
58
|
+
scope.setAttribute("data-ui-interaction", "engaged");
|
|
59
|
+
} else if (!engaged && scope.hasAttribute("data-ui-interaction")) {
|
|
60
|
+
scope.removeAttribute("data-ui-interaction");
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const schedule = () => {
|
|
64
|
+
if (frame !== null)
|
|
65
|
+
return;
|
|
66
|
+
frame = owner.requestAnimationFrame(update);
|
|
67
|
+
};
|
|
68
|
+
const onPointerMove = (event) => {
|
|
69
|
+
const pointer = event;
|
|
70
|
+
if (pointer.pointerType === "touch") {
|
|
71
|
+
point = null;
|
|
72
|
+
} else {
|
|
73
|
+
point = { x: pointer.clientX, y: pointer.clientY };
|
|
74
|
+
}
|
|
75
|
+
schedule();
|
|
76
|
+
};
|
|
77
|
+
const invalidate = () => {
|
|
78
|
+
geometryDirty = true;
|
|
79
|
+
schedule();
|
|
80
|
+
};
|
|
81
|
+
pointerTarget.addEventListener("pointermove", onPointerMove, {
|
|
82
|
+
passive: true,
|
|
83
|
+
signal: abort.signal
|
|
84
|
+
});
|
|
85
|
+
owner.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
86
|
+
owner.addEventListener("scroll", invalidate, { passive: true, capture: true, signal: abort.signal });
|
|
87
|
+
owner.visualViewport?.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
88
|
+
owner.visualViewport?.addEventListener("scroll", invalidate, { passive: true, signal: abort.signal });
|
|
89
|
+
measure();
|
|
90
|
+
return {
|
|
91
|
+
refresh: invalidate,
|
|
92
|
+
destroy() {
|
|
93
|
+
abort.abort();
|
|
94
|
+
if (frame !== null)
|
|
95
|
+
owner.cancelAnimationFrame(frame);
|
|
96
|
+
frame = null;
|
|
97
|
+
point = null;
|
|
98
|
+
clear();
|
|
99
|
+
anchors = [];
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
var uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
104
|
+
var UIAffordanceScope = class {
|
|
105
|
+
constructor(hostRef) {
|
|
106
|
+
registerInstance(this, hostRef);
|
|
107
|
+
}
|
|
108
|
+
get host() {
|
|
109
|
+
return getElement(this);
|
|
110
|
+
}
|
|
111
|
+
/** Distance outside each registered affordance that reveals its near state. */
|
|
112
|
+
nearRadius = 32;
|
|
113
|
+
coordinator = null;
|
|
114
|
+
componentDidLoad() {
|
|
115
|
+
this.connectCoordinator();
|
|
116
|
+
}
|
|
117
|
+
disconnectedCallback() {
|
|
118
|
+
this.coordinator?.destroy();
|
|
119
|
+
this.coordinator = null;
|
|
120
|
+
}
|
|
121
|
+
connectCoordinator() {
|
|
122
|
+
this.coordinator?.destroy();
|
|
123
|
+
this.coordinator = createProximityCoordinator(this.host, {
|
|
124
|
+
nearRadius: this.nearRadius
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
onSlotChange = () => {
|
|
128
|
+
this.coordinator?.refresh();
|
|
129
|
+
};
|
|
130
|
+
render() {
|
|
131
|
+
return h(Host, { key: "2bc861652826e6227deaba6d1030ecf43753f575" }, h("slot", { key: "5e0544939e6b20747f12023dbb45329eb3853715", onSlotchange: this.onSlotChange }));
|
|
132
|
+
}
|
|
133
|
+
static get watchers() {
|
|
134
|
+
return {
|
|
135
|
+
"nearRadius": [{
|
|
136
|
+
"connectCoordinator": 0
|
|
137
|
+
}]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
UIAffordanceScope.style = uiAffordanceScopeCss();
|
|
142
|
+
export {
|
|
143
|
+
UIAffordanceScope as ui_affordance_scope
|
|
144
|
+
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getElement,
|
|
4
4
|
h,
|
|
5
5
|
registerInstance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DYIMEQY7.js";
|
|
7
7
|
|
|
8
8
|
// dist/esm/ui-avatar-group.entry.js
|
|
9
9
|
var uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
|
|
@@ -43,7 +43,7 @@ var UIAvatarGroup = class {
|
|
|
43
43
|
this.overflowCount = overflowCount;
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return h(Host, { key: "
|
|
46
|
+
return h(Host, { key: "bef6efd3c80d29e47742412a497893789ea8790b", role: "list", "aria-label": this.label || void 0 }, h("slot", { key: "21585b11dcde36868c3e3bc7fbd0c216be6f011b" }), this.overflowCount > 0 && h("span", { key: "ede3b71945d379fe78d522a3346aa29c02d74b15", class: "overflow", role: "listitem", "aria-label": `${this.overflowCount} more`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
|
|
47
47
|
}
|
|
48
48
|
static get watchers() {
|
|
49
49
|
return {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DYIMEQY7.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-avatar.entry.js
|
|
8
8
|
function toInitials(value) {
|
|
@@ -35,7 +35,7 @@ var UIAvatar = class {
|
|
|
35
35
|
render() {
|
|
36
36
|
const fallbackText = this.fallback || toInitials(this.name || this.alt);
|
|
37
37
|
const label = this.alt || this.name || "Avatar";
|
|
38
|
-
return h(Host, { key: "
|
|
38
|
+
return h(Host, { key: "18214960ad2f1a0370907c0281102af924739de9", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "c6d0a00de56b756f0e24fdc4b306d89cdae2a44f", class: "avatar" }, h("img", { key: "c5bfecb9d18797bc934ff087ce7ed8a4616ab347", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "1875a45a9c21de3e3a52924ef25b3f8429a788c4", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
|
|
39
39
|
}
|
|
40
40
|
static get watchers() {
|
|
41
41
|
return {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DYIMEQY7.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-badge.entry.js
|
|
8
8
|
var uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
|
|
@@ -13,7 +13,7 @@ var UIBadge = class {
|
|
|
13
13
|
variant;
|
|
14
14
|
tone;
|
|
15
15
|
render() {
|
|
16
|
-
return h(Host, { key: "
|
|
16
|
+
return h(Host, { key: "8766c0331ac7fbd6409b604578e159ae093c844b", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("slot", { key: "65016ab530b850c82261e2da718622ff72567634" }));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
UIBadge.style = uiBadgeCss();
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getElement,
|
|
7
7
|
h,
|
|
8
8
|
registerInstance
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DYIMEQY7.js";
|
|
10
10
|
|
|
11
11
|
// dist/esm/ui-button.entry.js
|
|
12
12
|
var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}:host([variant='outline'])::slotted(button),::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none;transform:translateY(0)}:host([variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='destructive'])::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
@@ -49,7 +49,7 @@ var UIButton = class {
|
|
|
49
49
|
this.host.click();
|
|
50
50
|
};
|
|
51
51
|
render() {
|
|
52
|
-
return h(Host, { key: "
|
|
52
|
+
return h(Host, { key: "b5f9152db70a276334df047f5cf53d1b8efe2174", "data-size": this.size || void 0, "data-disabled": this.disabled ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "b39657e832abc63a6ea6090fa061779c3ae654b5", ref: (el) => this.slotRef = el }));
|
|
53
53
|
}
|
|
54
54
|
static get watchers() {
|
|
55
55
|
return {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DYIMEQY7.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-checkbox.entry.js
|
|
13
13
|
var uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
@@ -74,7 +74,7 @@ var UICheckbox = class {
|
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
76
|
render() {
|
|
77
|
-
return h(Host, { key: "
|
|
77
|
+
return h(Host, { key: "66b6708ae71c9eca6c03c63891b590bd050c2506", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "b5e168a9ff0c6e5e747fff6c6264c59744f10a56", ref: (el) => this.slotRef = el }));
|
|
78
78
|
}
|
|
79
79
|
static get watchers() {
|
|
80
80
|
return {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getElement,
|
|
12
12
|
h,
|
|
13
13
|
registerInstance
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DYIMEQY7.js";
|
|
15
15
|
|
|
16
16
|
// dist/esm/ui-context-menu.entry.js
|
|
17
17
|
var uiContextMenuCss = () => `:host{display:contents}.menu{position:fixed;z-index:var(--ui-z-overlay, 1000);min-width:12rem}.menu[data-open]{display:block}.menu:not([data-open]){display:none !important}`;
|
|
@@ -189,7 +189,7 @@ var UIContextMenu = class {
|
|
|
189
189
|
this.closeMenu("action", "pointer");
|
|
190
190
|
};
|
|
191
191
|
render() {
|
|
192
|
-
return h(Host, { key: "
|
|
192
|
+
return h(Host, { key: "79fbca2c89f1d1fd1f4796ad88d2a599e811a3f9", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "9308cadfa155930e3e46dfb4a69a847ae388958b", name: "trigger" }), h("div", { key: "16cfba2b32444ac9e3cac1f040f81f17fd5db23c", class: "menu", "data-open": this.internalOpen ? "" : void 0, style: { left: `${this.pointerX}px`, top: `${this.pointerY}px` } }, h("ui-menu", { key: "59f18e0df3bb1fe85efa8eeca00b336bbde47c70", open: this.internalOpen }, h("slot", { key: "5bdbb7773c9c1ae43ec2e05fca9558482815e28a" }))));
|
|
193
193
|
}
|
|
194
194
|
static get watchers() {
|
|
195
195
|
return {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getElement,
|
|
12
12
|
h,
|
|
13
13
|
registerInstance
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DYIMEQY7.js";
|
|
15
15
|
|
|
16
16
|
// dist/esm/ui-dialog.entry.js
|
|
17
17
|
var 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}}`;
|
|
@@ -89,7 +89,7 @@ var UIDialog = class {
|
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
render() {
|
|
92
|
-
return h(Host, { key: "
|
|
92
|
+
return h(Host, { key: "c10f9063a1c2677caff3b8d1f26b37bf25978a77", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "a7111bd363cab94f394cca526bf34ea8081e5228", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.label }, h("slot", { key: "b0a9699fe0be09e331cfea81b6bbeaec11d48956" })));
|
|
93
93
|
}
|
|
94
94
|
static get watchers() {
|
|
95
95
|
return {
|