@luzmo/lucero 0.0.11 → 0.0.13
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 +7 -8
- package/components/action-bar/index.cjs +4 -4
- package/components/action-bar/index.js +8 -9
- package/components/action-button/index.cjs +2 -2
- package/components/action-button/index.js +3 -4
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/action-group-Uimj-MJP.cjs +20 -0
- package/components/{action-group-Bf28z235.js → action-group-enfc-YnW.js} +7 -8
- package/components/action-menu/index.cjs +5 -5
- package/components/action-menu/index.js +6 -7
- package/components/{async-directive-FGzMycjH.js → async-directive-DWRUSKKF.js} +1 -1
- package/components/{async-directive-CV2MII86.cjs → async-directive-D_Ter1F8.cjs} +1 -1
- package/components/avatar/index.cjs +3 -3
- package/components/avatar/index.js +5 -6
- package/components/base-B7Pfl2if.cjs +40 -0
- package/components/base-CawdqE7p.js +666 -0
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +6 -7
- package/components/{button-base-CDLQV7Vk.js → button-base-B7v4eeRh.js} +4 -5
- package/components/button-base-DmjYs2s9.cjs +25 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +7 -8
- package/components/checkbox/index.cjs +4 -4
- package/components/checkbox/index.js +3 -4
- package/components/{checkbox-mixin-DXUIwtea.js → checkbox-mixin-BFGTmw17.js} +10 -11
- package/components/{checkbox-mixin-DaXMsrtV.cjs → checkbox-mixin-DUhXwD46.cjs} +3 -3
- package/components/{clear-button-Dh2Mq0cc.js → clear-button-DgZmX5RX.js} +6 -7
- package/components/clear-button-KdrF2jaV.cjs +18 -0
- package/components/{close-button-BsYkXOVh.js → close-button-CFHQnbsK.js} +4 -5
- package/components/close-button-DVGUppyd.cjs +18 -0
- package/components/color-area/index.cjs +4 -4
- package/components/color-area/index.js +9 -10
- package/components/color-field/index.cjs +2 -2
- package/components/color-field/index.js +2 -3
- package/components/color-handle/index.cjs +2 -2
- package/components/color-handle/index.js +5 -6
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/{color-loupe-BCfIVFkB.js → color-loupe-DxcqXoJ6.js} +3 -4
- package/components/color-loupe-SskbNeMp.cjs +56 -0
- package/components/color-menu/index.cjs +5 -5
- package/components/color-menu/index.js +5 -6
- package/components/color-picker/index.cjs +4 -4
- package/components/color-picker/index.js +9 -10
- package/components/color-slider/index.cjs +4 -4
- package/components/color-slider/index.js +5 -6
- package/components/{directive-helpers-C2vOfhFx.cjs → directive-helpers-TkFq2eZF.cjs} +1 -1
- package/components/{directive-helpers-BLDZnGQv.js → directive-helpers-nlQRAaQt.js} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +5 -6
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-CwZULltm.js → field-group-DAhrTCfl.js} +5 -6
- package/components/field-group-DSY2HUoj.cjs +23 -0
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-C3HFlH91.js → field-label-CAFfGxEL.js} +6 -7
- package/components/field-label-CjsQ3ujK.cjs +25 -0
- package/components/{focusable-zn6qaMtV.cjs → focusable-DGWL1v1p.cjs} +1 -1
- package/components/{focusable-zT9NFFYs.js → focusable-cj2QhwDT.js} +1 -1
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +4 -5
- package/components/{if-defined-Cv6xanXh.cjs → if-defined-B56xGmAg.cjs} +2 -2
- package/components/{if-defined-CYpcjGCb.js → if-defined-BSAr_4u4.js} +1 -1
- package/components/{index-C2qG2Sm8.js → index-CMvLpPKD.js} +7 -8
- package/components/{index-BYumXRH5.cjs → index-DnWavOZD.cjs} +15 -15
- package/components/index.cjs +1 -1
- package/components/index.js +16 -16
- package/components/infield-button/index.cjs +2 -2
- package/components/infield-button/index.js +3 -4
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +4 -5
- package/components/{like-anchor-CmIcmz5k.cjs → like-anchor-Bmabl9ra.cjs} +4 -4
- package/components/{like-anchor-DoJWh4Uu.js → like-anchor-QBlvwFfT.js} +8 -9
- package/components/{manage-help-text-BzWK2v8i.js → manage-help-text-Cozl9Sgn.js} +6 -6
- package/components/{manage-help-text-BKlmmlgp.cjs → manage-help-text-OHXDgxyj.cjs} +2 -2
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.js +1 -1
- package/components/multi-language-field/index.cjs +2 -2
- package/components/multi-language-field/index.js +6 -7
- package/components/number-field/index.cjs +4 -4
- package/components/number-field/index.js +15 -16
- package/components/{observe-slot-text-CP_EB97X.cjs → observe-slot-text-CrYB2Pj-.cjs} +1 -1
- package/components/{observe-slot-text-BG0H7bQK.js → observe-slot-text-ggb4kKgY.js} +1 -1
- package/components/overlay/index.cjs +7 -7
- package/components/overlay/index.js +33 -35
- package/components/{overlay-D7EbnA6E.js → overlay-CJ9by37f.js} +8 -9
- package/components/overlay-Deh6Ki6I.cjs +47 -0
- package/components/{pending-state-BHCOneQ7.cjs → pending-state-Do522lTd.cjs} +2 -2
- package/components/{pending-state-DHXuiejX.js → pending-state-TJj1x9xn.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-ChtCbFLB.js → picker-833Apxe4.js} +19 -21
- package/components/{picker-CLKdhX0B.cjs → picker-DDx8ii73.cjs} +25 -25
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/popover-BGOgXaka.cjs +30 -0
- package/components/{popover-bg0EQQ8p.js → popover-DlkzrLpl.js} +5 -6
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-BT2qW7LK.js → progress-circle-Be24kv6B.js} +5 -6
- package/components/progress-circle-NNbCMK2i.cjs +33 -0
- package/components/radio/index.cjs +2 -2
- package/components/radio/index.js +6 -7
- package/components/search/index.cjs +8 -8
- package/components/search/index.js +3 -4
- package/components/{sized-mixin-PyCYpyQq.js → sized-mixin-BxMraZLS.js} +1 -1
- package/components/{sized-mixin-BEemErtP.cjs → sized-mixin-D9LkrMjb.cjs} +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +5 -6
- package/components/{state-DHaIxrnQ.cjs → state-C5I1gP3G.cjs} +1 -1
- package/components/{state-BG4JQVA1.js → state-CYxk12SV.js} +1 -1
- package/components/{streaming-listener-wjMvsv4N.js → streaming-listener-CCalHg57.js} +2 -2
- package/components/streaming-listener-KVex1WWB.cjs +18 -0
- package/components/{style-map-BqvQDFJt.js → style-map-Ct2LiEds.js} +1 -1
- package/components/{style-map-BjBGQ_u3.cjs → style-map-uMq-yDJ3.cjs} +2 -2
- package/components/swatch/index.cjs +7 -7
- package/components/swatch/index.js +4 -5
- package/components/switch/index.cjs +2 -2
- package/components/switch/index.js +4 -5
- package/components/tags/index.cjs +4 -4
- package/components/tags/index.js +11 -12
- package/components/text-field/index.cjs +3 -3
- package/components/text-field/index.js +7 -8
- package/components/{text-field-CtUKbEQN.cjs → text-field-5_ev9way.cjs} +15 -15
- package/components/{text-field-7ITo3Lac.js → text-field-CvKSS59x.js} +27 -29
- package/components/toast/index.cjs +11 -11
- package/components/toast/index.js +4 -5
- package/components/tooltip/index.cjs +4 -4
- package/components/tooltip/index.js +5 -6
- package/components/unit-input/index.cjs +3 -3
- package/components/unit-input/index.js +5 -6
- package/components/utils.cjs +1 -1
- package/components/utils.js +4 -4
- package/package.json +1 -1
- package/components/action-group-BBoV2VL9.cjs +0 -20
- package/components/base-DNrOP9L3.js +0 -391
- package/components/base-DzbGOAPo.cjs +0 -30
- package/components/button-base-C1ceE1LF.cjs +0 -25
- package/components/clear-button-pnT9_M8M.cjs +0 -18
- package/components/close-button-CPtjRQ0R.cjs +0 -18
- package/components/color-loupe-DIBrhG1Y.cjs +0 -56
- package/components/field-group-eICRTHzI.cjs +0 -23
- package/components/field-label-DOIVL4S4.cjs +0 -25
- package/components/lit-html-B3ugcwD9.js +0 -248
- package/components/lit-html-p4Oxv2-5.cjs +0 -24
- package/components/overlay-B1JDPmUJ.cjs +0 -47
- package/components/popover-CdkB6GFb.cjs +0 -30
- package/components/progress-circle-DTeqfeun.cjs +0 -33
- package/components/streaming-listener-BQxEN4sL.cjs +0 -18
|
@@ -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 s=require("../overlay-Deh6Ki6I.cjs"),o=require("../base-B7Pfl2if.cjs"),p=require("../state-C5I1gP3G.cjs"),d=require("../query-BL-TJj7K.cjs"),f=require("../directive-C7oCP5Bh.cjs"),O=require("../async-directive-D_Ter1F8.cjs"),u=require("../slottable-request-event-BfUUt1Mh.cjs"),S=":host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}";var $=Object.defineProperty,l=(c,e,t,r)=>{for(var i=void 0,a=c.length-1,h;a>=0;a--)(h=c[a])&&(i=h(e,t,i)||i);return i&&$(e,t,i),i};class n extends o.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[o.r(S)]}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:t}=e;let r;if(t===this.clickOverlayElement)r="click";else if(t===this.longpressOverlayElement)r="longpress";else if(t===this.hoverOverlayElement)r="hover";else return;e.newState==="open"?this.open=r:this.open===r&&(this.open=void 0)}update(e){var t,r,i,a,h,g;e.has("clickContent")&&(this.clickPlacement=((t=this.clickContent[0])==null?void 0:t.getAttribute("placement"))||((r=this.clickContent[0])==null?void 0:r.getAttribute("direction"))||void 0),e.has("hoverContent")&&(this.hoverPlacement=((i=this.hoverContent[0])==null?void 0:i.getAttribute("placement"))||((a=this.hoverContent[0])==null?void 0:a.getAttribute("direction"))||void 0),e.has("longpressContent")&&(this.longpressPlacement=((h=this.longpressContent[0])==null?void 0:h.getAttribute("placement"))||((g=this.longpressContent[0])==null?void 0:g.getAttribute("direction"))||void 0),super.update(e)}renderSlot(e){return o.x`
|
|
19
19
|
<slot name=${e} @slotchange=${this.handleSlotContent}></slot>
|
|
20
|
-
`}renderClickOverlay(){Promise.resolve().then(()=>require("../overlay-
|
|
20
|
+
`}renderClickOverlay(){Promise.resolve().then(()=>require("../overlay-Deh6Ki6I.cjs")).then(t=>t.overlay);const e=this.renderSlot("click-content");return this.clickContent.length===0?e:o.x`
|
|
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
|
-
`}renderHoverOverlay(){Promise.resolve().then(()=>require("../overlay-
|
|
35
|
+
`}renderHoverOverlay(){Promise.resolve().then(()=>require("../overlay-Deh6Ki6I.cjs")).then(t=>t.overlay);const e=this.renderSlot("hover-content");return this.hoverContent.length===0?e:o.x`
|
|
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
|
-
`}renderLongpressOverlay(){Promise.resolve().then(()=>require("../overlay-
|
|
50
|
+
`}renderLongpressOverlay(){Promise.resolve().then(()=>require("../overlay-Deh6Ki6I.cjs")).then(t=>t.overlay);const e=this.renderSlot("longpress-content");return this.longpressContent.length===0?e:o.x`
|
|
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
|
-
`}render(){const e=this.content.split(" ");return
|
|
66
|
+
`}render(){const e=this.content.split(" ");return o.x`
|
|
67
67
|
<slot
|
|
68
68
|
id="trigger"
|
|
69
69
|
name="trigger"
|
|
70
70
|
@slotchange=${this.handleTriggerContent}
|
|
71
71
|
></slot>
|
|
72
|
-
${[e.includes("click")?this.renderClickOverlay():
|
|
73
|
-
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}
|
|
72
|
+
${[e.includes("click")?this.renderClickOverlay():o.x``,e.includes("hover")?this.renderHoverOverlay():o.x``,e.includes("longpress")?this.renderLongpressOverlay():o.x``]}
|
|
73
|
+
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}l([o.n()],n.prototype,"content");l([o.n({reflect:!0})],n.prototype,"placement");l([o.n()],n.prototype,"type");l([o.n({type:Number})],n.prototype,"offset");l([o.n({reflect:!0})],n.prototype,"open");l([o.n({type:Boolean,reflect:!0})],n.prototype,"disabled");l([o.n({attribute:"receives-focus"})],n.prototype,"receivesFocus");l([p.r()],n.prototype,"clickContent");l([p.r()],n.prototype,"longpressContent");l([p.r()],n.prototype,"hoverContent");l([p.r()],n.prototype,"targetContent");l([d.e("#click-overlay",!0)],n.prototype,"clickOverlayElement");l([d.e("#longpress-overlay",!0)],n.prototype,"longpressOverlayElement");l([d.e("#hover-overlay",!0)],n.prototype,"hoverOverlayElement");function k(c,e,t,r){return s.LuzmoOverlay.open(c,e,t,r)}class v extends O.f{render(e){return o.E}update(e,[t]){this.template=t,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 t=e.data===u.removeSlottableRequest;o.B(t?void 0:this.template(),this.target,{renderBefore:this.renderBefore})}init(){var t;(t=this.listeners)==null||t.abort(),this.listeners=new AbortController;const{signal:e}=this.listeners;this.listenerHost.addEventListener("slottable-request",r=>this.handleSlottableRequest(r),{signal:e})}disconnected(){var e;(e=this.listeners)==null||e.abort()}reconnected(){this.init()}}const E=f.e(v);class b extends v{constructor(){super(...arguments),this.defaultOptions={triggerInteraction:"click",overlayOptions:{type:"auto",offset:0}},this.options={...this.defaultOptions.overlayOptions}}render(e,t){return o.E}update(e,[t,r]){var g,m,y;this.options={...this.defaultOptions.overlayOptions,...r==null?void 0:r.overlayOptions},this.insertionOptions=r==null?void 0:r.insertionOptions,this.template=t,this.host=(g=e.options)==null?void 0:g.host;let i=!1;const a=(r==null?void 0:r.triggerInteraction)||this.defaultOptions.triggerInteraction,h=s.InteractionTypes[(m=this.strategy)==null?void 0:m.type]!==a;this.target!==e.element&&(this.target=e.element,i=!0),(i||h)&&((y=this.strategy)==null||y.abort(),this.strategy=new s.strategies[a](this.target,{isPersistent:!0,handleOverlayReady:C=>{this.listenerHost=this.overlay=C,this.init()}})),this.strategy.open=(r==null?void 0:r.open)??!1}handleSlottableRequest(e){var i,a;if(e.target!==e.currentTarget)return;const t=e.data===u.removeSlottableRequest,r={};if(this.host&&(r.host=this.host),o.B(t?void 0:this.template(),this.overlay,r),t)this.overlay.remove();else{s.LuzmoAbstractOverlay.applyOptions(this.overlay,{...this.options,trigger:this.target});const h=typeof((i=this.insertionOptions)==null?void 0:i.el)=="function"?this.insertionOptions.el():((a=this.insertionOptions)==null?void 0:a.el)||this.target,{where:g="afterend"}=this.insertionOptions||{};h.insertAdjacentElement(g,this.overlay)}}}const q=f.e(b);customElements.get("luzmo-overlay")||customElements.define("luzmo-overlay",s.LuzmoOverlay);customElements.get("luzmo-overlay-trigger")||customElements.define("luzmo-overlay-trigger",n);exports.ClickController=s.ClickController;exports.HoverController=s.HoverController;exports.InteractionController=s.InteractionController;exports.InteractionTypes=s.InteractionTypes;exports.LONGPRESS_INSTRUCTIONS=s.LONGPRESS_INSTRUCTIONS;exports.LongpressController=s.LongpressController;exports.LuzmoAbstractOverlay=s.LuzmoAbstractOverlay;exports.LuzmoOverlay=s.LuzmoOverlay;exports.PlacementController=s.PlacementController;exports.VirtualTrigger=s.VirtualTrigger;exports.guaranteedAllTransitionend=s.guaranteedAllTransitionend;exports.nextFrame=s.nextFrame;exports.noop=s.noop;exports.overlayTimer=s.overlayTimer;exports.placementUpdatedSymbol=s.placementUpdatedSymbol;exports.SlottableRequestEvent=u.SlottableRequestEvent;exports.removeSlottableRequest=u.removeSlottableRequest;exports.LuzmoOverlayTrigger=n;exports.OverlayTriggerDirective=b;exports.SlottableRequestDirective=v;exports.openOverlay=k;exports.slottableRequest=E;exports.trigger=q;
|
|
@@ -15,17 +15,15 @@
|
|
|
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
|
|
19
|
-
import { C as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { r as h } from "../state-BG4JQVA1.js";
|
|
18
|
+
import { e as f, I as O, s as $, L as S } from "../overlay-CJ9by37f.js";
|
|
19
|
+
import { C as G, H as M, b as J, c as K, d as Q, P as W, V as X, g as Y, a as Z, n as ee, o as te, p as oe } from "../overlay-CJ9by37f.js";
|
|
20
|
+
import { a as E, r as w, x as c, n as u, E as z, B as b } from "../base-CawdqE7p.js";
|
|
21
|
+
import { r as h } from "../state-CYxk12SV.js";
|
|
23
22
|
import { e as g } from "../query-D_KR_GUc.js";
|
|
24
|
-
import "../lit-html-B3ugcwD9.js";
|
|
25
23
|
import { e as v } from "../directive-oAbCiebi.js";
|
|
26
|
-
import { f as A } from "../async-directive-
|
|
24
|
+
import { f as A } from "../async-directive-DWRUSKKF.js";
|
|
27
25
|
import { r as y } from "../slottable-request-event-DggLA4Rx.js";
|
|
28
|
-
import { S as
|
|
26
|
+
import { S as le } from "../slottable-request-event-DggLA4Rx.js";
|
|
29
27
|
const k = () => {
|
|
30
28
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
31
29
|
const i = document.createElement("style");
|
|
@@ -39,12 +37,12 @@ var T = Object.defineProperty, s = (i, e, t, o) => {
|
|
|
39
37
|
(a = i[n]) && (r = a(e, t, r) || r);
|
|
40
38
|
return r && T(e, t, r), r;
|
|
41
39
|
};
|
|
42
|
-
class l extends
|
|
40
|
+
class l extends E {
|
|
43
41
|
constructor() {
|
|
44
42
|
super(...arguments), this.content = "click hover longpress", this.offset = 6, this.disabled = !1, this.receivesFocus = "auto", this.clickContent = [], this.longpressContent = [], this.hoverContent = [], this.targetContent = [];
|
|
45
43
|
}
|
|
46
44
|
static get styles() {
|
|
47
|
-
return [
|
|
45
|
+
return [w(F)];
|
|
48
46
|
}
|
|
49
47
|
getAssignedElementsFromSlot(e) {
|
|
50
48
|
return e.assignedElements({ flatten: !0 });
|
|
@@ -91,7 +89,7 @@ class l extends w {
|
|
|
91
89
|
`;
|
|
92
90
|
}
|
|
93
91
|
renderClickOverlay() {
|
|
94
|
-
import("../overlay-
|
|
92
|
+
import("../overlay-CJ9by37f.js").then((t) => t.f);
|
|
95
93
|
const e = this.renderSlot("click-content");
|
|
96
94
|
return this.clickContent.length === 0 ? e : c`
|
|
97
95
|
<luzmo-overlay
|
|
@@ -111,7 +109,7 @@ class l extends w {
|
|
|
111
109
|
`;
|
|
112
110
|
}
|
|
113
111
|
renderHoverOverlay() {
|
|
114
|
-
import("../overlay-
|
|
112
|
+
import("../overlay-CJ9by37f.js").then((t) => t.f);
|
|
115
113
|
const e = this.renderSlot("hover-content");
|
|
116
114
|
return this.hoverContent.length === 0 ? e : c`
|
|
117
115
|
<luzmo-overlay
|
|
@@ -131,7 +129,7 @@ class l extends w {
|
|
|
131
129
|
`;
|
|
132
130
|
}
|
|
133
131
|
renderLongpressOverlay() {
|
|
134
|
-
import("../overlay-
|
|
132
|
+
import("../overlay-CJ9by37f.js").then((t) => t.f);
|
|
135
133
|
const e = this.renderSlot("longpress-content");
|
|
136
134
|
return this.longpressContent.length === 0 ? e : c`
|
|
137
135
|
<luzmo-overlay
|
|
@@ -218,7 +216,7 @@ s([
|
|
|
218
216
|
s([
|
|
219
217
|
g("#hover-overlay", !0)
|
|
220
218
|
], l.prototype, "hoverOverlayElement");
|
|
221
|
-
function
|
|
219
|
+
function U(i, e, t, o) {
|
|
222
220
|
return f.open(
|
|
223
221
|
i,
|
|
224
222
|
e,
|
|
@@ -261,7 +259,7 @@ class x extends A {
|
|
|
261
259
|
this.init();
|
|
262
260
|
}
|
|
263
261
|
}
|
|
264
|
-
const
|
|
262
|
+
const N = v(x);
|
|
265
263
|
class I extends x {
|
|
266
264
|
constructor() {
|
|
267
265
|
super(...arguments), this.defaultOptions = {
|
|
@@ -286,7 +284,7 @@ class I extends x {
|
|
|
286
284
|
}, this.insertionOptions = o == null ? void 0 : o.insertionOptions, this.template = t, this.host = (m = e.options) == null ? void 0 : m.host;
|
|
287
285
|
let r = !1;
|
|
288
286
|
const n = (o == null ? void 0 : o.triggerInteraction) || this.defaultOptions.triggerInteraction, a = O[(d = this.strategy) == null ? void 0 : d.type] !== n;
|
|
289
|
-
this.target !== e.element && (this.target = e.element, r = !0), (r || a) && ((p = this.strategy) == null || p.abort(), this.strategy = new
|
|
287
|
+
this.target !== e.element && (this.target = e.element, r = !0), (r || a) && ((p = this.strategy) == null || p.abort(), this.strategy = new $[n](this.target, {
|
|
290
288
|
isPersistent: !0,
|
|
291
289
|
handleOverlayReady: (C) => {
|
|
292
290
|
this.listenerHost = this.overlay = C, this.init();
|
|
@@ -305,7 +303,7 @@ class I extends x {
|
|
|
305
303
|
), t)
|
|
306
304
|
this.overlay.remove();
|
|
307
305
|
else {
|
|
308
|
-
|
|
306
|
+
S.applyOptions(this.overlay, {
|
|
309
307
|
...this.options,
|
|
310
308
|
trigger: this.target
|
|
311
309
|
});
|
|
@@ -314,31 +312,31 @@ class I extends x {
|
|
|
314
312
|
}
|
|
315
313
|
}
|
|
316
314
|
}
|
|
317
|
-
const
|
|
315
|
+
const V = v(I);
|
|
318
316
|
customElements.get("luzmo-overlay") || customElements.define("luzmo-overlay", f);
|
|
319
317
|
customElements.get("luzmo-overlay-trigger") || customElements.define("luzmo-overlay-trigger", l);
|
|
320
318
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
G as ClickController,
|
|
320
|
+
M as HoverController,
|
|
321
|
+
J as InteractionController,
|
|
324
322
|
O as InteractionTypes,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
323
|
+
K as LONGPRESS_INSTRUCTIONS,
|
|
324
|
+
Q as LongpressController,
|
|
325
|
+
S as LuzmoAbstractOverlay,
|
|
328
326
|
f as LuzmoOverlay,
|
|
329
327
|
l as LuzmoOverlayTrigger,
|
|
330
328
|
I as OverlayTriggerDirective,
|
|
331
|
-
|
|
329
|
+
W as PlacementController,
|
|
332
330
|
x as SlottableRequestDirective,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
331
|
+
le as SlottableRequestEvent,
|
|
332
|
+
X as VirtualTrigger,
|
|
333
|
+
Y as guaranteedAllTransitionend,
|
|
334
|
+
Z as nextFrame,
|
|
335
|
+
ee as noop,
|
|
336
|
+
U as openOverlay,
|
|
337
|
+
te as overlayTimer,
|
|
338
|
+
oe as placementUpdatedSymbol,
|
|
341
339
|
y as removeSlottableRequest,
|
|
342
|
-
|
|
343
|
-
|
|
340
|
+
N as slottableRequest,
|
|
341
|
+
V as trigger
|
|
344
342
|
};
|
|
@@ -15,13 +15,12 @@
|
|
|
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 {
|
|
19
|
-
import {
|
|
20
|
-
import { r as fe } from "./state-BG4JQVA1.js";
|
|
18
|
+
import { a as ue, r as pe, x as ht, n as z } from "./base-CawdqE7p.js";
|
|
19
|
+
import { r as fe } from "./state-CYxk12SV.js";
|
|
21
20
|
import { e as te } from "./query-D_KR_GUc.js";
|
|
22
21
|
import { o as me } from "./query-assigned-elements-DjfhL1cl.js";
|
|
23
|
-
import { o as Ct } from "./if-defined-
|
|
24
|
-
import { o as Ut } from "./style-map-
|
|
22
|
+
import { o as Ct } from "./if-defined-BSAr_4u4.js";
|
|
23
|
+
import { o as Ut } from "./style-map-Ct2LiEds.js";
|
|
25
24
|
import { r as St } from "./random-id-ByCz1xaq.js";
|
|
26
25
|
import { E as ge, e as ve } from "./element-resolution-FCUT-wql.js";
|
|
27
26
|
import { u as lt } from "./focusable-selectors-B4YgbghQ.js";
|
|
@@ -118,7 +117,7 @@ const mt = new Te(), J = () => {
|
|
|
118
117
|
function R() {
|
|
119
118
|
return new Promise((e) => requestAnimationFrame(() => e()));
|
|
120
119
|
}
|
|
121
|
-
class rt extends
|
|
120
|
+
class rt extends ue {
|
|
122
121
|
constructor() {
|
|
123
122
|
super(...arguments), this.dispose = J, this.offset = 0, this.willPreventClose = !1;
|
|
124
123
|
}
|
|
@@ -1694,7 +1693,7 @@ const pt = 8, gi = 100, vi = (e) => ({
|
|
|
1694
1693
|
bottom: ["top", "left", "right"],
|
|
1695
1694
|
"bottom-start": ["top-start", "left", "right"],
|
|
1696
1695
|
"bottom-end": ["top-end", "left", "right"]
|
|
1697
|
-
})[e] ?? [e],
|
|
1696
|
+
})[e] ?? [e], qi = Symbol("placement updated");
|
|
1698
1697
|
class yi {
|
|
1699
1698
|
/**
|
|
1700
1699
|
* Creates an instance of the PlacementController.
|
|
@@ -2638,7 +2637,7 @@ const P = (I = class extends ft {
|
|
|
2638
2637
|
var t;
|
|
2639
2638
|
(t = this.strategy) == null || t.releaseDescription(), this.open = !1, super.disconnectedCallback();
|
|
2640
2639
|
}
|
|
2641
|
-
}, I.styles = [
|
|
2640
|
+
}, I.styles = [pe(Fe)], I.openCount = 1, I);
|
|
2642
2641
|
O([
|
|
2643
2642
|
z({ type: Boolean })
|
|
2644
2643
|
], P.prototype, "delayed", 1);
|
|
@@ -2708,6 +2707,6 @@ export {
|
|
|
2708
2707
|
kt as g,
|
|
2709
2708
|
J as n,
|
|
2710
2709
|
mt as o,
|
|
2711
|
-
|
|
2710
|
+
qi as p,
|
|
2712
2711
|
Oi as s
|
|
2713
2712
|
};
|
|
@@ -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 E=require("./base-B7Pfl2if.cjs"),xe=require("./state-C5I1gP3G.cjs"),ie=require("./query-BL-TJj7K.cjs"),Ee=require("./query-assigned-elements-DsKsfk7G.cjs"),Tt=require("./if-defined-B56xGmAg.cjs"),Vt=require("./style-map-uMq-yDJ3.cjs"),kt=require("./random-id-CqvckpWe.cjs"),Ut=require("./element-resolution-BvRLGqIU.cjs"),ct=require("./focusable-selectors-BgFlyFcY.cjs"),jt=require("./slottable-request-event-BfUUt1Mh.cjs"),Rt=require("./condition-attribute-with-id-DrQYZzFS.cjs"),Kt=require("./platform-BiXhwqk3.cjs");function Ce(e,t,i=[]){for(const[n,o]of t.entries()){const s=e[n],r=s.parentElement||s.getRootNode();i[n]&&i[n](o),r&&r!==s&&s.replaceWith(o),delete e[n]}return t}const Pe=(e,t,{position:i,prepareCallback:n}={position:"beforeend"})=>{let{length:o}=e;if(o===0)return()=>e;let s=1,r=0;(i==="afterbegin"||i==="afterend")&&(s=-1,r=o-1);const l=new Array(o),a=new Array(o),h=document.createComment("placeholder for reparented element");do{const c=e[r];n&&(a[r]=n(c)),l[r]=h.cloneNode();const d=c.parentElement||c.getRootNode();d&&d!==c&&d.replaceChild(l[r],c),t.insertAdjacentElement(i,c),r+=s}while(--o>0);return function(){return Ce(l,e,a)}},Oe=1e3,Te=1e3;class Ae{constructor(t={}){this.warmUpDelay=Oe,this.coolDownDelay=Te,this.isWarm=!1,this.timeout=0,Object.assign(this,t)}openTimer(t){if(this.cancelCooldownTimer(),!this.component||t!==this.component)return this.component&&(this.close(this.component),this.cancelCooldownTimer()),this.component=t,this.isWarm?Promise.resolve(!1):(this.promise=new Promise(i=>{this.resolve=i,this.timeout=window.setTimeout(()=>{this.resolve&&(this.resolve(!1),this.isWarm=!0)},this.warmUpDelay)}),this.promise);if(this.promise)return this.promise;throw new Error("Inconsistent state")}close(t){this.component&&this.component===t&&(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&&window.clearTimeout(this.cooldownTimeout),this.cooldownTimeout=window.setTimeout(()=>{this.isWarm=!1,delete this.cooldownTimeout},this.coolDownDelay))}cancelCooldownTimer(){this.cooldownTimeout&&window.clearTimeout(this.cooldownTimeout),delete this.cooldownTimeout}}const lt=new Ae,Y=()=>{},xt=(e,t,i)=>{const n=new AbortController,o=new Map,s=()=>{n.abort(),i()};let r,l;const a=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{s()})})}),h=d=>{d.target===e&&(o.set(d.propertyName,o.get(d.propertyName)-1),o.get(d.propertyName)||o.delete(d.propertyName),o.size===0&&s())},c=d=>{d.target===e&&(o.has(d.propertyName)||o.set(d.propertyName,0),o.set(d.propertyName,o.get(d.propertyName)+1),cancelAnimationFrame(a),cancelAnimationFrame(r),cancelAnimationFrame(l))};e.addEventListener("transitionrun",c,{signal:n.signal}),e.addEventListener("transitionend",h,{signal:n.signal}),e.addEventListener("transitioncancel",h,{signal:n.signal}),t()};function R(){return new Promise(e=>requestAnimationFrame(()=>e()))}class it extends E.LuzmoElement{constructor(){super(...arguments),this.dispose=Y,this.offset=0,this.willPreventClose=!1}applyFocus(t,i){}get delayed(){return!1}set delayed(t){}get disabled(){return!1}set disabled(t){}get elementResolver(){return this._elementResolver}set elementResolver(t){this._elementResolver=t}ensureOnDOM(t){}makeTransition(t){return null}manageDelay(t){}manageDialogOpen(){}managePopoverOpen(){}managePosition(){}get open(){return!1}set open(t){}get placementController(){return this._placementController}set placementController(t){this._placementController=t}requestSlottable(){}returnFocus(){}get state(){return"closed"}set state(t){}manuallyKeepOpen(){}static update(){const t=new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0});document.dispatchEvent(t)}static async open(t,i,n,o){await Promise.resolve().then(()=>bt);const s=arguments.length===2,r=n||t,l=new this;let a=!1;const h=Pe([r],l,{position:"beforeend",prepareCallback:f=>{const u=f.slot;return f.removeAttribute("slot"),()=>{f.slot=u}}});if(l.dispose=()=>{l.addEventListener("luzmo-closed",()=>{a||(h(),a=!0),requestAnimationFrame(()=>{l.remove()})}),l.open=!1,l.dispose=Y},!s&&r&&o){const f=t,u=i,p=o;return it.applyOptions(l,{...p,delayed:p.delayed||r.hasAttribute("delayed"),trigger:p.virtualTrigger||f,type:u==="modal"?"modal":u==="hover"?"hint":"auto"}),f.after(l),await l.updateComplete,l.open=!0,l.dispose}const d=i;return l.append(r),it.applyOptions(l,{...d,delayed:d.delayed||r.hasAttribute("delayed")}),l.updateComplete.then(()=>{l.open=!0}),l}static applyOptions(t,i){t.delayed=!!i.delayed,t.receivesFocus=i.receivesFocus??"auto",t.triggerElement=i.trigger||null,t.type=i.type||"modal",t.offset=i.offset??0,t.placement=i.placement,t.willPreventClose=!!i.notImmediatelyClosable}}const Ft=e=>e.querySelector(ct.userFocusableSelector),zt=e=>e.assignedElements().find(i=>i.matches(ct.userFocusableSelector));class Nt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="open",this.newState="closed"}}class _t extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="closed",this.newState="open"}}class k extends Event{constructor(t,i,{publish:n,interaction:o,reason:s}){super(t,{bubbles:n,composed:n}),this.overlay=i,this.detail={interaction:o,reason:s}}}class ht{constructor(t,i){this.x=0,this.y=0,this.x=t,this.y=i}updateBoundingClientRect(t,i){this.x=t,this.y=i,it.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 Re(e){class t extends e{async manageDialogOpen(){const n=this.open;if(await R(),await this.managePosition(),this.open!==n)return;const o=await this.dialogMakeTransition(n);this.open===n&&await this.dialogApplyFocus(n,o)}dialogMakeTransition(n){let o=null;const s=(l,a)=>()=>{if(l.open=n,!n){const c=()=>{l.removeEventListener("close",c)};l.addEventListener("close",c)}if(a>0)return;const h=n?_t:Nt;this.dispatchEvent(new h),n&&(l.matches(ct.userFocusableSelector)&&(o=l),o=o||Ft(l),o||l.querySelectorAll("slot").forEach(d=>{o||(o=zt(d))}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(l,a)=>()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(a>0){l.dispatchEvent(new k(h,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||n!==this.open)return;const c=async()=>{const d=this.triggerElement instanceof ht;this.dispatchEvent(new k(h,this,{interaction:this.type,publish:d})),l.dispatchEvent(new k(h,this,{interaction:this.type,publish:!1})),this.triggerElement&&!d&&this.triggerElement.dispatchEvent(new k(h,this,{interaction:this.type,publish:!0})),this.state=n?"opened":"closed",this.returnFocus(),await R(),await R(),n===this.open&&n===!1&&this.requestSlottable()};!n&&this.dialogEl.open?(this.dialogEl.addEventListener("close",()=>{c()},{once:!0}),this.dialogEl.close()):c()};return this.elements.forEach((l,a)=>{xt(l,s(l,a),r(l,a))}),o}dialogApplyFocus(n,o){this.applyFocus(n,o)}}return t}function De(e){class t extends e{async managePopoverOpen(){await this.managePosition()}async manageDelay(n){if(n===!1||n!==this.open){lt.close(this);return}this.delayed&&await lt.openTimer(this)&&(this.open=!n)}ensureOnDOM(n){document.body.offsetHeight}makeTransition(n){if(this.open!==n)return null;let o=null;const s=(l,a)=>()=>{if(n!==this.open)return;if(l.open=n,a===0){const c=n?_t:Nt;this.dispatchEvent(new c)}if(n!==!0||(l.matches(ct.userFocusableSelector)&&(o=l),o=o||Ft(l),o))return;l.querySelectorAll("slot").forEach(c=>{o||(o=zt(c))})},r=(l,a)=>async()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(l.dispatchEvent(new k(h,this,{interaction:this.type})),a>0)return;const c=this.triggerElement instanceof ht;this.dispatchEvent(new k(h,this,{interaction:this.type,publish:c})),this.triggerElement&&!c&&this.triggerElement.dispatchEvent(new k(h,this,{interaction:this.type,publish:!0})),this.state=n?"opened":"closed",this.returnFocus(),await R(),await R(),n===this.open&&n===!1&&this.requestSlottable()};return this.elements.forEach((l,a)=>{xt(l,s(l,a),r(l,a))}),o}}return t}const Le=CSS.supports("(overlay: auto)");function Yt(e){let t=!1;try{t=e.matches(":popover-open")}catch{}let i=!1;try{i=e.matches(":open")}catch{}return t||i}function Se(e){class t extends e{async manageDelay(n){if(n===!1||n!==this.open){lt.close(this);return}this.delayed&&await lt.openTimer(this)&&(this.open=!n)}shouldHidePopover(n){if(n&&this.open!==n)return;const o=async({newState:s}={})=>{s!=="open"&&await this.placementController.resetOverlayPosition()};if(!Yt(this.dialogEl)){o();return}this.dialogEl.addEventListener("toggle",o,{once:!0})}shouldShowPopover(n){let o=!1;try{o=this.dialogEl.matches(":popover-open")}catch{}let s=!1;try{s=this.dialogEl.matches(":open")}catch{}n&&this.open===n&&!o&&!s&&this.isConnected&&(this.dialogEl.showPopover(),this.managePosition())}async ensureOnDOM(n){await R(),Le||await this.shouldHidePopover(n),this.shouldShowPopover(n),await R()}makeTransition(n){if(this.open!==n)return null;let o=null;const s=(l,a)=>()=>{if(l.open=n,a===0){const c=n?_t:Nt;this.dispatchEvent(new c)}if(!n||(l.matches(ct.userFocusableSelector)&&(o=l),o=o||Ft(l),o))return;l.querySelectorAll("slot").forEach(c=>{o||(o=zt(c))})},r=(l,a)=>()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(a>0){l.dispatchEvent(new k(h,this,{interaction:this.type,publish:!1}));return}const c=async()=>{if(this.open!==n)return;await R();const f=this.triggerElement instanceof ht;this.dispatchEvent(new k(h,this,{interaction:this.type,publish:f})),l.dispatchEvent(new k(h,this,{interaction:this.type,publish:!1})),this.triggerElement&&!f&&this.triggerElement.dispatchEvent(new k(h,this,{interaction:this.type,publish:!0})),this.state=n?"opened":"closed",this.returnFocus(),await R(),await R(),n===this.open&&n===!1&&this.requestSlottable()};if(this.open!==n)return;const d=Yt(this.dialogEl);n!==!0&&d&&this.isConnected?(this.dialogEl.addEventListener("beforetoggle",()=>{c()},{once:!0}),this.dialogEl.hidePopover()):c()};return this.elements.forEach((l,a)=>{xt(l,s(l,a),r(l,a))}),o}}return t}const ke="showPopover"in document.createElement("div");class Fe{constructor(){this.root=document.body,this.stack=[],this.handlePointerdown=t=>{this.pointerdownPath=t.composedPath(),this.lastOverlay=this.stack.at(-1)},this.handlePointerup=()=>{const t=this.pointerdownPath;if(this.pointerdownPath=void 0,this.stack.length===0||!(t!=null&&t.length))return;const i=this.lastOverlay;this.lastOverlay=void 0;const n=this.stack.length-1,o=this.stack.filter((s,r)=>!t.find(a=>a===s||a===(s==null?void 0:s.triggerElement)&&(s==null?void 0:s.type)==="hint"||r===n&&s!==i&&s.triggerInteraction==="longpress")&&!s.shouldPreventClose()&&s.type!=="manual"&&!(s.type==="modal"&&i!==s));o.reverse(),o.forEach(s=>{this.closeOverlay(s);let r=s.parentOverlayToForceClose;for(;r;)this.closeOverlay(r),r=r.parentOverlayToForceClose})},this.handleBeforetoggle=t=>{const{target:i,newState:n}=t;n!=="open"&&this.closeOverlay(i)},this.handleKeydown=t=>{if(t.code!=="Escape"||this.stack.length===0)return;const i=this.stack.at(-1);if((i==null?void 0:i.type)==="page"){t.preventDefault();return}ke||(i==null?void 0:i.type)!=="manual"&&i&&this.closeOverlay(i)},this.bindEvents()}get document(){return this.root.ownerDocument||document}bindEvents(){this.document.addEventListener("pointerdown",this.handlePointerdown),this.document.addEventListener("pointerup",this.handlePointerup),this.document.addEventListener("keydown",this.handleKeydown)}closeOverlay(t){const i=this.stack.indexOf(t);i!==-1&&this.stack.splice(i,1),t.open=!1}overlaysByTriggerElement(t){return this.stack.filter(i=>i.triggerElement===t)}add(t){if(this.stack.includes(t)){const i=this.stack.indexOf(t);i!==-1&&(this.stack.splice(i,1),this.stack.push(t));return}if(t.type==="auto"||t.type==="modal"||t.type==="page"){const i="luzmo-overlay-query-path",n=new Event(i,{composed:!0,bubbles:!0});t.addEventListener(i,o=>{const s=o.composedPath();this.stack.forEach(r=>{!s.find(a=>a===r)&&r.type!=="manual"&&r.type!=="modal"&&this.closeOverlay(r)})},{once:!0}),t.dispatchEvent(n)}else if(t.type==="hint"){if(this.stack.some(n=>n.type!=="manual"&&n.triggerElement&&n.triggerElement===t.triggerElement)){t.open=!1;return}this.stack.forEach(n=>{n.type==="hint"&&this.closeOverlay(n)})}requestAnimationFrame(()=>{this.stack.push(t),t.addEventListener("beforetoggle",this.handleBeforetoggle,{once:!0})})}remove(t){this.closeOverlay(t)}}const Gt=new Fe,ze=':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))}}',G=Math.min,A=Math.max,vt=Math.round,pt=Math.floor,M=e=>({x:e,y:e}),Ne={left:"right",right:"left",bottom:"top",top:"bottom"},_e={start:"end",end:"start"};function Dt(e,t,i){return A(e,G(t,i))}function ot(e,t){return typeof e=="function"?e(t):e}function X(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function ne(e){return e==="x"?"y":"x"}function qt(e){return e==="y"?"height":"width"}function Q(e){return["top","bottom"].includes(X(e))?"y":"x"}function Mt(e){return ne(Q(e))}function qe(e,t,i){i===void 0&&(i=!1);const n=st(e),o=Mt(e),s=qt(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=yt(r)),[r,yt(r)]}function Me(e){const t=yt(e);return[Lt(e),t,Lt(t)]}function Lt(e){return e.replace(/start|end/g,t=>_e[t])}function $e(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function We(e,t,i,n){const o=st(e);let s=$e(X(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Lt)))),s}function yt(e){return e.replace(/left|right|bottom|top/g,t=>Ne[t])}function He(e){return{top:0,right:0,bottom:0,left:0,...e}}function oe(e){return typeof e!="number"?He(e):{top:e,right:e,bottom:e,left:e}}function wt(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Xt(e,t,i){let{reference:n,floating:o}=e;const s=Q(t),r=Mt(t),l=qt(r),a=X(t),h=s==="y",c=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let u;switch(a){case"top":u={x:c,y:n.y-o.height};break;case"bottom":u={x:c,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-o.width,y:d};break;default:u={x:n.x,y:n.y}}switch(st(t)){case"start":u[r]-=f*(i&&h?-1:1);break;case"end":u[r]+=f*(i&&h?-1:1);break}return u}const Ie=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let h=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Xt(h,n,a),f=n,u={},p=0;for(let m=0;m<l.length;m++){const{name:v,fn:g}=l[m],{x:y,y:w,data:x,reset:b}=await g({x:c,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:u,rects:h,platform:r,elements:{reference:e,floating:t}});c=y??c,d=w??d,u={...u,[v]:{...u[v],...x}},b&&p<=50&&(p++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(h=b.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:c,y:d}=Xt(h,f,a)),m=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:u}};async function $t(e,t){var i;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:r,elements:l,strategy:a}=e,{boundary:h="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:u=0}=ot(t,e),p=oe(u),v=l[f?d==="floating"?"reference":"floating":d],g=wt(await s.getClippingRect({element:(i=await(s.isElement==null?void 0:s.isElement(v)))==null||i?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:h,rootBoundary:c,strategy:a})),y=d==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),x=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},b=wt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:a}):y);return{top:(g.top-b.top+p.top)/x.y,bottom:(b.bottom-g.bottom+p.bottom)/x.y,left:(g.left-b.left+p.left)/x.x,right:(b.right-g.right+p.right)/x.x}}const Be=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:n,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=t,{element:h,padding:c=0}=ot(e,t)||{};if(h==null)return{};const d=oe(c),f={x:i,y:n},u=Mt(o),p=qt(u),m=await r.getDimensions(h),v=u==="y",g=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=s.reference[p]+s.reference[u]-f[u]-s.floating[p],b=f[u]-s.reference[u],L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(h));let C=L?L[w]:0;(!C||!await(r.isElement==null?void 0:r.isElement(L)))&&(C=l.floating[w]||s.floating[p]);const H=x/2-b/2,N=C/2-m[p]/2-1,S=G(d[g],N),V=G(d[y],N),_=S,U=C-m[p]-V,O=C/2-m[p]/2+H,tt=Dt(_,O,U),I=!a.arrow&&st(o)!=null&&O!==tt&&s.reference[p]/2-(O<_?S:V)-m[p]/2<0,q=I?O<_?O-_:O-U:0;return{[u]:f[u]+q,data:{[u]:tt,centerOffset:O-tt-q,...I&&{alignmentOffset:q}},reset:I}}}),Ve=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,n;const{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:h}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=ot(e,t);if((i=s.arrow)!=null&&i.alignmentOffset)return{};const g=X(o),y=Q(l),w=X(l)===l,x=await(a.isRTL==null?void 0:a.isRTL(h.floating)),b=f||(w||!m?[yt(l)]:Me(l)),L=p!=="none";!f&&L&&b.push(...We(l,m,p,x));const C=[l,...b],H=await $t(t,v),N=[];let S=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&N.push(H[g]),d){const O=qe(o,r,x);N.push(H[O[0]],H[O[1]])}if(S=[...S,{placement:o,overflows:N}],!N.every(O=>O<=0)){var V,_;const O=(((V=s.flip)==null?void 0:V.index)||0)+1,tt=C[O];if(tt)return{data:{index:O,overflows:S},reset:{placement:tt}};let I=(_=S.filter(q=>q.overflows[0]<=0).sort((q,j)=>q.overflows[1]-j.overflows[1])[0])==null?void 0:_.placement;if(!I)switch(u){case"bestFit":{var U;const q=(U=S.filter(j=>{if(L){const K=Q(j.placement);return K===y||K==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(K=>K>0).reduce((K,be)=>K+be,0)]).sort((j,K)=>j[1]-K[1])[0])==null?void 0:U[0];q&&(I=q);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};async function Ue(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=X(i),l=st(i),a=Q(i)==="y",h=["left","top"].includes(r)?-1:1,c=s&&a?-1:1,d=ot(t,e);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof p=="number"&&(u=l==="end"?p*-1:p),a?{x:u*c,y:f*h}:{x:f*h,y:u*c}}const je=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ue(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Ke=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:g,y}=v;return{x:g,y}}},...a}=ot(e,t),h={x:i,y:n},c=await $t(t,a),d=Q(X(o)),f=ne(d);let u=h[f],p=h[d];if(s){const v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=u+c[v],w=u-c[g];u=Dt(y,u,w)}if(r){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=p+c[v],w=p-c[g];p=Dt(y,p,w)}const m=l.fn({...t,[f]:u,[d]:p});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[f]:s,[d]:r}}}}}},Ye=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var i,n;const{placement:o,rects:s,platform:r,elements:l}=t,{apply:a=()=>{},...h}=ot(e,t),c=await $t(t,h),d=X(o),f=st(o),u=Q(o)==="y",{width:p,height:m}=s.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=f===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v=f==="end"?"top":"bottom");const y=m-c.top-c.bottom,w=p-c.left-c.right,x=G(m-c[v],y),b=G(p-c[g],w),L=!t.middlewareData.shift;let C=x,H=b;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&(H=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=y),L&&!f){const S=A(c.left,0),V=A(c.right,0),_=A(c.top,0),U=A(c.bottom,0);u?H=p-2*(S!==0||V!==0?S+V:A(c.left,c.right)):C=m-2*(_!==0||U!==0?_+U:A(c.top,c.bottom))}await a({...t,availableWidth:H,availableHeight:C});const N=await r.getDimensions(l.floating);return p!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Et(){return typeof window<"u"}function rt(e){return se(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function W(e){var t;return(t=(se(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function se(e){return Et()?e instanceof Node||e instanceof D(e).Node:!1}function F(e){return Et()?e instanceof Element||e instanceof D(e).Element:!1}function $(e){return Et()?e instanceof HTMLElement||e instanceof D(e).HTMLElement:!1}function Jt(e){return!Et()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof D(e).ShadowRoot}function dt(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Ge(e){return["table","td","th"].includes(rt(e))}function Ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wt(e){const t=Ht(),i=F(e)?z(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>i[n]?i[n]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Xe(e){let t=J(e);for(;$(t)&&!nt(t);){if(Wt(t))return t;if(Ct(t))return null;t=J(t)}return null}function Ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(e){return["html","body","#document"].includes(rt(e))}function z(e){return D(e).getComputedStyle(e)}function Pt(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(rt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jt(e)&&e.host||W(e);return Jt(t)?t.host:t}function re(e){const t=J(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:$(t)&&dt(t)?t:re(t)}function at(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=re(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=D(o);if(s){const l=St(r);return t.concat(r,r.visualViewport||[],dt(o)?o:[],l&&i?at(l):[])}return t.concat(o,at(o,[],i))}function St(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function le(e){const t=z(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=$(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=vt(i)!==s||vt(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function It(e){return F(e)?e:e.contextElement}function et(e){const t=It(e);if(!$(t))return M(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=le(t);let r=(s?vt(i.width):i.width)/n,l=(s?vt(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const Je=M(0);function ae(e){const t=D(e);return!Ht()||!t.visualViewport?Je:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qe(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==D(e)?!1:t}function Z(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=It(e);let r=M(1);t&&(n?F(n)&&(r=et(n)):r=et(e));const l=Qe(s,i,n)?ae(s):M(0);let a=(o.left+l.x)/r.x,h=(o.top+l.y)/r.y,c=o.width/r.x,d=o.height/r.y;if(s){const f=D(s),u=n&&F(n)?D(n):n;let p=f,m=St(p);for(;m&&n&&u!==p;){const v=et(m),g=m.getBoundingClientRect(),y=z(m),w=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,x=g.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,h*=v.y,c*=v.x,d*=v.y,a+=w,h+=x,p=D(m),m=St(p)}}return wt({width:c,height:d,x:a,y:h})}function Bt(e,t){const i=Pt(e).scrollLeft;return t?t.left+i:Z(W(e)).left+i}function ce(e,t,i){i===void 0&&(i=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(i?0:Bt(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function Ze(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=W(n),l=t?Ct(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},h=M(1);const c=M(0),d=$(n);if((d||!d&&!s)&&((rt(n)!=="body"||dt(r))&&(a=Pt(n)),$(n))){const u=Z(n);h=et(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}const f=r&&!d&&!s?ce(r,a,!0):M(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-a.scrollLeft*h.x+c.x+f.x,y:i.y*h.y-a.scrollTop*h.y+c.y+f.y}}function ti(e){return Array.from(e.getClientRects())}function ei(e){const t=W(e),i=Pt(e),n=e.ownerDocument.body,o=A(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=A(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Bt(e);const l=-i.scrollTop;return z(n).direction==="rtl"&&(r+=A(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ii(e,t){const i=D(e),n=W(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const h=Ht();(!h||h&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function ni(e,t){const i=Z(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=$(e)?et(e):M(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,h=n*s.y;return{width:r,height:l,x:a,y:h}}function Qt(e,t,i){let n;if(t==="viewport")n=ii(e,i);else if(t==="document")n=ei(W(e));else if(F(t))n=ni(t,i);else{const o=ae(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wt(n)}function he(e,t){const i=J(e);return i===t||!F(i)||nt(i)?!1:z(i).position==="fixed"||he(i,t)}function oi(e,t){const i=t.get(e);if(i)return i;let n=at(e,[],!1).filter(l=>F(l)&&rt(l)!=="body"),o=null;const s=z(e).position==="fixed";let r=s?J(e):e;for(;F(r)&&!nt(r);){const l=z(r),a=Wt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||dt(r)&&!a&&he(e,r))?n=n.filter(c=>c!==r):o=l,r=J(r)}return t.set(e,n),n}function si(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const r=[...i==="clippingAncestors"?Ct(t)?[]:oi(t,this._c):[].concat(i),n],l=r[0],a=r.reduce((h,c)=>{const d=Qt(t,c,o);return h.top=A(d.top,h.top),h.right=G(d.right,h.right),h.bottom=G(d.bottom,h.bottom),h.left=A(d.left,h.left),h},Qt(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function ri(e){const{width:t,height:i}=le(e);return{width:t,height:i}}function li(e,t,i){const n=$(t),o=W(t),s=i==="fixed",r=Z(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=M(0);if(n||!n&&!s)if((rt(t)!=="body"||dt(o))&&(l=Pt(t)),n){const f=Z(t,!0,s,t);a.x=f.x+t.clientLeft,a.y=f.y+t.clientTop}else o&&(a.x=Bt(o));const h=o&&!n&&!s?ce(o,l):M(0),c=r.left+l.scrollLeft-a.x-h.x,d=r.top+l.scrollTop-a.y-h.y;return{x:c,y:d,width:r.width,height:r.height}}function At(e){return z(e).position==="static"}function Zt(e,t){if(!$(e)||z(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return W(e)===i&&(i=i.ownerDocument.body),i}function de(e,t){const i=D(e);if(Ct(e))return i;if(!$(e)){let o=J(e);for(;o&&!nt(o);){if(F(o)&&!At(o))return o;o=J(o)}return i}let n=Zt(e,t);for(;n&&Ge(n)&&At(n);)n=Zt(n,t);return n&&nt(n)&&At(n)&&!Wt(n)?i:n||Xe(e)||i}const ai=async function(e){const t=this.getOffsetParent||de,i=this.getDimensions,n=await i(e.floating);return{reference:li(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ci(e){return z(e).direction==="rtl"}const hi={convertOffsetParentRelativeRectToViewportRelativeRect:Ze,getDocumentElement:W,getClippingRect:si,getOffsetParent:de,getElementRects:ai,getClientRects:ti,getDimensions:ri,getScale:et,isElement:F,isRTL:ci};function ue(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function di(e,t){let i=null,n;const o=W(e);function s(){var l;clearTimeout(n),(l=i)==null||l.disconnect(),i=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();const h=e.getBoundingClientRect(),{left:c,top:d,width:f,height:u}=h;if(l||t(),!f||!u)return;const p=pt(d),m=pt(o.clientWidth-(c+f)),v=pt(o.clientHeight-(d+u)),g=pt(c),w={rootMargin:-p+"px "+-m+"px "+-v+"px "+-g+"px",threshold:A(0,G(1,a))||1};let x=!0;function b(L){const C=L[0].intersectionRatio;if(C!==a){if(!x)return r();C?r(!1,C):n=setTimeout(()=>{r(!1,1e-7)},1e3)}C===1&&!ue(h,e.getBoundingClientRect())&&r(),x=!1}try{i=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{i=new IntersectionObserver(b,w)}i.observe(e)}return r(!0),s}function te(e,t,i,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,h=It(e),c=o||s?[...h?at(h):[],...at(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",i,{passive:!0}),s&&g.addEventListener("resize",i)});const d=h&&l?di(h,i):null;let f=-1,u=null;r&&(u=new ResizeObserver(g=>{let[y]=g;y&&y.target===h&&u&&(u.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=u)==null||w.observe(t)})),i()}),h&&!a&&u.observe(h),u.observe(t));let p,m=a?Z(e):null;a&&v();function v(){const g=Z(e);m&&!ue(m,g)&&i(),m=g,p=requestAnimationFrame(v)}return i(),()=>{var g;c.forEach(y=>{o&&y.removeEventListener("scroll",i),s&&y.removeEventListener("resize",i)}),d==null||d(),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(p)}}const ui=je,pi=Ke,ee=Ve,fi=Ye,mi=Be,gi=(e,t,i)=>{const n=new Map,o={platform:hi,...i},s={...o.platform,_c:n};return Ie(e,t,{...o,platform:s})};function ft(e){if(e===void 0)return 0;const t=window.devicePixelRatio||1;return Math.round(e*t)/t}const mt=8,vi=100,yi=e=>({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"]})[e]??[e],wi=Symbol("placement updated");class pe{constructor(t){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=t,this.host.addController(this)}placeOverlay(t=this.target,i=this.options){if(this.target=t,this.options=i,!t||!i)return;const n=te(i.trigger,t,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),o=te(i.trigger,t,this.updatePlacement,{ancestorScroll:!1});this.cleanup=()=>{var s;(s=this.host.elements)==null||s.forEach(r=>{r.addEventListener("luzmo-closed",()=>{const l=this.originalPlacements.get(r);l&&r.setAttribute("placement",l),this.originalPlacements.delete(r)},{once:!0})}),n(),o()}}async computePlacement(){var f,u;const{options:t,target:i}=this;await(document.fonts?document.fonts.ready:Promise.resolve());const n=t.trigger instanceof HTMLElement?ee():ee({padding:mt,fallbackPlacements:yi(t.placement)}),[o=0,s=0]=Array.isArray(t==null?void 0:t.offset)?t.offset:[t.offset,0],r=(f=this.host.elements.find(p=>p.tipElement))==null?void 0:f.tipElement,l=[ui({mainAxis:o,crossAxis:s}),pi({padding:mt}),n,fi({padding:mt,apply:({availableWidth:p,availableHeight:m,rects:{floating:v}})=>{const g=Math.max(vi,Math.floor(m)),y=v.height;this.initialHeight=this.isConstrained&&this.initialHeight||y,this.isConstrained=y<this.initialHeight||g<=y;const w=this.isConstrained?`${g}px`:"";Object.assign(i.style,{maxWidth:`${Math.floor(p)}px`,maxHeight:w})}}),...r?[mi({element:r,padding:t.tipPadding||mt})]:[]],{x:a,y:h,placement:c,middlewareData:d}=await gi(t.trigger,i,{placement:t.placement,middleware:l,strategy:"fixed"});if(Object.assign(i.style,{top:"0px",left:"0px",translate:`${ft(a)}px ${ft(h)}px`}),i.setAttribute("actual-placement",c),(u=this.host.elements)==null||u.forEach(p=>{this.originalPlacements.has(p)||this.originalPlacements.set(p,p.getAttribute("placement")),p.setAttribute("placement",c)}),r&&d.arrow){const{x:p,y:m}=d.arrow;Object.assign(r.style,{top:c.startsWith("right")||c.startsWith("left")?"0px":"",left:c.startsWith("bottom")||c.startsWith("top")?"0px":"",translate:`${ft(p)}px ${ft(m)}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 t;this.host.open||((t=this.cleanup)==null||t.call(this),this.cleanup=void 0)}hostDisconnected(){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0,document.removeEventListener("luzmo-update-overlays",this.resetOverlayPosition)}}var ut=(e=>(e[e.click=0]="click",e[e.hover=1]="hover",e[e.longpress=2]="longpress",e))(ut||{});class Ot{constructor(t,{overlay:i,isPersistent:n,handleOverlayReady:o}){this.target=t,this.isLazilyOpen=!1,this.isPersistent=!1,this.isPersistent=!!n,this.handleOverlayReady=o,this.isPersistent&&this.init(),this.overlay=i}get activelyOpening(){return!1}get open(){var t;return((t=this.overlay)==null?void 0:t.open)??this.isLazilyOpen}set open(t){if(t!==this.open){if(this.isLazilyOpen=t,this.overlay){this.overlay.open=t;return}t&&(customElements.whenDefined("luzmo-overlay").then(async()=>{const{LuzmoOverlay:i}=await Promise.resolve().then(()=>bt);this.overlay=new i,this.overlay.open=!0}),Promise.resolve().then(()=>bt))}}get overlay(){return this._overlay}set overlay(t){var i;t&&this.overlay!==t&&(this.overlay&&this.overlay.removeController(this),this._overlay=t,this.overlay.addController(this),this.initOverlay(),this.prepareDescription(this.target),(i=this.handleOverlayReady)==null||i.call(this,this.overlay))}prepareDescription(t){}releaseDescription(){}shouldCompleteOpen(){}init(){}initOverlay(){}abort(){var t;this.releaseDescription(),(t=this.abortController)==null||t.abort()}hostConnected(){this.init()}hostDisconnected(){this.isPersistent||this.abort()}}class fe extends Ot{constructor(){super(...arguments),this.type=ut.click,this.preventNextToggle=!1}handleClick(){this.preventNextToggle||(this.open=!this.open),this.preventNextToggle=!1}handlePointerdown(){this.preventNextToggle=this.open}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("click",()=>this.handleClick(),{signal:t}),this.target.addEventListener("pointerdown",()=>this.handlePointerdown(),{signal:t})}}const bi=300;class me extends Ot{constructor(){super(...arguments),this.type=ut.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleTargetFocusin(){this.target.matches(":focus-visible")&&(this.open=!0,this.focusedin=!0)}handleTargetFocusout(){this.focusedin=!1,!this.pointerentered&&(this.open=!1)}handleTargetPointerenter(){var t;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0),!((t=this.overlay)!=null&&t.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 t=this.target.getRootNode(),i=this.overlay.elements[0].getRootNode(),n=this.overlay.getRootNode();t===n?this.prepareOverlayRelativeDescription():t===i&&this.prepareContentRelativeDescription()}prepareOverlayRelativeDescription(){const t=Rt.conditionAttributeWithId(this.target,"aria-describedby",[this.overlay.id]);this.releaseDescription=()=>{t(),this.releaseDescription=Y}}prepareContentRelativeDescription(){const t=[],i=this.overlay.elements.map(o=>(t.push(o.id),o.id||(o.id=`${this.overlay.tagName.toLowerCase()}-helper-${kt.randomID()}`),o.id));this.elementIds=t;const n=Rt.conditionAttributeWithId(this.target,"aria-describedby",i);this.releaseDescription=()=>{n(),this.overlay.elements.map((o,s)=>{o.id=this.elementIds[s]}),this.releaseDescription=Y}}doPointerleave(){this.pointerentered=!1;const t=this.target;this.focusedin&&t.matches(":focus-visible")||(this.hoverTimeout=setTimeout(()=>{this.open=!1},bi))}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("focusin",()=>this.handleTargetFocusin(),{signal:t}),this.target.addEventListener("focusout",()=>this.handleTargetFocusout(),{signal:t}),this.target.addEventListener("pointerenter",()=>this.handleTargetPointerenter(),{signal:t}),this.target.addEventListener("pointerleave",()=>this.handleTargetPointerleave(),{signal:t}),this.overlay&&this.initOverlay()}initOverlay(){if(!this.abortController)return;const{signal:t}=this.abortController;this.overlay.addEventListener("pointerenter",()=>this.handleHostPointerenter(),{signal:t}),this.overlay.addEventListener("pointerleave",()=>this.handleHostPointerleave(),{signal:t})}}const xi=300,ge={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 ve extends Ot{constructor(){super(...arguments),this.type=ut.longpress,this.longpressState=null,this.releaseDescription=Y,this.handlePointerup=()=>{var t;clearTimeout(this.timeout),this.target&&(this.longpressState=((t=this.overlay)==null?void 0:t.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(t){!this.target||t.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"}}))},xi))}handleKeydown(t){const{code:i,altKey:n}=t;n&&i==="ArrowDown"&&(t.stopPropagation(),t.stopImmediatePropagation())}handleKeyup(t){const{code:i,altKey:n}=t;if(i==="Space"||n&&i==="ArrowDown"){if(!this.target)return;t.stopPropagation(),this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"keyboard"}})),setTimeout(()=>{this.longpressState=null})}}prepareDescription(t){if(this.releaseDescription!==Y||this.overlay.elements.length===0)return;const i=document.createElement("div");i.id=`longpress-describedby-descriptor-${kt.randomID()}`;const n=Kt.isIOS()||Kt.isAndroid()?"touch":"keyboard";i.textContent=ge[n],i.slot="longpress-describedby-descriptor";const o=t.getRootNode(),s=this.overlay.getRootNode();o===s?this.overlay.append(i):(i.hidden=!("host"in o),t.after(i));const r=Rt.conditionAttributeWithId(t,"aria-describedby",[i.id]);this.releaseDescription=()=>{r(),i.remove(),this.releaseDescription=Y}}shouldCompleteOpen(){this.longpressState=this.longpressState==="pressed"?null:this.longpressState}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("longpress",()=>this.handleLongpress(),{signal:t}),this.target.addEventListener("pointerdown",n=>this.handlePointerdown(n),{signal:t}),this.prepareDescription(this.target),!this.target.holdAffordance&&(this.target.addEventListener("keydown",n=>this.handleKeydown(n),{signal:t}),this.target.addEventListener("keyup",n=>this.handleKeyup(n),{signal:t}))}}const ye={click:fe,longpress:ve,hover:me};var Ei=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor,T=(e,t,i,n)=>{for(var o=n>1?void 0:n?Ci(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Ei(t,i,o),o};const Pi="showPopover"in document.createElement("div");let gt=Re(it);gt=Pi?Se(gt):De(gt);var B;const P=(B=class extends gt{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=t=>{if(!t.relatedTarget)return;const i=new Event("overlay-relation-query",{bubbles:!0,composed:!0});t.relatedTarget.addEventListener(i.type,n=>{n.composedPath().includes(this)||(this.open=!1)}),t.relatedTarget.dispatchEvent(i)}}get delayed(){var t;return((t=this.elements.at(-1))==null?void 0:t.hasAttribute("delayed"))||this._delayed}set delayed(t){this._delayed=t}get disabled(){return this._disabled}set disabled(t){var i;this._disabled=t,t?((i=this.strategy)==null||i.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 ht)}get placementController(){return this._placementController||(this._placementController=new pe(this)),this._placementController}get open(){return this._open}set open(t){var i;t&&this.disabled||t!==this.open&&((i=this.strategy)!=null&&i.activelyOpening&&!t||(this._open=t,this.open&&(B.openCount+=1),this.requestUpdate("open",!this.open),this.open&&this.requestSlottable()))}get state(){return this._state}set state(t){var n;if(t===this.state)return;const i=this.state;this._state=t,(this.state==="opened"||this.state==="closed")&&((n=this.strategy)==null||n.shouldCompleteOpen()),this.requestUpdate("state",i)}get elementResolver(){return this._elementResolver||(this._elementResolver=new Ut.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 t=this.offset||0,i=this.triggerElement,n=this.placement||"right",o=this.tipPadding;this.placementController.placeOverlay(this.dialogEl,{offset:t,placement:n,tipPadding:o,trigger:i,type:this.type})}async managePopoverOpen(){super.managePopoverOpen();const t=this.open;if(this.open!==t||(await this.manageDelay(t),this.open!==t)||(await this.ensureOnDOM(t),this.open!==t))return;const i=await this.makeTransition(t);this.open===t&&await this.applyFocus(t,i)}async applyFocus(t,i){if(!(this.receivesFocus==="false"||this.type==="hint")){if(await R(),await R(),t===this.open&&!this.open){this.hasNonVirtualTrigger&&this.contains(this.getRootNode().activeElement)&&this.triggerElement.focus();return}i==null||i.focus()}}returnFocus(){var i;if(this.open||this.type==="hint")return;const t=()=>{var s,r;const n=[];let o=document.activeElement;for(;(s=o==null?void 0:o.shadowRoot)!=null&&s.activeElement;)o=o.shadowRoot.activeElement;for(;o;){const l=o.assignedSlot||o.parentElement||((r=o.getRootNode())==null?void 0:r.host);l&&n.push(l),o=l}return n};this.receivesFocus!=="false"&&((i=this.triggerElement)!=null&&i.focus)&&(this.contains(this.getRootNode().activeElement)||t().includes(this)||document.activeElement===document.body)&&this.triggerElement.focus()}async manageOpen(t){if(!(!this.isConnected&&this.open)&&(this.hasUpdated||await this.updateComplete,this.open?(Gt.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))):(t&&this.dispose(),Gt.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 i=this.getRootNode();this.open?i.addEventListener("focusout",this.closeOnFocusOut,{capture:!0}):i.removeEventListener("focusout",this.closeOnFocusOut,{capture:!0})}}bindEvents(){var t;(t=this.strategy)==null||t.abort(),this.strategy=void 0,this.hasNonVirtualTrigger&&this.triggerInteraction&&(this.strategy=new ye[this.triggerInteraction](this.triggerElement,{overlay:this}))}handleBeforetoggle(t){t.newState!=="open"&&this.handleBrowserClose(t)}handleBrowserClose(t){var i;if(t.stopPropagation(),!((i=this.strategy)!=null&&i.activelyOpening)){this.open=!1;return}this.manuallyKeepOpen()}manuallyKeepOpen(){this.open=!0,this.placementController.allowPlacementUpdate=!0,this.manageOpen(!1)}handleSlotchange(){var t,i;this.elements.length===0?(t=this.strategy)==null||t.releaseDescription():this.hasNonVirtualTrigger&&((i=this.strategy)==null||i.prepareDescription(this.triggerElement))}shouldPreventClose(){const t=this.willPreventClose;return this.willPreventClose=!1,t}requestSlottable(){this.lastRequestSlottableState!==this.open&&(this.open||document.body.offsetHeight,this.dispatchEvent(new jt.SlottableRequestEvent("overlay-content",this.open?{}:jt.removeSlottableRequest)),this.lastRequestSlottableState=this.open)}willUpdate(t){var n;if(this.hasAttribute("id")||this.setAttribute("id",`${this.tagName.toLowerCase()}-${kt.randomID()}`),t.has("open")&&(this.hasUpdated||this.open)&&this.manageOpen(t.get("open")),t.has("trigger")){const[o,s]=((n=this.trigger)==null?void 0:n.split("@"))||[];this.elementResolver.selector=o?`#${o}`:"",this.triggerInteraction=s}let i=!1;t.has(Ut.elementResolverUpdatedSymbol)&&(i=this.triggerElement,this.triggerElement=this.elementResolver.element),t.has("triggerElement")&&(i=t.get("triggerElement")),i!==!1&&this.bindEvents()}updated(t){super.updated(t),t.has("placement")&&(this.placement?this.dialogEl.setAttribute("actual-placement",this.placement):this.dialogEl.removeAttribute("actual-placement"),this.open&&t.get("placement")!==void 0&&this.placementController.resetOverlayPosition()),t.has("state")&&this.state==="closed"&&t.get("state")!==void 0&&this.placementController.clearOverlayPosition()}renderContent(){return E.x` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":B.openCount.toString()}}renderDialog(){return E.x`
|
|
19
|
+
<dialog
|
|
20
|
+
class="dialog"
|
|
21
|
+
part="dialog"
|
|
22
|
+
placement=${Tt.o(this.requiresPositioning?this.placement||"right":void 0)}
|
|
23
|
+
style=${Vt.o(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 E.x`
|
|
32
|
+
<div
|
|
33
|
+
class="dialog"
|
|
34
|
+
part="dialog"
|
|
35
|
+
placement=${Tt.o(this.requiresPositioning?this.placement||"right":void 0)}
|
|
36
|
+
popover=${Tt.o(this.popoverValue)}
|
|
37
|
+
style=${Vt.o(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 t=this.type==="modal"||this.type==="page";return E.x`
|
|
45
|
+
${t?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 t;(t=this.strategy)==null||t.releaseDescription(),this.open=!1,super.disconnectedCallback()}},B.styles=[E.r(ze)],B.openCount=1,B);T([E.n({type:Boolean})],P.prototype,"delayed",1);T([ie.e(".dialog")],P.prototype,"dialogEl",2);T([E.n({type:Boolean})],P.prototype,"disabled",1);T([Ee.o({flatten:!0,selector:':not([slot="longpress-describedby-descriptor"], slot)'})],P.prototype,"elements",2);T([E.n({type:Number})],P.prototype,"offset",2);T([E.n({type:Boolean,reflect:!0})],P.prototype,"open",1);T([E.n()],P.prototype,"placement",2);T([E.n({attribute:"receives-focus"})],P.prototype,"receivesFocus",2);T([ie.e("slot")],P.prototype,"slotEl",2);T([xe.r()],P.prototype,"state",1);T([E.n({type:Number,attribute:"tip-padding"})],P.prototype,"tipPadding",2);T([E.n()],P.prototype,"trigger",2);T([E.n({attribute:!1})],P.prototype,"triggerElement",2);T([E.n({attribute:!1})],P.prototype,"triggerInteraction",2);T([E.n()],P.prototype,"type",2);let we=P;const bt=Object.freeze(Object.defineProperty({__proto__:null,LuzmoOverlay:we},Symbol.toStringTag,{value:"Module"}));exports.ClickController=fe;exports.HoverController=me;exports.InteractionController=Ot;exports.InteractionTypes=ut;exports.LONGPRESS_INSTRUCTIONS=ge;exports.LongpressController=ve;exports.LuzmoAbstractOverlay=it;exports.LuzmoOverlay=we;exports.PlacementController=pe;exports.VirtualTrigger=ht;exports.guaranteedAllTransitionend=xt;exports.nextFrame=R;exports.noop=Y;exports.overlay=bt;exports.overlayTimer=lt;exports.placementUpdatedSymbol=wi;exports.strategies=ye;
|
|
@@ -15,7 +15,7 @@
|
|
|
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";const s=require("
|
|
18
|
+
"use strict";const s=require("./base-B7Pfl2if.cjs");require("./progress-circle-NNbCMK2i.cjs");class r{constructor(e){this.cachedAriaLabel=null,this.host=e,this.host.addController(this)}renderPendingState(){const e=this.host.pendingLabel||"Pending";return this.host.pending?s.x`
|
|
19
19
|
<luzmo-progress-circle
|
|
20
20
|
id="loader"
|
|
21
21
|
size="s"
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
aria-valuetext=${e}
|
|
24
24
|
class="progress-circle"
|
|
25
25
|
></luzmo-progress-circle>
|
|
26
|
-
`:s.
|
|
26
|
+
`:s.x``}updateAriaLabel(){const{pending:e,disabled:t,pendingLabel:i}=this.host,a=this.host.getAttribute("aria-label");e&&!t&&a!==i?(this.cachedAriaLabel=a,this.host.setAttribute("aria-label",i||"Pending")):(!e||t)&&(this.cachedAriaLabel?this.host.setAttribute("aria-label",this.cachedAriaLabel):e||this.host.removeAttribute("aria-label"))}hostConnected(){this.cachedAriaLabel||(this.cachedAriaLabel=this.host.getAttribute("aria-label")),this.updateAriaLabel()}hostUpdated(){this.updateAriaLabel()}}exports.PendingStateController=r;
|
|
@@ -15,8 +15,8 @@
|
|
|
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 {
|
|
19
|
-
import "./progress-circle-
|
|
18
|
+
import { x as s } from "./base-CawdqE7p.js";
|
|
19
|
+
import "./progress-circle-Be24kv6B.js";
|
|
20
20
|
class o {
|
|
21
21
|
/**
|
|
22
22
|
* Creates an instance of PendingStateController.
|
|
@@ -15,4 +15,4 @@
|
|
|
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 e=require("../picker-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../picker-DDx8ii73.cjs");customElements.get("luzmo-picker")||customElements.define("luzmo-picker",e.LuzmoPicker);exports.DESCRIPTION_ID=e.DESCRIPTION_ID;exports.LuzmoPicker=e.LuzmoPicker;exports.LuzmoPickerBase=e.LuzmoPickerBase;
|
|
@@ -15,8 +15,8 @@
|
|
|
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 { a as r } from "../picker-
|
|
19
|
-
import { D as c, L as z } from "../picker-
|
|
18
|
+
import { a as r } from "../picker-833Apxe4.js";
|
|
19
|
+
import { D as c, L as z } from "../picker-833Apxe4.js";
|
|
20
20
|
const l = () => {
|
|
21
21
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
22
22
|
const o = document.createElement("style");
|
|
@@ -15,24 +15,22 @@
|
|
|
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 {
|
|
19
|
-
import {
|
|
20
|
-
import { r as h } from "./state-BG4JQVA1.js";
|
|
18
|
+
import { T as y, x as s, E as w, B as x, r as C, n as l } from "./base-CawdqE7p.js";
|
|
19
|
+
import { r as h } from "./state-CYxk12SV.js";
|
|
21
20
|
import { e as v } from "./query-D_KR_GUc.js";
|
|
22
|
-
import { T as C } from "./lit-html-B3ugcwD9.js";
|
|
23
21
|
import { e as I, i as S, t as M } from "./directive-oAbCiebi.js";
|
|
24
|
-
import { o as u } from "./if-defined-
|
|
25
|
-
import { o as E } from "./style-map-
|
|
26
|
-
import { F as $ } from "./focusable-
|
|
22
|
+
import { o as u } from "./if-defined-BSAr_4u4.js";
|
|
23
|
+
import { o as E } from "./style-map-Ct2LiEds.js";
|
|
24
|
+
import { F as $ } from "./focusable-cj2QhwDT.js";
|
|
27
25
|
import { D as q } from "./dependency-manger-CEXvGQUV.js";
|
|
28
|
-
import { P as L } from "./pending-state-
|
|
29
|
-
import { S as F } from "./sized-mixin-
|
|
26
|
+
import { P as L } from "./pending-state-TJj1x9xn.js";
|
|
27
|
+
import { S as F } from "./sized-mixin-BxMraZLS.js";
|
|
30
28
|
import { luzmoIcon as f, luzmoAngleDown as A, luzmoAlert as O } from "@luzmo/icons";
|
|
31
|
-
import "./index-
|
|
29
|
+
import "./index-CMvLpPKD.js";
|
|
32
30
|
import "./overlay/index.js";
|
|
33
31
|
import "./progress-circle/index.js";
|
|
34
32
|
import "./tooltip/index.js";
|
|
35
|
-
import { f as
|
|
33
|
+
import { f as k } from "./platform-BM-uMWpX.js";
|
|
36
34
|
/**
|
|
37
35
|
* @license
|
|
38
36
|
* Copyright 2018 Google LLC
|
|
@@ -59,7 +57,7 @@ const D = I(class extends S {
|
|
|
59
57
|
const d = !!e[r];
|
|
60
58
|
d === this.st.has(r) || (c = this.nt) != null && c.has(r) || (d ? (o.add(r), this.st.add(r)) : (o.remove(r), this.st.delete(r)));
|
|
61
59
|
}
|
|
62
|
-
return
|
|
60
|
+
return y;
|
|
63
61
|
}
|
|
64
62
|
}), B = "(max-width: 743px) and (hover: none) and (pointer: coarse)";
|
|
65
63
|
class P {
|
|
@@ -205,10 +203,10 @@ class K extends z {
|
|
|
205
203
|
this.preventNextToggle === "no" && (this.open = !this.open), this.preventNextToggle = "no";
|
|
206
204
|
}
|
|
207
205
|
handlePointerdown() {
|
|
208
|
-
this.preventNextToggle = this.open ? "yes" : "no",
|
|
206
|
+
this.preventNextToggle = this.open ? "yes" : "no", k() && this.target.classList.add(p);
|
|
209
207
|
}
|
|
210
208
|
handleFocusOut() {
|
|
211
|
-
this.host.open ||
|
|
209
|
+
this.host.open || k() && this.target.classList.contains(p) && this.target.classList.remove(p);
|
|
212
210
|
}
|
|
213
211
|
init() {
|
|
214
212
|
var o;
|
|
@@ -225,7 +223,7 @@ class K extends z {
|
|
|
225
223
|
});
|
|
226
224
|
}
|
|
227
225
|
}
|
|
228
|
-
const
|
|
226
|
+
const m = {
|
|
229
227
|
desktop: T,
|
|
230
228
|
mobile: K
|
|
231
229
|
};
|
|
@@ -325,7 +323,7 @@ class n extends F($, {
|
|
|
325
323
|
}
|
|
326
324
|
bindEvents() {
|
|
327
325
|
var e;
|
|
328
|
-
(e = this.strategy) == null || e.abort(), this.strategy = this.isMobile.matches ? new
|
|
326
|
+
(e = this.strategy) == null || e.abort(), this.strategy = this.isMobile.matches ? new m.mobile(this.button, this) : new m.desktop(this.button, this);
|
|
329
327
|
}
|
|
330
328
|
connectedCallback() {
|
|
331
329
|
super.connectedCallback(), this.recentlyConnected = this.hasUpdated;
|
|
@@ -407,7 +405,7 @@ class n extends F($, {
|
|
|
407
405
|
<slot name="label"></slot>
|
|
408
406
|
</div>
|
|
409
407
|
` : s` <span hidden id="applied-label">${o}</span> `}
|
|
410
|
-
${this.invalid && !this.pending ? s` ${this.renderAlertIcon()} ` :
|
|
408
|
+
${this.invalid && !this.pending ? s` ${this.renderAlertIcon()} ` : w}
|
|
411
409
|
${this.pendingStateController.renderPendingState()}
|
|
412
410
|
${this.renderAngleIcon()}
|
|
413
411
|
<slot
|
|
@@ -424,7 +422,7 @@ class n extends F($, {
|
|
|
424
422
|
if (((t = this.strategy) == null ? void 0 : t.overlay) === void 0)
|
|
425
423
|
return e;
|
|
426
424
|
const o = this.renderContainer(e);
|
|
427
|
-
return
|
|
425
|
+
return x(o, (c = this.strategy) == null ? void 0 : c.overlay, {
|
|
428
426
|
host: this
|
|
429
427
|
}), (r = this.strategy) == null ? void 0 : r.overlay;
|
|
430
428
|
}
|
|
@@ -624,7 +622,7 @@ a([
|
|
|
624
622
|
a([
|
|
625
623
|
h()
|
|
626
624
|
], n.prototype, "selectedItemContent", 1);
|
|
627
|
-
class
|
|
625
|
+
class ce extends n {
|
|
628
626
|
constructor() {
|
|
629
627
|
super(...arguments), this.handleKeydown = (e) => {
|
|
630
628
|
const { code: o } = e;
|
|
@@ -643,7 +641,7 @@ class se extends n {
|
|
|
643
641
|
};
|
|
644
642
|
}
|
|
645
643
|
static get styles() {
|
|
646
|
-
return [
|
|
644
|
+
return [C(_)];
|
|
647
645
|
}
|
|
648
646
|
get containerStyles() {
|
|
649
647
|
const e = super.containerStyles;
|
|
@@ -653,5 +651,5 @@ class se extends n {
|
|
|
653
651
|
export {
|
|
654
652
|
g as D,
|
|
655
653
|
n as L,
|
|
656
|
-
|
|
654
|
+
ce as a
|
|
657
655
|
};
|