@luzmo/lucero 1.0.1-alpha.1 → 1.0.1-alpha.11
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 +2 -2
- package/components/accordion/index.js +1 -1
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +1 -1
- package/components/action-button/index.cjs +2 -2
- package/components/action-button/index.js +2 -2
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +2 -2
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +2 -2
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +1 -1
- package/components/{clear-button-BbVqNU-g.js → clear-button-DQcRdcUa.js} +1 -1
- package/components/{clear-button-DYdeFsS8.cjs → clear-button-OFUFFe7G.cjs} +1 -1
- package/components/{close-button-CpfKibqg.cjs → close-button-Cbnb7XXj.cjs} +1 -1
- package/components/{close-button-DzOZZmkY.js → close-button-CqHYZhum.js} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +1 -1
- package/components/{color-controller-DTp1juRz.js → color-controller-B0uX6Zso.js} +116 -84
- package/components/{color-controller-_ZwyhvaU.cjs → color-controller-CoUL5f9K.cjs} +1 -1
- package/components/color-field/color-field.d.ts +8 -0
- package/components/color-field/index.cjs +4 -4
- package/components/color-field/index.js +36 -24
- package/components/color-menu/index.cjs +7 -7
- package/components/color-menu/index.js +39 -39
- package/components/color-palette/color-palette.d.ts +53 -0
- package/components/color-palette/index.cjs +18 -0
- package/components/color-palette/index.d.ts +7 -0
- package/components/color-palette/index.js +88 -0
- 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 +205 -0
- package/components/color-picker/color-picker.d.ts +31 -2
- package/components/color-picker/index.cjs +4 -3
- package/components/color-picker/index.js +13 -9
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +2 -2
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +1 -1
- package/components/{index-Cb9zsiz6.js → index-Cl54m8Yh.js} +1 -1
- package/components/{index-BQoI8AD3.cjs → index-Wq3qZJGh.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +141 -137
- package/components/{luzmo-icons-NEyaMpEM.js → luzmo-icons-4nDFv1Lq.js} +12 -12
- package/components/{luzmo-icons-D47EGj-3.cjs → luzmo-icons-D4IvHgVd.cjs} +2 -2
- package/components/menu/index.cjs +4 -4
- package/components/menu/index.js +2 -2
- package/components/number-field/index.cjs +5 -5
- package/components/number-field/index.js +5 -5
- package/components/options/index.cjs +8 -8
- package/components/options/index.js +1 -1
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.js +2 -2
- package/components/{overlay-BtZCJ2M0.js → overlay-Cig9r6uU.js} +1 -1
- package/components/overlay-KSKMzzkh.cjs +47 -0
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-CAYj4hBD.js → picker-BfBP7XJN.js} +1 -1
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +1 -1
- package/components/{picker-apS0Zrly.cjs → picker-xIphqE6d.cjs} +4 -4
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +2 -2
- package/components/select/index.cjs +6 -6
- package/components/select/index.js +1 -1
- package/components/swatch/index.cjs +5 -5
- package/components/swatch/index.js +8 -8
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +1 -1
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -1
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.js +5 -5
- package/components/{text-field-BSIXGkFs.cjs → text-field-BTkr42k4.cjs} +4 -4
- package/components/{text-field-B9IkRRxO.js → text-field-ol9Ed5lQ.js} +5 -5
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +2 -2
- package/components/unit-input/index.cjs +3 -3
- package/components/unit-input/index.js +1 -1
- package/custom-elements.json +1 -1
- package/index.d.ts +2 -0
- package/package.json +12 -2
- package/components/overlay-DTCm3y_-.cjs +0 -47
|
@@ -15,21 +15,21 @@
|
|
|
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 W=require("../mutation-controller-DkOMCW-c.cjs"),a=require("../base-CBCg3yyw.cjs"),L=require("../query-BL-TJj7K.cjs"),K=require("../focusable-EbipgXRh.cjs"),Z=require("../like-anchor-sod1C1fR.cjs"),G=require("../observe-slot-presence-bc9chhsi.cjs"),J=require("../observe-slot-text-Ceb7SvYT.cjs"),X=require("../random-id-CqvckpWe.cjs"),E=require("../luzmo-icons-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../mutation-controller-DkOMCW-c.cjs"),a=require("../base-CBCg3yyw.cjs"),L=require("../query-BL-TJj7K.cjs"),K=require("../focusable-EbipgXRh.cjs"),Z=require("../like-anchor-sod1C1fR.cjs"),G=require("../observe-slot-presence-bc9chhsi.cjs"),J=require("../observe-slot-text-Ceb7SvYT.cjs"),X=require("../random-id-CqvckpWe.cjs"),E=require("../luzmo-icons-D4IvHgVd.cjs"),S=require("../directive-C7oCP5Bh.cjs"),Y=require("../async-directive-BX1T1e1_.cjs"),g=require("../directive-helpers-DyIRTWwA.cjs"),Q=require("../base-BjTwmyRF.cjs"),D=require("../sized-mixin-CPxE5C96.cjs");require("../progress-circle/index.cjs");const tt=require("../divider.module-DDvBo9zo.cjs");/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/let ot;function et(r){return(t,o)=>Q.e(t,o,{get(){return(this.renderRoot??ot??(ot=document.createDocumentFragment())).querySelectorAll(r)}})}const it='#icon{grid-area:iconArea;align-self:start;height:var(--luzmo-option-icon-container-height, var(--option-icon-container-height));display:flex;align-items:center;justify-content:center;color:var(--highcontrast-option-color-default, var(--luzmo-option-label-icon-color-default, var(--option-label-icon-color-default)))}::slotted([slot=icon]){fill:var(--highcontrast-option-color-default, var(--luzmo-option-label-icon-color-default, var(--option-label-icon-color-default)));margin-inline-end:var(--luzmo-option-label-text-to-visual, var(--option-label-text-to-visual));block-size:var(--luzmo-option-icon-size, var(--option-icon-height));inline-size:var(--luzmo-option-icon-width, var(--option-icon-height));font-size:var(--luzmo-option-icon-size, var(--option-icon-height));text-align:center;--luzmo-icon-vertical-align: 0}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-option-background-color-default, var(--luzmo-option-background-color-default, var(--option-background-color-default)));line-height:var(--luzmo-option-label-line-height, var(--option-label-line-height));min-block-size:var(--luzmo-option-min-height, var(--option-min-height));padding-block-start:var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text));padding-block-end:var(--luzmo-option-bottom-edge-to-text, var(--option-bottom-edge-to-text));padding-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));grid-template:". . headingIconArea sectionHeadingArea . ." "selectedArea checkArea iconArea labelArea valueArea actionsArea" 1fr ". . . descriptionArea . ." ". . . . . ."/auto auto auto 1fr auto auto;justify-content:start;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;outline:none;align-items:center;position:relative;flex-shrink:0}:host:focus-visible{outline:none}#label{grid-area:submenuItemLabelArea}.checkmark,.checkbox{opacity:1;grid-area:checkArea;align-self:start;display:block}.checkmark{font-size:var(--luzmo-option-checkmark-size, var(--option-checkmark-size));fill:var(--highcontrast-options-checkmark-icon-color-default, var(--luzmo-options-checkmark-icon-color-default, var(--options-checkmark-icon-color-default)));color:var(--highcontrast-options-checkmark-icon-color-default, var(--luzmo-options-checkmark-icon-color-default, var(--options-checkmark-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkmark, var(--option-top-to-checkmark)) - var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control, var(--option-label-text-to-control))}.checkbox{font-size:var(--luzmo-option-checkbox-size, var(--option-checkbox-size));fill:var(--highcontrast-options-checkbox-icon-color-default, var(--luzmo-options-checkbox-icon-color-default, var(--options-checkbox-icon-color-default)));color:var(--highcontrast-options-checkbox-icon-color-default, var(--luzmo-options-checkbox-icon-color-default, var(--options-checkbox-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkbox, var(--option-top-to-checkbox)) - var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control, var(--option-label-text-to-control))}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-key-focus, var(--option-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-focus, var(--option-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-focus, var(--option-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-focus, var(--option-value-color-focus)))}:host([focused])>.icon:not(.checkmark,.checkbox),:host(:focus)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-focus, var(--option-label-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-focus, var(--option-label-icon-color-focus)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-focus, var(--options-checkmark-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-focus, var(--options-checkmark-icon-color-focus)))}:host([focused])>.checkbox,:host(:focus)>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-focus, var(--options-checkbox-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-focus, var(--options-checkbox-icon-color-focus)))}:host:dir(rtl),:host([dir=rtl]){--option-focus-indicator-direction-scalar: -1}:host(:is(:active,[active])){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-down, var(--option-background-color-down)))}:host(:is(:active,[active]))>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-down, var(--option-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-down, var(--option-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-down, var(--option-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-down, var(--option-label-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-down, var(--option-label-icon-color-down)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-down, var(--options-checkmark-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-down, var(--options-checkmark-icon-color-down)))}:host(:is(:active,[active]))>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-down, var(--options-checkbox-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-down, var(--options-checkbox-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-content-color-disabled, var(--option-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-description-color-disabled, var(--option-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)))}:host([focused]){box-shadow:inset calc(var(--luzmo-option-focus-indicator-width, var(--option-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-option-focus-indicator-color, var(--luzmo-option-focus-indicator-color, var(--option-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-option-focus-indicator-width, var(--option-focus-indicator-width)) * var(--option-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-option-focus-indicator-color, var(--luzmo-option-focus-indicator-color, var(--option-focus-indicator-color)))}#label{font-size:var(--luzmo-option-label-font-size, var(--option-label-font-size));color:var(--highcontrast-option-color-default, var(--luzmo-option-label-content-color-default, var(--option-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}:host([variant=highlight][selected]){background-color:var(--luzmo-option-highlight-selected-label-background-color, var(--option-highlight-selected-label-background-color))}:host([variant=highlight][selected]) #label{color:var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color))}:host([variant=highlight][selected]):hover #label{color:var(--luzmo-option-highlight-selected-label-content-color-hover, var(--option-highlight-selected-label-content-color-hover))}:host([variant=highlight][selected]):active #label{color:var(--luzmo-option-highlight-selected-label-content-color-down, var(--option-highlight-selected-label-content-color-down))}:host([variant=highlight][selected]):focus #label{color:var(--luzmo-option-highlight-selected-label-content-color-focus, var(--option-highlight-selected-label-content-color-focus))}:host([variant=highlight][selected]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color)))}::slotted([slot=value]){color:var(--highcontrast-option-color-default, var(--luzmo-option-value-color-default, var(--option-value-color-default)));font-size:var(--luzmo-option-label-font-size, var(--option-label-font-size));grid-area:valueArea;justify-self:end}[name=description]::slotted(*){color:var(--highcontrast-option-color-default, var(--luzmo-option-description-color-default, var(--option-description-color-default)));font-size:var(--luzmo-option-description-font-size, var(--option-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-option-description-line-height, var(--option-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-option-label-to-description-spacing, var(--option-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@media (hover: hover){:host(:hover){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-hover, var(--option-background-color-hover)))}:host(:hover)>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-hover, var(--option-label-content-color-hover)))}:host([variant=highlight][selected]:hover)>#label{color:var(--luzmo-option-highlight-selected-label-content-color-hover, var(--option-highlight-selected-label-content-color-hover))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-hover, var(--option-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-hover, var(--option-value-color-hover)))}:host(:hover)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-hover, var(--option-label-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-hover, var(--option-label-icon-color-hover)))}:host([variant=highlight][selected]:hover)>.icon:not(.checkmark,.checkbox){fill:var(--luzmo-option-highlight-selected-label-icon-color-hover, var(--option-highlight-selected-label-icon-color-hover))}:host(:hover)>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-hover, var(--options-checkmark-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-hover, var(--options-checkmark-icon-color-hover)))}:host(:hover)>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-hover, var(--options-checkbox-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-hover, var(--options-checkbox-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-content-color-disabled, var(--option-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-description-color-disabled, var(--option-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)))}}:host([emphasized]){--options-checkmark-icon-color-default: var(--luzmo-primary);--options-checkmark-icon-color-hover: var(--luzmo-primary-hover);--options-checkmark-icon-color-down: var(--luzmo-primary-down);--options-checkmark-icon-color-focus: var(--luzmo-primary-focus);--options-checkbox-icon-color-default: var(--luzmo-primary);--options-checkbox-icon-color-hover: var(--luzmo-primary-hover);--options-checkbox-icon-color-down: var(--luzmo-primary-down);--options-checkbox-icon-color-focus: var(--luzmo-primary-focus)}:host{text-align:initial;font-family:var(--luzmo-option-font-family, var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*){color:var(--luzmo-option-label-icon-color-disabled, var(--luzmo-disabled-color))}#button{position:absolute;top:0;right:0;bottom:0;left:0}.icon-container>svg{vertical-align:top}:host([dir=ltr]) [icon-only]::slotted(:last-of-type){margin-right:auto}:host([dir=rtl]) [icon-only]::slotted(:last-of-type){margin-left:auto}@media (forced-colors: active){:host{forced-color-adjust:none}}:host([no-wrap]) #label{display:block}';var nt=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,z=(r,t,o,e)=>{for(var i=e>1?void 0:e?lt(t,o):t,n=r.length-1,s;n>=0;n--)(s=r[n])&&(i=(e?s(t,o,i):s(i))||i);return e&&i&&nt(t,o,i),i};const rt=r=>a.x`
|
|
23
23
|
<span class="icon-container icon checkmark ${r.join(" ")}">
|
|
24
|
-
${E.
|
|
24
|
+
${E.y3(E.B)}
|
|
25
25
|
</span>
|
|
26
26
|
`,st=r=>a.x`
|
|
27
27
|
<span class="icon-container icon checkbox ${r.join(" ")}">
|
|
28
|
-
${E.
|
|
28
|
+
${E.y3(E.z0)}
|
|
29
29
|
</span>
|
|
30
30
|
`,at=r=>a.x`
|
|
31
31
|
<span class="icon-container icon checkbox ${r.join(" ")}">
|
|
32
|
-
${E.
|
|
32
|
+
${E.y3(E.v0)}
|
|
33
33
|
</span>
|
|
34
34
|
`;class b extends Z.LikeAnchor(J.ObserveSlotText(G.ObserveSlotPresence(K.Focusable,'[slot="icon"]'))){constructor(){super(),this.active=!1,this.focused=!1,this.selected=!1,this.emphasized=!1,this.variant="checkmarks",this._value="",this.noWrap=!1,this.renderCheckIcon=(t,o)=>{const e=o?["check-icon--with-adjacent-icon"]:[];return this.variant==="checkboxes"?t?at(e):st(e):t&&this.variant!=="highlight"?rt(e):a.x``},this.proxyFocus=()=>{this.focus()},this.willDispatchUpdate=!1,this.addEventListener("click",this.handleClickCapture,{capture:!0}),new W.s(this,{config:{characterData:!0,childList:!0,subtree:!0},callback:()=>{this.breakItemChildrenCache()}})}static get styles(){return[a.r(it)]}get value(){return this._value||this.itemText}set value(t){t!==this._value&&(this._value=t||"",this._value?this.setAttribute("value",this._value):this.removeAttribute("value"))}get itemText(){return this.itemChildren.content.reduce((t,o)=>t+(o.textContent||"").trim(),"")}get focusElement(){return this}get hasIcon(){return this.slotContentIsPresent}get itemChildren(){if(!this.iconSlot||!this.contentSlot)return{icon:[],content:[]};if(this._itemChildren)return this._itemChildren;const t=this.iconSlot.assignedElements().map(e=>{const i=e.cloneNode(!0);return i.removeAttribute("slot"),i.classList.toggle("icon"),i}),o=this.contentSlot.assignedNodes().map(e=>e.cloneNode(!0));return this._itemChildren={icon:t,content:o},this._itemChildren}click(){this.disabled||this.shouldProxyClick()||super.click()}handleClickCapture(t){if(this.disabled)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!1}shouldProxyClick(){let t=!1;return this.anchorElement&&(this.anchorElement.click(),t=!0),t}breakItemChildrenCache(){this._itemChildren=void 0,this.triggerUpdate()}render(){return a.x`
|
|
35
35
|
${this.renderCheckIcon(this.selected,this.hasIcon)}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2017 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/const F=(r,t,o)=>{const e=new Map;for(let i=t;i<=o;i++)e.set(r[i],i);return e},j=S.e(class extends S.i{constructor(r){if(super(r),r.type!==S.t.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,o){let e;o===void 0?o=t:t!==void 0&&(e=t);const i=[],n=[];let s=0;for(const l of r)i[s]=e?e(l,s):s,n[s]=o(l,s),s++;return{values:n,keys:i}}render(r,t,o){return this.dt(r,t,o).values}update(r,[t,o,e]){const i=g.p(r),{values:n,keys:s}=this.dt(t,o,e);if(!Array.isArray(i))return this.ut=s,n;const l=this.ut??(this.ut=[]),c=[];let h,m,d=0,p=i.length-1,u=0,v=n.length-1;for(;d<=p&&u<=v;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(l[d]===s[u])c[u]=g.v(i[d],n[u]),d++,u++;else if(l[p]===s[v])c[v]=g.v(i[p],n[v]),p--,v--;else if(l[d]===s[v])c[v]=g.v(i[d],n[v]),g.r(r,c[v+1],i[d]),d++,v--;else if(l[p]===s[u])c[u]=g.v(i[p],n[u]),g.r(r,i[d],i[p]),p--,u++;else if(h===void 0&&(h=F(s,u,v),m=F(l,d,p)),h.has(l[d]))if(h.has(l[p])){const f=m.get(s[u]),
|
|
49
|
+
*/const F=(r,t,o)=>{const e=new Map;for(let i=t;i<=o;i++)e.set(r[i],i);return e},j=S.e(class extends S.i{constructor(r){if(super(r),r.type!==S.t.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,o){let e;o===void 0?o=t:t!==void 0&&(e=t);const i=[],n=[];let s=0;for(const l of r)i[s]=e?e(l,s):s,n[s]=o(l,s),s++;return{values:n,keys:i}}render(r,t,o){return this.dt(r,t,o).values}update(r,[t,o,e]){const i=g.p(r),{values:n,keys:s}=this.dt(t,o,e);if(!Array.isArray(i))return this.ut=s,n;const l=this.ut??(this.ut=[]),c=[];let h,m,d=0,p=i.length-1,u=0,v=n.length-1;for(;d<=p&&u<=v;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(l[d]===s[u])c[u]=g.v(i[d],n[u]),d++,u++;else if(l[p]===s[v])c[v]=g.v(i[p],n[v]),p--,v--;else if(l[d]===s[v])c[v]=g.v(i[d],n[v]),g.r(r,c[v+1],i[d]),d++,v--;else if(l[p]===s[u])c[u]=g.v(i[p],n[u]),g.r(r,i[d],i[p]),p--,u++;else if(h===void 0&&(h=F(s,u,v),m=F(l,d,p)),h.has(l[d]))if(h.has(l[p])){const f=m.get(s[u]),k=f!==void 0?i[f]:null;if(k===null){const x=g.r(r,i[d]);g.v(x,n[u]),c[u]=x}else c[u]=g.v(k,n[u]),g.r(r,i[d],k),i[f]=null;u++}else g.M(i[p]),p--;else g.M(i[d]),d++;for(;u<=v;){const f=g.r(r,c[v+1]);g.v(f,n[u]),c[u++]=f}for(;d<=p;){const f=i[d++];f!==null&&g.M(f)}return this.ut=s,g.m(r,c),a.T}});/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2021 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* @license
|
|
59
59
|
* Copyright 2021 Google LLC
|
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
|
-
*/let $=typeof window<"u"?window.ResizeObserver:void 0;const R=Symbol("virtualizerRef"),I="virtualizer-sizer";let P;class ut{constructor(t){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(t.hostElement)this._init(t);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout))}_init(t){this._isScroller=!!t.scroller,this._initHostElement(t);const o=t.layout||{};this._layoutInitialized=this._initLayout(o)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new $(()=>this._hostElementSizeChanged()),this._childrenRO=new $(this._childrenSizeChanged.bind(this))}_initHostElement(t){const o=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),o[R]=this}connected(){this._initObservers();const t=this._isScroller;this._clippingAncestors=vt(this._hostElement,t),this._scrollerController=new ht(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(t=>this._childrenRO.observe(t)),this._scrollEventListeners.forEach(t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){var t,o,e,i;this._scrollEventListeners.forEach(n=>n.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],(t=this._scrollerController)==null||t.detach(this),this._scrollerController=null,(o=this._mutationObserver)==null||o.disconnect(),this._mutationObserver=null,(e=this._hostElementRO)==null||e.disconnect(),this._hostElementRO=null,(i=this._childrenRO)==null||i.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const o=this._hostElement.style;o.display=o.display||"block",o.position=o.position||"relative",o.contain=o.contain||"size layout",this._isScroller&&(o.overflow=o.overflow||"auto",o.minHeight=o.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let o=t.querySelector(`[${I}]`);o||(o=document.createElement("div"),o.setAttribute(I,""),t.appendChild(o)),Object.assign(o.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),o.textContent=" ",o.setAttribute(I,""),this._sizer=o}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const o=t.type||P;if(typeof o=="function"&&this._layout instanceof o){const e={...t};return delete e.type,this._layout.config=e,!0}return!1}async _initLayout(t){let o,e;if(typeof t.type=="function"){e=t.type;const i={...t};delete i.type,o=i}else o=t;e===void 0&&(P=e=(await Promise.resolve().then(()=>require("../flow-DM3dNAKs.cjs"))).FlowLayout),this._layout=new e(i=>this._handleLayoutMessage(i),o),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){const t=window.performance.now(),o=t-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<t).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:o,virtualizationTime:i}}return null}_measureChildren(){const t={},o=this._children,e=this._measureChildOverride||this._measureChild;for(let i=0;i<o.length;i++){const n=o[i],s=this._first+i;(this._itemsChanged||this._toBeMeasured.has(n))&&(t[s]=e.call(this,n,this._items[s]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:o,height:e}=t.getBoundingClientRect();return Object.assign({width:o,height:e},dt(t))}async _schedule(t){this._scheduled.has(t)||(this._scheduled.add(t),await Promise.resolve(),this._scheduled.delete(t),t.call(this))}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:o,_itemsChanged:e}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(o||e)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(t=>this._childrenRO.observe(t)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){var t;if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&((t=this._layout)==null||t.unpin()),this._schedule(this._updateLayout)}handleEvent(t){switch(t.type){case"scroll":(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",t)}}_handleLayoutMessage(t){t.type==="stateChanged"?this._updateDOM(t):t.type==="visibilityChanged"?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):t.type==="unpinned"&&this._hostElement.dispatchEvent(new M)}get _children(){const t=[];let o=this._hostElement.firstElementChild;for(;o;)o.hasAttribute(I)||t.push(o),o=o.nextElementSibling;return t}_updateView(){var i;const t=this._hostElement,o=(i=this._scrollerController)==null?void 0:i.element,e=this._layout;if(t&&o&&e){let n,s,l,c;const h=t.getBoundingClientRect();n=0,s=0,l=window.innerHeight,c=window.innerWidth;const m=this._clippingAncestors.map(w=>w.getBoundingClientRect());m.unshift(h);for(const w of m)n=Math.max(n,w.top),s=Math.max(s,w.left),l=Math.min(l,w.bottom),c=Math.min(c,w.right);const d=o.getBoundingClientRect(),p={left:h.left-d.left,top:h.top-d.top},u={width:o.scrollWidth,height:o.scrollHeight},v=n-h.top+t.scrollTop,f=s-h.left+t.scrollLeft,y=Math.max(0,l-n),x=Math.max(0,c-s);e.viewportSize={width:x,height:y},e.viewportScroll={top:v,left:f},e.totalScrollSize=u,e.offsetWithinScroller=p}}_sizeHostElement(t){const e=t&&t.width!==null?Math.min(82e5,t.width):0,i=t&&t.height!==null?Math.min(82e5,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${e}px, ${i}px)`;else{const n=this._hostElement.style;n.minWidth=e?`${e}px`:"100%",n.minHeight=i?`${i}px`:"100%"}}_positionChildren(t){t&&t.forEach(({top:o,left:e,width:i,height:n,xOffset:s,yOffset:l},c)=>{const h=this._children[c-this._first];h&&(h.style.position="absolute",h.style.boxSizing="border-box",h.style.transform=`translate(${e}px, ${o}px)`,i!==void 0&&(h.style.width=i+"px"),n!==void 0&&(h.style.height=n+"px"),h.style.left=s===void 0?null:s+"px",h.style.top=l===void 0?null:l+"px")})}async _adjustRange(t){const{_first:o,_last:e,_firstVisible:i,_lastVisible:n}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==o||this._last!==e,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==i||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:o}=this._scrollerController,{top:e,left:i}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-e,left:o-i})}}element(t){var o;return t===1/0&&(t=this._items.length-1),((o=this._items)==null?void 0:o[t])===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),t.behavior==="smooth"){const o=this._layout.getScrollIntoViewCoordinates(t),{behavior:e}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(o,{behavior:e}),()=>this._layout.getScrollIntoViewCoordinates(t),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:o}=this._scrollIntoViewTarget||{};o&&(t!=null&&t.has(o))&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new T({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new V({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((t,o)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=o})),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){var o;if((o=this._layout)!=null&&o.measureChildren){for(const e of t)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function dt(r){const t=window.getComputedStyle(r);return{marginTop:A(t.marginTop),marginRight:A(t.marginRight),marginBottom:A(t.marginBottom),marginLeft:A(t.marginLeft)}}function A(r){const t=r?parseFloat(r):NaN;return Number.isNaN(t)?0:t}function B(r){if(r.assignedSlot!==null)return r.assignedSlot;if(r.parentElement!==null)return r.parentElement;const t=r.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}function pt(r,t=!1){const o=[];let e=t?r:B(r);for(;e!==null;)o.push(e),e=B(e);return o}function vt(r,t=!1){let o=!1;return pt(r,t).filter(e=>{if(o)return!1;const i=getComputedStyle(e);return o=i.position==="fixed",i.overflow!=="visible"})}/**
|
|
61
|
+
*/let $=typeof window<"u"?window.ResizeObserver:void 0;const R=Symbol("virtualizerRef"),I="virtualizer-sizer";let B;class ut{constructor(t){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(t.hostElement)this._init(t);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout))}_init(t){this._isScroller=!!t.scroller,this._initHostElement(t);const o=t.layout||{};this._layoutInitialized=this._initLayout(o)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new $(()=>this._hostElementSizeChanged()),this._childrenRO=new $(this._childrenSizeChanged.bind(this))}_initHostElement(t){const o=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),o[R]=this}connected(){this._initObservers();const t=this._isScroller;this._clippingAncestors=vt(this._hostElement,t),this._scrollerController=new ht(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(t=>this._childrenRO.observe(t)),this._scrollEventListeners.forEach(t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){var t,o,e,i;this._scrollEventListeners.forEach(n=>n.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],(t=this._scrollerController)==null||t.detach(this),this._scrollerController=null,(o=this._mutationObserver)==null||o.disconnect(),this._mutationObserver=null,(e=this._hostElementRO)==null||e.disconnect(),this._hostElementRO=null,(i=this._childrenRO)==null||i.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const o=this._hostElement.style;o.display=o.display||"block",o.position=o.position||"relative",o.contain=o.contain||"size layout",this._isScroller&&(o.overflow=o.overflow||"auto",o.minHeight=o.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let o=t.querySelector(`[${I}]`);o||(o=document.createElement("div"),o.setAttribute(I,""),t.appendChild(o)),Object.assign(o.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),o.textContent=" ",o.setAttribute(I,""),this._sizer=o}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const o=t.type||B;if(typeof o=="function"&&this._layout instanceof o){const e={...t};return delete e.type,this._layout.config=e,!0}return!1}async _initLayout(t){let o,e;if(typeof t.type=="function"){e=t.type;const i={...t};delete i.type,o=i}else o=t;e===void 0&&(B=e=(await Promise.resolve().then(()=>require("../flow-DM3dNAKs.cjs"))).FlowLayout),this._layout=new e(i=>this._handleLayoutMessage(i),o),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){const t=window.performance.now(),o=t-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<t).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:o,virtualizationTime:i}}return null}_measureChildren(){const t={},o=this._children,e=this._measureChildOverride||this._measureChild;for(let i=0;i<o.length;i++){const n=o[i],s=this._first+i;(this._itemsChanged||this._toBeMeasured.has(n))&&(t[s]=e.call(this,n,this._items[s]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:o,height:e}=t.getBoundingClientRect();return Object.assign({width:o,height:e},dt(t))}async _schedule(t){this._scheduled.has(t)||(this._scheduled.add(t),await Promise.resolve(),this._scheduled.delete(t),t.call(this))}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:o,_itemsChanged:e}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(o||e)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(t=>this._childrenRO.observe(t)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){var t;if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&((t=this._layout)==null||t.unpin()),this._schedule(this._updateLayout)}handleEvent(t){switch(t.type){case"scroll":(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",t)}}_handleLayoutMessage(t){t.type==="stateChanged"?this._updateDOM(t):t.type==="visibilityChanged"?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):t.type==="unpinned"&&this._hostElement.dispatchEvent(new M)}get _children(){const t=[];let o=this._hostElement.firstElementChild;for(;o;)o.hasAttribute(I)||t.push(o),o=o.nextElementSibling;return t}_updateView(){var i;const t=this._hostElement,o=(i=this._scrollerController)==null?void 0:i.element,e=this._layout;if(t&&o&&e){let n,s,l,c;const h=t.getBoundingClientRect();n=0,s=0,l=window.innerHeight,c=window.innerWidth;const m=this._clippingAncestors.map(w=>w.getBoundingClientRect());m.unshift(h);for(const w of m)n=Math.max(n,w.top),s=Math.max(s,w.left),l=Math.min(l,w.bottom),c=Math.min(c,w.right);const d=o.getBoundingClientRect(),p={left:h.left-d.left,top:h.top-d.top},u={width:o.scrollWidth,height:o.scrollHeight},v=n-h.top+t.scrollTop,f=s-h.left+t.scrollLeft,k=Math.max(0,l-n),x=Math.max(0,c-s);e.viewportSize={width:x,height:k},e.viewportScroll={top:v,left:f},e.totalScrollSize=u,e.offsetWithinScroller=p}}_sizeHostElement(t){const e=t&&t.width!==null?Math.min(82e5,t.width):0,i=t&&t.height!==null?Math.min(82e5,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${e}px, ${i}px)`;else{const n=this._hostElement.style;n.minWidth=e?`${e}px`:"100%",n.minHeight=i?`${i}px`:"100%"}}_positionChildren(t){t&&t.forEach(({top:o,left:e,width:i,height:n,xOffset:s,yOffset:l},c)=>{const h=this._children[c-this._first];h&&(h.style.position="absolute",h.style.boxSizing="border-box",h.style.transform=`translate(${e}px, ${o}px)`,i!==void 0&&(h.style.width=i+"px"),n!==void 0&&(h.style.height=n+"px"),h.style.left=s===void 0?null:s+"px",h.style.top=l===void 0?null:l+"px")})}async _adjustRange(t){const{_first:o,_last:e,_firstVisible:i,_lastVisible:n}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==o||this._last!==e,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==i||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:o}=this._scrollerController,{top:e,left:i}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-e,left:o-i})}}element(t){var o;return t===1/0&&(t=this._items.length-1),((o=this._items)==null?void 0:o[t])===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),t.behavior==="smooth"){const o=this._layout.getScrollIntoViewCoordinates(t),{behavior:e}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(o,{behavior:e}),()=>this._layout.getScrollIntoViewCoordinates(t),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:o}=this._scrollIntoViewTarget||{};o&&(t!=null&&t.has(o))&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new T({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new V({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((t,o)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=o})),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){var o;if((o=this._layout)!=null&&o.measureChildren){for(const e of t)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function dt(r){const t=window.getComputedStyle(r);return{marginTop:A(t.marginTop),marginRight:A(t.marginRight),marginBottom:A(t.marginBottom),marginLeft:A(t.marginLeft)}}function A(r){const t=r?parseFloat(r):NaN;return Number.isNaN(t)?0:t}function P(r){if(r.assignedSlot!==null)return r.assignedSlot;if(r.parentElement!==null)return r.parentElement;const t=r.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}function pt(r,t=!1){const o=[];let e=t?r:P(r);for(;e!==null;)o.push(e),e=P(e);return o}function vt(r,t=!1){let o=!1;return pt(r,t).filter(e=>{if(o)return!1;const i=getComputedStyle(e);return o=i.position==="fixed",i.overflow!=="visible"})}/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2021 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
* @license
|
|
71
71
|
* Copyright 2021 Google LLC
|
|
72
72
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
73
|
-
*/customElements.define("lit-virtualizer",C);const gt=":host{--options-divider-thickness: var( --divider-thickness-medium, var(--luzmo-border-width) );inline-size:auto;margin-block:var(--luzmo-options-section-divider-margin-block, max(0px, (var(--option-section-divider-height) - var(--options-divider-thickness)) / 2));margin-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));overflow:visible}:host{display:block;flex-shrink:0}";class N extends D.SizedMixin(a.LuzmoElement,{validSizes:["s","m","l"]}){static get styles(){return[a.r(tt.dividerStyles),a.r(gt)]}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","separator")}}const bt=":host{--option-top-to-action: var(--luzmo-spacing-1);--option-top-to-checkbox: var(--luzmo-spacing-1);--option-label-line-height: var(--luzmo-line-height);--option-label-line-height-cjk: 1.5;--option-label-to-description-spacing: 1px;--option-focus-indicator-width: var(--luzmo-indicator-width);--option-focus-indicator-color: var(--luzmo-indicator-color);--option-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--option-label-content-color-default: var(--luzmo-font-color);--option-label-content-color-hover: var(--luzmo-font-color-hover);--option-label-content-color-down: var(--luzmo-font-color-down);--option-label-content-color-focus: var(--luzmo-font-color-focus);--option-label-icon-color-default: var(--luzmo-font-color);--option-label-icon-color-hover: var(--luzmo-font-color-hover);--option-label-icon-color-down: var(--luzmo-font-color-down);--option-label-icon-color-focus: var(--luzmo-font-color-focus);--option-highlight-selected-label-background-color: var(--luzmo-primary);--option-highlight-selected-label-content-color: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-hover: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-down: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-focus: var( --luzmo-primary-inverse-color );--option-label-content-color-disabled: var(--luzmo-font-color-disabled);--option-label-icon-color-disabled: var(--luzmo-font-color-disabled);--option-description-line-height: var(--luzmo-line-height);--option-description-line-height-cjk: 1.5;--option-description-color-default: var(--luzmo-font-color);--option-description-color-hover: var(--luzmo-font-color-hover);--option-description-color-down: var(--luzmo-font-color-down);--option-description-color-focus: var(--luzmo-font-color-focus);--option-description-color-disabled: var(--luzmo-disabled-color);--options-section-header-line-height: var(--luzmo-line-height);--options-section-header-line-height-cjk: 1.5;--options-section-header-font-weight: bold;--options-section-header-color: var(--luzmo-font-color-hard);--options-collapsible-icon-color: var(--luzmo-font-color-hard);--options-checkmark-icon-color-default: var(--luzmo-font-color);--options-checkmark-icon-color-hover: var(--luzmo-font-color-hover);--options-checkmark-icon-color-down: var(--luzmo-font-color-down);--options-checkmark-icon-color-focus: var(--luzmo-font-color-focus);--options-checkbox-icon-color-default: var(--luzmo-font-color);--options-checkbox-icon-color-hover: var(--luzmo-font-color-hover);--options-checkbox-icon-color-down: var(--luzmo-font-color-down);--options-checkbox-icon-color-focus: var(--luzmo-font-color-focus);--options-drillin-icon-color-default: var(--luzmo-font-color);--options-drillin-icon-color-hover: var(--luzmo-font-color-hover);--options-drillin-icon-color-down: var(--luzmo-font-color-down);--options-drillin-icon-color-focus: var(--luzmo-font-color-focus);--option-value-color-default: var(--luzmo-font-color);--option-value-color-hover: var(--luzmo-font-color-hover);--option-value-color-down: var(--luzmo-font-color-down);--option-value-color-focus: var(--luzmo-font-color-focus);--option-collapsible-no-icon-suboption-padding-x-start: 28px;--option-background-color-selected: var(--luzmo-background-color);--option-background-color-default: var(--luzmo-background-color);--option-background-color-hover: var(--luzmo-background-color-hover);--option-background-color-down: var(--luzmo-background-color-down);--option-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--option-min-height: var(--luzmo-component-height);--option-icon-container-height: 18px;--options-pending-height: var(--option-min-height);--progress-circle-size: calc( var(--options-pending-height) - var(--option-top-edge-to-text) - var( --option-bottom-edge-to-text ) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size);--option-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--pending-inline-edge-to-content: var(--option-label-inline-edge-to-content);--option-top-edge-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--option-bottom-edge-to-text: var(--luzmo-spacing-3);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size);--options-section-header-min-width: var(--luzmo-component-height);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--option-min-height: var(--luzmo-component-height-s);--option-icon-container-height: 17px;--option-icon-height: var(--luzmo-font-size);--option-icon-width: var(--luzmo-font-size);--option-label-font-size: var(--luzmo-font-size-s);--option-label-text-to-visual: var(--luzmo-spacing-3);--option-label-text-to-control: var(--luzmo-spacing-3);--option-label-inline-edge-to-content: var(--luzmo-spacing-3);--option-top-edge-to-text: calc( var(--luzmo-spacing-1) + var(--luzmo-spacing-2) );--option-bottom-edge-to-text: var(--luzmo-spacing-2);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size-s);--options-section-header-min-width: var(--luzmo-component-height-s);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: var(--luzmo-spacing-3);--option-top-to-checkbox: var(--luzmo-spacing-3)}:host([size=l]){--option-min-height: var(--luzmo-component-height-l);--option-icon-container-height: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size-l);--option-label-text-to-visual: var(--luzmo-spacing-4);--option-label-text-to-control: var(--luzmo-spacing-4);--option-label-inline-edge-to-content: var(--luzmo-spacing-4);--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size-s);--options-section-header-font-size: var(--luzmo-font-size-l);--options-section-header-min-width: var(--luzmo-component-height-l);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--option-checkmark-size: var(--luzmo-font-size-s);--option-checkbox-size: var(--luzmo-font-size-s);--option-top-to-checkmark: var(--luzmo-spacing-4);--option-top-to-checkbox: var(--luzmo-spacing-4)}:host([size=xl]){--option-min-height: var(--luzmo-component-height-xl);--option-icon-container-height: 26px;--option-icon-height: var(--luzmo-font-size-xl);--option-icon-width: var(--luzmo-font-size-xl);--option-label-font-size: var(--luzmo-font-size-xl);--option-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size);--options-section-header-font-size: var(--luzmo-font-size-xl);--options-section-header-min-width: var(--luzmo-component-height-xl);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size);--option-checkbox-size: var(--luzmo-font-size);--option-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}@media (forced-colors: active){:host{--highcontrast-option-background-color-default: ButtonFace;--highcontrast-option-color-default: ButtonText;--highcontrast-option-background-color-focus: Highlight;--highcontrast-option-color-focus: HighlightText;--highcontrast-options-checkmark-icon-color-default: Highlight;--highcontrast-options-checkbox-icon-color-default: Highlight;--highcontrast-option-color-disabled: GrayText;--highcontrast-option-focus-indicator-color: Highlight;--highcontrast-option-selected-background-color: Highlight;--highcontrast-option-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-option-selected-background-color: SelectedItem;--highcontrast-option-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-options-inline-size, auto);box-sizing:border-box;margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--option-label-line-height: var( --luzmo-option-label-line-height-cjk, var(--option-label-line-height-cjk) );--option-description-line-height: var( --luzmo-option-description-line-height-cjk, var(--option-description-line-height-cjk) );--options-section-header-line-height: var( --luzmo-options-section-header-line-height-cjk, var(--options-section-header-line-height-cjk) )}luzmo-option{width:100%}#pending{display:flex;flex-shrink:0;align-items:center;height:var(--options-pending-height);padding-inline:var(--pending-inline-edge-to-content)}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";var _t=Object.defineProperty,k=(r,t,o,e)=>{for(var i=void 0,n=r.length-1,s;n>=0;n--)(s=r[n])&&(i=s(t,o,i)||i);return i&&_t(t,o,i),i};const H=25;function zt(r,t){return!!t&&(r===t||r.contains(t))}class _ extends D.SizedMixin(a.LuzmoElement,{noDefaultSize:!0}){constructor(){super(),this.label="",this.variant="highlight",this.selects="single",this.emphasized=!1,this.pending=!1,this.options=[],this.value=[],this.focusedOptionIndex=0,this._selectedOptions=[],this._firstVisibleIndex=0,this.addEventListener("focusin",this.handleFocusin),this.addEventListener("blur",this.handleBlur)}static get styles(){return[a.r(bt)]}get _virtualizeActive(){return this.options.length>H}firstUpdated(t){super.firstUpdated(t),this.hasAttribute("tabindex")||(this.tabIndex=0);const o=[new Promise(e=>requestAnimationFrame(()=>e(!0)))];[...this.children].forEach(e=>{e.localName==="luzmo-option"&&o.push(e.updateComplete)}),this.optionElementsUpdated=Promise.all(o)}willUpdate(t){var e;t.has("selects")&&this.selects==="single"&&((e=this.value)==null?void 0:e.length)>1&&(this.value=this.value.slice(0,1))}updated(t){super.updated(t),t.has("label")&&(this.label||t.get("label")!==void 0)&&(this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.optionElementsUpdated,t}focus({preventScroll:t}={}){super.focus({preventScroll:t}),this.focusOptionByOffset(0)}_removeFocusedPropertyOnOptions(){requestAnimationFrame(()=>{this.visibleOptionElements.forEach(t=>{t.focused=!1})})}scrollToTop(){this.scrollTop=0}handleFocusin(){this.startListeningToKeyboard()}handleBlur(t){zt(this,t.relatedTarget)||(this.stopListeningToKeyboard(),this._removeFocusedPropertyOnOptions(),this.removeAttribute("aria-activedescendant"))}startListeningToKeyboard(){this.addEventListener("keydown",this.handleKeydown)}stopListeningToKeyboard(){this.removeEventListener("keydown",this.handleKeydown)}handleKeydown(t){var n;if(t.defaultPrevented)return;const o=this.focusedOptionIndex,e=[...this.visibleOptionElements].find(s=>{var l,c,h,m;return((l=s.value)==null?void 0:l.toString())===((m=(h=(c=this.options)==null?void 0:c[o])==null?void 0:h.value)==null?void 0:m.toString())}),{key:i}=t;if(i==="Tab"){this.prepareToCleanUp();return}if(i===" "||i==="Enter"){t.preventDefault(),e&&this.toggleOption(t,(n=this.options)==null?void 0:n[o]);return}if(i==="ArrowDown"||i==="ArrowUp"){t.preventDefault(),this.navigateWithinOptions(t,e);return}}navigateWithinOptions(t,o){const{key:e}=t,i=e==="ArrowDown"?1:-1;t.preventDefault(),t.stopPropagation();const n=this.focusOptionByOffset(i,o,!0);n!==o&&(this._virtualizeActive||n==null||n.scrollIntoView({block:"nearest"}))}focusOptionByOffset(t,o,e){var d;const i=t||1;o&&(o.focused=!1);const n=this.focusedOptionIndex;this.focusedOptionIndex=this.options.length>0?(this.options.length+this.focusedOptionIndex+t)%this.options.length:0;let s=this.options[this.focusedOptionIndex],l=this.options.length;for(;(s!=null&&s.disabled||s!=null&&s.divider)&&l;)l-=1,this.focusedOptionIndex=(this.options.length+this.focusedOptionIndex+i)%this.options.length,s=this.options[this.focusedOptionIndex];const c=n<this.focusedOptionIndex&&t===-1,h=n>this.focusedOptionIndex&&t===1;(c||h)&&(this.focusedOptionIndex=n,this.dispatchEvent(new Event(`luzmo-exceeded-${c?"top":"bottom"}`,{bubbles:!0,composed:!0,cancelable:!0})));let m;return e&&this._virtualizeActive&&(m=[...this.visibleOptionElements].find(p=>{var u,v,f;return((u=p.value)==null?void 0:u.toString())===((f=(v=this.options[this.focusedOptionIndex])==null?void 0:v.value)==null?void 0:f.toString())}),m||(this.focusedOptionIndex=this._firstVisibleIndex)),this._virtualizeActive&&e&&((d=this.virtualizer.element(this.focusedOptionIndex))==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})),m=m??[...this.visibleOptionElements].find(p=>{var u,v,f,y,x;return(p.value===null?null:(u=p.value)==null?void 0:u.toString())===(((v=this.options[this.focusedOptionIndex])==null?void 0:v.value)===null?(f=this.options[this.focusedOptionIndex])==null?void 0:f.value:(x=(y=this.options[this.focusedOptionIndex])==null?void 0:y.value)==null?void 0:x.toString())}),s!=null&&s.disabled||this.setFocusedAndActiveDescendant(m),m}updateSelectedItemIndex(){this.focusedOptionIndex=this._virtualizeActive?this._firstVisibleIndex:0}setSelectedOptionsFromValue(){this._selectedOptions=this.options.filter(t=>{var o;return Array.isArray(this.value)&&((o=this.value)==null?void 0:o.includes((t==null?void 0:t.value)??null))})}visibilityChanged(t){this._firstVisibleIndex=(t==null?void 0:t.first)??0}rangeChange(t){t.stopPropagation(),t.preventDefault(),(t==null?void 0:t.first)!==-1&&(t==null?void 0:t.last)!==-1&&this.dispatchEvent(new CustomEvent("luzmo-scrolled",{bubbles:!0,composed:!0,cancelable:!0,detail:{first:t.first,last:t.last}}))}async toggleOption(t,o){var s;const e=t instanceof KeyboardEvent,i=this.options.findIndex(l=>(l==null?void 0:l.value)===(o==null?void 0:o.value));this.focusedOptionIndex=i,this.visibleOptionElements.forEach(l=>{var c,h;if(e){const m=((l==null?void 0:l.value)===null?null:(c=l.value)==null?void 0:c.toString())===((o==null?void 0:o.value)===null?null:(h=o==null?void 0:o.value)==null?void 0:h.toString());l.focused=m,m&&this.setFocusedAndActiveDescendant(l)}else l.focused=!1});const n=Array.isArray(this.value)&&((s=this.value)==null?void 0:s.includes((o==null?void 0:o.value)??null));this.selects==="single"?(this.value=[o==null?void 0:o.value],this._selectedOptions=[o]):(this.value=n?this.value.filter(l=>l!==(o==null?void 0:o.value)):[...this.value??[],o==null?void 0:o.value],this._selectedOptions=n?this._selectedOptions.filter(l=>l.value!==o.value):[...this._selectedOptions,o]),await this.updateComplete,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0,composed:!0,detail:{value:this.value??[]}})),this.prepareToCleanUp()}handleOptionClick(t,o){this.toggleOption(o,t)}render(){const t=l=>a.x`<luzmo-icon
|
|
73
|
+
*/customElements.define("lit-virtualizer",C);const gt=":host{--options-divider-thickness: var( --divider-thickness-medium, var(--luzmo-border-width) );inline-size:auto;margin-block:var(--luzmo-options-section-divider-margin-block, max(0px, (var(--option-section-divider-height) - var(--options-divider-thickness)) / 2));margin-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));overflow:visible}:host{display:block;flex-shrink:0}";class N extends D.SizedMixin(a.LuzmoElement,{validSizes:["s","m","l"]}){static get styles(){return[a.r(tt.dividerStyles),a.r(gt)]}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","separator")}}const bt=":host{--option-top-to-action: var(--luzmo-spacing-1);--option-top-to-checkbox: var(--luzmo-spacing-1);--option-label-line-height: var(--luzmo-line-height);--option-label-line-height-cjk: 1.5;--option-label-to-description-spacing: 1px;--option-focus-indicator-width: var(--luzmo-indicator-width);--option-focus-indicator-color: var(--luzmo-indicator-color);--option-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--option-label-content-color-default: var(--luzmo-font-color);--option-label-content-color-hover: var(--luzmo-font-color-hover);--option-label-content-color-down: var(--luzmo-font-color-down);--option-label-content-color-focus: var(--luzmo-font-color-focus);--option-label-icon-color-default: var(--luzmo-font-color);--option-label-icon-color-hover: var(--luzmo-font-color-hover);--option-label-icon-color-down: var(--luzmo-font-color-down);--option-label-icon-color-focus: var(--luzmo-font-color-focus);--option-highlight-selected-label-background-color: var(--luzmo-primary);--option-highlight-selected-label-content-color: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-hover: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-down: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-focus: var( --luzmo-primary-inverse-color );--option-label-content-color-disabled: var(--luzmo-font-color-disabled);--option-label-icon-color-disabled: var(--luzmo-font-color-disabled);--option-description-line-height: var(--luzmo-line-height);--option-description-line-height-cjk: 1.5;--option-description-color-default: var(--luzmo-font-color);--option-description-color-hover: var(--luzmo-font-color-hover);--option-description-color-down: var(--luzmo-font-color-down);--option-description-color-focus: var(--luzmo-font-color-focus);--option-description-color-disabled: var(--luzmo-disabled-color);--options-section-header-line-height: var(--luzmo-line-height);--options-section-header-line-height-cjk: 1.5;--options-section-header-font-weight: bold;--options-section-header-color: var(--luzmo-font-color-hard);--options-collapsible-icon-color: var(--luzmo-font-color-hard);--options-checkmark-icon-color-default: var(--luzmo-font-color);--options-checkmark-icon-color-hover: var(--luzmo-font-color-hover);--options-checkmark-icon-color-down: var(--luzmo-font-color-down);--options-checkmark-icon-color-focus: var(--luzmo-font-color-focus);--options-checkbox-icon-color-default: var(--luzmo-font-color);--options-checkbox-icon-color-hover: var(--luzmo-font-color-hover);--options-checkbox-icon-color-down: var(--luzmo-font-color-down);--options-checkbox-icon-color-focus: var(--luzmo-font-color-focus);--options-drillin-icon-color-default: var(--luzmo-font-color);--options-drillin-icon-color-hover: var(--luzmo-font-color-hover);--options-drillin-icon-color-down: var(--luzmo-font-color-down);--options-drillin-icon-color-focus: var(--luzmo-font-color-focus);--option-value-color-default: var(--luzmo-font-color);--option-value-color-hover: var(--luzmo-font-color-hover);--option-value-color-down: var(--luzmo-font-color-down);--option-value-color-focus: var(--luzmo-font-color-focus);--option-collapsible-no-icon-suboption-padding-x-start: 28px;--option-background-color-selected: var(--luzmo-background-color);--option-background-color-default: var(--luzmo-background-color);--option-background-color-hover: var(--luzmo-background-color-hover);--option-background-color-down: var(--luzmo-background-color-down);--option-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--option-min-height: var(--luzmo-component-height);--option-icon-container-height: 18px;--options-pending-height: var(--option-min-height);--progress-circle-size: calc( var(--options-pending-height) - var(--option-top-edge-to-text) - var( --option-bottom-edge-to-text ) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size);--option-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--pending-inline-edge-to-content: var(--option-label-inline-edge-to-content);--option-top-edge-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--option-bottom-edge-to-text: var(--luzmo-spacing-3);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size);--options-section-header-min-width: var(--luzmo-component-height);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--option-min-height: var(--luzmo-component-height-s);--option-icon-container-height: 17px;--option-icon-height: var(--luzmo-font-size);--option-icon-width: var(--luzmo-font-size);--option-label-font-size: var(--luzmo-font-size-s);--option-label-text-to-visual: var(--luzmo-spacing-3);--option-label-text-to-control: var(--luzmo-spacing-3);--option-label-inline-edge-to-content: var(--luzmo-spacing-3);--option-top-edge-to-text: calc( var(--luzmo-spacing-1) + var(--luzmo-spacing-2) );--option-bottom-edge-to-text: var(--luzmo-spacing-2);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size-s);--options-section-header-min-width: var(--luzmo-component-height-s);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: var(--luzmo-spacing-3);--option-top-to-checkbox: var(--luzmo-spacing-3)}:host([size=l]){--option-min-height: var(--luzmo-component-height-l);--option-icon-container-height: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size-l);--option-label-text-to-visual: var(--luzmo-spacing-4);--option-label-text-to-control: var(--luzmo-spacing-4);--option-label-inline-edge-to-content: var(--luzmo-spacing-4);--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size-s);--options-section-header-font-size: var(--luzmo-font-size-l);--options-section-header-min-width: var(--luzmo-component-height-l);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--option-checkmark-size: var(--luzmo-font-size-s);--option-checkbox-size: var(--luzmo-font-size-s);--option-top-to-checkmark: var(--luzmo-spacing-4);--option-top-to-checkbox: var(--luzmo-spacing-4)}:host([size=xl]){--option-min-height: var(--luzmo-component-height-xl);--option-icon-container-height: 26px;--option-icon-height: var(--luzmo-font-size-xl);--option-icon-width: var(--luzmo-font-size-xl);--option-label-font-size: var(--luzmo-font-size-xl);--option-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size);--options-section-header-font-size: var(--luzmo-font-size-xl);--options-section-header-min-width: var(--luzmo-component-height-xl);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size);--option-checkbox-size: var(--luzmo-font-size);--option-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}@media (forced-colors: active){:host{--highcontrast-option-background-color-default: ButtonFace;--highcontrast-option-color-default: ButtonText;--highcontrast-option-background-color-focus: Highlight;--highcontrast-option-color-focus: HighlightText;--highcontrast-options-checkmark-icon-color-default: Highlight;--highcontrast-options-checkbox-icon-color-default: Highlight;--highcontrast-option-color-disabled: GrayText;--highcontrast-option-focus-indicator-color: Highlight;--highcontrast-option-selected-background-color: Highlight;--highcontrast-option-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-option-selected-background-color: SelectedItem;--highcontrast-option-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-options-inline-size, auto);box-sizing:border-box;margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--option-label-line-height: var( --luzmo-option-label-line-height-cjk, var(--option-label-line-height-cjk) );--option-description-line-height: var( --luzmo-option-description-line-height-cjk, var(--option-description-line-height-cjk) );--options-section-header-line-height: var( --luzmo-options-section-header-line-height-cjk, var(--options-section-header-line-height-cjk) )}luzmo-option{width:100%}#pending{display:flex;flex-shrink:0;align-items:center;height:var(--options-pending-height);padding-inline:var(--pending-inline-edge-to-content)}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";var _t=Object.defineProperty,y=(r,t,o,e)=>{for(var i=void 0,n=r.length-1,s;n>=0;n--)(s=r[n])&&(i=s(t,o,i)||i);return i&&_t(t,o,i),i};const H=25;function zt(r,t){return!!t&&(r===t||r.contains(t))}class _ extends D.SizedMixin(a.LuzmoElement,{noDefaultSize:!0}){constructor(){super(),this.label="",this.variant="highlight",this.selects="single",this.emphasized=!1,this.pending=!1,this.options=[],this.value=[],this.focusedOptionIndex=0,this._selectedOptions=[],this._firstVisibleIndex=0,this.addEventListener("focusin",this.handleFocusin),this.addEventListener("blur",this.handleBlur)}static get styles(){return[a.r(bt)]}get _virtualizeActive(){return this.options.length>H}firstUpdated(t){super.firstUpdated(t),this.hasAttribute("tabindex")||(this.tabIndex=0);const o=[new Promise(e=>requestAnimationFrame(()=>e(!0)))];[...this.children].forEach(e=>{e.localName==="luzmo-option"&&o.push(e.updateComplete)}),this.optionElementsUpdated=Promise.all(o)}willUpdate(t){var e;t.has("selects")&&this.selects==="single"&&((e=this.value)==null?void 0:e.length)>1&&(this.value=this.value.slice(0,1))}updated(t){super.updated(t),t.has("label")&&(this.label||t.get("label")!==void 0)&&(this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.optionElementsUpdated,t}focus({preventScroll:t}={}){super.focus({preventScroll:t}),this.focusOptionByOffset(0)}_removeFocusedPropertyOnOptions(){requestAnimationFrame(()=>{this.visibleOptionElements.forEach(t=>{t.focused=!1})})}scrollToTop(){this.scrollTop=0}handleFocusin(){this.startListeningToKeyboard()}handleBlur(t){zt(this,t.relatedTarget)||(this.stopListeningToKeyboard(),this._removeFocusedPropertyOnOptions(),this.removeAttribute("aria-activedescendant"))}startListeningToKeyboard(){this.addEventListener("keydown",this.handleKeydown)}stopListeningToKeyboard(){this.removeEventListener("keydown",this.handleKeydown)}handleKeydown(t){var n;if(t.defaultPrevented)return;const o=this.focusedOptionIndex,e=[...this.visibleOptionElements].find(s=>{var l,c,h,m;return((l=s.value)==null?void 0:l.toString())===((m=(h=(c=this.options)==null?void 0:c[o])==null?void 0:h.value)==null?void 0:m.toString())}),{key:i}=t;if(i==="Tab"){this.prepareToCleanUp();return}if(i===" "||i==="Enter"){t.preventDefault(),e&&this.toggleOption(t,(n=this.options)==null?void 0:n[o]);return}if(i==="ArrowDown"||i==="ArrowUp"){t.preventDefault(),this.navigateWithinOptions(t,e);return}}navigateWithinOptions(t,o){const{key:e}=t,i=e==="ArrowDown"?1:-1;t.preventDefault(),t.stopPropagation();const n=this.focusOptionByOffset(i,o,!0);n!==o&&(this._virtualizeActive||n==null||n.scrollIntoView({block:"nearest"}))}focusOptionByOffset(t,o,e){var d;const i=t||1;o&&(o.focused=!1);const n=this.focusedOptionIndex;this.focusedOptionIndex=this.options.length>0?(this.options.length+this.focusedOptionIndex+t)%this.options.length:0;let s=this.options[this.focusedOptionIndex],l=this.options.length;for(;(s!=null&&s.disabled||s!=null&&s.divider)&&l;)l-=1,this.focusedOptionIndex=(this.options.length+this.focusedOptionIndex+i)%this.options.length,s=this.options[this.focusedOptionIndex];const c=n<this.focusedOptionIndex&&t===-1,h=n>this.focusedOptionIndex&&t===1;(c||h)&&(this.focusedOptionIndex=n,this.dispatchEvent(new Event(`luzmo-exceeded-${c?"top":"bottom"}`,{bubbles:!0,composed:!0,cancelable:!0})));let m;return e&&this._virtualizeActive&&(m=[...this.visibleOptionElements].find(p=>{var u,v,f;return((u=p.value)==null?void 0:u.toString())===((f=(v=this.options[this.focusedOptionIndex])==null?void 0:v.value)==null?void 0:f.toString())}),m||(this.focusedOptionIndex=this._firstVisibleIndex)),this._virtualizeActive&&e&&((d=this.virtualizer.element(this.focusedOptionIndex))==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})),m=m??[...this.visibleOptionElements].find(p=>{var u,v,f,k,x;return(p.value===null?null:(u=p.value)==null?void 0:u.toString())===(((v=this.options[this.focusedOptionIndex])==null?void 0:v.value)===null?(f=this.options[this.focusedOptionIndex])==null?void 0:f.value:(x=(k=this.options[this.focusedOptionIndex])==null?void 0:k.value)==null?void 0:x.toString())}),s!=null&&s.disabled||this.setFocusedAndActiveDescendant(m),m}updateSelectedItemIndex(){this.focusedOptionIndex=this._virtualizeActive?this._firstVisibleIndex:0}setSelectedOptionsFromValue(){this._selectedOptions=this.options.filter(t=>{var o;return Array.isArray(this.value)&&((o=this.value)==null?void 0:o.includes((t==null?void 0:t.value)??null))})}visibilityChanged(t){this._firstVisibleIndex=(t==null?void 0:t.first)??0}rangeChange(t){t.stopPropagation(),t.preventDefault(),(t==null?void 0:t.first)!==-1&&(t==null?void 0:t.last)!==-1&&this.dispatchEvent(new CustomEvent("luzmo-scrolled",{bubbles:!0,composed:!0,cancelable:!0,detail:{first:t.first,last:t.last}}))}async toggleOption(t,o){var s;const e=t instanceof KeyboardEvent,i=this.options.findIndex(l=>(l==null?void 0:l.value)===(o==null?void 0:o.value));this.focusedOptionIndex=i,this.visibleOptionElements.forEach(l=>{var c,h;if(e){const m=((l==null?void 0:l.value)===null?null:(c=l.value)==null?void 0:c.toString())===((o==null?void 0:o.value)===null?null:(h=o==null?void 0:o.value)==null?void 0:h.toString());l.focused=m,m&&this.setFocusedAndActiveDescendant(l)}else l.focused=!1});const n=Array.isArray(this.value)&&((s=this.value)==null?void 0:s.includes((o==null?void 0:o.value)??null));this.selects==="single"?(this.value=[o==null?void 0:o.value],this._selectedOptions=[o]):(this.value=n?this.value.filter(l=>l!==(o==null?void 0:o.value)):[...this.value??[],o==null?void 0:o.value],this._selectedOptions=n?this._selectedOptions.filter(l=>l.value!==o.value):[...this._selectedOptions,o]),await this.updateComplete,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0,composed:!0,detail:{value:this.value??[]}})),this.prepareToCleanUp()}handleOptionClick(t,o){this.toggleOption(o,t)}render(){const t=l=>a.x`<luzmo-icon
|
|
74
74
|
slot="icon"
|
|
75
75
|
.icon=${l}
|
|
76
76
|
.size=${this.size}
|
|
@@ -98,4 +98,4 @@
|
|
|
98
98
|
@visibilityChanged=${this.visibilityChanged}
|
|
99
99
|
></lit-virtualizer>`:j(this.options,i),s=this.pending?a.x`<div id="pending">
|
|
100
100
|
<luzmo-progress-circle indeterminate></luzmo-progress-circle>
|
|
101
|
-
</div>`:a.E;return a.x`${n} ${s}`}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listbox"),this.updateComplete.then(()=>this.updateItemFocus())}disconnectedCallback(){super.disconnectedCallback()}prepareToCleanUp(){document.addEventListener("focusout",()=>{requestAnimationFrame(()=>{this.updateSelectedItemIndex()})},{once:!0})}updateItemFocus(){if(this.visibleOptionElements.length===0)return;const t=this.focusedOptionIndex,o=[...this.visibleOptionElements].find(e=>{var i,n,s,l,c,h;return(e.value===null?null:(i=e.value)==null?void 0:i.toString())===(((s=(n=this.options)==null?void 0:n[t])==null?void 0:s.value)===null?null:(h=(c=(l=this.options)==null?void 0:l[t])==null?void 0:c.value)==null?void 0:h.toString())});this.setFocusedAndActiveDescendant(o)}setFocusedAndActiveDescendant(t){var e,i;if(!t)return;const o=this.hasVisibleFocusInTree()||!!((e=this.visibleOptionElements)!=null&&e.some&&((i=this.visibleOptionElements)!=null&&i.some(n=>n.hasVisibleFocusInTree())));t.focused=o,o&&this.setAttribute("aria-activedescendant",t.id)}}
|
|
101
|
+
</div>`:a.E;return a.x`${n} ${s}`}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listbox"),this.updateComplete.then(()=>this.updateItemFocus())}disconnectedCallback(){super.disconnectedCallback()}prepareToCleanUp(){document.addEventListener("focusout",()=>{requestAnimationFrame(()=>{this.updateSelectedItemIndex()})},{once:!0})}updateItemFocus(){if(this.visibleOptionElements.length===0)return;const t=this.focusedOptionIndex,o=[...this.visibleOptionElements].find(e=>{var i,n,s,l,c,h;return(e.value===null?null:(i=e.value)==null?void 0:i.toString())===(((s=(n=this.options)==null?void 0:n[t])==null?void 0:s.value)===null?null:(h=(c=(l=this.options)==null?void 0:l[t])==null?void 0:c.value)==null?void 0:h.toString())});this.setFocusedAndActiveDescendant(o)}setFocusedAndActiveDescendant(t){var e,i;if(!t)return;const o=this.hasVisibleFocusInTree()||!!((e=this.visibleOptionElements)!=null&&e.some&&((i=this.visibleOptionElements)!=null&&i.some(n=>n.hasVisibleFocusInTree())));t.focused=o,o&&this.setAttribute("aria-activedescendant",t.id)}}y([a.n({type:String,reflect:!0})],_.prototype,"label");y([a.n({type:String,reflect:!0})],_.prototype,"variant");y([a.n({type:String,reflect:!0})],_.prototype,"selects");y([a.n({type:Boolean,reflect:!0})],_.prototype,"emphasized");y([a.n({type:Boolean,reflect:!0})],_.prototype,"pending");y([a.n({type:Array})],_.prototype,"options");y([a.n({type:Boolean,reflect:!0,attribute:"no-wrap"})],_.prototype,"noWrap");y([a.n({type:Array})],_.prototype,"value");y([L.e("lit-virtualizer")],_.prototype,"virtualizer");y([et("luzmo-option")],_.prototype,"visibleOptionElements");customElements.get("luzmo-options")||customElements.define("luzmo-options",_);customElements.get("luzmo-options-divider")||customElements.define("luzmo-options-divider",N);customElements.get("luzmo-option")||customElements.define("luzmo-option",b);exports.LuzmoOption=b;exports.LuzmoOptions=_;exports.LuzmoOptionsDivider=N;exports.VIRTUALIZE_AS_OF_NUM_ITEMS=H;
|
|
@@ -23,7 +23,7 @@ import { L as eo } from "../like-anchor-Bvn_vLQ8.js";
|
|
|
23
23
|
import { O as io } from "../observe-slot-presence-CmVi0zTc.js";
|
|
24
24
|
import { O as lo } from "../observe-slot-text-BPfIQQtz.js";
|
|
25
25
|
import { r as ro } from "../random-id-ByCz1xaq.js";
|
|
26
|
-
import {
|
|
26
|
+
import { y as D, v as no, z as so, B as ao } from "../luzmo-icons-4nDFv1Lq.js";
|
|
27
27
|
import { e as q, i as co, t as K } from "../directive-oAbCiebi.js";
|
|
28
28
|
import { f as ho } from "../async-directive-BfcqVjDp.js";
|
|
29
29
|
import { p as uo, v as w, r as S, M, m as po } from "../directive-helpers-Cm6gitnu.js";
|
|
@@ -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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../overlay-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../overlay-KSKMzzkh.cjs"),n=require("../base-CBCg3yyw.cjs"),p=require("../state-D8JEtYqe.cjs"),d=require("../query-BL-TJj7K.cjs"),f=require("../directive-C7oCP5Bh.cjs"),O=require("../async-directive-BX1T1e1_.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=(h,e,r,t)=>{for(var i=void 0,a=h.length-1,c;a>=0;a--)(c=h[a])&&(i=c(e,r,i)||i);return i&&$(e,r,i),i};class o extends n.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[n.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: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,i,a,c,g;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=((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=((c=this.longpressContent[0])==null?void 0:c.getAttribute("placement"))||((g=this.longpressContent[0])==null?void 0:g.getAttribute("direction"))||void 0),super.update(e)}renderSlot(e){return n.x`
|
|
19
19
|
<slot name=${e} @slotchange=${this.handleSlotContent}></slot>
|
|
20
20
|
`}renderClickOverlay(){var t;const e=this.renderSlot("click-content"),r=n.x`
|
|
21
21
|
<luzmo-overlay
|
|
@@ -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 { e as f, I as O, s as S, L as $ } from "../overlay-
|
|
19
|
-
import { C as D, H as M, b as J, c as K, d as Q, P as W, S as X, V as Y, g as Z, l as ee, a as te, n as oe, o as re, p as le } from "../overlay-
|
|
18
|
+
import { e as f, I as O, s as S, L as $ } from "../overlay-Cig9r6uU.js";
|
|
19
|
+
import { C as D, H as M, b as J, c as K, d as Q, P as W, S as X, V as Y, g as Z, l as ee, a as te, n as oe, o as re, p as le } from "../overlay-Cig9r6uU.js";
|
|
20
20
|
import { a as E, r as w, x as m, n as c, E as z, B as v } from "../base-WsynuqaS.js";
|
|
21
21
|
import { r as g } from "../state-Deh-vKYE.js";
|
|
22
22
|
import { e as h } from "../query-D_KR_GUc.js";
|
|
@@ -556,7 +556,7 @@ const ze = "showPopover" in document.createElement("div");
|
|
|
556
556
|
class Ne {
|
|
557
557
|
constructor() {
|
|
558
558
|
this.root = document.body, this.stack = [], this.handleScroll = (t) => {
|
|
559
|
-
this.stack.forEach((i) => {
|
|
559
|
+
t.target !== document && t.target !== document.documentElement && t.target !== document.body || this.stack.forEach((i) => {
|
|
560
560
|
i.open && (i.type === "auto" && i.triggerElement instanceof HTMLElement && i.triggerElement.closest(
|
|
561
561
|
"luzmo-picker, luzmo-select, luzmo-action-menu"
|
|
562
562
|
) && t.stopPropagation(), document.dispatchEvent(
|
|
@@ -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 x=require("./base-CBCg3yyw.cjs"),Ce=require("./state-D8JEtYqe.cjs"),oe=require("./query-BL-TJj7K.cjs"),Pe=require("./query-assigned-elements-DsKsfk7G.cjs"),Dt=require("./if-defined-C9YGdo33.cjs"),jt=require("./style-map-CeilmSgs.cjs"),Nt=require("./random-id-CqvckpWe.cjs"),Yt=require("./element-resolution-BvRLGqIU.cjs"),ht=require("./focusable-selectors-BgFlyFcY.cjs"),Gt=require("./slottable-request-event-BfUUt1Mh.cjs"),St=require("./condition-attribute-with-id-DrQYZzFS.cjs"),yt=require("./platform-BiXhwqk3.cjs");function Oe(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 Te=(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 a=new Array(o),l=new Array(o),h=document.createComment("placeholder for reparented element");do{const c=e[r];n&&(l[r]=n(c)),a[r]=h.cloneNode();const d=c.parentElement||c.getRootNode();d&&d!==c&&d.replaceChild(a[r],c),t.insertAdjacentElement(i,c),r+=s}while(--o>0);return function(){return Oe(a,e,l)}},Ae=1e3,Re=1e3;class De{constructor(t={}){this.warmUpDelay=Ae,this.coolDownDelay=Re,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 De,Y=()=>{},Pt=(e,t,i)=>{const n=new AbortController,o=new Map,s=()=>{n.abort(),i()};let r,a;const l=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{a=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(l),cancelAnimationFrame(r),cancelAnimationFrame(a))};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 x.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(()=>Ct);const s=arguments.length===2,r=n||t,a=new this;let l=!1;const h=Te([r],a,{position:"beforeend",prepareCallback:f=>{const u=f.slot;return f.removeAttribute("slot"),()=>{f.slot=u}}});if(a.dispose=()=>{a.addEventListener("luzmo-closed",()=>{l||(h(),l=!0),requestAnimationFrame(()=>{a.remove()})}),a.open=!1,a.dispose=Y},!s&&r&&o){const f=t,u=i,p=o;return it.applyOptions(a,{...p,delayed:p.delayed||r.hasAttribute("delayed"),trigger:p.virtualTrigger||f,type:u==="modal"?"modal":u==="hover"?"hint":"auto"}),f.after(a),await a.updateComplete,a.open=!0,a.dispose}const d=i;return a.append(r),it.applyOptions(a,{...d,delayed:d.delayed||r.hasAttribute("delayed")}),a.updateComplete.then(()=>{a.open=!0}),a}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 _t=e=>e.querySelector(ht.userFocusableSelector),It=e=>e.assignedElements().find(i=>i.matches(ht.userFocusableSelector));class qt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="open",this.newState="closed"}}class Mt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="closed",this.newState="open"}}class F 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 dt{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 Le(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=(a,l)=>()=>{if(a.open=n,!n){const c=()=>{a.removeEventListener("close",c)};a.addEventListener("close",c)}if(l>0)return;const h=n?Mt:qt;this.dispatchEvent(new h),n&&(a.matches(ht.userFocusableSelector)&&(o=a),o=o||_t(a),o||a.querySelectorAll("slot").forEach(d=>{o||(o=It(d))}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(a,l)=>()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(l>0){a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||n!==this.open)return;const c=async()=>{const d=this.triggerElement instanceof dt;this.dispatchEvent(new F(h,this,{interaction:this.type,publish:d})),a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1})),this.triggerElement&&!d&&this.triggerElement.dispatchEvent(new F(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((a,l)=>{Pt(a,s(a,l),r(a,l))}),o}dialogApplyFocus(n,o){this.applyFocus(n,o)}}return t}function Se(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=(a,l)=>()=>{if(n!==this.open)return;if(a.open=n,l===0){const c=n?Mt:qt;this.dispatchEvent(new c)}if(n!==!0||(a.matches(ht.userFocusableSelector)&&(o=a),o=o||_t(a),o))return;a.querySelectorAll("slot").forEach(c=>{o||(o=It(c))})},r=(a,l)=>async()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(a.dispatchEvent(new F(h,this,{interaction:this.type})),l>0)return;const c=this.triggerElement instanceof dt;this.dispatchEvent(new F(h,this,{interaction:this.type,publish:c})),this.triggerElement&&!c&&this.triggerElement.dispatchEvent(new F(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((a,l)=>{Pt(a,s(a,l),r(a,l))}),o}}return t}const Fe=CSS.supports("(overlay: auto)");function Xt(e){let t=!1;try{t=e.matches(":popover-open")}catch{}let i=!1;try{i=e.matches(":open")}catch{}return t||i}function ke(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(!Xt(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){Fe||await this.shouldHidePopover(n),this.shouldShowPopover(n),await R()}makeTransition(n){if(this.open!==n)return null;let o=null;const s=(a,l)=>()=>{if(a.open=n,l===0){const c=n?Mt:qt;this.dispatchEvent(new c)}if(!n||(a.matches(ht.userFocusableSelector)&&(o=a),o=o||_t(a),o))return;a.querySelectorAll("slot").forEach(c=>{o||(o=It(c))})},r=(a,l)=>()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(l>0){a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1}));return}const c=async()=>{if(this.open!==n)return;await R();const f=this.triggerElement instanceof dt;this.dispatchEvent(new F(h,this,{interaction:this.type,publish:f})),a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1})),this.triggerElement&&!f&&this.triggerElement.dispatchEvent(new F(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=Xt(this.dialogEl);n!==!0&&d&&this.isConnected?(this.dialogEl.addEventListener("beforetoggle",()=>{c()},{once:!0}),this.dialogEl.hidePopover()):c()};return this.elements.forEach((a,l)=>{Pt(a,s(a,l),r(a,l))}),o}}return t}const ze="showPopover"in document.createElement("div");class Ne{constructor(){this.root=document.body,this.stack=[],this.handleScroll=t=>{t.target!==document&&t.target!==document.documentElement&&t.target!==document.body||this.stack.forEach(i=>{i.open&&(i.type==="auto"&&i.triggerElement instanceof HTMLElement&&i.triggerElement.closest("luzmo-picker, luzmo-select, luzmo-action-menu")&&t.stopPropagation(),document.dispatchEvent(new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0})))})},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(l=>l===s||l===(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}if((i==null?void 0:i.type)==="manual"){this.closeOverlay(i);return}ze||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),this.document.addEventListener("scroll",this.handleScroll,{capture:!0})}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(l=>l===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 Jt=new Ne,_e=':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,wt=Math.round,pt=Math.floor,q=e=>({x:e,y:e}),Ie={left:"right",right:"left",bottom:"top",top:"bottom"},qe={start:"end",end:"start"};function Ft(e,t,i){return A(e,G(t,i))}function st(e,t){return typeof e=="function"?e(t):e}function X(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function se(e){return e==="x"?"y":"x"}function Wt(e){return e==="y"?"height":"width"}function Q(e){return["top","bottom"].includes(X(e))?"y":"x"}function $t(e){return se(Q(e))}function Me(e,t,i){i===void 0&&(i=!1);const n=rt(e),o=$t(e),s=Wt(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=bt(r)),[r,bt(r)]}function We(e){const t=bt(e);return[kt(e),t,kt(t)]}function kt(e){return e.replace(/start|end/g,t=>qe[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 He(e,t,i,n){const o=rt(e);let s=$e(X(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(kt)))),s}function bt(e){return e.replace(/left|right|bottom|top/g,t=>Ie[t])}function Be(e){return{top:0,right:0,bottom:0,left:0,...e}}function re(e){return typeof e!="number"?Be(e):{top:e,right:e,bottom:e,left:e}}function Et(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 Qt(e,t,i){let{reference:n,floating:o}=e;const s=Q(t),r=$t(t),a=Wt(r),l=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[a]/2-o[a]/2;let u;switch(l){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(rt(t)){case"start":u[r]-=f*(i&&h?-1:1);break;case"end":u[r]+=f*(i&&h?-1:1);break}return u}const Ve=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let h=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Qt(h,n,l),f=n,u={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:g}=a[m],{x:y,y:w,data:E,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],...E}},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}=Qt(h,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:u}};async function Ht(e,t){var i;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:h="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:u=0}=st(t,e),p=re(u),v=a[f?d==="floating"?"reference":"floating":d],g=Et(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(a.floating)),boundary:h,rootBoundary:c,strategy:l})),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(a.floating)),E=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=Et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(g.top-b.top+p.top)/E.y,bottom:(b.bottom-g.bottom+p.bottom)/E.y,left:(g.left-b.left+p.left)/E.x,right:(b.right-g.right+p.right)/E.x}}const Ue=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:n,placement:o,rects:s,platform:r,elements:a,middlewareData:l}=t,{element:h,padding:c=0}=st(e,t)||{};if(h==null)return{};const d=re(c),f={x:i,y:n},u=$t(o),p=Wt(u),m=await r.getDimensions(h),v=u==="y",g=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",E=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=a.floating[w]||s.floating[p]);const $=E/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+$,tt=Ft(_,O,U),H=!l.arrow&&rt(o)!=null&&O!==tt&&s.reference[p]/2-(O<_?S:V)-m[p]/2<0,I=H?O<_?O-_:O-U:0;return{[u]:f[u]+I,data:{[u]:tt,centerOffset:O-tt-I,...H&&{alignmentOffset:I}},reset:H}}}),Ke=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:a,platform:l,elements:h}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=st(e,t);if((i=s.arrow)!=null&&i.alignmentOffset)return{};const g=X(o),y=Q(a),w=X(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(h.floating)),b=f||(w||!m?[bt(a)]:We(a)),L=p!=="none";!f&&L&&b.push(...He(a,m,p,E));const C=[a,...b],$=await Ht(t,v),N=[];let S=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&N.push($[g]),d){const O=Me(o,r,E);N.push($[O[0]],$[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 H=(_=S.filter(I=>I.overflows[0]<=0).sort((I,K)=>I.overflows[1]-K.overflows[1])[0])==null?void 0:_.placement;if(!H)switch(u){case"bestFit":{var U;const I=(U=S.filter(K=>{if(L){const j=Q(K.placement);return j===y||j==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(j=>j>0).reduce((j,xe)=>j+xe,0)]).sort((K,j)=>K[1]-j[1])[0])==null?void 0:U[0];I&&(H=I);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};async function je(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=X(i),a=rt(i),l=Q(i)==="y",h=["left","top"].includes(r)?-1:1,c=s&&l?-1:1,d=st(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 a&&typeof p=="number"&&(u=a==="end"?p*-1:p),l?{x:u*c,y:f*h}:{x:f*h,y:u*c}}const Ye=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:a}=t,l=await je(t,e);return r===((i=a.offset)==null?void 0:i.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},Ge=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:a={fn:v=>{let{x:g,y}=v;return{x:g,y}}},...l}=st(e,t),h={x:i,y:n},c=await Ht(t,l),d=Q(X(o)),f=se(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=Ft(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=Ft(y,p,w)}const m=a.fn({...t,[f]:u,[d]:p});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[f]:s,[d]:r}}}}}},Xe=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:a}=t,{apply:l=()=>{},...h}=st(e,t),c=await Ht(t,h),d=X(o),f=rt(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(a.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,E=G(m-c[v],y),b=G(p-c[g],w),L=!t.middlewareData.shift;let C=E,$=b;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&($=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?$=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 l({...t,availableWidth:$,availableHeight:C});const N=await r.getDimensions(a.floating);return p!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Ot(){return typeof window<"u"}function at(e){return ae(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=(ae(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ae(e){return Ot()?e instanceof Node||e instanceof D(e).Node:!1}function k(e){return Ot()?e instanceof Element||e instanceof D(e).Element:!1}function M(e){return Ot()?e instanceof HTMLElement||e instanceof D(e).HTMLElement:!1}function Zt(e){return!Ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof D(e).ShadowRoot}function ut(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 Je(e){return["table","td","th"].includes(at(e))}function Tt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Bt(e){const t=Vt(),i=k(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 Qe(e){let t=J(e);for(;M(t)&&!nt(t);){if(Bt(t))return t;if(Tt(t))return null;t=J(t)}return null}function Vt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(e){return["html","body","#document"].includes(at(e))}function z(e){return D(e).getComputedStyle(e)}function At(e){return k(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(at(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zt(e)&&e.host||W(e);return Zt(t)?t.host:t}function le(e){const t=J(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&ut(t)?t:le(t)}function ct(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=le(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=D(o);if(s){const a=zt(r);return t.concat(r,r.visualViewport||[],ut(o)?o:[],a&&i?ct(a):[])}return t.concat(o,ct(o,[],i))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ce(e){const t=z(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=M(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,a=wt(i)!==s||wt(n)!==r;return a&&(i=s,n=r),{width:i,height:n,$:a}}function Ut(e){return k(e)?e:e.contextElement}function et(e){const t=Ut(e);if(!M(t))return q(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=ce(t);let r=(s?wt(i.width):i.width)/n,a=(s?wt(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ze=q(0);function he(e){const t=D(e);return!Vt()||!t.visualViewport?Ze:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ti(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=Ut(e);let r=q(1);t&&(n?k(n)&&(r=et(n)):r=et(e));const a=ti(s,i,n)?he(s):q(0);let l=(o.left+a.x)/r.x,h=(o.top+a.y)/r.y,c=o.width/r.x,d=o.height/r.y;if(s){const f=D(s),u=n&&k(n)?D(n):n;let p=f,m=zt(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,E=g.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,h*=v.y,c*=v.x,d*=v.y,l+=w,h+=E,p=D(m),m=zt(p)}}return Et({width:c,height:d,x:l,y:h})}function Kt(e,t){const i=At(e).scrollLeft;return t?t.left+i:Z(W(e)).left+i}function de(e,t,i){i===void 0&&(i=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(i?0:Kt(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function ei(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=W(n),a=t?Tt(t.floating):!1;if(n===r||a&&s)return i;let l={scrollLeft:0,scrollTop:0},h=q(1);const c=q(0),d=M(n);if((d||!d&&!s)&&((at(n)!=="body"||ut(r))&&(l=At(n)),M(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?de(r,l,!0):q(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-l.scrollLeft*h.x+c.x+f.x,y:i.y*h.y-l.scrollTop*h.y+c.y+f.y}}function ii(e){return Array.from(e.getClientRects())}function ni(e){const t=W(e),i=At(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+Kt(e);const a=-i.scrollTop;return z(n).direction==="rtl"&&(r+=A(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:a}}function oi(e,t){const i=D(e),n=W(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;const h=Vt();(!h||h&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a,y:l}}function si(e,t){const i=Z(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=M(e)?et(e):q(1),r=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,h=n*s.y;return{width:r,height:a,x:l,y:h}}function te(e,t,i){let n;if(t==="viewport")n=oi(e,i);else if(t==="document")n=ni(W(e));else if(k(t))n=si(t,i);else{const o=he(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Et(n)}function ue(e,t){const i=J(e);return i===t||!k(i)||nt(i)?!1:z(i).position==="fixed"||ue(i,t)}function ri(e,t){const i=t.get(e);if(i)return i;let n=ct(e,[],!1).filter(a=>k(a)&&at(a)!=="body"),o=null;const s=z(e).position==="fixed";let r=s?J(e):e;for(;k(r)&&!nt(r);){const a=z(r),l=Bt(r);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ut(r)&&!l&&ue(e,r))?n=n.filter(c=>c!==r):o=a,r=J(r)}return t.set(e,n),n}function ai(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const r=[...i==="clippingAncestors"?Tt(t)?[]:ri(t,this._c):[].concat(i),n],a=r[0],l=r.reduce((h,c)=>{const d=te(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},te(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function li(e){const{width:t,height:i}=ce(e);return{width:t,height:i}}function ci(e,t,i){const n=M(t),o=W(t),s=i==="fixed",r=Z(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=q(0);if(n||!n&&!s)if((at(t)!=="body"||ut(o))&&(a=At(t)),n){const f=Z(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Kt(o));const h=o&&!n&&!s?de(o,a):q(0),c=r.left+a.scrollLeft-l.x-h.x,d=r.top+a.scrollTop-l.y-h.y;return{x:c,y:d,width:r.width,height:r.height}}function Lt(e){return z(e).position==="static"}function ee(e,t){if(!M(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 pe(e,t){const i=D(e);if(Tt(e))return i;if(!M(e)){let o=J(e);for(;o&&!nt(o);){if(k(o)&&!Lt(o))return o;o=J(o)}return i}let n=ee(e,t);for(;n&&Je(n)&&Lt(n);)n=ee(n,t);return n&&nt(n)&&Lt(n)&&!Bt(n)?i:n||Qe(e)||i}const hi=async function(e){const t=this.getOffsetParent||pe,i=this.getDimensions,n=await i(e.floating);return{reference:ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function di(e){return z(e).direction==="rtl"}const ui={convertOffsetParentRelativeRectToViewportRelativeRect:ei,getDocumentElement:W,getClippingRect:ai,getOffsetParent:pe,getElementRects:hi,getClientRects:ii,getDimensions:li,getScale:et,isElement:k,isRTL:di};function fe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pi(e,t){let i=null,n;const o=W(e);function s(){var a;clearTimeout(n),(a=i)==null||a.disconnect(),i=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const h=e.getBoundingClientRect(),{left:c,top:d,width:f,height:u}=h;if(a||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,l))||1};let E=!0;function b(L){const C=L[0].intersectionRatio;if(C!==l){if(!E)return r();C?r(!1,C):n=setTimeout(()=>{r(!1,1e-7)},1e3)}C===1&&!fe(h,e.getBoundingClientRect())&&r(),E=!1}try{i=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{i=new IntersectionObserver(b,w)}i.observe(e)}return r(!0),s}function ie(e,t,i,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,h=Ut(e),c=o||s?[...h?ct(h):[],...ct(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",i,{passive:!0}),s&&g.addEventListener("resize",i)});const d=h&&a?pi(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&&!l&&u.observe(h),u.observe(t));let p,m=l?Z(e):null;l&&v();function v(){const g=Z(e);m&&!fe(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,l&&cancelAnimationFrame(p)}}const fi=Ye,mi=Ge,ne=Ke,gi=Xe,vi=Ue,yi=(e,t,i)=>{const n=new Map,o={platform:ui,...i},s={...o.platform,_c:n};return Ve(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,wi=100,bi=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],Ei=Symbol("placement updated");class me{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=ie(i.trigger,t,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),o=ie(i.trigger,t,this.updatePlacement,{ancestorScroll:!1});this.cleanup=()=>{var s;(s=this.host.elements)==null||s.forEach(r=>{r.addEventListener("luzmo-closed",()=>{const a=this.originalPlacements.get(r);a&&r.setAttribute("placement",a),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?ne():ne({padding:mt,fallbackPlacements:bi(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,a=[fi({mainAxis:o,crossAxis:s}),mi({padding:mt}),n,gi({padding:mt,apply:({availableWidth:p,availableHeight:m,rects:{floating:v}})=>{const g=Math.max(wi,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?[vi({element:r,padding:t.tipPadding||mt})]:[]],{x:l,y:h,placement:c,middlewareData:d}=await yi(t.trigger,i,{placement:t.placement,middleware:a,strategy:"fixed"});if(Object.assign(i.style,{top:"0px",left:"0px",translate:`${ft(l)}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 ot=(e=>(e.click="click",e.hover="hover",e.longpress="longpress",e))(ot||{});const xt=Symbol("lastInteractionType"),gt="remove-focus-ring-safari-hack";class Rt{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,this.target[xt]=this.type;return}t&&(customElements.whenDefined("luzmo-overlay").then(async()=>{const{LuzmoOverlay:i}=await Promise.resolve().then(()=>Ct);this.overlay=new i,this.overlay.open=!0,this.target[xt]=this.type}),Promise.resolve().then(()=>Ct))}}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 ge extends Rt{constructor(){super(...arguments),this.type=ot.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 xi=300;class ve extends Rt{constructor(){super(...arguments),this.type=ot.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleKeyup(t){(t.code==="Tab"||t.code==="Escape")&&(this.open=!0,this.removeSafariFocusRingClass())}handleTargetFocusin(){if(this.target.matches(":focus-visible")){if(yt.isWebKit()&&this.target[xt]===ot.click){this.target.classList.add(gt);return}this.open=!0,this.focusedin=!0,this.removeSafariFocusRingClass()}}handleTargetFocusout(){this.removeSafariFocusRingClass(),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=St.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-${Nt.randomID()}`),o.id));this.elementIds=t;const n=St.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},xi))}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("keyup",n=>this.handleKeyup(n),{signal:t}),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})}removeSafariFocusRingClass(){yt.isWebKit()&&this.target.classList.contains(gt)&&this.target.classList.remove(gt)}}const Ci=300,ye={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 we extends Rt{constructor(){super(...arguments),this.type=ot.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"}}))},Ci))}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-${Nt.randomID()}`;const n=yt.isIOS()||yt.isAndroid()?"touch":"keyboard";i.textContent=ye[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=St.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 be={click:ge,longpress:we,hover:ve};var Pi=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,T=(e,t,i,n)=>{for(var o=n>1?void 0:n?Oi(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&&Pi(t,i,o),o};const Ti="showPopover"in document.createElement("div");let vt=Le(it);vt=Ti?ke(vt):Se(vt);var B;const P=(B=class extends vt{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 dt)}get placementController(){return this._placementController||(this._placementController=new me(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 Yt.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)||(this.triggerInteraction==="longpress"&&await R(),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 a=o.assignedSlot||o.parentElement||((r=o.getRootNode())==null?void 0:r.host);a&&n.push(a),o=a}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?(Jt.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(),Jt.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 be[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 Gt.SlottableRequestEvent("overlay-content",this.open?{}:Gt.removeSlottableRequest)),this.lastRequestSlottableState=this.open)}willUpdate(t){var n;if(this.hasAttribute("id")||this.setAttribute("id",`${this.tagName.toLowerCase()}-${Nt.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(Yt.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 x.x` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":B.openCount.toString()}}renderDialog(){return x.x`
|
|
19
|
+
<dialog
|
|
20
|
+
class="dialog"
|
|
21
|
+
part="dialog"
|
|
22
|
+
placement=${Dt.o(this.requiresPositioning?this.placement||"right":void 0)}
|
|
23
|
+
style=${jt.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 x.x`
|
|
32
|
+
<div
|
|
33
|
+
class="dialog"
|
|
34
|
+
part="dialog"
|
|
35
|
+
placement=${Dt.o(this.requiresPositioning?this.placement||"right":void 0)}
|
|
36
|
+
popover=${Dt.o(this.popoverValue)}
|
|
37
|
+
style=${jt.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 x.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=[x.r(_e)],B.openCount=1,B);T([x.n({type:Boolean})],P.prototype,"delayed",1);T([oe.e(".dialog")],P.prototype,"dialogEl",2);T([x.n({type:Boolean})],P.prototype,"disabled",1);T([Pe.o({flatten:!0,selector:':not([slot="longpress-describedby-descriptor"], slot)'})],P.prototype,"elements",2);T([x.n({type:Number})],P.prototype,"offset",2);T([x.n({type:Boolean,reflect:!0})],P.prototype,"open",1);T([x.n()],P.prototype,"placement",2);T([x.n({attribute:"receives-focus"})],P.prototype,"receivesFocus",2);T([oe.e("slot")],P.prototype,"slotEl",2);T([Ce.r()],P.prototype,"state",1);T([x.n({type:Number,attribute:"tip-padding"})],P.prototype,"tipPadding",2);T([x.n()],P.prototype,"trigger",2);T([x.n({attribute:!1})],P.prototype,"triggerElement",2);T([x.n({attribute:!1})],P.prototype,"triggerInteraction",2);T([x.n()],P.prototype,"type",2);let Ee=P;const Ct=Object.freeze(Object.defineProperty({__proto__:null,LuzmoOverlay:Ee},Symbol.toStringTag,{value:"Module"}));exports.ClickController=ge;exports.HoverController=ve;exports.InteractionController=Rt;exports.InteractionTypes=ot;exports.LONGPRESS_INSTRUCTIONS=ye;exports.LongpressController=we;exports.LuzmoAbstractOverlay=it;exports.LuzmoOverlay=Ee;exports.PlacementController=me;exports.SAFARI_FOCUS_RING_CLASS=gt;exports.VirtualTrigger=dt;exports.guaranteedAllTransitionend=Pt;exports.lastInteractionType=xt;exports.nextFrame=R;exports.noop=Y;exports.overlay=Ct;exports.overlayTimer=lt;exports.placementUpdatedSymbol=Ei;exports.strategies=be;
|
|
@@ -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-xIphqE6d.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-BfBP7XJN.js";
|
|
19
|
+
import { D as c, L as z } from "../picker-BfBP7XJN.js";
|
|
20
20
|
const l = () => {
|
|
21
21
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
22
22
|
const o = document.createElement("style");
|
|
@@ -26,7 +26,7 @@ import { D as x } from "./dependency-manger-CEXvGQUV.js";
|
|
|
26
26
|
import { M as I, I as $, s as k } from "./strategies-9indNIEb.js";
|
|
27
27
|
import { P as S } from "./pending-state-DTX7ggyF.js";
|
|
28
28
|
import { S as M } from "./sized-mixin-D4ACoVUr.js";
|
|
29
|
-
import {
|
|
29
|
+
import { y as b, T as C, $ as q } from "./luzmo-icons-4nDFv1Lq.js";
|
|
30
30
|
import "./menu/index.js";
|
|
31
31
|
import "./overlay/index.js";
|
|
32
32
|
import "./progress-circle/index.js";
|
|
@@ -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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-CBCg3yyw.cjs"),d=require("../sized-mixin-CPxE5C96.cjs"),l=require("../luzmo-icons-D47EGj-3.cjs"),b=require("../class-map-Di1D_rCm.cjs"),s=require("../observe-slot-presence-bc9chhsi.cjs"),p=require("../button-base-XgPLmwP-.cjs");require("../icon/index.cjs");const k="@media (hover: hover){.root:hover{--picker-button-background-color: var( --luzmo-picker-button-background-color-hover, var(--picker-button-background-color-hover) );--picker-button-font-color: var( --luzmo-picker-button-font-color-hover, var(--picker-button-font-color-hover) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-hover, var(--picker-button-icon-color-hover) )}}:host([open]) .root,:host(:is(:active,[active])) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-down, var(--picker-button-background-color-down) );--picker-button-font-color: var( --luzmo-picker-button-font-color-down, var(--picker-button-font-color-down) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-down, var(--picker-button-icon-color-down) )}:host([focused]) .root,.root:focus,.root:focus-visible{--picker-button-background-color: var( --luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus) );--picker-button-font-color: var( --luzmo-picker-button-font-color-key-focus, var(--picker-button-font-color-key-focus) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-key-focus, var(--picker-button-icon-color-key-focus) )}:host([disabled]) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-disabled, var(--luzmo-background-color-disabled) );--picker-button-border-color: var( --luzmo-picker-button-border-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-font-color: var( --luzmo-picker-button-font-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-hover: var( --luzmo-picker-button-font-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-down: var( --luzmo-picker-button-font-color-down-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-hover: var( --luzmo-picker-button-icon-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-down: var( --luzmo-picker-button-icon-color-down-disabled, var(--luzmo-font-color-disabled) )}:host([quiet]) .root{--luzmo-picker-button-background-color: var( --luzmo-picker-button-background-color-quiet, transparent );--luzmo-picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-quiet, transparent );--luzmo-picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-quiet, transparent );--luzmo-picker-button-background-color-key-focus: var( --luzmo-picker-button-background-color-key-focus-quiet, transparent );--luzmo-picker-button-border-color: var( --luzmo-picker-button-border-color-quiet, transparent )}.root{background-color:initial;block-size:var(--luzmo-picker-button-width, var(--picker-button-width));box-sizing:border-box;padding:var(--luzmo-picker-button-padding, var(--picker-button-padding));border-style:none;justify-content:center;align-items:center;display:flex}.root.uiicononly{inline-size:var(--luzmo-picker-button-height, var(--picker-button-height))}.luzmo-picker-button-label{color:var(--luzmo-picker-button-font-color, var(--picker-button-font-color));white-space:nowrap;font-family:var(--luzmo-picker-button-font-family, var(--picker-button-font-family));font-style:var(--luzmo-picker-button-font-style, var(--picker-button-font-style));font-weight:var(--luzmo-picker-button-font-weight, var(--picker-button-font-weight));font-size:var(--luzmo-picker-button-font-size, var(--picker-button-font-size));flex:auto;padding-block-start:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));padding-block-end:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));overflow:hidden}.uiicononly .luzmo-picker-button-label{display:none}:host(:focus-visible) .luzmo-picker-button-fill{border-color:var(--luzmo-picker-button-indicator-color, var(--picker-button-indicator-color));background-color:var(--luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus))}.luzmo-picker-button-fill{box-sizing:border-box;block-size:100%;inline-size:100%;justify-content:center;align-items:center;gap:var(--luzmo-picker-button-gap, var(--picker-button-gap));background-color:var(--luzmo-picker-button-background-color, var(--picker-button-background-color));border-color:var(--luzmo-picker-button-border-color, var(--picker-button-border-color));border-width:var(--luzmo-picker-button-border-width, var(--picker-button-border-width));padding:var(--luzmo-picker-button-horizontal-padding, var(--picker-button-horizontal-padding));transition:border-color var(--luzmo-picker-button-background-animation-duration, var(--picker-button-background-animation-duration)) ease-in-out;border-style:solid;border-start-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-start-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));display:flex}:host([position=right]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=right][rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([position=left]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=left][rounded]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded))}.uiicononly .luzmo-picker-button-fill{padding:0}.textuiicon .luzmo-picker-button-fill{inline-size:auto}.luzmo-picker-button-icon{color:var(--luzmo-picker-button-icon-color, var(--picker-button-icon-color));flex-shrink:0}.root{--picker-button-height: var(--luzmo-component-height);--picker-button-width: var(--luzmo-component-height);--picker-button-gap: calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--picker-button-label-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--picker-button-horizontal-padding: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-button-indicator-color: var(--luzmo-indicator-color);--picker-button-icon-color: var(--luzmo-font-color);--picker-button-icon-color-hover: var(--luzmo-font-color-hover);--picker-button-icon-color-down: var(--luzmo-font-color-down);--picker-button-icon-color-key-focus: var(--luzmo-font-color-focus);--picker-button-font-color: var(--luzmo-font-color);--picker-button-font-color-hover: var(--luzmo-font-color-hover);--picker-button-font-color-down: var(--luzmo-font-color-down);--picker-button-font-color-key-focus: var(--neutral-content-color-focus);--picker-button-font-family: var(--luzmo-font-family);--picker-button-font-style: var(--luzmo-font-style);--picker-button-font-weight: var(--body-sans-serif-font-weight);--picker-button-font-size: var(--luzmo-font-size);--picker-button-border-radius-rounded: var(--luzmo-border-radius);--picker-button-background-animation-duration: var( --luzmo-animation-duration )}.root{--picker-button-background-color: var(--luzmo-background-color);--picker-button-background-color-hover: var(--luzmo-background-color-hover);--picker-button-background-color-down: var(--luzmo-background-color-down);--picker-button-background-color-key-focus: var( --luzmo-background-color-focus );--picker-button-border-color: var(--luzmo-border-color);--picker-button-border-radius: var(--luzmo-border-radius);--picker-button-border-radius-rounded-sided: var(--luzmo-border-radius);--picker-button-border-radius-sided: 0;--picker-button-border-width: var(--luzmo-border-width)}:host([size=s]) .root{--picker-button-height: var(--luzmo-component-height-s);--picker-button-width: var(--luzmo-component-height-s);--picker-button-label-padding: var(--luzmo-spacing-2);--picker-button-font-size: var(--luzmo-font-size-s);--picker-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=l]) .root{--picker-button-height: var(--luzmo-component-height-l);--picker-button-width: var(--luzmo-component-height-l);--picker-button-label-padding: var(--luzmo-spacing-3);--picker-button-font-size: var(--luzmo-font-size-l);--picker-button-horizontal-padding: var(--luzmo-spacing-4)}:host([size=xl]) .root{--picker-button-height: var(--luzmo-component-height-xl);--picker-button-width: var(--luzmo-component-height-xl);--picker-button-label-padding: var(--luzmo-spacing-4);--picker-button-font-size: var(--luzmo-font-size-xl);--picker-button-horizontal-padding: var(--luzmo-spacing-5)}:host{display:inline-flex}.root{display:flex}";var v=Object.defineProperty,a=(n,r,u,z)=>{for(var o=void 0,i=n.length-1,c;i>=0;i--)(c=n[i])&&(o=c(r,u,o)||o);return o&&v(r,u,o),o};class e extends d.SizedMixin(s.ObserveSlotPresence(p.LuzmoButtonBase,'[slot="label"]')){constructor(){super(...arguments),this.invalid=!1,this.position="right"}static get styles(){return[t.r(k)]}get hasText(){return this.slotContentIsPresent}render(){const r={root:!0,uiicononly:!this.hasText,textuiicon:this.hasText};return t.x`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-CBCg3yyw.cjs"),d=require("../sized-mixin-CPxE5C96.cjs"),l=require("../luzmo-icons-D4IvHgVd.cjs"),b=require("../class-map-Di1D_rCm.cjs"),s=require("../observe-slot-presence-bc9chhsi.cjs"),p=require("../button-base-XgPLmwP-.cjs");require("../icon/index.cjs");const k="@media (hover: hover){.root:hover{--picker-button-background-color: var( --luzmo-picker-button-background-color-hover, var(--picker-button-background-color-hover) );--picker-button-font-color: var( --luzmo-picker-button-font-color-hover, var(--picker-button-font-color-hover) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-hover, var(--picker-button-icon-color-hover) )}}:host([open]) .root,:host(:is(:active,[active])) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-down, var(--picker-button-background-color-down) );--picker-button-font-color: var( --luzmo-picker-button-font-color-down, var(--picker-button-font-color-down) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-down, var(--picker-button-icon-color-down) )}:host([focused]) .root,.root:focus,.root:focus-visible{--picker-button-background-color: var( --luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus) );--picker-button-font-color: var( --luzmo-picker-button-font-color-key-focus, var(--picker-button-font-color-key-focus) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-key-focus, var(--picker-button-icon-color-key-focus) )}:host([disabled]) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-disabled, var(--luzmo-background-color-disabled) );--picker-button-border-color: var( --luzmo-picker-button-border-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-font-color: var( --luzmo-picker-button-font-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-hover: var( --luzmo-picker-button-font-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-down: var( --luzmo-picker-button-font-color-down-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-hover: var( --luzmo-picker-button-icon-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-down: var( --luzmo-picker-button-icon-color-down-disabled, var(--luzmo-font-color-disabled) )}:host([quiet]) .root{--luzmo-picker-button-background-color: var( --luzmo-picker-button-background-color-quiet, transparent );--luzmo-picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-quiet, transparent );--luzmo-picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-quiet, transparent );--luzmo-picker-button-background-color-key-focus: var( --luzmo-picker-button-background-color-key-focus-quiet, transparent );--luzmo-picker-button-border-color: var( --luzmo-picker-button-border-color-quiet, transparent )}.root{background-color:initial;block-size:var(--luzmo-picker-button-width, var(--picker-button-width));box-sizing:border-box;padding:var(--luzmo-picker-button-padding, var(--picker-button-padding));border-style:none;justify-content:center;align-items:center;display:flex}.root.uiicononly{inline-size:var(--luzmo-picker-button-height, var(--picker-button-height))}.luzmo-picker-button-label{color:var(--luzmo-picker-button-font-color, var(--picker-button-font-color));white-space:nowrap;font-family:var(--luzmo-picker-button-font-family, var(--picker-button-font-family));font-style:var(--luzmo-picker-button-font-style, var(--picker-button-font-style));font-weight:var(--luzmo-picker-button-font-weight, var(--picker-button-font-weight));font-size:var(--luzmo-picker-button-font-size, var(--picker-button-font-size));flex:auto;padding-block-start:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));padding-block-end:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));overflow:hidden}.uiicononly .luzmo-picker-button-label{display:none}:host(:focus-visible) .luzmo-picker-button-fill{border-color:var(--luzmo-picker-button-indicator-color, var(--picker-button-indicator-color));background-color:var(--luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus))}.luzmo-picker-button-fill{box-sizing:border-box;block-size:100%;inline-size:100%;justify-content:center;align-items:center;gap:var(--luzmo-picker-button-gap, var(--picker-button-gap));background-color:var(--luzmo-picker-button-background-color, var(--picker-button-background-color));border-color:var(--luzmo-picker-button-border-color, var(--picker-button-border-color));border-width:var(--luzmo-picker-button-border-width, var(--picker-button-border-width));padding:var(--luzmo-picker-button-horizontal-padding, var(--picker-button-horizontal-padding));transition:border-color var(--luzmo-picker-button-background-animation-duration, var(--picker-button-background-animation-duration)) ease-in-out;border-style:solid;border-start-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-start-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));display:flex}:host([position=right]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=right][rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([position=left]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=left][rounded]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded))}.uiicononly .luzmo-picker-button-fill{padding:0}.textuiicon .luzmo-picker-button-fill{inline-size:auto}.luzmo-picker-button-icon{color:var(--luzmo-picker-button-icon-color, var(--picker-button-icon-color));flex-shrink:0}.root{--picker-button-height: var(--luzmo-component-height);--picker-button-width: var(--luzmo-component-height);--picker-button-gap: calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--picker-button-label-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--picker-button-horizontal-padding: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-button-indicator-color: var(--luzmo-indicator-color);--picker-button-icon-color: var(--luzmo-font-color);--picker-button-icon-color-hover: var(--luzmo-font-color-hover);--picker-button-icon-color-down: var(--luzmo-font-color-down);--picker-button-icon-color-key-focus: var(--luzmo-font-color-focus);--picker-button-font-color: var(--luzmo-font-color);--picker-button-font-color-hover: var(--luzmo-font-color-hover);--picker-button-font-color-down: var(--luzmo-font-color-down);--picker-button-font-color-key-focus: var(--neutral-content-color-focus);--picker-button-font-family: var(--luzmo-font-family);--picker-button-font-style: var(--luzmo-font-style);--picker-button-font-weight: var(--body-sans-serif-font-weight);--picker-button-font-size: var(--luzmo-font-size);--picker-button-border-radius-rounded: var(--luzmo-border-radius);--picker-button-background-animation-duration: var( --luzmo-animation-duration )}.root{--picker-button-background-color: var(--luzmo-background-color);--picker-button-background-color-hover: var(--luzmo-background-color-hover);--picker-button-background-color-down: var(--luzmo-background-color-down);--picker-button-background-color-key-focus: var( --luzmo-background-color-focus );--picker-button-border-color: var(--luzmo-border-color);--picker-button-border-radius: var(--luzmo-border-radius);--picker-button-border-radius-rounded-sided: var(--luzmo-border-radius);--picker-button-border-radius-sided: 0;--picker-button-border-width: var(--luzmo-border-width)}:host([size=s]) .root{--picker-button-height: var(--luzmo-component-height-s);--picker-button-width: var(--luzmo-component-height-s);--picker-button-label-padding: var(--luzmo-spacing-2);--picker-button-font-size: var(--luzmo-font-size-s);--picker-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=l]) .root{--picker-button-height: var(--luzmo-component-height-l);--picker-button-width: var(--luzmo-component-height-l);--picker-button-label-padding: var(--luzmo-spacing-3);--picker-button-font-size: var(--luzmo-font-size-l);--picker-button-horizontal-padding: var(--luzmo-spacing-4)}:host([size=xl]) .root{--picker-button-height: var(--luzmo-component-height-xl);--picker-button-width: var(--luzmo-component-height-xl);--picker-button-label-padding: var(--luzmo-spacing-4);--picker-button-font-size: var(--luzmo-font-size-xl);--picker-button-horizontal-padding: var(--luzmo-spacing-5)}:host{display:inline-flex}.root{display:flex}";var v=Object.defineProperty,a=(n,r,u,z)=>{for(var o=void 0,i=n.length-1,c;i>=0;i--)(c=n[i])&&(o=c(r,u,o)||o);return o&&v(r,u,o),o};class e extends d.SizedMixin(s.ObserveSlotPresence(p.LuzmoButtonBase,'[slot="label"]')){constructor(){super(...arguments),this.invalid=!1,this.position="right"}static get styles(){return[t.r(k)]}get hasText(){return this.slotContentIsPresent}render(){const r={root:!0,uiicononly:!this.hasText,textuiicon:this.hasText};return t.x`
|
|
19
19
|
<div class=${b.e(r)}>
|
|
20
20
|
<div class="luzmo-picker-button-fill">
|
|
21
21
|
<span
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import { r as d, x as b, n as l } from "../base-WsynuqaS.js";
|
|
19
19
|
import { S as s } from "../sized-mixin-D4ACoVUr.js";
|
|
20
|
-
import { T as p } from "../luzmo-icons-
|
|
20
|
+
import { T as p } from "../luzmo-icons-4nDFv1Lq.js";
|
|
21
21
|
import { e as m } from "../class-map-NbVXqBU0.js";
|
|
22
22
|
import { O as z } from "../observe-slot-presence-CmVi0zTc.js";
|
|
23
23
|
import { L as k } from "../button-base-DbkDzb71.js";
|