@luzmo/lucero 1.0.1-alpha.4 → 1.0.1-alpha.40
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/components/accordion/index.cjs +6 -6
- package/components/accordion/index.js +14 -13
- package/components/action-bar/index.cjs +4 -4
- package/components/action-bar/index.js +20 -18
- package/components/action-button/index.cjs +3 -3
- package/components/action-button/index.js +7 -6
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +2 -2
- package/components/{action-group-DBImibFn.js → action-group-Bwt9w8Vh.js} +10 -9
- package/components/action-group-D917z7XF.cjs +20 -0
- package/components/action-menu/index.cjs +9 -9
- package/components/action-menu/index.js +10 -10
- package/components/avatar/index.cjs +3 -3
- package/components/avatar/index.js +7 -7
- package/components/base-5nDSSNeT.cjs +18 -0
- package/components/base-CdYjmV_8.js +96 -0
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +38 -2
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +37 -32
- package/components/{button-base-DbkDzb71.js → button-base-B5uul3tZ.js} +54 -39
- package/components/button-base-C7or8-FB.cjs +25 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +11 -9
- package/components/calendar/index.cjs +96 -1
- package/components/calendar/index.js +538 -6
- package/components/checkbox/index.cjs +4 -4
- package/components/checkbox/index.js +10 -8
- package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-DUbGDm7f.js} +9 -9
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
- package/components/{clear-button-DoeRUWQ3.js → clear-button-Bjp7N52G.js} +14 -13
- package/components/clear-button-C39c3PH0.cjs +18 -0
- package/components/close-button-C4zqQJRL.cjs +18 -0
- package/components/close-button-R-Cyxi_j.js +52 -0
- package/components/color-area/index.cjs +5 -5
- package/components/color-area/index.js +12 -11
- package/components/color-controller-7sNUf7SP.js +386 -0
- package/components/color-controller-ChN-A9Ft.cjs +18 -0
- package/components/color-field/color-field.d.ts +8 -0
- package/components/color-field/index.cjs +4 -4
- package/components/color-field/index.js +38 -25
- package/components/color-handle/index.cjs +2 -2
- package/components/color-handle/index.js +8 -6
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +2 -2
- package/components/color-loupe-CIEFp7ln.cjs +56 -0
- package/components/{color-loupe-CmMsXbjT.js → color-loupe-CLPX6xVb.js} +6 -4
- package/components/color-menu/index.cjs +8 -8
- package/components/color-menu/index.js +46 -46
- package/components/color-palette/color-palette.d.ts +6 -2
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +35 -34
- package/components/color-palette-group/color-palette-group.d.ts +79 -0
- package/components/color-palette-group/index.cjs +28 -0
- package/components/color-palette-group/index.d.ts +7 -0
- package/components/color-palette-group/index.js +206 -0
- package/components/color-picker/color-picker.d.ts +31 -2
- package/components/color-picker/index.cjs +6 -5
- package/components/color-picker/index.js +16 -12
- package/components/color-slider/index.cjs +40 -1
- package/components/color-slider/index.js +452 -6
- package/components/date-time-picker/index.cjs +16 -16
- package/components/date-time-picker/index.js +105 -106
- package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
- package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +11 -9
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +2 -2
- package/components/field-group-BYHNJmv0.cjs +23 -0
- package/components/{field-group-DXfBWrkO.js → field-group-CHmw159R.js} +7 -5
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +2 -2
- package/components/{field-label-CZ2zzChK.js → field-label-Cy3xMWZ-.js} +9 -8
- package/components/field-label-DZoeqJJX.cjs +25 -0
- package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/{focusable-BxtpnzWp.js → focusable-BjvsvVam.js} +3 -2
- package/components/focusable-CbVKgGfS.cjs +18 -0
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +22 -20
- package/components/index.cjs +1 -1
- package/components/index.js +140 -138
- package/components/infield-button/index.cjs +2 -2
- package/components/infield-button/index.js +6 -5
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +7 -5
- package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
- package/components/{directive-C7oCP5Bh.cjs → language-resolution-EUER43cg.cjs} +1 -5
- package/components/like-anchor-B2EqJPdw.cjs +32 -0
- package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-CgqCU210.js} +23 -22
- package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
- package/components/{manage-help-text-syYnjKGL.js → manage-help-text-C9sCHK3R.js} +8 -8
- package/components/menu/index.cjs +38 -13
- package/components/menu/index.js +138 -105
- package/components/menu/menu-item.d.ts +8 -1
- package/components/multi-language-field/index.cjs +2 -2
- package/components/multi-language-field/index.js +9 -7
- package/components/number-field/index.cjs +5 -5
- package/components/number-field/index.js +122 -85
- package/components/number-field/number-field.d.ts +145 -0
- package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
- package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
- package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
- package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-DorVpCL4.js} +14 -15
- package/components/options/index.cjs +26 -58
- package/components/options/index.js +205 -849
- package/components/overlay/index.cjs +6 -6
- package/components/overlay/index.js +31 -32
- package/components/overlay-BhrVS5h7.cjs +47 -0
- package/components/overlay-C-No3oJQ.js +1736 -0
- package/components/{pending-state-CaH1si5b.cjs → pending-state-DQctFHI8.cjs} +2 -2
- package/components/{pending-state-DTX7ggyF.js → pending-state-Dx1u3EXA.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +3 -3
- package/components/{picker-BmoXv1jt.js → picker-Cm6_didQ.js} +44 -44
- package/components/picker-DxYgh4LR.cjs +123 -0
- package/components/picker-button/index.cjs +4 -4
- package/components/picker-button/index.js +8 -7
- package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
- package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +2 -2
- package/components/popover-lcZnODPK.cjs +30 -0
- package/components/{popover-DjX0aAnY.js → popover-ucIgjbQs.js} +8 -7
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +2 -2
- package/components/{progress-circle-DXH9z8-6.js → progress-circle-D5J0ZwY0.js} +8 -7
- package/components/progress-circle-DgMbqrzG.cjs +33 -0
- package/components/radio/index.cjs +2 -2
- package/components/radio/index.js +12 -11
- package/components/search/index.cjs +6 -6
- package/components/search/index.js +6 -6
- package/components/select/index.cjs +43 -42
- package/components/select/index.js +142 -126
- package/components/select/select.d.ts +1 -1
- package/components/{base-BjTwmyRF.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
- package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-cJbo3PKR.js} +5 -5
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +48 -1101
- package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
- package/components/strategies-CNgBb6dM.cjs +18 -0
- package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BlWm-XZU.js} +5 -6
- package/components/streaming-listener-D9Wc7skA.cjs +18 -0
- package/components/swatch/index.cjs +7 -7
- package/components/swatch/index.js +18 -17
- package/components/switch/index.cjs +2 -2
- package/components/switch/index.js +6 -5
- package/components/tabs/index.cjs +16 -24
- package/components/tabs/index.js +94 -162
- package/components/tags/index.cjs +4 -4
- package/components/tags/index.js +15 -14
- package/components/text-field/index.cjs +3 -3
- package/components/text-field/index.js +13 -11
- package/components/text-field/text-field.d.ts +1 -0
- package/components/{text-field-BIADXoLC.js → text-field-BHaLKkf1.js} +73 -99
- package/components/text-field-DFP7p8Rv.cjs +81 -0
- package/components/text-field.module-Bp4Mwuvj.js +21 -0
- package/components/text-field.module-eAEqjvZu.cjs +18 -0
- package/components/toast/index.cjs +11 -11
- package/components/toast/index.js +11 -9
- package/components/tooltip/index.cjs +4 -4
- package/components/tooltip/index.js +60 -36
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/unit-input/index.cjs +6 -6
- package/components/unit-input/index.js +12 -11
- package/components/utils.cjs +1 -1
- package/components/utils.js +6 -6
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/package.json +67 -1
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- package/components/base-CBCg3yyw.cjs +0 -40
- package/components/base-D76d76ww.js +0 -26
- package/components/base-WsynuqaS.js +0 -677
- package/components/button-base-XgPLmwP-.cjs +0 -25
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-Qi1pMA5S.cjs +0 -18
- package/components/close-button-BFMBEw3q.cjs +0 -18
- package/components/close-button-BWXdHSx3.js +0 -51
- package/components/color-controller-DTp1juRz.js +0 -3198
- package/components/color-controller-_ZwyhvaU.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/directive-oAbCiebi.js +0 -44
- package/components/field-group-DkGst3r5.cjs +0 -23
- package/components/field-label-mO1AkUgR.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/if-defined-C9YGdo33.cjs +0 -22
- package/components/if-defined-DOaE2coe.js +0 -27
- package/components/index-A-yOTB_d.js +0 -1490
- package/components/index-BLWuwZXx.cjs +0 -113
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-HjQa8tew.js +0 -1174
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-DbwDQtuO.js +0 -229
- package/components/luzmo-icons-DletXGWU.cjs +0 -29
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
- package/components/overlay-Cig9r6uU.js +0 -2747
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/picker-DWsBWdPN.cjs +0 -123
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/query-assigned-nodes-C76XVPWY.js +0 -36
- package/components/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/state-Deh-vKYE.js +0 -29
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-D5d_Gt0t.cjs +0 -85
- package/components/text-field.module-ColtFhf_.js +0 -21
- package/components/text-field.module-p_VF2tC_.cjs +0 -18
- package/components/when-CDK1Tt5Y.js +0 -28
- package/components/when-CDZyJPvd.cjs +0 -22
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../overlay-BhrVS5h7.cjs"),h=require("lit"),i=require("lit/decorators.js"),b=require("../base-5nDSSNeT.cjs"),d=require("lit/async-directive.js"),u=require("../slottable-request-event-BfUUt1Mh.cjs"),O=":host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}";var S=Object.defineProperty,l=(g,e,r,t)=>{for(var n=void 0,a=g.length-1,c;a>=0;a--)(c=g[a])&&(n=c(e,r,n)||n);return n&&S(e,r,n),n};class s extends b.LuzmoElement{constructor(){super(...arguments),this.content="click hover longpress",this.offset=6,this.disabled=!1,this.receivesFocus="auto",this.clickContent=[],this.longpressContent=[],this.hoverContent=[],this.targetContent=[]}static get styles(){return[h.unsafeCSS(O)]}getAssignedElementsFromSlot(e){return e.assignedElements({flatten:!0})}handleTriggerContent(e){this.targetContent=this.getAssignedElementsFromSlot(e.target)}handleSlotContent(e){switch(e.target.name){case"click-content":{this.clickContent=this.getAssignedElementsFromSlot(e.target);break}case"longpress-content":{this.longpressContent=this.getAssignedElementsFromSlot(e.target);break}case"hover-content":{this.hoverContent=this.getAssignedElementsFromSlot(e.target);break}}}handleBeforetoggle(e){const{target:r}=e;let t;if(r===this.clickOverlayElement)t="click";else if(r===this.longpressOverlayElement)t="longpress";else if(r===this.hoverOverlayElement)t="hover";else return;e.newState==="open"?this.open=t:this.open===t&&(this.open=void 0)}update(e){var r,t,n,a,c,p;e.has("clickContent")&&(this.clickPlacement=((r=this.clickContent[0])==null?void 0:r.getAttribute("placement"))||((t=this.clickContent[0])==null?void 0:t.getAttribute("direction"))||void 0),e.has("hoverContent")&&(this.hoverPlacement=((n=this.hoverContent[0])==null?void 0:n.getAttribute("placement"))||((a=this.hoverContent[0])==null?void 0:a.getAttribute("direction"))||void 0),e.has("longpressContent")&&(this.longpressPlacement=((c=this.longpressContent[0])==null?void 0:c.getAttribute("placement"))||((p=this.longpressContent[0])==null?void 0:p.getAttribute("direction"))||void 0),super.update(e)}renderSlot(e){return h.html`
|
|
19
19
|
<slot name=${e} @slotchange=${this.handleSlotContent}></slot>
|
|
20
|
-
`}renderClickOverlay(){var t;const e=this.renderSlot("click-content"),r=
|
|
20
|
+
`}renderClickOverlay(){var t;const e=this.renderSlot("click-content"),r=h.html`
|
|
21
21
|
<luzmo-overlay
|
|
22
22
|
id="click-overlay"
|
|
23
23
|
?disabled=${this.disabled||this.clickContent.length===0}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
>
|
|
33
33
|
${e}
|
|
34
34
|
</luzmo-overlay>
|
|
35
|
-
`;return(t=this.triggeredBy)!=null&&t.includes("click")?r:this.clickContent.length===0?e:r}renderHoverOverlay(){var t;const e=this.renderSlot("hover-content"),r=
|
|
35
|
+
`;return(t=this.triggeredBy)!=null&&t.includes("click")?r:this.clickContent.length===0?e:r}renderHoverOverlay(){var t;const e=this.renderSlot("hover-content"),r=h.html`
|
|
36
36
|
<luzmo-overlay
|
|
37
37
|
id="hover-overlay"
|
|
38
38
|
?open=${this.open==="hover"&&this.hoverContent.length>0}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
>
|
|
48
48
|
${e}
|
|
49
49
|
</luzmo-overlay>
|
|
50
|
-
`;return(t=this.triggeredBy)!=null&&t.includes("hover")?r:this.hoverContent.length===0?e:r}renderLongpressOverlay(){var t;const e=this.renderSlot("longpress-content"),r=
|
|
50
|
+
`;return(t=this.triggeredBy)!=null&&t.includes("hover")?r:this.hoverContent.length===0?e:r}renderLongpressOverlay(){var t;const e=this.renderSlot("longpress-content"),r=h.html`
|
|
51
51
|
<luzmo-overlay
|
|
52
52
|
id="longpress-overlay"
|
|
53
53
|
?disabled=${this.disabled||this.longpressContent.length===0}
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
${e}
|
|
64
64
|
</luzmo-overlay>
|
|
65
65
|
<slot name="longpress-describedby-descriptor"></slot>
|
|
66
|
-
`;return(t=this.triggeredBy)!=null&&t.includes("longpress")?r:this.longpressContent.length===0?e:r}render(){return
|
|
66
|
+
`;return(t=this.triggeredBy)!=null&&t.includes("longpress")?r:this.longpressContent.length===0?e:r}render(){return h.html`
|
|
67
67
|
<slot
|
|
68
68
|
id="trigger"
|
|
69
69
|
name="trigger"
|
|
70
70
|
@slotchange=${this.handleTriggerContent}
|
|
71
71
|
></slot>
|
|
72
72
|
${[this.renderClickOverlay(),this.renderHoverOverlay(),this.renderLongpressOverlay()]}
|
|
73
|
-
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}l([
|
|
73
|
+
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}l([i.property()],s.prototype,"content");l([i.property({attribute:"triggered-by"})],s.prototype,"triggeredBy");l([i.property({reflect:!0})],s.prototype,"placement");l([i.property()],s.prototype,"type");l([i.property({type:Number})],s.prototype,"offset");l([i.property({reflect:!0})],s.prototype,"open");l([i.property({type:Boolean,reflect:!0})],s.prototype,"disabled");l([i.property({attribute:"receives-focus"})],s.prototype,"receivesFocus");l([i.state()],s.prototype,"clickContent");l([i.state()],s.prototype,"longpressContent");l([i.state()],s.prototype,"hoverContent");l([i.state()],s.prototype,"targetContent");l([i.query("#click-overlay",!0)],s.prototype,"clickOverlayElement");l([i.query("#longpress-overlay",!0)],s.prototype,"longpressOverlayElement");l([i.query("#hover-overlay",!0)],s.prototype,"hoverOverlayElement");function $(g,e,r,t){return o.LuzmoOverlay.open(g,e,r,t)}class y extends d.AsyncDirective{render(e){return h.nothing}update(e,[r]){this.template=r,this.target!==e.element&&(this.target=e.element,this.renderBefore=this.target.children[0]),this.listenerHost=this.target,this.init()}handleSlottableRequest(e){if(e.target!==e.currentTarget)return;const r=e.data===u.removeSlottableRequest;h.render(r?void 0:this.template(),this.target,{renderBefore:this.renderBefore})}init(){var r;(r=this.listeners)==null||r.abort(),this.listeners=new AbortController;const{signal:e}=this.listeners;this.listenerHost.addEventListener("slottable-request",t=>this.handleSlottableRequest(t),{signal:e})}disconnected(){var e;(e=this.listeners)==null||e.abort()}reconnected(){this.init()}}const k=d.directive(y);class f extends y{constructor(){super(...arguments),this.defaultOptions={triggerInteraction:"click",overlayOptions:{type:"auto",offset:0}},this.options={...this.defaultOptions.overlayOptions}}render(e,r){return h.nothing}update(e,[r,t]){var p,v,m;this.options={...this.defaultOptions.overlayOptions,...t==null?void 0:t.overlayOptions},this.insertionOptions=t==null?void 0:t.insertionOptions,this.template=r,this.host=(p=e.options)==null?void 0:p.host;let n=!1;const a=(t==null?void 0:t.triggerInteraction)||this.defaultOptions.triggerInteraction,c=o.InteractionTypes[(v=this.strategy)==null?void 0:v.type]!==a;this.target!==e.element&&(this.target=e.element,n=!0),(n||c)&&((m=this.strategy)==null||m.abort(),this.strategy=new o.strategies[a](this.target,{isPersistent:!0,handleOverlayReady:C=>{this.listenerHost=this.overlay=C,this.init()}})),this.strategy.open=(t==null?void 0:t.open)??!1}handleSlottableRequest(e){var n,a;if(e.target!==e.currentTarget)return;const r=e.data===u.removeSlottableRequest,t={};if(this.host&&(t.host=this.host),h.render(r?void 0:this.template(),this.overlay,t),r)this.overlay.remove();else{o.LuzmoAbstractOverlay.applyOptions(this.overlay,{...this.options,trigger:this.target});const c=typeof((n=this.insertionOptions)==null?void 0:n.el)=="function"?this.insertionOptions.el():((a=this.insertionOptions)==null?void 0:a.el)||this.target,{where:p="afterend"}=this.insertionOptions||{};c.insertAdjacentElement(p,this.overlay)}}}const E=d.directive(f);customElements.get("luzmo-overlay")||customElements.define("luzmo-overlay",o.LuzmoOverlay);customElements.get("luzmo-overlay-trigger")||customElements.define("luzmo-overlay-trigger",s);exports.ClickController=o.ClickController;exports.HoverController=o.HoverController;exports.InteractionController=o.InteractionController;exports.InteractionTypes=o.InteractionTypes;exports.LONGPRESS_INSTRUCTIONS=o.LONGPRESS_INSTRUCTIONS;exports.LongpressController=o.LongpressController;exports.LuzmoAbstractOverlay=o.LuzmoAbstractOverlay;exports.LuzmoOverlay=o.LuzmoOverlay;exports.PlacementController=o.PlacementController;exports.SAFARI_FOCUS_RING_CLASS=o.SAFARI_FOCUS_RING_CLASS;exports.VirtualTrigger=o.VirtualTrigger;exports.guaranteedAllTransitionend=o.guaranteedAllTransitionend;exports.lastInteractionType=o.lastInteractionType;exports.nextFrame=o.nextFrame;exports.noop=o.noop;exports.overlayTimer=o.overlayTimer;exports.placementUpdatedSymbol=o.placementUpdatedSymbol;exports.SlottableRequestEvent=u.SlottableRequestEvent;exports.removeSlottableRequest=u.removeSlottableRequest;exports.LuzmoOverlayTrigger=s;exports.OverlayTriggerDirective=f;exports.SlottableRequestDirective=y;exports.openOverlay=$;exports.slottableRequest=k;exports.trigger=E;
|
|
@@ -15,19 +15,18 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { e as f, I as O, s as S, L as $ } from "../overlay-
|
|
19
|
-
import { C as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { f as A } from "../async-directive-BfcqVjDp.js";
|
|
18
|
+
import { e as f, I as O, s as S, L as $ } from "../overlay-C-No3oJQ.js";
|
|
19
|
+
import { C as V, H as j, b as M, c as J, d as K, P as Q, S as W, V as X, g as Y, l as Z, a as ee, n as te, o as oe, p as re } from "../overlay-C-No3oJQ.js";
|
|
20
|
+
import { unsafeCSS as E, html as m, nothing as z, render as v } from "lit";
|
|
21
|
+
import { property as c, state as g, query as h } from "lit/decorators.js";
|
|
22
|
+
import { a as w } from "../base-CdYjmV_8.js";
|
|
23
|
+
import { directive as b, AsyncDirective as A } from "lit/async-directive.js";
|
|
25
24
|
import { r as y } from "../slottable-request-event-DggLA4Rx.js";
|
|
26
|
-
import { S as
|
|
25
|
+
import { S as se } from "../slottable-request-event-DggLA4Rx.js";
|
|
27
26
|
const k = () => {
|
|
28
27
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
29
28
|
const i = document.createElement("style");
|
|
30
|
-
i.setAttribute("data-luzmo-vars", ""), i.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-
|
|
29
|
+
i.setAttribute("data-luzmo-vars", ""), i.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(i);
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
32
|
k();
|
|
@@ -37,12 +36,12 @@ var I = Object.defineProperty, s = (i, e, o, t) => {
|
|
|
37
36
|
(a = i[n]) && (l = a(e, o, l) || l);
|
|
38
37
|
return l && I(e, o, l), l;
|
|
39
38
|
};
|
|
40
|
-
class r extends
|
|
39
|
+
class r extends w {
|
|
41
40
|
constructor() {
|
|
42
41
|
super(...arguments), this.content = "click hover longpress", this.offset = 6, this.disabled = !1, this.receivesFocus = "auto", this.clickContent = [], this.longpressContent = [], this.hoverContent = [], this.targetContent = [];
|
|
43
42
|
}
|
|
44
43
|
static get styles() {
|
|
45
|
-
return [
|
|
44
|
+
return [E(F)];
|
|
46
45
|
}
|
|
47
46
|
getAssignedElementsFromSlot(e) {
|
|
48
47
|
return e.assignedElements({ flatten: !0 });
|
|
@@ -218,7 +217,7 @@ s([
|
|
|
218
217
|
s([
|
|
219
218
|
h("#hover-overlay", !0)
|
|
220
219
|
], r.prototype, "hoverOverlayElement");
|
|
221
|
-
function
|
|
220
|
+
function H(i, e, o, t) {
|
|
222
221
|
return f.open(
|
|
223
222
|
i,
|
|
224
223
|
e,
|
|
@@ -261,7 +260,7 @@ class x extends A {
|
|
|
261
260
|
this.init();
|
|
262
261
|
}
|
|
263
262
|
}
|
|
264
|
-
const
|
|
263
|
+
const U = b(x);
|
|
265
264
|
class R extends x {
|
|
266
265
|
constructor() {
|
|
267
266
|
super(...arguments), this.defaultOptions = {
|
|
@@ -314,33 +313,33 @@ class R extends x {
|
|
|
314
313
|
}
|
|
315
314
|
}
|
|
316
315
|
}
|
|
317
|
-
const
|
|
316
|
+
const N = b(R);
|
|
318
317
|
customElements.get("luzmo-overlay") || customElements.define("luzmo-overlay", f);
|
|
319
318
|
customElements.get("luzmo-overlay-trigger") || customElements.define("luzmo-overlay-trigger", r);
|
|
320
319
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
V as ClickController,
|
|
321
|
+
j as HoverController,
|
|
322
|
+
M as InteractionController,
|
|
324
323
|
O as InteractionTypes,
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
J as LONGPRESS_INSTRUCTIONS,
|
|
325
|
+
K as LongpressController,
|
|
327
326
|
$ as LuzmoAbstractOverlay,
|
|
328
327
|
f as LuzmoOverlay,
|
|
329
328
|
r as LuzmoOverlayTrigger,
|
|
330
329
|
R as OverlayTriggerDirective,
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
Q as PlacementController,
|
|
331
|
+
W as SAFARI_FOCUS_RING_CLASS,
|
|
333
332
|
x as SlottableRequestDirective,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
333
|
+
se as SlottableRequestEvent,
|
|
334
|
+
X as VirtualTrigger,
|
|
335
|
+
Y as guaranteedAllTransitionend,
|
|
336
|
+
Z as lastInteractionType,
|
|
337
|
+
ee as nextFrame,
|
|
338
|
+
te as noop,
|
|
339
|
+
H as openOverlay,
|
|
340
|
+
oe as overlayTimer,
|
|
341
|
+
re as placementUpdatedSymbol,
|
|
343
342
|
y as removeSlottableRequest,
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
U as slottableRequest,
|
|
344
|
+
N as trigger
|
|
346
345
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
"use strict";const O=require("lit"),u=require("lit/decorators.js"),$=require("lit/directives/if-defined.js"),G=require("lit/directives/style-map.js"),M=require("./random-id-CqvckpWe.cjs"),Y=require("./element-resolution-BvRLGqIU.cjs"),le=require("./base-5nDSSNeT.cjs"),S=require("./focusable-selectors-BgFlyFcY.cjs"),b=require("@floating-ui/dom"),J=require("./slottable-request-event-BfUUt1Mh.cjs"),H=require("./condition-attribute-with-id-DrQYZzFS.cjs"),k=require("./platform-BJnOJJag.cjs");function he(a,e,t=[]){for(const[i,s]of e.entries()){const n=a[i],r=n.parentElement||n.getRootNode();t[i]&&t[i](s),r&&r!==n&&n.replaceWith(s),delete a[i]}return e}const ce=(a,e,{position:t,prepareCallback:i}={position:"beforeend"})=>{let{length:s}=a;if(s===0)return()=>a;let n=1,r=0;(t==="afterbegin"||t==="afterend")&&(n=-1,r=s-1);const o=new Array(s),h=new Array(s),p=typeof document<"u"?document.createComment("placeholder for reparented element"):null;do{const l=a[r];i&&(h[r]=i(l)),o[r]=p.cloneNode();const c=l.parentElement||l.getRootNode();c&&c!==l&&c.replaceChild(o[r],l),e.insertAdjacentElement(t,l),r+=n}while(--s>0);return function(){return he(o,a,h)}},pe=1e3,de=1e3;class ue{constructor(e={}){this.warmUpDelay=pe,this.coolDownDelay=de,this.isWarm=!1,this.timeout=0,Object.assign(this,e)}openTimer(e){if(this.cancelCooldownTimer(),!this.component||e!==this.component)return this.component&&(this.close(this.component),this.cancelCooldownTimer()),this.component=e,this.isWarm?Promise.resolve(!1):(this.promise=new Promise(t=>{this.resolve=t,this.timeout=typeof window<"u"?window.setTimeout(()=>{this.resolve&&(this.resolve(!1),this.isWarm=!0)},this.warmUpDelay):0}),this.promise);if(this.promise)return this.promise;throw new Error("Inconsistent state")}close(e){this.component&&this.component===e&&(this.resetCooldownTimer(),this.timeout>0&&(clearTimeout(this.timeout),this.timeout=0),this.resolve&&(this.resolve(!0),delete this.resolve),delete this.promise,delete this.component)}resetCooldownTimer(){this.isWarm&&(this.cooldownTimeout&&typeof window<"u"&&window.clearTimeout(this.cooldownTimeout),this.cooldownTimeout=typeof window<"u"?window.setTimeout(()=>{this.isWarm=!1,delete this.cooldownTimeout},this.coolDownDelay):void 0)}cancelCooldownTimer(){this.cooldownTimeout&&typeof window<"u"&&window.clearTimeout(this.cooldownTimeout),delete this.cooldownTimeout}}const D=new ue,E=()=>{},q=(a,e,t)=>{const i=new AbortController,s=new Map,n=()=>{i.abort(),t()};let r,o;const h=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{o=requestAnimationFrame(()=>{n()})})}),p=c=>{c.target===a&&(s.set(c.propertyName,s.get(c.propertyName)-1),s.get(c.propertyName)||s.delete(c.propertyName),s.size===0&&n())},l=c=>{c.target===a&&(s.has(c.propertyName)||s.set(c.propertyName,0),s.set(c.propertyName,s.get(c.propertyName)+1),cancelAnimationFrame(h),cancelAnimationFrame(r),cancelAnimationFrame(o))};a.addEventListener("transitionrun",l,{signal:i.signal}),a.addEventListener("transitionend",p,{signal:i.signal}),a.addEventListener("transitioncancel",p,{signal:i.signal}),e()};function f(){return new Promise(a=>requestAnimationFrame(()=>a()))}class C extends le.LuzmoElement{constructor(){super(...arguments),this.dispose=E,this.offset=0,this.willPreventClose=!1}applyFocus(e,t){}get delayed(){return!1}set delayed(e){}get disabled(){return!1}set disabled(e){}get elementResolver(){return this._elementResolver}set elementResolver(e){this._elementResolver=e}ensureOnDOM(e){}makeTransition(e){return null}manageDelay(e){}manageDialogOpen(){}managePopoverOpen(){}managePosition(){}get open(){return!1}set open(e){}get placementController(){return this._placementController}set placementController(e){this._placementController=e}requestSlottable(){}returnFocus(){}get state(){return"closed"}set state(e){}manuallyKeepOpen(){}static update(){const e=new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0});document.dispatchEvent(e)}static async open(e,t,i,s){await Promise.resolve().then(()=>N);const n=arguments.length===2,r=i||e,o=new this;let h=!1;const p=ce([r],o,{position:"beforeend",prepareCallback:v=>{const P=v.slot;return v.removeAttribute("slot"),()=>{v.slot=P}}});if(o.dispose=()=>{o.addEventListener("luzmo-closed",()=>{h||(p(),h=!0),requestAnimationFrame(()=>{o.remove()})}),o.open=!1,o.dispose=E},!n&&r&&s){const v=e,P=t,g=s;return C.applyOptions(o,{...g,delayed:g.delayed||r.hasAttribute("delayed"),trigger:g.virtualTrigger||v,type:P==="modal"?"modal":P==="hover"?"hint":"auto"}),v.after(o),await o.updateComplete,o.open=!0,o.dispose}const c=t;return o.append(r),C.applyOptions(o,{...c,delayed:c.delayed||r.hasAttribute("delayed")}),o.updateComplete.then(()=>{o.open=!0}),o}static applyOptions(e,t){e.delayed=!!t.delayed,e.receivesFocus=t.receivesFocus??"auto",e.triggerElement=t.trigger||null,e.type=t.type||"modal",e.offset=t.offset??0,e.placement=t.placement,e.willPreventClose=!!t.notImmediatelyClosable}}const W=a=>a.querySelector(S.userFocusableSelector),B=a=>a.assignedElements().find(t=>t.matches(S.userFocusableSelector));class K extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="open",this.newState="closed"}}class j extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="closed",this.newState="open"}}class y extends Event{constructor(e,t,{publish:i,interaction:s,reason:n}){super(e,{bubbles:i,composed:i}),this.overlay=t,this.detail={interaction:s,reason:n}}}class x{constructor(e,t){this.x=0,this.y=0,this.x=e,this.y=t}updateBoundingClientRect(e,t){this.x=e,this.y=t,C.update()}getBoundingClientRect(){return{width:0,height:0,top:this.y,right:this.x,y:this.y,x:this.x,bottom:this.y,left:this.x,toJSON(){}}}}function me(a){class e extends a{async manageDialogOpen(){const i=this.open;if(await f(),await this.managePosition(),this.open!==i)return;const s=await this.dialogMakeTransition(i);this.open===i&&await this.dialogApplyFocus(i,s)}dialogMakeTransition(i){let s=null;const n=(o,h)=>()=>{if(o.open=i,!i){const l=()=>{o.removeEventListener("close",l)};o.addEventListener("close",l)}if(h>0)return;const p=i?j:K;this.dispatchEvent(new p),i&&(o.matches(S.userFocusableSelector)&&(s=o),s=s||W(o),s||o.querySelectorAll("slot").forEach(c=>{s||(s=B(c))}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(o,h)=>()=>{if(this.open!==i)return;const p=i?"luzmo-opened":"luzmo-closed";if(h>0){o.dispatchEvent(new y(p,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||i!==this.open)return;const l=async()=>{const c=this.triggerElement instanceof x;this.dispatchEvent(new y(p,this,{interaction:this.type,publish:c})),o.dispatchEvent(new y(p,this,{interaction:this.type,publish:!1})),this.triggerElement&&!c&&this.triggerElement.dispatchEvent(new y(p,this,{interaction:this.type,publish:!0})),this.state=i?"opened":"closed",this.returnFocus(),await f(),await f(),i===this.open&&i===!1&&this.requestSlottable()};!i&&this.dialogEl.open?(this.dialogEl.addEventListener("close",()=>{l()},{once:!0}),this.dialogEl.close()):l()};return this.elements.forEach((o,h)=>{q(o,n(o,h),r(o,h))}),s}dialogApplyFocus(i,s){this.applyFocus(i,s)}}return e}function ge(a){class e extends a{async managePopoverOpen(){await this.managePosition()}async manageDelay(i){if(i===!1||i!==this.open){D.close(this);return}this.delayed&&await D.openTimer(this)&&(this.open=!i)}ensureOnDOM(i){document.body.offsetHeight}makeTransition(i){if(this.open!==i)return null;let s=null;const n=(o,h)=>()=>{if(i!==this.open)return;if(o.open=i,h===0){const l=i?j:K;this.dispatchEvent(new l)}if(i!==!0||(o.matches(S.userFocusableSelector)&&(s=o),s=s||W(o),s))return;o.querySelectorAll("slot").forEach(l=>{s||(s=B(l))})},r=(o,h)=>async()=>{if(this.open!==i)return;const p=i?"luzmo-opened":"luzmo-closed";if(o.dispatchEvent(new y(p,this,{interaction:this.type})),h>0)return;const l=this.triggerElement instanceof x;this.dispatchEvent(new y(p,this,{interaction:this.type,publish:l})),this.triggerElement&&!l&&this.triggerElement.dispatchEvent(new y(p,this,{interaction:this.type,publish:!0})),this.state=i?"opened":"closed",this.returnFocus(),await f(),await f(),i===this.open&&i===!1&&this.requestSlottable()};return this.elements.forEach((o,h)=>{q(o,n(o,h),r(o,h))}),s}}return e}const fe=typeof CSS<"u"&&CSS.supports("(overlay: auto)");function Q(a){let e=!1;try{e=a.matches(":popover-open")}catch{}let t=!1;try{t=a.matches(":open")}catch{}return e||t}function ve(a){class e extends a{async manageDelay(i){if(i===!1||i!==this.open){D.close(this);return}this.delayed&&await D.openTimer(this)&&(this.open=!i)}shouldHidePopover(i){if(i&&this.open!==i)return;const s=async({newState:n}={})=>{n!=="open"&&await this.placementController.resetOverlayPosition()};if(!Q(this.dialogEl)){s();return}this.dialogEl.addEventListener("toggle",s,{once:!0})}shouldShowPopover(i){let s=!1;try{s=this.dialogEl.matches(":popover-open")}catch{}let n=!1;try{n=this.dialogEl.matches(":open")}catch{}i&&this.open===i&&!s&&!n&&this.isConnected&&(this.dialogEl.showPopover(),this.managePosition())}async ensureOnDOM(i){fe||await this.shouldHidePopover(i),this.shouldShowPopover(i),await f()}makeTransition(i){if(this.open!==i)return null;let s=null;const n=(o,h)=>()=>{if(o.open=i,h===0){const l=i?j:K;this.dispatchEvent(new l)}if(!i||(o.matches(S.userFocusableSelector)&&(s=o),s=s||W(o),s))return;o.querySelectorAll("slot").forEach(l=>{s||(s=B(l))})},r=(o,h)=>()=>{if(this.open!==i)return;const p=i?"luzmo-opened":"luzmo-closed";if(h>0){o.dispatchEvent(new y(p,this,{interaction:this.type,publish:!1}));return}const l=async()=>{if(this.open!==i)return;await f();const v=this.triggerElement instanceof x;this.dispatchEvent(new y(p,this,{interaction:this.type,publish:v})),o.dispatchEvent(new y(p,this,{interaction:this.type,publish:!1})),this.triggerElement&&!v&&this.triggerElement.dispatchEvent(new y(p,this,{interaction:this.type,publish:!0})),this.state=i?"opened":"closed",this.returnFocus(),await f(),await f(),i===this.open&&i===!1&&this.requestSlottable()};if(this.open!==i)return;const c=Q(this.dialogEl);i!==!0&&c&&this.isConnected?(this.dialogEl.addEventListener("beforetoggle",()=>{l()},{once:!0}),this.dialogEl.hidePopover()):l()};return this.elements.forEach((o,h)=>{q(o,n(o,h),r(o,h))}),s}}return e}const ye=typeof document<"u"&&"showPopover"in document.createElement("div");class be{constructor(){this.root=typeof document>"u"?null:document.body,this.stack=[],this.handleScroll=e=>{typeof document<"u"&&e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||this.stack.forEach(t=>{t.open&&(t.type==="auto"&&t.triggerElement instanceof HTMLElement&&t.triggerElement.closest("luzmo-picker, luzmo-select, luzmo-action-menu")&&e.stopPropagation(),typeof document<"u"&&document.dispatchEvent(new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0})))})},this.handlePointerdown=e=>{this.pointerdownPath=e.composedPath(),this.lastOverlay=this.stack.at(-1)},this.handlePointerup=()=>{const e=this.pointerdownPath;if(this.pointerdownPath=void 0,this.stack.length===0||!(e!=null&&e.length))return;const t=this.lastOverlay;this.lastOverlay=void 0;const i=this.stack.length-1,s=this.stack.filter((n,r)=>!e.find(h=>h===n||h===(n==null?void 0:n.triggerElement)&&(n==null?void 0:n.type)==="hint"||r===i&&n!==t&&n.triggerInteraction==="longpress")&&!n.shouldPreventClose()&&n.type!=="manual"&&!(n.type==="modal"&&t!==n));s.reverse(),s.forEach(n=>{this.closeOverlay(n);let r=n.parentOverlayToForceClose;for(;r;)this.closeOverlay(r),r=r.parentOverlayToForceClose})},this.handleBeforetoggle=e=>{const{target:t,newState:i}=e;i!=="open"&&this.closeOverlay(t)},this.handleKeydown=e=>{if(e.code!=="Escape"||this.stack.length===0)return;const t=this.stack.at(-1);if((t==null?void 0:t.type)==="page"){e.preventDefault();return}if((t==null?void 0:t.type)==="manual"){this.closeOverlay(t);return}ye||t&&this.closeOverlay(t)},typeof document<"u"&&this.bindEvents()}get document(){return this.root.ownerDocument||document}bindEvents(){typeof document<"u"&&(this.document.addEventListener("pointerdown",this.handlePointerdown),this.document.addEventListener("pointerup",this.handlePointerup),this.document.addEventListener("keydown",this.handleKeydown),this.document.addEventListener("scroll",this.handleScroll,{capture:!0}))}closeOverlay(e){const t=this.stack.indexOf(e);t!==-1&&this.stack.splice(t,1),e.open=!1}overlaysByTriggerElement(e){return this.stack.filter(t=>t.triggerElement===e)}add(e){if(this.stack.includes(e)){const t=this.stack.indexOf(e);t!==-1&&(this.stack.splice(t,1),this.stack.push(e));return}if(e.type==="auto"||e.type==="modal"||e.type==="page"){const t="luzmo-overlay-query-path",i=new Event(t,{composed:!0,bubbles:!0});e.addEventListener(t,s=>{const n=s.composedPath();this.stack.forEach(r=>{!n.find(h=>h===r)&&r.type!=="manual"&&r.type!=="modal"&&this.closeOverlay(r)})},{once:!0}),e.dispatchEvent(i)}else if(e.type==="hint"){if(this.stack.some(i=>i.type!=="manual"&&i.triggerElement&&i.triggerElement===e.triggerElement)){e.open=!1;return}this.stack.forEach(i=>{i.type==="hint"&&this.closeOverlay(i)})}requestAnimationFrame(()=>{this.stack.push(e),e.addEventListener("beforetoggle",this.handleBeforetoggle,{once:!0})})}remove(e){this.closeOverlay(e)}}const X=new be,we=':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}';function A(a){if(a===void 0)return 0;const e=window.devicePixelRatio||1;return Math.round(a*e)/e}const R=8,Ee=100,Pe=a=>({left:["right","bottom","top"],"left-start":["right-start","bottom","top"],"left-end":["right-end","bottom","top"],right:["left","bottom","top"],"right-start":["left-start","bottom","top"],"right-end":["left-end","bottom","top"],top:["bottom","left","right"],"top-start":["bottom-start","left","right"],"top-end":["bottom-end","left","right"],bottom:["top","left","right"],"bottom-start":["top-start","left","right"],"bottom-end":["top-end","left","right"]})[a]??[a],Ce=Symbol("placement updated");class Z{constructor(e){this.originalPlacements=new WeakMap,this.allowPlacementUpdate=!1,this.closeForAncestorUpdate=()=>{!this.allowPlacementUpdate&&this.options.type!=="modal"&&this.cleanup&&this.target.dispatchEvent(new Event("close",{bubbles:!0})),this.allowPlacementUpdate=!1},this.updatePlacement=()=>{this.computePlacement()},this.resetOverlayPosition=()=>{!this.target||!this.options||(this.clearOverlayPosition(),this.host.offsetHeight,this.computePlacement())},this.host=e,this.host.addController(this)}placeOverlay(e=this.target,t=this.options){if(this.target=e,this.options=t,!e||!t)return;const i=b.autoUpdate(t.trigger,e,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),s=b.autoUpdate(t.trigger,e,this.updatePlacement,{ancestorScroll:!1});this.cleanup=()=>{var n;(n=this.host.elements)==null||n.forEach(r=>{r.addEventListener("luzmo-closed",()=>{const o=this.originalPlacements.get(r);o&&r.setAttribute("placement",o),this.originalPlacements.delete(r)},{once:!0})}),i(),s()}}async computePlacement(){var v,P;const{options:e,target:t}=this;await(document.fonts?document.fonts.ready:Promise.resolve());const i=e.trigger instanceof HTMLElement?b.flip():b.flip({padding:R,fallbackPlacements:Pe(e.placement)}),[s=0,n=0]=Array.isArray(e==null?void 0:e.offset)?e.offset:[e.offset,0],r=(v=this.host.elements.find(g=>g.tipElement))==null?void 0:v.tipElement,o=[b.offset({mainAxis:s,crossAxis:n}),b.shift({padding:R}),i,b.size({padding:R,apply:({availableWidth:g,availableHeight:U,rects:{floating:re}})=>{const V=Math.max(Ee,Math.floor(U)),L=re.height;this.initialHeight=this.isConstrained&&this.initialHeight||L,this.isConstrained=L<this.initialHeight||V<=L;const ae=this.isConstrained?`${V}px`:"";Object.assign(t.style,{maxWidth:`${Math.floor(g)}px`,maxHeight:ae})}}),...r?[b.arrow({element:r,padding:e.tipPadding||R})]:[]],{x:h,y:p,placement:l,middlewareData:c}=await b.computePosition(e.trigger,t,{placement:e.placement,middleware:o,strategy:"fixed"});if(Object.assign(t.style,{top:"0px",left:"0px",translate:`${A(h)}px ${A(p)}px`}),t.setAttribute("actual-placement",l),(P=this.host.elements)==null||P.forEach(g=>{this.originalPlacements.has(g)||this.originalPlacements.set(g,g.getAttribute("placement")),g.setAttribute("placement",l)}),r&&c.arrow){const{x:g,y:U}=c.arrow;Object.assign(r.style,{top:l.startsWith("right")||l.startsWith("left")?"0px":"",left:l.startsWith("bottom")||l.startsWith("top")?"0px":"",translate:`${A(g)}px ${A(U)}px`})}}clearOverlayPosition(){this.target&&(this.target.style.removeProperty("max-height"),this.target.style.removeProperty("max-width"),this.initialHeight=void 0,this.isConstrained=!1)}hostConnected(){document.addEventListener("luzmo-update-overlays",this.resetOverlayPosition)}hostUpdated(){var e;this.host.open||((e=this.cleanup)==null||e.call(this),this.cleanup=void 0)}hostDisconnected(){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0,document.removeEventListener("luzmo-update-overlays",this.resetOverlayPosition)}}var T=(a=>(a.click="click",a.hover="hover",a.longpress="longpress",a))(T||{});const _=Symbol("lastInteractionType"),z="remove-focus-ring-safari-hack";class I{constructor(e,{overlay:t,isPersistent:i,handleOverlayReady:s}){this.target=e,this.isLazilyOpen=!1,this.isPersistent=!1,this.isPersistent=!!i,this.handleOverlayReady=s,this.isPersistent&&this.init(),this.overlay=t}get activelyOpening(){return!1}get open(){var e;return((e=this.overlay)==null?void 0:e.open)??this.isLazilyOpen}set open(e){if(e!==this.open){if(this.isLazilyOpen=e,this.overlay){this.overlay.open=e,this.target[_]=this.type;return}e&&(customElements.whenDefined("luzmo-overlay").then(async()=>{const{LuzmoOverlay:t}=await Promise.resolve().then(()=>N);this.overlay=new t,this.overlay.open=!0,this.target[_]=this.type}),Promise.resolve().then(()=>N))}}get overlay(){return this._overlay}set overlay(e){var t;e&&this.overlay!==e&&(this.overlay&&this.overlay.removeController(this),this._overlay=e,this.overlay.addController(this),this.initOverlay(),this.prepareDescription(this.target),(t=this.handleOverlayReady)==null||t.call(this,this.overlay))}prepareDescription(e){}releaseDescription(){}shouldCompleteOpen(){}init(){}initOverlay(){}abort(){var e;this.releaseDescription(),(e=this.abortController)==null||e.abort()}hostConnected(){this.init()}hostDisconnected(){this.isPersistent||this.abort()}}class ee extends I{constructor(){super(...arguments),this.type=T.click,this.preventNextToggle=!1}handleClick(){this.preventNextToggle||(this.open=!this.open),this.preventNextToggle=!1}handlePointerdown(){this.preventNextToggle=this.open}init(){var t;(t=this.abortController)==null||t.abort(),this.abortController=new AbortController;const{signal:e}=this.abortController;this.target.addEventListener("click",()=>this.handleClick(),{signal:e}),this.target.addEventListener("pointerdown",()=>this.handlePointerdown(),{signal:e})}}const Te=300;class te extends I{constructor(){super(...arguments),this.type=T.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleKeyup(e){(e.code==="Tab"||e.code==="Escape")&&(this.open=!0,this.removeSafariFocusRingClass())}handleTargetFocusin(){if(this.target.matches(":focus-visible")){if(k.isWebKit()&&this.target[_]===T.click){this.target.classList.add(z);return}this.open=!0,this.focusedin=!0,this.removeSafariFocusRingClass()}}handleTargetFocusout(){this.removeSafariFocusRingClass(),this.focusedin=!1,!this.pointerentered&&(this.open=!1)}handleTargetPointerenter(){var e;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0),!((e=this.overlay)!=null&&e.disabled)&&(this.open=!0,this.pointerentered=!0)}handleTargetPointerleave(){this.doPointerleave()}handleHostPointerenter(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0)}handleHostPointerleave(){this.doPointerleave()}prepareDescription(){if(this.overlay.elements.length===0)return;const e=this.target.getRootNode(),t=this.overlay.elements[0].getRootNode(),i=this.overlay.getRootNode();e===i?this.prepareOverlayRelativeDescription():e===t&&this.prepareContentRelativeDescription()}prepareOverlayRelativeDescription(){const e=H.conditionAttributeWithId(this.target,"aria-describedby",[this.overlay.id]);this.releaseDescription=()=>{e(),this.releaseDescription=E}}prepareContentRelativeDescription(){const e=[],t=this.overlay.elements.map(s=>(e.push(s.id),s.id||(s.id=`${this.overlay.tagName.toLowerCase()}-helper-${M.randomID()}`),s.id));this.elementIds=e;const i=H.conditionAttributeWithId(this.target,"aria-describedby",t);this.releaseDescription=()=>{i(),this.overlay.elements.map((s,n)=>{s.id=this.elementIds[n]}),this.releaseDescription=E}}doPointerleave(){this.pointerentered=!1;const e=this.target;this.focusedin&&e.matches(":focus-visible")||(this.hoverTimeout=setTimeout(()=>{this.open=!1},Te))}init(){var t;(t=this.abortController)==null||t.abort(),this.abortController=new AbortController;const{signal:e}=this.abortController;this.target.addEventListener("keyup",i=>this.handleKeyup(i),{signal:e}),this.target.addEventListener("focusin",()=>this.handleTargetFocusin(),{signal:e}),this.target.addEventListener("focusout",()=>this.handleTargetFocusout(),{signal:e}),this.target.addEventListener("pointerenter",()=>this.handleTargetPointerenter(),{signal:e}),this.target.addEventListener("pointerleave",()=>this.handleTargetPointerleave(),{signal:e}),this.overlay&&this.initOverlay()}initOverlay(){if(!this.abortController)return;const{signal:e}=this.abortController;this.overlay.addEventListener("pointerenter",()=>this.handleHostPointerenter(),{signal:e}),this.overlay.addEventListener("pointerleave",()=>this.handleHostPointerleave(),{signal:e})}removeSafariFocusRingClass(){k.isWebKit()&&this.target.classList.contains(z)&&this.target.classList.remove(z)}}const Oe=300,ie={touch:"Double tap and long press for additional options",keyboard:"Press Space or Alt+Down Arrow for additional options",mouse:"Click and hold for additional options"};class se extends I{constructor(){super(...arguments),this.type=T.longpress,this.longpressState=null,this.releaseDescription=E,this.handlePointerup=()=>{var e;clearTimeout(this.timeout),this.target&&(this.longpressState=((e=this.overlay)==null?void 0:e.state)==="opening"?"pressed":null,document.removeEventListener("pointerup",this.handlePointerup),document.removeEventListener("pointercancel",this.handlePointerup))}}get activelyOpening(){return this.longpressState==="opening"||this.longpressState==="pressed"}handleLongpress(){this.open=!0,this.longpressState=this.longpressState==="potential"?"opening":"pressed"}handlePointerdown(e){!this.target||e.button!==0||(this.longpressState="potential",document.addEventListener("pointerup",this.handlePointerup),document.addEventListener("pointercancel",this.handlePointerup),"holdAffordance"in this.target)||(this.timeout=setTimeout(()=>{this.target&&this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"pointer"}}))},Oe))}handleKeydown(e){const{code:t,altKey:i}=e;i&&t==="ArrowDown"&&(e.stopPropagation(),e.stopImmediatePropagation())}handleKeyup(e){const{code:t,altKey:i}=e;if(t==="Space"||i&&t==="ArrowDown"){if(!this.target)return;e.stopPropagation(),this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"keyboard"}})),setTimeout(()=>{this.longpressState=null})}}prepareDescription(e){if(this.releaseDescription!==E||this.overlay.elements.length===0)return;const t=document.createElement("div");t.id=`longpress-describedby-descriptor-${M.randomID()}`;const i=k.isIOS()||k.isAndroid()?"touch":"keyboard";t.textContent=ie[i],t.slot="longpress-describedby-descriptor";const s=e.getRootNode(),n=this.overlay.getRootNode();s===n?this.overlay.append(t):(t.hidden=!("host"in s),e.after(t));const r=H.conditionAttributeWithId(e,"aria-describedby",[t.id]);this.releaseDescription=()=>{r(),t.remove(),this.releaseDescription=E}}shouldCompleteOpen(){this.longpressState=this.longpressState==="pressed"?null:this.longpressState}init(){var t;(t=this.abortController)==null||t.abort(),this.abortController=new AbortController;const{signal:e}=this.abortController;this.target.addEventListener("longpress",()=>this.handleLongpress(),{signal:e}),this.target.addEventListener("pointerdown",i=>this.handlePointerdown(i),{signal:e}),this.prepareDescription(this.target),!this.target.holdAffordance&&(this.target.addEventListener("keydown",i=>this.handleKeydown(i),{signal:e}),this.target.addEventListener("keyup",i=>this.handleKeyup(i),{signal:e}))}}const oe={click:ee,longpress:se,hover:te};var De=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,m=(a,e,t,i)=>{for(var s=i>1?void 0:i?Se(e,t):e,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&De(e,t,s),s};const xe=typeof document<"u"&&"showPopover"in document.createElement("div");let F=me(C);F=xe?ve(F):ge(F);var w;const d=(w=class extends F{constructor(){super(...arguments),this._delayed=!1,this._disabled=!1,this.offset=0,this._open=!1,this.lastRequestSlottableState=!1,this.receivesFocus="auto",this._state="closed",this.triggerElement=null,this.type="auto",this.wasOpen=!1,this.closeOnFocusOut=e=>{if(!e.relatedTarget)return;const t=new Event("overlay-relation-query",{bubbles:!0,composed:!0});e.relatedTarget.addEventListener(t.type,i=>{i.composedPath().includes(this)||(this.open=!1)}),e.relatedTarget.dispatchEvent(t)}}get delayed(){var e;return((e=this.elements.at(-1))==null?void 0:e.hasAttribute("delayed"))||this._delayed}set delayed(e){this._delayed=e}get disabled(){return this._disabled}set disabled(e){var t;this._disabled=e,e?((t=this.strategy)==null||t.abort(),this.wasOpen=this.open,this.open=!1):(this.bindEvents(),this.open=this.open||this.wasOpen,this.wasOpen=!1)}get hasNonVirtualTrigger(){return!!this.triggerElement&&!(this.triggerElement instanceof x)}get placementController(){return this._placementController||(this._placementController=new Z(this)),this._placementController}get open(){return this._open}set open(e){var t;e&&this.disabled||e!==this.open&&((t=this.strategy)!=null&&t.activelyOpening&&!e||(this._open=e,this.open&&(w.openCount+=1),this.requestUpdate("open",!this.open),this.open&&this.requestSlottable()))}get state(){return this._state}set state(e){var i;if(e===this.state)return;const t=this.state;this._state=e,(this.state==="opened"||this.state==="closed")&&((i=this.strategy)==null||i.shouldCompleteOpen()),this.requestUpdate("state",t)}get elementResolver(){return this._elementResolver||(this._elementResolver=new Y.ElementResolutionController(this)),this._elementResolver}get usesDialog(){return this.type==="modal"||this.type==="page"}get popoverValue(){if("popover"in this)switch(this.type){case"modal":case"page":return;case"hint":return"manual";default:return this.type}}get requiresPositioning(){return!(this.type==="page"||!this.open||!this.triggerElement||!this.placement&&this.type!=="hint")}managePosition(){if(!this.requiresPositioning||!this.open)return;const e=this.offset||0,t=this.triggerElement,i=this.placement||"right",s=this.tipPadding;this.placementController.placeOverlay(this.dialogEl,{offset:e,placement:i,tipPadding:s,trigger:t,type:this.type})}async managePopoverOpen(){super.managePopoverOpen();const e=this.open;if(this.open!==e||(await this.manageDelay(e),this.open!==e)||(this.triggerInteraction==="longpress"&&await f(),await this.ensureOnDOM(e),this.open!==e))return;const t=await this.makeTransition(e);this.open===e&&await this.applyFocus(e,t)}async applyFocus(e,t){if(!(this.receivesFocus==="false"||this.type==="hint")){if(await f(),await f(),e===this.open&&!this.open){this.hasNonVirtualTrigger&&this.contains(this.getRootNode().activeElement)&&this.triggerElement.focus();return}t==null||t.focus()}}returnFocus(){var t;if(this.open||this.type==="hint")return;const e=()=>{var n,r;const i=[];let s=typeof document<"u"?document.activeElement:null;for(;(n=s==null?void 0:s.shadowRoot)!=null&&n.activeElement;)s=s.shadowRoot.activeElement;for(;s;){const o=s.assignedSlot||s.parentElement||((r=s.getRootNode())==null?void 0:r.host);o&&i.push(o),s=o}return i};this.receivesFocus!=="false"&&((t=this.triggerElement)!=null&&t.focus)&&(this.contains(this.getRootNode().activeElement)||e().includes(this)||typeof document<"u"&&document.activeElement===document.body)&&this.triggerElement.focus()}async manageOpen(e){if(!(!this.isConnected&&this.open)&&(this.hasUpdated||await this.updateComplete,this.open?(X.add(this),this.willPreventClose&&(document.addEventListener("pointerup",()=>{this.dialogEl.classList.toggle("not-immediately-closable",!1),this.willPreventClose=!1},{once:!0}),this.dialogEl.classList.toggle("not-immediately-closable",!0))):(e&&this.dispose(),X.remove(this)),this.open&&this.state!=="opened"?this.state="opening":!this.open&&this.state!=="closed"&&(this.state="closing"),this.usesDialog?this.manageDialogOpen():this.managePopoverOpen(),this.type==="auto")){const t=this.getRootNode();this.open?t.addEventListener("focusout",this.closeOnFocusOut,{capture:!0}):t.removeEventListener("focusout",this.closeOnFocusOut,{capture:!0})}}bindEvents(){var e;(e=this.strategy)==null||e.abort(),this.strategy=void 0,this.hasNonVirtualTrigger&&this.triggerInteraction&&(this.strategy=new oe[this.triggerInteraction](this.triggerElement,{overlay:this}))}handleBeforetoggle(e){e.newState!=="open"&&this.handleBrowserClose(e)}handleBrowserClose(e){var t;if(e.stopPropagation(),!((t=this.strategy)!=null&&t.activelyOpening)){this.open=!1;return}this.manuallyKeepOpen()}manuallyKeepOpen(){this.open=!0,this.placementController.allowPlacementUpdate=!0,this.manageOpen(!1)}handleSlotchange(){var e,t;this.elements.length===0?(e=this.strategy)==null||e.releaseDescription():this.hasNonVirtualTrigger&&((t=this.strategy)==null||t.prepareDescription(this.triggerElement))}shouldPreventClose(){const e=this.willPreventClose;return this.willPreventClose=!1,e}requestSlottable(){this.lastRequestSlottableState!==this.open&&(this.open||document.body.offsetHeight,this.dispatchEvent(new J.SlottableRequestEvent("overlay-content",this.open?{}:J.removeSlottableRequest)),this.lastRequestSlottableState=this.open)}willUpdate(e){var i;if(this.hasAttribute("id")||this.setAttribute("id",`${this.tagName.toLowerCase()}-${M.randomID()}`),e.has("open")&&(this.hasUpdated||this.open)&&this.manageOpen(e.get("open")),e.has("trigger")){const[s,n]=((i=this.trigger)==null?void 0:i.split("@"))||[];this.elementResolver.selector=s?`#${s}`:"",this.triggerInteraction=n}let t=!1;e.has(Y.elementResolverUpdatedSymbol)&&(t=this.triggerElement,this.triggerElement=this.elementResolver.element),e.has("triggerElement")&&(t=e.get("triggerElement")),t!==!1&&this.bindEvents()}updated(e){super.updated(e),e.has("placement")&&(this.placement?this.dialogEl.setAttribute("actual-placement",this.placement):this.dialogEl.removeAttribute("actual-placement"),this.open&&e.get("placement")!==void 0&&this.placementController.resetOverlayPosition()),e.has("state")&&this.state==="closed"&&e.get("state")!==void 0&&this.placementController.clearOverlayPosition()}renderContent(){return O.html` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":w.openCount.toString()}}renderDialog(){return O.html`
|
|
19
|
+
<dialog
|
|
20
|
+
class="dialog"
|
|
21
|
+
part="dialog"
|
|
22
|
+
placement=${$.ifDefined(this.requiresPositioning?this.placement||"right":void 0)}
|
|
23
|
+
style=${G.styleMap(this.dialogStyleMap)}
|
|
24
|
+
@close=${this.handleBrowserClose}
|
|
25
|
+
@cancel=${this.handleBrowserClose}
|
|
26
|
+
@beforetoggle=${this.handleBeforetoggle}
|
|
27
|
+
?is-visible=${this.state!=="closed"}
|
|
28
|
+
>
|
|
29
|
+
${this.renderContent()}
|
|
30
|
+
</dialog>
|
|
31
|
+
`}renderPopover(){return O.html`
|
|
32
|
+
<div
|
|
33
|
+
class="dialog"
|
|
34
|
+
part="dialog"
|
|
35
|
+
placement=${$.ifDefined(this.requiresPositioning?this.placement||"right":void 0)}
|
|
36
|
+
popover=${$.ifDefined(this.popoverValue)}
|
|
37
|
+
style=${G.styleMap(this.dialogStyleMap)}
|
|
38
|
+
@beforetoggle=${this.handleBeforetoggle}
|
|
39
|
+
@close=${this.handleBrowserClose}
|
|
40
|
+
?is-visible=${this.state!=="closed"}
|
|
41
|
+
>
|
|
42
|
+
${this.renderContent()}
|
|
43
|
+
</div>
|
|
44
|
+
`}render(){const e=this.type==="modal"||this.type==="page";return O.html`
|
|
45
|
+
${e?this.renderDialog():this.renderPopover()}
|
|
46
|
+
<slot name="longpress-describedby-descriptor"></slot>
|
|
47
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("close",()=>{this.open=!1}),this.hasUpdated&&this.bindEvents()}disconnectedCallback(){var e;(e=this.strategy)==null||e.releaseDescription(),this.open=!1,super.disconnectedCallback()}},w.styles=[O.unsafeCSS(we)],w.openCount=1,w);m([u.property({type:Boolean})],d.prototype,"delayed",1);m([u.query(".dialog")],d.prototype,"dialogEl",2);m([u.property({type:Boolean})],d.prototype,"disabled",1);m([u.queryAssignedElements({flatten:!0,selector:':not([slot="longpress-describedby-descriptor"], slot)'})],d.prototype,"elements",2);m([u.property({type:Number})],d.prototype,"offset",2);m([u.property({type:Boolean,reflect:!0})],d.prototype,"open",1);m([u.property()],d.prototype,"placement",2);m([u.property({attribute:"receives-focus"})],d.prototype,"receivesFocus",2);m([u.query("slot")],d.prototype,"slotEl",2);m([u.state()],d.prototype,"state",1);m([u.property({type:Number,attribute:"tip-padding"})],d.prototype,"tipPadding",2);m([u.property()],d.prototype,"trigger",2);m([u.property({attribute:!1})],d.prototype,"triggerElement",2);m([u.property({attribute:!1})],d.prototype,"triggerInteraction",2);m([u.property()],d.prototype,"type",2);let ne=d;const N=Object.freeze(Object.defineProperty({__proto__:null,LuzmoOverlay:ne},Symbol.toStringTag,{value:"Module"}));exports.ClickController=ee;exports.HoverController=te;exports.InteractionController=I;exports.InteractionTypes=T;exports.LONGPRESS_INSTRUCTIONS=ie;exports.LongpressController=se;exports.LuzmoAbstractOverlay=C;exports.LuzmoOverlay=ne;exports.PlacementController=Z;exports.SAFARI_FOCUS_RING_CLASS=z;exports.VirtualTrigger=x;exports.guaranteedAllTransitionend=q;exports.lastInteractionType=_;exports.nextFrame=f;exports.noop=E;exports.overlay=N;exports.overlayTimer=D;exports.placementUpdatedSymbol=Ce;exports.strategies=oe;
|