@solid-design-system/components 6.24.1 → 6.24.2
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/cdn/chunks/{chunk.AX6E7G7K.js → chunk.GNQ2AH6R.js} +2 -2
- package/cdn/chunks/chunk.MXPGGLKX.js +2 -0
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +3 -3
- package/cdn/solid-components.iife.js +3 -3
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2FRV4JI3.js +1 -1
- package/cdn-versioned/chunks/chunk.2TCDQYYC.js +2 -2
- package/cdn-versioned/chunks/chunk.32WSNOK5.js +2 -2
- package/cdn-versioned/chunks/chunk.36LY3DX3.js +2 -2
- package/cdn-versioned/chunks/chunk.3FXWTJNG.js +2 -2
- package/cdn-versioned/chunks/chunk.3HJR4W7S.js +2 -2
- package/cdn-versioned/chunks/chunk.3NV5EFHF.js +9 -9
- package/cdn-versioned/chunks/chunk.4PBTCGFX.js +2 -2
- package/cdn-versioned/chunks/chunk.4TEHVEJ5.js +2 -2
- package/cdn-versioned/chunks/chunk.5B4C742P.js +2 -2
- package/cdn-versioned/chunks/chunk.5D2QLOPO.js +2 -2
- package/cdn-versioned/chunks/chunk.5LQXIFL5.js +1 -1
- package/cdn-versioned/chunks/chunk.6ZVU7R22.js +2 -2
- package/cdn-versioned/chunks/chunk.7EYPTWOC.js +2 -2
- package/cdn-versioned/chunks/chunk.A3QRJ5ME.js +2 -2
- package/cdn-versioned/chunks/chunk.BJGMSYKC.js +1 -1
- package/cdn-versioned/chunks/chunk.BMOWDQOV.js +2 -2
- package/cdn-versioned/chunks/chunk.BS3GML7W.js +3 -3
- package/cdn-versioned/chunks/chunk.CIRCXXWS.js +2 -2
- package/cdn-versioned/chunks/chunk.CPEHJK3R.js +1 -1
- package/cdn-versioned/chunks/chunk.D4KX4Q6E.js +2 -2
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.E3RBLJOD.js +2 -2
- package/cdn-versioned/chunks/chunk.EDVI5WKO.js +3 -3
- package/cdn-versioned/chunks/chunk.FK2QE2LJ.js +2 -2
- package/cdn-versioned/chunks/chunk.GCCUJ5RI.js +3 -3
- package/cdn-versioned/chunks/chunk.GICLEIQR.js +1 -1
- package/cdn-versioned/chunks/{chunk.AX6E7G7K.js → chunk.GNQ2AH6R.js} +5 -5
- package/cdn-versioned/chunks/chunk.GWINLIF6.js +2 -2
- package/cdn-versioned/chunks/chunk.HA4FSESN.js +2 -2
- package/cdn-versioned/chunks/chunk.ISEX6JDK.js +2 -2
- package/cdn-versioned/chunks/chunk.IXCKRXZP.js +2 -2
- package/cdn-versioned/chunks/chunk.KJ4O2AAU.js +2 -2
- package/cdn-versioned/chunks/chunk.KQBMEX4Q.js +2 -2
- package/cdn-versioned/chunks/chunk.L7DV2MLH.js +1 -1
- package/cdn-versioned/chunks/chunk.LVX7YSFZ.js +2 -2
- package/cdn-versioned/chunks/chunk.LWNOAXVZ.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.MXPGGLKX.js +2 -0
- package/cdn-versioned/chunks/chunk.NXUXZCC5.js +1 -1
- package/cdn-versioned/chunks/chunk.OFQAFMQN.js +2 -2
- package/cdn-versioned/chunks/chunk.OJN4DDNN.js +2 -2
- package/cdn-versioned/chunks/chunk.OW556SXG.js +2 -2
- package/cdn-versioned/chunks/chunk.P4GZNPGK.js +1 -1
- package/cdn-versioned/chunks/chunk.PQIUYCLY.js +2 -2
- package/cdn-versioned/chunks/chunk.PZSKPF3M.js +2 -2
- package/cdn-versioned/chunks/chunk.R3CFPFL7.js +2 -2
- package/cdn-versioned/chunks/chunk.RJ7RNCAD.js +2 -2
- package/cdn-versioned/chunks/chunk.SK3BEBJX.js +2 -2
- package/cdn-versioned/chunks/chunk.SW3IDYJO.js +1 -1
- package/cdn-versioned/chunks/chunk.TNHTS2QZ.js +2 -2
- package/cdn-versioned/chunks/chunk.TQXBNN2G.js +2 -2
- package/cdn-versioned/chunks/chunk.TTYJJ4T5.js +2 -2
- package/cdn-versioned/chunks/chunk.TYVGKCJX.js +2 -2
- package/cdn-versioned/chunks/chunk.U2Q5EORY.js +2 -2
- package/cdn-versioned/chunks/chunk.VMZSSKC5.js +1 -1
- package/cdn-versioned/chunks/chunk.VSRBSS6K.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WB2ATZAO.js +5 -5
- package/cdn-versioned/chunks/chunk.XND4CVBN.js +2 -2
- package/cdn-versioned/chunks/chunk.XQ2AM7JO.js +2 -2
- package/cdn-versioned/chunks/chunk.YDZ7FOAV.js +2 -2
- package/cdn-versioned/chunks/chunk.YGYXL3BZ.js +2 -2
- package/cdn-versioned/chunks/chunk.ZC3U3HHB.js +2 -2
- package/cdn-versioned/chunks/chunk.ZFTFC2P4.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +253 -253
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +81 -81
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +81 -81
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +109 -109
- package/cdn-versioned/web-types.json +165 -165
- package/dist/chunks/{chunk.X4BIP2Y2.js → chunk.GUWNLJ7W.js} +6 -2
- package/dist/chunks/{chunk.KTT6XPZB.js → chunk.JHHNBCX5.js} +7 -5
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/navigation-item/navigation-item.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +2 -2
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.2KU6UVWZ.js +2 -2
- package/dist-versioned/chunks/chunk.2N4PQ34O.js +11 -11
- package/dist-versioned/chunks/chunk.4F4N3QQ6.js +4 -4
- package/dist-versioned/chunks/chunk.4QZT4Y6W.js +3 -3
- package/dist-versioned/chunks/chunk.4SNDWIKF.js +2 -2
- package/dist-versioned/chunks/chunk.5XP6OIKT.js +3 -3
- package/dist-versioned/chunks/chunk.6DDIBH76.js +14 -14
- package/dist-versioned/chunks/chunk.6MMNEOUE.js +2 -2
- package/dist-versioned/chunks/chunk.6V7SKGRY.js +4 -4
- package/dist-versioned/chunks/chunk.AIG5N2FZ.js +1 -1
- package/dist-versioned/chunks/chunk.AXZSMHWW.js +4 -4
- package/dist-versioned/chunks/chunk.BCZIRWVM.js +3 -3
- package/dist-versioned/chunks/chunk.BIYQLL42.js +11 -11
- package/dist-versioned/chunks/chunk.BVWAKEFC.js +1 -1
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.CTVKYPFB.js +5 -5
- package/dist-versioned/chunks/chunk.D3CLWL6Z.js +13 -13
- package/dist-versioned/chunks/chunk.D6W4R7CF.js +12 -12
- package/dist-versioned/chunks/chunk.DDBIUIIK.js +6 -6
- package/dist-versioned/chunks/chunk.DGV5QTN6.js +5 -5
- package/dist-versioned/chunks/chunk.EAJ3CM6N.js +4 -4
- package/dist-versioned/chunks/chunk.EHIUARAT.js +2 -2
- package/dist-versioned/chunks/chunk.EIHPDMVS.js +5 -5
- package/dist-versioned/chunks/chunk.EYTDOBZ4.js +6 -6
- package/dist-versioned/chunks/chunk.FMLTJI4Z.js +7 -7
- package/dist-versioned/chunks/chunk.FWMPHWGG.js +10 -10
- package/dist-versioned/chunks/chunk.G5PJCSSV.js +7 -7
- package/dist-versioned/chunks/chunk.GAQZ5NES.js +5 -5
- package/dist-versioned/chunks/chunk.GQ4ENMDG.js +10 -10
- package/dist-versioned/chunks/chunk.GUTW4VQD.js +5 -5
- package/dist-versioned/chunks/{chunk.X4BIP2Y2.js → chunk.GUWNLJ7W.js} +31 -27
- package/dist-versioned/chunks/chunk.JHGRQU5N.js +6 -6
- package/dist-versioned/chunks/{chunk.KTT6XPZB.js → chunk.JHHNBCX5.js} +17 -15
- package/dist-versioned/chunks/chunk.JYUKVPUJ.js +1 -1
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KEUBCTKM.js +8 -8
- package/dist-versioned/chunks/chunk.KGQHJROJ.js +3 -3
- package/dist-versioned/chunks/chunk.LKDQ3TXG.js +2 -2
- package/dist-versioned/chunks/chunk.LMXGFI7F.js +11 -11
- package/dist-versioned/chunks/chunk.M52SSKFL.js +10 -10
- package/dist-versioned/chunks/chunk.MUOLK3RU.js +33 -33
- package/dist-versioned/chunks/chunk.N7WMSLKA.js +1 -1
- package/dist-versioned/chunks/chunk.NIKLDQ35.js +2 -2
- package/dist-versioned/chunks/chunk.NNMBBWIU.js +2 -2
- package/dist-versioned/chunks/chunk.OXCSSHRT.js +10 -10
- package/dist-versioned/chunks/chunk.P7RNSWL3.js +1 -1
- package/dist-versioned/chunks/chunk.QWPXBE3R.js +3 -3
- package/dist-versioned/chunks/chunk.R3ZRRK4P.js +4 -4
- package/dist-versioned/chunks/chunk.R6M52RPI.js +5 -5
- package/dist-versioned/chunks/chunk.RQN4WSFL.js +5 -5
- package/dist-versioned/chunks/chunk.RWGWOZ23.js +1 -1
- package/dist-versioned/chunks/chunk.SLLHUOTL.js +2 -2
- package/dist-versioned/chunks/chunk.SUQL6D3H.js +5 -5
- package/dist-versioned/chunks/chunk.TEHKQWUZ.js +6 -6
- package/dist-versioned/chunks/chunk.TEHS57B5.js +2 -2
- package/dist-versioned/chunks/chunk.TRG462TJ.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.WASJNAOH.js +25 -25
- package/dist-versioned/chunks/chunk.XFU4IJSC.js +5 -5
- package/dist-versioned/chunks/chunk.XRYVTNMS.js +3 -3
- package/dist-versioned/chunks/chunk.YEO5QKA7.js +2 -2
- package/dist-versioned/chunks/chunk.YNVPCLKL.js +5 -5
- package/dist-versioned/chunks/chunk.YSZ7WBON.js +1 -1
- package/dist-versioned/chunks/chunk.ZCOV36IT.js +2 -2
- package/dist-versioned/chunks/chunk.ZF4JCUFV.js +6 -6
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +253 -253
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +109 -109
- package/dist-versioned/web-types.json +165 -165
- package/package.json +1 -1
- package/cdn/chunks/chunk.7R76DQCY.js +0 -2
- package/cdn-versioned/chunks/chunk.7R76DQCY.js +0 -2
|
@@ -205,9 +205,9 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
205
205
|
base:tag__base,
|
|
206
206
|
content:tag__content,
|
|
207
207
|
removable-indicator:tag__removable-indicator,
|
|
208
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}async handleComboboxKeyDown(t){var e;if(t.key==="Tab"){if(this.displayInputValue="",this.displayInput.value="",this.open&&((e=this.shadowRoot)==null?void 0:e.activeElement)===this.displayInput){t.preventDefault(),this.open=!1,await this.updateComplete,this.displayInput.focus();return}return}this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleSearchClick(t){t.stopPropagation(),!(this.disabled||this.visuallyDisabled)&&this.emit("sd-search")}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-option"),o=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),o=e.indexOf(i),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),ae(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,o;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var b,w,g;let o=i.cloneNode(!0);if(o.current=o.value===((b=this.lastOption)==null?void 0:b.value),o.selected=i.selected,o.checkbox=i.checkbox,o.size=i.size,!(((w=i.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=i.parentElement,h=(g=l.querySelector('[slot="label"]'))==null?void 0:g.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),h&&(u==null||u.appendChild(h));return}let m=l.cloneNode();return m.appendChild(o),h&&m.appendChild(h),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await Z(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:o}=W(this,"combobox.show",{dir:this.localize.dir()});await Y(this.popup.popup,i,o),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await Z(this);let{keyframes:t,options:e}=W(this,"combobox.hide",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([J(this,"sd-after-show"),J(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,J(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return ko(Ls(this.defaultSlot)).flat()}getSlottedOptGroups(){return Co(Ls(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!i,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,h=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",g=this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],T={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],M=this.size==="lg"?this.floatingLabel?m?"py-3":"py-4":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",O={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${c("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${c(o&&"inline-block",o&&(this.visuallyDisabled||this.disabled)?"text-neutral-500":"form-control-color-text")}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200",h?O:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",m&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
208
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}async handleComboboxKeyDown(t){var e;if(t.key==="Tab"){if(this.displayInputValue="",this.displayInput.value="",this.open&&((e=this.shadowRoot)==null?void 0:e.activeElement)===this.displayInput){t.preventDefault(),this.open=!1,await this.updateComplete,this.displayInput.focus();return}return}this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleSearchClick(t){t.stopPropagation(),!(this.disabled||this.visuallyDisabled)&&this.emit("sd-search")}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-option"),o=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),o=e.indexOf(i),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),ae(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,o;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var b,w,g;let o=i.cloneNode(!0);if(o.current=o.value===((b=this.lastOption)==null?void 0:b.value),o.selected=i.selected,o.checkbox=i.checkbox,o.size=i.size,!(((w=i.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=i.parentElement,h=(g=l.querySelector('[slot="label"]'))==null?void 0:g.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),h&&(u==null||u.appendChild(h));return}let m=l.cloneNode();return m.appendChild(o),h&&m.appendChild(h),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await Z(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:o}=W(this,"combobox.show",{dir:this.localize.dir()});await Y(this.popup.popup,i,o),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await Z(this);let{keyframes:t,options:e}=W(this,"combobox.hide",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([J(this,"sd-after-show"),J(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,J(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return ko(Ls(this.defaultSlot)).flat()}getSlottedOptGroups(){return Co(Ls(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!i,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,h=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",g=this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],T={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],M=this.size==="lg"?this.floatingLabel?"py-3":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",O={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${c("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${c(o&&"inline-block",o&&(this.visuallyDisabled||this.disabled)?"text-neutral-500":"form-control-color-text")}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200",h?O:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",m&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
209
209
|
popup:popup__content,
|
|
210
|
-
"><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center form-control-border-radius transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:[@media(hover:hover)]:form-control--hover-color-background",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(b)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],M)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${c("inline-flex",T,g,z)}"></slot>`:""}<div class="${c("flex flex-wrap items-center gap-1 w-full min-w-0 relative",this.floatingLabel&&"mt-4")}">${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${c("flex flex-wrap items-center gap-1 min-w-0",T)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",w,this.selectedTextLabel&&!this.multiple?"placeholder:text-black":"placeholder:text-neutral-700",this.size==="sm"?m?"h-4":"h-6":m?"h-6":"h-8")}" type="text" placeholder="${!this.floatingLabel||m?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"></div><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(D=>D==null?void 0:D.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",w)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${c("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",z)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c(y,z,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",y,z)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",z)}">${this.type!=="search"?p`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${c("flex items-center sd-interactive",y)}" type="button" @mousedown="${this.preventLoosingFocus}" @click="${this.handleSearchClick}"><sd-icon class="${c(g,z)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2 sd-color-icon-fill-primary" tabindex="-1" aria-hidden="true" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow-listbox transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm mt-1",n?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};S.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
210
|
+
"><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center form-control-border-radius transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:[@media(hover:hover)]:form-control--hover-color-background",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(b)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],M)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${c("inline-flex",T,g,z)}"></slot>`:""}<div class="${c("flex flex-wrap items-center gap-1 w-full min-w-0 relative",this.floatingLabel&&m&&"mt-4",this.floatingLabel&&!m&&this.size==="lg"&&"mt-2")}">${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${c("flex flex-wrap items-center gap-1 min-w-0",T)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",w,this.selectedTextLabel&&!this.multiple?"placeholder:text-black":"placeholder:text-neutral-700",this.size==="sm"?m?"h-4":"h-6":m?"h-6":"h-8")}" type="text" placeholder="${!this.floatingLabel||m?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"></div><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(D=>D==null?void 0:D.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",w)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${c("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",z)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c(y,z,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",y,z)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",z)}">${this.type!=="search"?p`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${c("flex items-center sd-interactive",y)}" type="button" @mousedown="${this.preventLoosingFocus}" @click="${this.handleSearchClick}"><sd-icon class="${c(g,z)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2 sd-color-icon-fill-primary" tabindex="-1" aria-hidden="true" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow-listbox transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm mt-1",n?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};S.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
211
211
|
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);border-width:var(--sd-combobox__tag-border-width,var(--sd-spacing-0\\.25));padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}[part=chevron]{color:rgb(var(--sd-color-icon-fill-primary))}:host([disabled])::part(chevron),:host([visually-disabled])::part(chevron){color:rgba(var(--sd-color-icon-fill-neutral-500,--sd-color-neutral-500))}@property --tw-font-weight{syntax:"*";inherits:false}`],a([v("sd-popup")],S.prototype,"popup",2),a([v('[part="combobox"]')],S.prototype,"combobox",2),a([v('[part="display-input"]')],S.prototype,"displayInput",2),a([v(".value-input")],S.prototype,"valueInput",2),a([v('[part="listbox"]')],S.prototype,"listbox",2),a([v('[part="tags"]')],S.prototype,"tagWrapper",2),a([v('[part="filtered-listbox"]')],S.prototype,"filteredWrapper",2),a([v("slot:not([name])")],S.prototype,"defaultSlot",2),a([v("#invalid-message")],S.prototype,"invalidMessage",2),a([L()],S.prototype,"hasFocus",2),a([L()],S.prototype,"displayInputValue",2),a([L()],S.prototype,"selectedTextLabel",2),a([L()],S.prototype,"selectedOptions",2),a([L()],S.prototype,"filteredOptions",2),a([L()],S.prototype,"allOptions",2),a([L()],S.prototype,"lastOption",2),a([L()],S.prototype,"showValidStyle",2),a([L()],S.prototype,"showInvalidStyle",2),a([L()],S.prototype,"deletedTagLabel",2),a([d({reflect:!0})],S.prototype,"name",2),a([d({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],S.prototype,"value",2),a([Kt()],S.prototype,"defaultValue",2),a([d({type:String,reflect:!0})],S.prototype,"size",2),a([d({type:String,reflect:!0})],S.prototype,"placeholder",2),a([d({type:String,attribute:"max-options-tag-label",reflect:!0})],S.prototype,"maxOptionsTagLabel",2),a([d({type:Boolean,reflect:!0})],S.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],S.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],S.prototype,"clearable",2),a([d({type:Boolean,reflect:!0})],S.prototype,"open",2),a([d({type:Boolean,reflect:!0})],S.prototype,"hoist",2),a([d({type:String,reflect:!0})],S.prototype,"label",2),a([d({type:String,reflect:!0})],S.prototype,"placement",2),a([d({type:String,attribute:"help-text",reflect:!0})],S.prototype,"helpText",2),a([d({type:String,reflect:!0})],S.prototype,"form",2),a([d({type:Boolean,reflect:!0})],S.prototype,"required",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],S.prototype,"floatingLabel",2),a([d({type:String,reflect:!0})],S.prototype,"type",2),a([L()],S.prototype,"currentPlacement",2),a([d()],S.prototype,"getOption",2),a([d({type:Boolean,reflect:!0})],S.prototype,"multiple",2),a([d({type:Boolean,reflect:!0})],S.prototype,"useTags",2),a([d({type:Number,reflect:!0,attribute:"max-options-visible"})],S.prototype,"maxOptionsVisible",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],S.prototype,"styleOnValid",2),a([d()],S.prototype,"filter",2),a([d()],S.prototype,"getTag",2),a([C("filter",{waitUntilFirstUpdate:!0})],S.prototype,"handleFilterChange",1),a([C("useTags",{waitUntilFirstUpdate:!0})],S.prototype,"handleUseTagsChange",1),a([C("size",{waitUntilFirstUpdate:!0})],S.prototype,"applySizeToOptions",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],S.prototype,"handleDisabledChange",1),a([C("value",{waitUntilFirstUpdate:!0})],S.prototype,"handleValueChange",1),a([C("displayInputValue",{waitUntilFirstUpdate:!0})],S.prototype,"handleDisplayInputValueChange",1),a([C("open",{waitUntilFirstUpdate:!0})],S.prototype,"handleOpenChange",1),a([C(["size","floatingLabel"])],S.prototype,"handleSizeChange",1),S=a([k("sd-combobox")],S);R("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var we=class extends f{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return p`<hr part="main" aria-orientation="${this.orientation}" class="${c(this.inverted?"sd-divider--inverted-color-border":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};we.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
212
212
|
:host{margin:calc(var(--sd-spacing-1) * 0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],a([d({type:String,reflect:!0})],we.prototype,"orientation",2),a([d({type:Boolean,reflect:!0})],we.prototype,"inverted",2),we=a([k("sd-divider")],we);var $={startOfDayLocal:s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()),isSameDay:(s,r)=>!s||!r?!1:s.getFullYear()===r.getFullYear()&&s.getMonth()===r.getMonth()&&s.getDate()===r.getDate(),clampDateToMonth:(s,r)=>{let t=new Date(r.getFullYear(),r.getMonth(),1),e=new Date(r.getFullYear(),r.getMonth()+1,0);return s<t?t:s>e?e:s},toLocalISODate:s=>{let r=s.getFullYear(),t=String(s.getMonth()+1).padStart(2,"0"),e=String(s.getDate()).padStart(2,"0");return`${r}-${t}-${e}`},parseLocalISO:s=>{if(!s)return null;let r=s.trim();if(!r)return null;let e=r.replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;let i=Number(e[1]),o=Number(e[2])-1,n=Number(e[3]),l=new Date(i,o,n);return Number.isNaN(l.getTime())?null:l},compareDates:(s,r)=>{let t=$.startOfDayLocal(s).getTime(),e=$.startOfDayLocal(r).getTime();return t-e},isBetweenInclusive:(s,r,t)=>{let e=$.compareDates(r,t)<=0?r:t,i=$.compareDates(r,t)<=0?t:r;return $.compareDates(s,e)>=0&&$.compareDates(s,i)<=0}};var Lr={fromAttribute(s){if(!s)return null;let t=s.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,i=new Date(+t[1],+t[2]-1,+t[3]);return i.getFullYear()!==+t[1]||i.getMonth()!==+t[2]-1||i.getDate()!==+t[3]?null:e},toAttribute(s){return s!=null?s:""}},Eo={fromAttribute(s){if(!s)return null;let r=s.trim().replace(/[./]/g,"-"),t=r.match(/^(\d{2})-(\d{4})$/),e,i;if(t)e=Number(t[1]),i=Number(t[2]);else{if(t=r.match(/^(\d{4})-(\d{2})$/),!t)return null;i=Number(t[1]),e=Number(t[2])}return!i||!e||e<1||e>12?null:new Date(i,e-1,1)},toAttribute(s){if(!s)return"";let r=s.getFullYear(),t=String(s.getMonth()+1).padStart(2,"0");return`${r}-${t}`}},$o={fromAttribute(s){if(!s)return[];let r=[],t=s.trim();if(t.startsWith("["))try{let i=JSON.parse(t);Array.isArray(i)&&(r=i.map(String))}catch(i){return[]}else r=t.split(/[\s,]+/).map(i=>i.trim()).filter(Boolean);let e=[];for(let i of r){let n=i.replace(/[-/]/g,".").split(".");if(n.length!==3)continue;let[l,h,u]=n.map(Number);if(!l||!h||!u)continue;let m=new Date(l,h-1,u);if(m.getFullYear()!==l||m.getMonth()!==h-1||m.getDate()!==u)continue;let b=`${l}-${String(h).padStart(2,"0")}-${String(u).padStart(2,"0")}`;e.push(b)}return e},toAttribute(s){return s?s.join(","):""}};var A=class extends f{constructor(){super();this.localize=new _(this);this.hasSlotController=new P(this,"label","help-text","tooltip");this.formControlController=new ft(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=$.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(o=>{var n,l;return o instanceof HTMLElement&&(((n=o.classList)==null?void 0:n.contains("nav"))||((l=o.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,h,u,m,b;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,i=e.value,o=(u=e.selectionStart)!=null?u:i.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let w=i.replace(/\D/g,""),g=w.slice(0,8),y=w.slice(8,16),T=this.buildDmyFromDigits(g),z=this.buildDmyFromDigits(y),M;g.length===0?M="":g.length<8?M=T:y.length>0?M=`${T} - ${z}`:M=n?T:`${T} -`;let O=this.countDigitsBeforeCaret(i,o),D;if(O<=8){let I=this.digitIndexToDmyCaretPos(Math.min(O,8));D=Math.min(I,T.length)}else{let I=g.length<8?T.length:T.length+3,N=Math.min(O-8,8),K=this.digitIndexToDmyCaretPos(N);D=I+Math.min(K,z.length)}this.inputValue=M;let F=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(T)){let I=this.dmyToIso(T),N=I?$.parseLocalISO(I):null;N&&!this.isDisabled(N)&&this.inMinMax(N)&&this.rangeStart!==I&&(this.rangeStart=I,this.previewEnd=null,this.viewMonth=new Date(N.getFullYear(),N.getMonth(),1),this.focusedDate=$.startOfDayLocal(N),F=!0)}else this.rangeStart&&(this.rangeStart=null,F=!0),this.rangeEnd&&(this.rangeEnd=null,F=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(z)&&this.rangeStart){let I=$.parseLocalISO(this.rangeStart),N=this.dmyToIso(z),K=N?$.parseLocalISO(N):null;if(!!K&&!this.isDisabled(K)&&this.inMinMax(K)){let[gt,pt]=$.compareDates(I,K)<=0?[I,K]:[K,I],St=$.isSameDay(gt,pt);if((this.allowSameDayRange||!St)&&!this.wouldRangeContainDisabled(gt,pt)){let vt=$.toLocalISODate($.startOfDayLocal(gt)),lt=$.toLocalISODate($.startOfDayLocal(pt));(this.rangeStart!==vt||this.rangeEnd!==lt)&&(this.rangeStart=vt,this.rangeEnd=lt,this.viewMonth=new Date(pt.getFullYear(),pt.getMonth(),1),this.focusedDate=$.startOfDayLocal(pt),F=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,F=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),F&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var N;let I=(N=this.input)!=null?N:e;I&&(I.value=this.inputValue,I.setSelectionRange(D,D))})})}else{let w=e,g=w.value,y=(b=w.selectionStart)!=null?b:g.length,T=g.replace(/\D/g,"").slice(0,8),z=T.slice(0,2),M=T.slice(2,4),O=T.slice(4,8),D="";z.length>0&&(D+=z,z.length===2&&(D+=".")),M.length>0&&z.length===2&&(D+=M,M.length===2&&(D+=".")),O.length>0&&z.length===2&&M.length===2&&(D+=O),D=D.replace(/\.\.+/g,".");let F=this.inputValue||"";this.inputValue=D;let I=y,N=tt=>{let vt=[];for(let lt=0;lt<tt.length;lt++)tt[lt]==="."&&vt.push(lt);return vt},K=N(F),ut=N(D),gt=K.filter(tt=>tt<y).length,St=ut.filter(tt=>tt<y).length-gt;if(St>0?I+=St:!K.includes(y)&&ut.includes(y)&&(I+=1),I=Math.min(Math.max(0,I),D.length),requestAnimationFrame(()=>{var vt;let tt=(vt=this.input)!=null?vt:w;tt&&(tt.value=this.inputValue,tt.setSelectionRange(I,I))}),/^\d{2}\.\d{2}\.\d{4}$/.test(D)){let tt=this.parseInputText(D);this.applyParsedInput(tt)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let w=this.rangeStart?$.parseLocalISO(this.rangeStart):null,g=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;w&&!g?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(w)}`):w&&g&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(w)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(g)}`)}else if(this.value){let w=$.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(w)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,i,o)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){o&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var n,l;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,i=!0,o=new Date(this.focusedDate);switch(e){case"ArrowLeft":o.setDate(o.getDate()-1);break;case"ArrowRight":o.setDate(o.getDate()+1);break;case"ArrowUp":o.setDate(o.getDate()-7);break;case"ArrowDown":o.setDate(o.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:i=!1}if(i){t.preventDefault();let h=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(o.getMonth()!==h.getMonth()||o.getFullYear()!==h.getFullYear()){let w=new Date(o.getFullYear(),o.getMonth(),1);this.viewMonth=w;let g=this.formatMonthYear(w);this.setNavStatus(g)}let m=$.startOfDayLocal(o);m.getTime()!==((l=this.focusedDate)==null?void 0:l.getTime())&&(this.focusedDate=m);let b=m.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(b),this.requestUpdate(),requestAnimationFrame(()=>{let w=this.shadowRoot,g=w==null?void 0:w.querySelector("button.day.focused");g==null||g.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?$.parseLocalISO(this.value):null,e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,i=$.startOfDayLocal(new Date),o=this.range&&e?e:t!=null?t:i,n=(l=this.viewMonth)!=null?l:new Date(o.getFullYear(),o.getMonth(),1);this.viewMonth=n,this.focusedDate=$.clampDateToMonth(o,n),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var i;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&$.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&$.parseLocalISO(this.rangeStart)||this.value&&$.parseLocalISO(this.value)||this.today;if(!t)return;let e=$.clampDateToMonth(t,this.viewMonth);e.getTime()!==((i=this.focusedDate)==null?void 0:i.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?$.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=$.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var i;let e=this.input;if(e){e.value=(i=this.inputValue)!=null?i:"";let o=e.value.length;e.setSelectionRange(o,o)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?$.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=$.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let o=this.input;if(o){o.value=(n=this.inputValue)!=null?n:"";let l=o.value.length;o.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return $.parseLocalISO(t)}inMinMax(t){let e=n=>{if(n==null)return null;if(n instanceof Date)return $.startOfDayLocal(n);if(typeof n=="number")return $.startOfDayLocal(new Date(n));if(typeof n=="string"){let l=this.parseISO(n);return l?$.startOfDayLocal(l):null}return null},i=e(this.min),o=e(this.max);return!(i&&t<i||o&&t>o)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),n=`${e}-${i}-${o}`;return this.disabledDatesSet.has(n)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let i="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+i},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),i=this.ordinal(e),o=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${i} of ${o} ${n}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,o=e[(i-20)%10]||e[i]||e[0];return t+o}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let i=JSON.parse(e);Array.isArray(i)&&(t=i)}catch(i){t=[]}else e.length>0&&(t=e.split(",").map(i=>i.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let i=$.compareDates(t,e)<=0?$.startOfDayLocal(t):$.startOfDayLocal(e),o=$.compareDates(t,e)<=0?$.startOfDayLocal(e):$.startOfDayLocal(t),n=new Date(i);for(;$.compareDates(n,o)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=$.parseLocalISO(t);if(e||(e=$.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${i}.${o}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let i=Number(e[1]),o=Number(e[2]),n=Number(e[3]),l=new Date(n,o-1,i);if(l.getFullYear()!==n||l.getMonth()!==o-1||l.getDate()!==i)return null;let h=$.startOfDayLocal(l);return $.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),o=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${o} ${l}`:n&&!l?`${n} ${o}`:""}parseInputText(t){var o,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let u=this.dmyToIso(h);return u?{start:u,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(o=l[0])!=null?o:"",u=(n=l[1])!=null?n:"",m=h?this.dmyToIso(h):null,b=u?this.dmyToIso(u):null;return h&&!m?{start:null,end:null,valid:!1}:u&&!b?{start:null,end:null,valid:!1}:{start:m,end:b,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let i=this.dmyToIso(e);return i?{single:i,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,u,m,b;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=w=>{if(!w)return!0;let g=$.parseLocalISO(w);return!(!this.inMinMax(g)||this.isDisabled(g))},i=!1;if(this.range){let w=(h=t.start)!=null?h:null,g=(u=t.end)!=null?u:null;if(!e(w)||g&&!e(g))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let y=w?$.parseLocalISO(w):null,T=g?$.parseLocalISO(g):null;if(y&&T){if($.compareDates(y,T)>0){let O=y;y=T,T=O}if(!this.allowSameDayRange&&$.isSameDay(y,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(y,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let z=y?$.toLocalISODate($.startOfDayLocal(y)):null,M=T?$.toLocalISODate($.startOfDayLocal(T)):null;if(this.rangeStart!==z||this.rangeEnd!==M){this.rangeStart=z,this.rangeEnd=M,this.previewEnd=null,i=!0;let O=(m=y!=null?y:T)!=null?m:this.today;this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=$.startOfDayLocal(O),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let o=(b=t.single)!=null?b:null;if(!e(o))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=o?$.parseLocalISO(o):null,l=n?$.toLocalISODate($.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,i=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=$.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),i}buildDmyFromDigits(t){let e=t.slice(0,8),i=e.slice(0,2),o=e.slice(2,4),n=e.slice(4,8),l=i;return o.length&&(l+="."+o),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var i,o;((o=(i=t.composedPath)==null?void 0:i.call(t))!=null?o:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var n;let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth(),i=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear())return;this.viewMonth=i;let o=this.formatMonthYear(i);this.setNavStatus(o),this.emit("sd-month-change",{detail:{month:i}})}setYear(t){var n;let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth(),i=new Date(e.getFullYear()+t,e.getMonth(),1);if(i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth())return;this.viewMonth=i;let o=this.formatMonthYear(i);this.setNavStatus(o),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var o;let t=null;if(!this.range&&this.value){let n=$.parseLocalISO(this.value);n&&(t=$.startOfDayLocal(n))}if(this.range){let n=this.rangeStart?$.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;l?t=$.startOfDayLocal(l):n&&(t=$.startOfDayLocal(n))}let e=(o=this.viewMonth)!=null?o:this.ensureViewMonth();if(!(n=>n?n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()&&!this.isDisabled(n):!1)(t)){let{weeks:n}=this.getMonthMatrix(e),l=n.flat().find(h=>h.getMonth()===e.getMonth()&&$.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=$.startOfDayLocal(l);else{let h=n.flat().find(u=>u.getMonth()===e.getMonth()&&!this.isDisabled(u));t=h?$.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let n=this.shadowRoot,l=(n==null?void 0:n.querySelector("button.day.selected"))||(n==null?void 0:n.querySelector("button.day.focused"))||(n==null?void 0:n.querySelector('button.day[tabindex="0"]'))||(n==null?void 0:n.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=$.startOfDayLocal(t),i=$.toLocalISODate(e);if(this.value===i)return;this.value=i;let o=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(o),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=n.value.length;n.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=$.startOfDayLocal(t),i=this.rangeStart?$.parseLocalISO(this.rangeStart):null,o=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(!i&&!o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=l.value.length;l.setSelectionRange(u,u)})}))});return}if(i&&!o){if(this.isDisabled(e))return;if($.isSameDay(i,e)){if(!this.allowSameDayRange){this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let w=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${w}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var y;let g=this.input;g&&(g.value=(y=this.inputValue)!=null?y:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let T=g.value.length;g.setSelectionRange(T,T)})}))});return}this.rangeStart=$.toLocalISODate(e),this.rangeEnd=$.toLocalISODate(e),this.previewEnd=null;let b=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${b}`,40),this.announceSelect(`${this.termEndSelected()}: ${b}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var g;let w=this.input;w&&(w.value=(g=this.inputValue)!=null?g:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let y=w.value.length;w.setSelectionRange(y,y)})}))});return}let n=$.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,h]=$.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=$.toLocalISODate(l),this.rangeEnd=$.toLocalISODate(h),this.previewEnd=null;let u=this.formatSelectionLabel(l),m=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${u}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var w;let b=this.input;b&&(b.value=(w=this.inputValue)!=null?w:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let g=b.value.length;b.setSelectionRange(g,g)})}))});return}if(i&&o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=l.value.length;l.setSelectionRange(u,u)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?$.parseLocalISO(this.value):null,e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,i=$.startOfDayLocal(new Date),o=this.range&&e?e:t!=null?t:i,n=new Date(o.getFullYear(),o.getMonth(),1);return this.viewMonth=n,n}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,i=new Date(t.getFullYear(),t.getMonth(),1),o=new Date(i),n=(i.getDay()-e+7)%7;o.setDate(i.getDate()-n);let l=[],h=o;for(let b=0;b<6;b++){let w=[];for(let g=0;g<7;g++)w.push(new Date(h)),h.setDate(h.getDate()+1);l.push(w)}let u=b=>b.every(w=>w.getMonth()!==t.getMonth());for(;l.length>0&&u(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var o;let t=(o=this.firstDayOfWeek)!=null?o:1,e=new Date(2021,7,1),i=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{i.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){i.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return i}getTabTargetDayForCurrentView(t){var n;let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth(),i=t.flat().find(l=>l.getMonth()===e.getMonth()&&$.isSameDay(l,this.today)&&!this.isDisabled(l));if(i)return $.startOfDayLocal(i);let o=t.flat().find(l=>l.getMonth()===e.getMonth()&&!this.isDisabled(l));return o?$.startOfDayLocal(o):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(e&&!i){let o=$.startOfDayLocal(t);this.previewEnd=this.isDisabled(o)?null:o,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var w,g;let t=(w=this.viewMonth)!=null?w:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),o=this.weekdayLabels(),n=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,m=y=>!this.range||!l||h||!u?!1:$.isBetweenInclusive(y,l,u),b=this.getTabTargetDayForCurrentView(e);return p`<div part="datepicker" class="${c("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(g=this.currentPlacement)!=null&&g.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${i}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-icon></button></div></div><sd-divider></sd-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${i}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${o.map((y,T)=>p`<div role="columnheader" aria-colindex="${T+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${y}" title="${y}" id="${"col-"+(T+1)}">${y}</div>`)}</div>${e.map((y,T)=>p`<div class="grid-row grid grid-cols-7 ${T===0?"mt-2":""}" role="row" aria-rowindex="${T+2}">${y.map((z,M)=>{let O=z.getMonth()===t.getMonth(),D=this.isDisabled(z)||!this.inMinMax(z),F=$.isSameDay(z,this.focusedDate),I=$.isSameDay(z,this.today),N=!this.range&&n?$.isSameDay(z,n):!1,K=this.range&&l?$.isSameDay(z,l):!1,ut=this.range&&h?$.isSameDay(z,h):!1,gt=this.range&&l&&h?$.isBetweenInclusive(z,l,h):!1,pt=m(z)&&!D,St=-1,tt=b&&$.isSameDay(z,b);(this.tabbingIntoGrid&&tt||!this.tabbingIntoGrid&&F)&&(St=0);let vt=this.isWeekend(z),lt=z.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),Ht=K?this.localize.term("startDateSelected"):ut?this.localize.term("endDateSelected"):void 0;return p`<button type="button" part="day" class="${c("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",K||ut?F?"outline-none sd-datepicker__date-item--selected--hover-color-background sd-datepicker__date-item--selected--hover-color-text":"outline-none sd-datepicker__date-item--selected-color-background sd-datepicker__date-item--selected-color-text hover:sd-datepicker__date-item--selected--hover-color-background hover:sd-datepicker__date-item--selected--hover-color-text":"hover:sd-datepicker__date-item--hover--default-color-text",!K&&!ut&&!gt&&"hover:sd-datepicker__date-item--hover--default-color-background",N?"selected outline-none border-primary sd-datepicker__date-item--selected-color-background sd-datepicker__date-item--selected-color-text hover:sd-datepicker__date-item--selected--hover-color-text hover:sd-datepicker__date-item--selected--hover-color-background":O?this.isInDisabledDates(z)||!this.inMinMax(z)?"out-month text-neutral-500":this.disabledWeekends&&vt?"weekend-day text-neutral-500":"in-month sd-datepicker__date-item--default-color-text":this.disabledWeekends&&vt?"out-month weekend-day text-neutral-500":vt?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-datepicker__date-item--hover--prev-next-color-text hover:sd-datepicker__date-item--hover--prev-next-color-background",K?"rounded-l-md rounded-r-none":"",ut?"range-end rounded-r-md rounded-l-none":"",gt&&!K&&!ut?"in-range selected sd-datepicker__date-item--range-color-background rounded-none hover:sd-datepicker__date-item--selected--hover-color-background hover:sd-datepicker__date-item--selected--hover-color-text":"",!gt&&pt&&!K&&!ut?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",I&&!N&&!K&&!ut&&F?"today border-[1px] border-primary sd-datepicker__date-item--current-font-weight":"",D?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",F&&!I?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${M+1}" aria-labelledby="${"col-"+(M+1)}" .tabIndex="${St}" ?disabled="${D||this.disabled||this.readonly}" aria-disabled="${D||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${N||gt||K||ut?"true":"false"}" aria-current="${I?"date":U}" aria-label="${lt}" aria-roledescription="${Ht!=null?Ht:U}" @focus="${()=>this.focusedDate=$.startOfDayLocal(z)}" @mouseenter="${()=>this.onDayMouseEnter(z)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=$.startOfDayLocal(z),this.selectDate(z)}}">${z.getDate()}</button>`})}</div>`)}</div></div>`}render(){var y,T;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,i=this.helpText?!0:!!t.helpText,o=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",w={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],g=this.size==="sm"?"text-sm":"text-base";return p`<div part="form-control" class="${c("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||o?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",g)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",w,this.open&&((y=this.currentPlacement)!=null&&y.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",(T=this.currentPlacement)!=null&&T.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${c("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",b==="disabled"||b==="visuallyDisabled"?"text-neutral-500":"text-black",b==="invalid"&&"form-control--invalid-color-background",b==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${i?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${c("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],g,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c("text-error",u,m)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?p`<sd-icon class="${c("text-success shrink-0",u,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}<sd-icon class="${c(h,u,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-icon></div>${this.renderCalendar()}</sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm mt-1",i?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!i}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};A.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
213
213
|
:host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,rgba(var(--sd-color-primary-500))))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,rgba(var(--sd-color-primary))))}.icon-color{color:rgb(var(--sd-color-icon-fill-primary))}.month-label{color:rgb(var(--sd-color-border-primary))!important}`],a([d({type:String,reflect:!0})],A.prototype,"locale",2),a([d({type:String,converter:Lr,reflect:!0})],A.prototype,"value",2),a([d({type:Boolean,reflect:!0})],A.prototype,"range",2),a([d({attribute:"range-start",converter:Lr,reflect:!0})],A.prototype,"rangeStart",2),a([d({attribute:"range-end",converter:Lr,reflect:!0})],A.prototype,"rangeEnd",2),a([d({type:Boolean})],A.prototype,"allowSameDayRange",2),a([d({type:String,converter:Lr,reflect:!0})],A.prototype,"min",2),a([d({type:String,converter:Lr,reflect:!0})],A.prototype,"max",2),a([d({attribute:"view-month",converter:Eo})],A.prototype,"viewMonth",2),a([d({type:Number})],A.prototype,"firstDayOfWeek",2),a([d({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],A.prototype,"disabledWeekends",2),a([d({attribute:"disabled-dates",converter:$o})],A.prototype,"disabledDates",2),a([d({attribute:!1})],A.prototype,"isDateDisabled",2),a([d({type:String,reflect:!0})],A.prototype,"size",2),a([d({type:String})],A.prototype,"alignment",2),a([d({type:String,reflect:!0})],A.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],A.prototype,"helpText",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],A.prototype,"floatingLabel",2),a([d({type:Boolean,reflect:!0})],A.prototype,"disabled",2),a([d({type:Boolean,reflect:!0})],A.prototype,"required",2),a([d({type:Boolean,attribute:"visually-disabled"})],A.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],A.prototype,"styleOnValid",2),a([d({type:Boolean,reflect:!0})],A.prototype,"readonly",2),a([d({type:String,reflect:!0})],A.prototype,"placement",2),a([d({type:String,reflect:!0})],A.prototype,"placeholder",2),a([d({reflect:!0})],A.prototype,"name",2),a([d({type:String,reflect:!0})],A.prototype,"form",2),a([L()],A.prototype,"open",2),a([L()],A.prototype,"focusedDate",2),a([L()],A.prototype,"today",2),a([L()],A.prototype,"disabledDatesSet",2),a([L()],A.prototype,"previewEnd",2),a([L()],A.prototype,"statusNavText",2),a([L()],A.prototype,"statusSelectText",2),a([L()],A.prototype,"hasFocus",2),a([L()],A.prototype,"showValidStyle",2),a([L()],A.prototype,"showInvalidStyle",2),a([L()],A.prototype,"currentPlacement",2),a([L()],A.prototype,"inputValue",2),a([v("sd-popup")],A.prototype,"popup",2),a([v("#invalid-message")],A.prototype,"invalidMessage",2),a([v("#input")],A.prototype,"input",2),a([C("open",{waitUntilFirstUpdate:!0})],A.prototype,"handleOpenChange",1),a([C("locale")],A.prototype,"handleLocaleChange",1),a([C("viewMonth")],A.prototype,"handleViewMonthChange",1),a([C("disabledDates")],A.prototype,"handleDisabledDatesChange",1),a([C("value")],A.prototype,"handleValueChange",1),a([C("rangeStart"),C("rangeEnd")],A.prototype,"handleRangeChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],A.prototype,"handleDisabledChange",1),a([C(["size","floatingLabel"])],A.prototype,"handleSizeChange",1),A=a([k("sd-datepicker")],A);var Rt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"footer");this.localize=new _(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new nr(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),ar(this))}disconnectedCallback(){super.disconnectedCallback(),or(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let i=W(this,"dialog.denyClose",{dir:this.localize.dir()});Y(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=sr(),this.modal.activate(),ar(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([Z(this.dialog),Z(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});let e=this.prefersReducedMotion?W(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):W(this,"dialog.show",{dir:this.localize.dir()}),i=W(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([Y(this.panel,e.keyframes,e.options),Y(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Z(this.dialog),Z(this.overlay)]);let t=this.prefersReducedMotion?W(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):W(this,"dialog.hide",{dir:this.localize.dir()}),e=W(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([Y(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),Y(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,or(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&i.isConnected&&setTimeout(()=>{try{i.focus({preventScroll:!0})}catch(o){i.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(this,"sd-after-hide")}render(){return p`<div part="base" class="${c("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 overlay-color-background" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("panel-color-border border flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${E(this.headline?this.headline:void 0)}" aria-labelledby="${E(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?p`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:p`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":p`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${c("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};Rt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
@@ -235,7 +235,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
235
235
|
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?et`div`:t?et`a`:et`button`,i=ki(this.marker[this.variant]),o=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return j`<${e} part="base" class="${c("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${E(t?this.href:void 0)}" target="${E(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${E(this.notInteractive||t?void 0:"button")}" aria-label="${E(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${E(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${c("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-map-marker--cluster-color-text",main:"sd-color-fill-accent",place:"sd-map-marker--pin-color-text"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="${c("absolute inset-0 overflow-hidden pointer-events-none",{cluster:"sd-map-marker--cluster--default-color-background group-hover:sd-map-marker--cluster--hover-color-background",main:"sd-map-marker--main-color-background",place:"sd-map-marker--pin--default-color-background"}[this.variant])}" style="mask-image:${o};-webkit-mask-image:${o}"><div class="${c("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${c("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":this.state==="hover"?"bg-accent-550":"group-hover:bg-accent-550 group-active:bg-accent-700",place:this.state==="active"||this.state==="hover"?"sd-map-marker--pin--hover-color-background":"group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?j`<div id="marker-circle" class="absolute rounded-full"></div>`:""}</div>${i} ${this.variant==="cluster"?j`<div id="cluster-border" class="${c("absolute inset-0 sd-map-marker--cluster--default-color-background rounded-full opacity-30 hover:sd-map-marker--cluster--hover-color-background",this.state==="hover"&&"sd-map-marker--cluster--hover-color-background")}"></div>`:""}</div><div id="content" part="content" class="${c("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold sd-map-marker--cluster-color-text",this.variant==="place"&&"font-bold sd-map-marker--pin-color-text")}"><slot></slot></div></${e}>`}};Nt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
236
236
|
:host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker--cluster--hover-color-background))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}#marker-circle{background-color:rgba(var(--sd-color-icon-fill-white,rgba(var(--sd-color-white))))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],a([d({type:String,reflect:!0})],Nt.prototype,"variant",2),a([d({type:String,reflect:!0})],Nt.prototype,"state",2),a([d({type:Boolean,reflect:!0})],Nt.prototype,"animated",2),a([d({type:Boolean,reflect:!0,attribute:"not-interactive"})],Nt.prototype,"notInteractive",2),a([d({type:String,reflect:!0})],Nt.prototype,"href",2),a([d({type:String,reflect:!0})],Nt.prototype,"target",2),a([d({reflect:!0})],Nt.prototype,"label",2),Nt=a([k("sd-map-marker")],Nt);var Me=class extends f{constructor(){super(...arguments);this.localize=new _(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],i=t.composedPath(),o=i.find(u=>{var m;return e.includes(((m=u==null?void 0:u.getAttribute)==null?void 0:m.call(u,"role"))||"")});if(!o||i.find(u=>{var m;return((m=u==null?void 0:u.getAttribute)==null?void 0:m.call(u,"role"))==="menu"})!==this)return;let h=o;h.type==="checkbox"&&(h.checked=!h.checked),this.emit("sd-select",{detail:{item:h}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),i=this.getCurrentItem(),o=i?e.indexOf(i):0;if(i==null||i.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let n=(l,h)=>{let u=l;for(let m of e)if(u=(u+h+e.length)%e.length,!e[u].disabled)return u;return l};if(t.key==="ArrowDown")o=n(o,1);else if(t.key==="ArrowUp")o=n(o,-1);else if(t.key==="Home")o=e.findIndex(l=>!l.disabled),o===-1&&(o=0);else if(t.key==="End"){o=e.length-1;for(let l=e.length-1;l>=0;l--)if(!e[l].disabled){o=l;break}}this.setCurrentItem(e[o]),e[o].focus(),e[o].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(i=>{i.setAttribute("tabindex",i===t?"0":"-1")})}render(){return p`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};Me.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
237
237
|
:host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md);padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-divider){padding-block:var(--sd-spacing-3)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],a([v("slot")],Me.prototype,"defaultSlot",2),Me=a([k("sd-menu")],Me);var zo=()=>new _s,_s=class{},Ms=new WeakMap,So=se(class extends zr{render(s){return U}update(s,[r]){var e;let t=r!==this.G;return t&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=r,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),U}rt(s){var r;if(this.G!==void 0)if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=(r=this.ht)!=null?r:globalThis,e=Ms.get(t);e===void 0&&(e=new WeakMap,Ms.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,r,t;return typeof this.G=="function"?(r=Ms.get((s=this.ht)!=null?s:globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Ni=class{constructor(r,t){this.popupRef=zo();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=r=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${r.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${r.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=r=>{switch(r.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":r.target!==this.host&&(r.preventDefault(),r.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(r);break;default:break}};this.handleClick=r=>{var t;r.target===this.host?(r.preventDefault(),r.stopPropagation()):r.target instanceof Element&&(r.target.tagName==="sd-menu-item"||(t=r.target.role)!=null&&t.startsWith("menuitem"))&&r.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=r=>{r.relatedTarget&&r.relatedTarget instanceof Element&&this.host.contains(r.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=r=>{r.stopPropagation()};this.handlePopupReposition=()=>{let r=this.host.renderRoot.querySelector("slot[name='submenu']"),t=r==null?void 0:r.assignedElements({flatten:!0}).filter(h=>h.localName==="sd-menu")[0],e=getComputedStyle(this.host).direction==="rtl";if(!t)return;let{left:i,top:o,width:n,height:l}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${e?i+n:i}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${e?i+n:i}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${o+l}px`)};(this.host=r).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(r){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let e=null;for(let i of t.assignedElements())if(e=i.querySelectorAll("sd-menu-item, [role^='menuitem']"),e.length!==0)break;if(!(!e||e.length===0)){e[0].setAttribute("tabindex","0");for(let i=1;i!==e.length;++i)e[i].setAttribute("tabindex","-1");this.popupRef.value&&(r.preventDefault(),r.stopPropagation(),this.popupRef.value.active?e[0]instanceof HTMLElement&&e[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{e[0]instanceof HTMLElement&&e[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(r){this.popupRef.value&&this.popupRef.value.active!==r&&(this.popupRef.value.active=r,this.host.requestUpdate())}enableSubmenu(r=!0){r?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var i;if(!((i=this.host.parentElement)!=null&&i.computedStyleMap))return;let r=this.host.parentElement.computedStyleMap(),e=["padding-top","border-top-width","margin-top"].reduce((o,n)=>{var m;let l=(m=r.get(n))!=null?m:new CSSUnitValue(0,"px"),u=(l instanceof CSSUnitValue?l:new CSSUnitValue(0,"px")).to("px");return o-u.value},0);this.skidding=e}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let r=getComputedStyle(this.host).direction==="rtl";return this.isConnected?p`<sd-popup ${So(this.popupRef)} placement="${r?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-popup>`:p`<slot name="submenu" hidden></slot>`}};var Tt=class extends f{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new P(this,"submenu");this.submenuController=new Ni(this,this.hasSlotController);this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Da(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let t=this.submenuController.isExpanded(),e={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return p`<div id="anchor" part="base" class="${c("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap !navigable-border-radius",this.disabled?"outline-none cursor-not-allowed sd-menu--disabled-color-text hover:bg-transparent":"cursor-pointer sd-menu-color-text hover:bg-neutral-200",this.isSubmenu()&&t&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!t}">${this.type==="checkbox"?p`<span part="checked-icon" class="${c("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-icon></span>`:""} ${e.iconIndent?p`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?p`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};Tt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
238
|
-
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(.menu-item-focus) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}//TODO clean up sd-menu-color-icon variable replacing with sd-menu-item-color-icon-fill (breakingchange) :host [part=icon-indent],:host [part=checked-icon],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon,var(--sd-menu-item-color-icon-fill)))}//TODO clean up sd-menu--disabled-color-icon variable replacing with sd-menu-item--disabled-color-icon-fill (breakingchange) :host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon,var(--sd-menu-item--disabled-color-icon-fill)))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}.sd-menu-color-text{color:rgba(var(--sd-menu-color-text,var(--sd-menu-item-color-text)))}.sd-menu--disabled-color-text{color:rgba(var(--sd-menu--disabled-color-text,var(--sd-menu-item--disabled-color-text)))}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],a([v("slot:not([name])")],Tt.prototype,"defaultSlot",2),a([v('part="base"')],Tt.prototype,"menuItem",2),a([d()],Tt.prototype,"type",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"disabled",2),a([d()],Tt.prototype,"value",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"chevron",2),a([C("checked")],Tt.prototype,"handleCheckedChange",1),a([C("disabled")],Tt.prototype,"handleDisabledChange",1),a([C("type")],Tt.prototype,"handleTypeChange",1),Tt=a([k("sd-menu-item")],Tt);var ot=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new _(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.stacked=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var i;return e.nodeType===Node.TEXT_NODE?!((i=e.textContent)!=null&&i.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}get isStackedHorizontal(){return!this.vertical&&this.stacked}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?et`div`:this.isAccordion&&!this.isLink?et`summary`:this.isLink?et`a`:et`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,i=this.isButton,o=this.isAccordion,n=this.isIconOnly,l={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":this.isStackedHorizontal?"
|
|
238
|
+
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(.menu-item-focus) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}//TODO clean up sd-menu-color-icon variable replacing with sd-menu-item-color-icon-fill (breakingchange) :host [part=icon-indent],:host [part=checked-icon],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon,var(--sd-menu-item-color-icon-fill)))}//TODO clean up sd-menu--disabled-color-icon variable replacing with sd-menu-item--disabled-color-icon-fill (breakingchange) :host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon,var(--sd-menu-item--disabled-color-icon-fill)))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}.sd-menu-color-text{color:rgba(var(--sd-menu-color-text,var(--sd-menu-item-color-text)))}.sd-menu--disabled-color-text{color:rgba(var(--sd-menu--disabled-color-text,var(--sd-menu-item--disabled-color-text)))}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],a([v("slot:not([name])")],Tt.prototype,"defaultSlot",2),a([v('part="base"')],Tt.prototype,"menuItem",2),a([d()],Tt.prototype,"type",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"disabled",2),a([d()],Tt.prototype,"value",2),a([d({type:Boolean,reflect:!0})],Tt.prototype,"chevron",2),a([C("checked")],Tt.prototype,"handleCheckedChange",1),a([C("disabled")],Tt.prototype,"handleDisabledChange",1),a([C("type")],Tt.prototype,"handleTypeChange",1),Tt=a([k("sd-menu-item")],Tt);var ot=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new _(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.stacked=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var i;return e.nodeType===Node.TEXT_NODE?!((i=e.textContent)!=null&&i.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}get isStackedHorizontal(){return!this.vertical&&this.stacked}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?et`div`:this.isAccordion&&!this.isLink?et`summary`:this.isLink?et`a`:et`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,i=this.isButton,o=this.isAccordion,n=this.isIconOnly,l={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":this.isStackedHorizontal?"py-1":"py-2",u=j`<${t} part="base" class="${c("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px] navigable-border-radius",this.isStackedHorizontal?"text-xs leading-4.5":{md:"navigable-font-size",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"sd-navigation-item-color-text",this.current&&!this.disabled&&"sd-navigation-item--current-color-text",this.current&&!this.isStackedHorizontal&&"font-bold",!this.current&&!this.isStackedHorizontal&&"choice-control-font-weight",!o&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&(this.isStackedHorizontal?"inline-flex flex-col items-center justify-center text-center rounded-full wrap":"inline-flex items-center"),!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",n?"justify-center aspect-square p-3":this.isStackedHorizontal?"px-8":"px-4")}" aria-current="${E(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${E(i?this.disabled:void 0)}" href="${E(e?this.href:void 0)}" target="${E(e?this.target:void 0)}" download="${E(e?this.download:void 0)}" rel="${E(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:i?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent pointer-events-none navigable__current-indicator-border-radius",this.vertical?"navigable__current-indicator-width h-[calc(100%-16px)] top-2 left-0 group-hover:h-full group-hover:top-0":this.isStackedHorizontal?"h-[2px] left-6 right-6 bottom-0":"navigable__current-indicator-height w-[calc(100%-16px)] left-2 bottom-0 group-hover:w-full group-hover:left-0 transition-all",this.disabled&&"bg-neutral-500")}"></div><div class="${c("inline-flex flex-col justify-center gap-1 w-full h-full",this.isStackedHorizontal&&"flex-col items-center")}"><span part="content-area" class="${c("relative inline-flex justify-between items-center",o?"grow":"w-full",this.isStackedHorizontal&&"justify-center",l.description&&"pt-3",!l.description&&!this.separated&&h,this.calculatePaddingX)}">${this.divider&&this.vertical?j`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="${c("inline-flex items-center",this.vertical?"flex-auto gap-2":this.isStackedHorizontal?"text-center":"flex-auto flex-col justify-center gap-1 text-center")}"><slot part="content" class="${c("inline-flex items-center",this.vertical?"gap-2":this.isStackedHorizontal?"flex-col justify-center gap-1 text-center":"justify-center gap-1 text-center")}"></slot></span>${this.chevron||l.children&&this.vertical&&!this.separated?j`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${l.description&&this.vertical?j`<slot id="description" name="description" part="description" class="${c("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?j`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${u} ${l.children&&this.vertical?j`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?j`<slot name="children"></slot>`:""}</div>`:o?j`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${u}<slot name="children"></slot></details>`:j`${u}`}};ot.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
239
239
|
:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}:host([stacked]:not([vertical])) ::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}.sd-navigation-item--current-color-text{color:rgb(var(--sd-navigation-item--current-color-text,var(--sd-navigation-item-color-text)))}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}`],a([v('[part="base"]')],ot.prototype,"button",2),a([v("slot:not([name])")],ot.prototype,"defaultSlot",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"vertical",2),a([d({type:String,reflect:!0})],ot.prototype,"size",2),a([d({reflect:!0})],ot.prototype,"href",2),a([d({type:String,reflect:!0})],ot.prototype,"target",2),a([d({reflect:!0})],ot.prototype,"download",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"current",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"stacked",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"chevron",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"relaxed",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"divider",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"indented",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"open",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"separated",2),ot=a([k("sd-navigation-item")],ot);var Ui={"top-right":null,"bottom-center":null},Fd=()=>{Object.entries(Ui).forEach(([s])=>{let r=document.querySelector(`#sd-toast-stack--${s}`);if(r){r.setAttribute("role","region"),Ui[s]=r;return}Ui[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Fd();var Et=class extends f{constructor(){super(...arguments);this.localize=new _(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return Ui[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([Z(this.base),Z(this.wrapper)]),this.wrapper.hidden=!1;let t=W(this,"notification.show",{dir:this.localize.dir()}),e=W(this,`notification.wrapper.show${kr(ws(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([Y(this.base,$e(t.keyframes,this.base.scrollHeight),t.options),Y(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([Z(this.base),Z(this.wrapper)]);let t=W(this,"notification.hide",{dir:this.localize.dir()}),e=W(this,`notification.wrapper.hide${kr(ws(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([Y(this.base,$e(t.keyframes,this.base.scrollHeight),t.options),Y(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,J(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,J(this,"sd-after-hide")}async toast(){return new Promise(t=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),t()},{once:!0})})}render(){return p`<div part="base" class="${c("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="${E(this.closable?"0":void 0)}" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${c("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${c("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 sd-notification-color-border",{info:"sd-notification--info-color-background",success:"sd-notification--success-color-background",warning:"sd-notification--warning-color-background",error:"sd-notification--error-color-background"}[this.variant])}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?p`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?p`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("absolute w-0 h-[2px] bottom-0 sd-notification__duration-indicator-color-background z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div></div>`}};Et.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
240
240
|
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([v('[part~="base"]')],Et.prototype,"base",2),a([v('[part~="wrapper"]')],Et.prototype,"wrapper",2),a([v('[part~="close-button"]')],Et.prototype,"close",2),a([d({type:String,reflect:!0})],Et.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],Et.prototype,"open",2),a([d({type:Boolean,reflect:!0})],Et.prototype,"closable",2),a([d({type:Number,reflect:!0})],Et.prototype,"duration",2),a([d({type:Boolean,reflect:!0,attribute:"duration-indicator"})],Et.prototype,"durationIndicator",2),a([d({type:String,reflect:!0,attribute:"toast-stack"})],Et.prototype,"toastStack",2),a([C("open",{waitUntilFirstUpdate:!0})],Et.prototype,"handleOpenChange",1),a([C("duration")],Et.prototype,"handleDurationChange",1),Et=a([k("sd-notification")],Et);R("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});R("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var re=class extends f{constructor(){super(...arguments);this.localize=new _(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return j`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};re.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
241
241
|
:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],re.prototype,"defaultSlot",2),a([d({reflect:!0,type:Boolean})],re.prototype,"disabled",2),a([d({type:String,reflect:!0})],re.prototype,"label",2),a([C("disabled",{waitUntilFirstUpdate:!0})],re.prototype,"handleDisabledChange",1),re=a([k("sd-optgroup")],re);var wt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return p`<div part="base" style="word-break:break-word" class="${c("px-4 flex items-start w-full transition-colors duration-fast ease-in-out text-left text-base relative",{sm:"text-base py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"text-black cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?p`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4 mr-2",{sm:"mt-0.5",md:"mt-1",lg:"mt-1"}[this.size],this.disabled?"sd-option--disabled-color-border":this.selected?"bg-accent border-accent":"bg-white form-control-color-border")}">${this.selected?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?p`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?p`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};wt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
package/cdn/solid-components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue}from"./chunks/chunk.E3RBLJOD.js";import"./chunks/chunk.HAL7R4WT.js";import{a as ee}from"./chunks/chunk.5B4C742P.js";import{a as oe}from"./chunks/chunk.32WSNOK5.js";import{a as re}from"./chunks/chunk.CIRCXXWS.js";import{a as te}from"./chunks/chunk.L7DV2MLH.js";import{a as ae}from"./chunks/chunk.YDZ7FOAV.js";import{a as K}from"./chunks/chunk.D4KX4Q6E.js";import{a as U}from"./chunks/chunk.SW3IDYJO.js";import{a as W}from"./chunks/chunk.4TEHVEJ5.js";import{a as X}from"./chunks/chunk.TNHTS2QZ.js";import{a as Y}from"./chunks/chunk.BS3GML7W.js";import{a as Z}from"./chunks/chunk.XND4CVBN.js";import{a as _}from"./chunks/chunk.GWINLIF6.js";import{a as $}from"./chunks/chunk.TQXBNN2G.js";import{a as Q}from"./chunks/chunk.LWNOAXVZ.js";import{a as V}from"./chunks/chunk.4PBTCGFX.js";import{a as H}from"./chunks/chunk.KQBMEX4Q.js";import{a as q}from"./chunks/chunk.FK2QE2LJ.js";import{a as j}from"./chunks/chunk.GCCUJ5RI.js";import"./chunks/chunk.IVHEBGOY.js";import{a as y}from"./chunks/chunk.A3QRJ5ME.js";import{a as z}from"./chunks/chunk.7EYPTWOC.js";import{a as J}from"./chunks/chunk.WB2ATZAO.js";import{a as P}from"./chunks/chunk.
|
|
1
|
+
import{a as ue}from"./chunks/chunk.E3RBLJOD.js";import"./chunks/chunk.HAL7R4WT.js";import{a as ee}from"./chunks/chunk.5B4C742P.js";import{a as oe}from"./chunks/chunk.32WSNOK5.js";import{a as re}from"./chunks/chunk.CIRCXXWS.js";import{a as te}from"./chunks/chunk.L7DV2MLH.js";import{a as ae}from"./chunks/chunk.YDZ7FOAV.js";import{a as K}from"./chunks/chunk.D4KX4Q6E.js";import{a as U}from"./chunks/chunk.SW3IDYJO.js";import{a as W}from"./chunks/chunk.4TEHVEJ5.js";import{a as X}from"./chunks/chunk.TNHTS2QZ.js";import{a as Y}from"./chunks/chunk.BS3GML7W.js";import{a as Z}from"./chunks/chunk.XND4CVBN.js";import{a as _}from"./chunks/chunk.GWINLIF6.js";import{a as $}from"./chunks/chunk.TQXBNN2G.js";import{a as Q}from"./chunks/chunk.LWNOAXVZ.js";import{a as V}from"./chunks/chunk.4PBTCGFX.js";import{a as H}from"./chunks/chunk.KQBMEX4Q.js";import{a as q}from"./chunks/chunk.FK2QE2LJ.js";import{a as j}from"./chunks/chunk.GCCUJ5RI.js";import"./chunks/chunk.IVHEBGOY.js";import{a as y}from"./chunks/chunk.A3QRJ5ME.js";import{a as z}from"./chunks/chunk.7EYPTWOC.js";import{a as J}from"./chunks/chunk.WB2ATZAO.js";import{a as P}from"./chunks/chunk.MXPGGLKX.js";import{a as v}from"./chunks/chunk.PQIUYCLY.js";import{a as N}from"./chunks/chunk.HA4FSESN.js";import{a as O}from"./chunks/chunk.ZFTFC2P4.js";import{a as E}from"./chunks/chunk.5D2QLOPO.js";import{a as F}from"./chunks/chunk.TYVGKCJX.js";import{a as M}from"./chunks/chunk.P4GZNPGK.js";import{a as R}from"./chunks/chunk.ZC3U3HHB.js";import{a as A}from"./chunks/chunk.XQ2AM7JO.js";import{a as w}from"./chunks/chunk.VSRBSS6K.js";import{a as L}from"./chunks/chunk.BMOWDQOV.js";import"./chunks/chunk.DSKB3SEU.js";import"./chunks/chunk.ICEC5PGK.js";import{a as G}from"./chunks/chunk.LVX7YSFZ.js";import{a as I}from"./chunks/chunk.3FXWTJNG.js";import"./chunks/chunk.WWGARXPI.js";import"./chunks/chunk.23WKPZET.js";import{a as h}from"./chunks/chunk.2TCDQYYC.js";import{a as B}from"./chunks/chunk.ISEX6JDK.js";import{a as C}from"./chunks/chunk.U2Q5EORY.js";import{a as D}from"./chunks/chunk.36LY3DX3.js";import{a as b}from"./chunks/chunk.IXCKRXZP.js";import"./chunks/chunk.SAEYIL5V.js";import"./chunks/chunk.IF6Y3ILD.js";import{a as T}from"./chunks/chunk.OFQAFMQN.js";import{a as k}from"./chunks/chunk.GNQ2AH6R.js";import"./chunks/chunk.54DO3JVH.js";import{a as g}from"./chunks/chunk.TTYJJ4T5.js";import"./chunks/chunk.ERP45OHF.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as u}from"./chunks/chunk.R3CFPFL7.js";import{a as l}from"./chunks/chunk.PZSKPF3M.js";import{a as x}from"./chunks/chunk.OJN4DDNN.js";import{a as s}from"./chunks/chunk.EDVI5WKO.js";import{a as m}from"./chunks/chunk.2FRV4JI3.js";import{a as i}from"./chunks/chunk.KJ4O2AAU.js";import{a as S}from"./chunks/chunk.NXUXZCC5.js";import"./chunks/chunk.3HJR4W7S.js";import{a as c}from"./chunks/chunk.RJ7RNCAD.js";import"./chunks/chunk.BJBQEPZV.js";import"./chunks/chunk.EOXYPQZI.js";import"./chunks/chunk.MHWW3RZB.js";import{a as n}from"./chunks/chunk.GICLEIQR.js";import"./chunks/chunk.CBQWVOOS.js";import{a as r}from"./chunks/chunk.BJGMSYKC.js";import{a as o}from"./chunks/chunk.SK3BEBJX.js";import{a}from"./chunks/chunk.5LQXIFL5.js";import"./chunks/chunk.D4E5ZIRW.js";import{a as p}from"./chunks/chunk.OW556SXG.js";import{a as f}from"./chunks/chunk.6ZVU7R22.js";import"./chunks/chunk.I2H6CZK5.js";import"./chunks/chunk.2AQOPKKH.js";import"./chunks/chunk.G7HKVXLR.js";import"./chunks/chunk.3L472FD4.js";import{a as d}from"./chunks/chunk.3NV5EFHF.js";import{a as t}from"./chunks/chunk.CPEHJK3R.js";import"./chunks/chunk.LZRL7OLU.js";import"./chunks/chunk.LHSR56PH.js";import"./chunks/chunk.CGQ2BPPZ.js";import"./chunks/chunk.B2NUKX6G.js";import"./chunks/chunk.NL7YFV4O.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as e}from"./chunks/chunk.YGYXL3BZ.js";import"./chunks/chunk.W5O4FM6B.js";import"./chunks/chunk.QQD62QOV.js";import{d as de,e as fe}from"./chunks/chunk.HFID7R26.js";import"./chunks/chunk.TRGIF57L.js";import"./chunks/chunk.MB7SWCJ2.js";import"./chunks/chunk.LGQNGLG3.js";import"./chunks/chunk.PYHYYOBE.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import{a as pe}from"./chunks/chunk.VAM5SM3O.js";import"./chunks/chunk.PB7NJRWC.js";import"./chunks/chunk.NADOKI3X.js";import"./chunks/chunk.4XDRYWQQ.js";import"./chunks/chunk.UFTAQNZB.js";import"./chunks/chunk.NYKJXI3Q.js";import"./chunks/chunk.VMZSSKC5.js";import"./chunks/chunk.OBAEIKIV.js";import"./chunks/chunk.W4QBFD6E.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.6EV4YU6C.js";export{pe as LocalizeController,o as SdAccordion,r as SdAccordionGroup,a as SdAnimation,p as SdAudio,u as SdBadge,l as SdBrandshape,x as SdBreadcrumb,i as SdBreadcrumbItem,d as SdButton,c as SdCarousel,n as SdCarouselItem,b as SdCheckbox,T as SdCheckboxGroup,k as SdCombobox,I as SdDatepicker,h as SdDialog,B as SdDivider,f as SdDrawer,s as SdDropdown,C as SdExpandable,D as SdFlipcard,G as SdHeader,e as SdIcon,M as SdInclude,R as SdInput,S as SdLink,t as SdLoader,A as SdMapMarker,w as SdMenu,L as SdMenuItem,P as SdNavigationItem,v as SdNotification,N as SdOptgroup,O as SdOption,m as SdPopup,E as SdProgressBar,F as SdQuickfact,H as SdRadio,Q as SdRadioButton,V as SdRadioGroup,q as SdRange,y as SdRangeTick,z as SdScrollable,J as SdSelect,K as SdSkeleton,U as SdSpinner,W as SdStep,X as SdStepGroup,Y as SdSwitch,Z as SdTab,_ as SdTabGroup,$ as SdTabPanel,g as SdTag,ee as SdTeaser,oe as SdTeaserMedia,re as SdTextarea,te as SdThemeListener,j as SdTooltip,ae as SdVideo,de as registerIconLibrary,ue as setupAutocomplete,fe as unregisterIconLibrary};
|
package/cdn/web-types.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as Bt}from"./chunk.UFTAQNZB.js";import{a as kt,b as O,d as Et,h as Ct}from"./chunk.VMZSSKC5.js";import{b as Dt,e as Rt}from"./chunk.OBAEIKIV.js";import{a as S,b as W,c as mt,e as A}from"./chunk.6EV4YU6C.js";var V=Math.min,T=Math.max,ft=Math.round,ut=Math.floor,$=t=>({x:t,y:t}),ge={left:"right",right:"left",bottom:"top",top:"bottom"};function gt(t,e,n){return T(t,V(e,n))}function Z(t,e){return typeof t=="function"?t(e):t}function Y(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}function _(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function yt(t){return St(_(t))}function Nt(t,e,n){n===void 0&&(n=!1);let i=tt(t),o=yt(t),s=wt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function Ht(t){let e=at(t);return[pt(t),e,pt(e)]}function pt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var $t=["left","right"],Ft=["right","left"],we=["top","bottom"],ye=["bottom","top"];function xe(t,e,n){switch(t){case"top":case"bottom":return n?e?Ft:$t:e?$t:Ft;case"left":case"right":return e?we:ye;default:return[]}}function Wt(t,e,n,i){let o=tt(t),s=xe(Y(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(pt)))),s}function at(t){let e=Y(t);return ge[e]+t.slice(e.length)}function ve(t){return S({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?ve(t):{top:t,right:t,bottom:t,left:t}}function et(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Vt(t,e,n){let{reference:i,floating:o}=t,s=_(e),r=yt(e),c=wt(r),f=Y(e),u=s==="y",l=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[c]/2-o[c]/2,a;switch(f){case"top":a={x:l,y:i.y-o.height};break;case"bottom":a={x:l,y:i.y+i.height};break;case"right":a={x:i.x+i.width,y:h};break;case"left":a={x:i.x-o.width,y:h};break;default:a={x:i.x,y:i.y}}switch(tt(e)){case"start":a[r]-=m*(n&&u?-1:1);break;case"end":a[r]+=m*(n&&u?-1:1);break}return a}async function _t(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:h="floating",altBoundary:m=!1,padding:a=0}=Z(e,t),d=Tt(a),w=c[m?h==="floating"?"reference":"floating":h],g=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:l,strategy:f})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},R=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:v,strategy:f}):y);return{top:(g.top-R.top+d.top)/b.y,bottom:(R.bottom-g.bottom+d.bottom)/b.y,left:(g.left-R.left+d.left)/b.x,right:(R.right-g.right+d.right)/b.x}}var be=50,jt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:W(S({},r),{detectOverflow:_t}),f=await(r.isRTL==null?void 0:r.isRTL(e)),u=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:l,y:h}=Vt(u,i,f),m=i,a=0,d={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:g,fn:y}=w,{x:v,y:b,data:R,reset:E}=await y({x:l,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:d,rects:u,platform:c,elements:{reference:t,floating:e}});l=v!=null?v:l,h=b!=null?b:h,d[g]=S(S({},d[g]),R),E&&a<be&&(a++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):E.rects),{x:l,y:h}=Vt(u,m,f)),p=-1)}return{x:l,y:h,placement:m,strategy:o,middlewareData:d}},It=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:u,padding:l=0}=Z(t,e)||{};if(u==null)return{};let h=Tt(l),m={x:n,y:i},a=yt(o),d=wt(a),p=await r.getDimensions(u),w=a==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",b=s.reference[d]+s.reference[a]-m[a]-s.floating[d],R=m[a]-s.reference[a],E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u)),C=E?E[v]:0;(!C||!await(r.isElement==null?void 0:r.isElement(E)))&&(C=c.floating[v]||s.floating[d]);let I=b/2-R/2,N=C/2-p[d]/2-1,z=V(h[g],N),U=V(h[y],N),H=z,K=C-p[d]-U,P=C/2-p[d]/2+I,k=gt(H,P,K),J=!f.arrow&&tt(o)!=null&&P!==k&&s.reference[d]/2-(P<H?z:U)-p[d]/2<0,X=J?P<H?P-H:P-K:0;return{[a]:m[a]+X,data:S({[a]:k,centerOffset:P-k-X},J&&{alignmentOffset:X}),reset:J}}});var Xt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:u}=e,P=Z(t,e),{mainAxis:l=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=mt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=Y(o),y=_(c),v=Y(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(u.floating)),R=m||(v||!p?[at(c)]:Ht(c)),E=d!=="none";!m&&E&&R.push(...Wt(c,p,d,b));let C=[c,...R],I=await f.detectOverflow(e,w),N=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(l&&N.push(I[g]),h){let k=Nt(o,r,b);N.push(I[k[0]],I[k[1]])}if(z=[...z,{placement:o,overflows:N}],!N.every(k=>k<=0)){var U,H;let k=(((U=s.flip)==null?void 0:U.index)||0)+1,J=C[k];if(J&&(!(h==="alignment"?y!==_(J):!1)||z.every(B=>_(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:k,overflows:z},reset:{placement:J}};let X=(H=z.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:H.placement;if(!X)switch(a){case"bestFit":{var K;let Q=(K=z.filter(B=>{if(E){let G=_(B.placement);return G===y||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,pe)=>G+pe,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:K[0];Q&&(X=Q);break}case"initialPlacement":X=c;break}if(o!==X)return{reset:{placement:X}}}return{}}}};var Ae=new Set(["left","top"]);async function Oe(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Y(n),c=tt(n),f=_(n)==="y",u=Ae.has(r)?-1:1,l=s&&f?-1:1,h=Z(e,t),{mainAxis:m,crossAxis:a,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof d=="number"&&(a=c==="end"?d*-1:d),f?{x:a*l,y:m*u}:{x:m*u,y:a*l}}var Yt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:c}=e,f=await Oe(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:W(S({},f),{placement:r})}}}},qt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o,platform:s}=e,g=Z(t,e),{mainAxis:r=!0,crossAxis:c=!1,limiter:f={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}}}=g,u=mt(g,["mainAxis","crossAxis","limiter"]),l={x:n,y:i},h=await s.detectOverflow(e,u),m=_(Y(o)),a=St(m),d=l[a],p=l[m];if(r){let y=a==="y"?"top":"left",v=a==="y"?"bottom":"right",b=d+h[y],R=d-h[v];d=gt(b,d,R)}if(c){let y=m==="y"?"top":"left",v=m==="y"?"bottom":"right",b=p+h[y],R=p-h[v];p=gt(b,p,R)}let w=f.fn(W(S({},e),{[a]:d,[m]:p}));return W(S({},w),{data:{x:w.x-n,y:w.y-i,enabled:{[a]:r,[m]:c}}})}}};var Ut=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:c}=e,z=Z(t,e),{apply:f=()=>{}}=z,u=mt(z,["apply"]),l=await r.detectOverflow(e,u),h=Y(o),m=tt(o),a=_(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-l.top-l.bottom,v=d-l.left-l.right,b=V(p-l[w],y),R=V(d-l[g],v),E=!e.middlewareData.shift,C=b,I=R;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(I=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(C=y),E&&!m){let U=T(l.left,0),H=T(l.right,0),K=T(l.top,0),P=T(l.bottom,0);a?I=d-2*(U!==0||H!==0?U+H:T(l.left,l.right)):C=p-2*(K!==0||P!==0?K+P:T(l.top,l.bottom))}await f(W(S({},e),{availableWidth:I,availableHeight:C}));let N=await r.getDimensions(c.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function it(t){return Gt(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function F(t){var e;return(e=(Gt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gt(t){return xt()?t instanceof Node||t instanceof L(t).Node:!1}function M(t){return xt()?t instanceof Element||t instanceof L(t).Element:!1}function j(t){return xt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function Kt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=D(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function Jt(t){return/^(table|td|th)$/.test(it(t))}function ht(t){try{if(t.matches(":popover-open"))return!0}catch(e){}try{return t.matches(":modal")}catch(e){return!1}}var Re=/transform|translate|scale|rotate|perspective|filter/,Ee=/paint|layout|strict|content/,nt=t=>!!t&&t!=="none",Lt;function vt(t){let e=M(t)?D(t):t;return nt(e.transform)||nt(e.translate)||nt(e.scale)||nt(e.rotate)||nt(e.perspective)||!bt()&&(nt(e.backdropFilter)||nt(e.filter))||Re.test(e.willChange||"")||Ee.test(e.contain||"")}function Qt(t){let e=q(t);for(;j(e)&&!ot(e);){if(vt(e))return e;if(ht(e))return null;e=q(e)}return null}function bt(){return Lt==null&&(Lt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lt}function ot(t){return/^(html|body|#document)$/.test(it(t))}function D(t){return L(t).getComputedStyle(t)}function dt(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(it(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||F(t);return Kt(e)?e.host:e}function Zt(t){let e=q(t);return ot(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&ct(e)?e:Zt(e)}function st(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Zt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=L(o);if(s){let c=At(r);return e.concat(r,r.visualViewport||[],ct(o)?o:[],c&&n?st(c):[])}else return e.concat(o,st(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ie(t){let e=D(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=j(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,c=ft(n)!==s||ft(i)!==r;return c&&(n=s,i=r),{width:n,height:i,$:c}}function zt(t){return M(t)?t:t.contextElement}function lt(t){let e=zt(t);if(!j(e))return $(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=ie(e),r=(s?ft(n.width):n.width)/i,c=(s?ft(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ce=$(0);function oe(t){let e=L(t);return!bt()||!e.visualViewport?Ce:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Se(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function rt(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=zt(t),r=$(1);e&&(i?M(i)&&(r=lt(i)):r=lt(t));let c=Se(s,n,i)?oe(s):$(0),f=(o.left+c.x)/r.x,u=(o.top+c.y)/r.y,l=o.width/r.x,h=o.height/r.y;if(s){let m=L(s),a=i&&M(i)?L(i):i,d=m,p=At(d);for(;p&&i&&a!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=D(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,b=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;f*=w.x,u*=w.y,l*=w.x,h*=w.y,f+=v,u+=b,d=L(p),p=At(d)}}return et({width:l,height:h,x:f,y:u})}function Ot(t,e){let n=dt(t).scrollLeft;return e?e.left+n:rt(F(t)).left+n}function re(t,e){let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Ot(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function Te(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=F(i),c=e?ht(e.floating):!1;if(i===r||c&&s)return n;let f={scrollLeft:0,scrollTop:0},u=$(1),l=$(0),h=j(i);if((h||!h&&!s)&&((it(i)!=="body"||ct(r))&&(f=dt(i)),h)){let a=rt(i);u=lt(i),l.x=a.x+i.clientLeft,l.y=a.y+i.clientTop}let m=r&&!h&&!s?re(r,f):$(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+l.x+m.x,y:n.y*u.y-f.scrollTop*u.y+l.y+m.y}}function Le(t){return Array.from(t.getClientRects())}function Pe(t){let e=F(t),n=dt(t),i=t.ownerDocument.body,o=T(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=T(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+Ot(t),c=-n.scrollTop;return D(i).direction==="rtl"&&(r+=T(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:c}}var te=25;function ze(t,e){let n=L(t),i=F(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,c=0,f=0;if(o){s=o.width,r=o.height;let l=bt();(!l||l&&e==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}let u=Ot(i);if(u<=0){let l=i.ownerDocument,h=l.body,m=getComputedStyle(h),a=l.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,d=Math.abs(i.clientWidth-h.clientWidth-a);d<=te&&(s-=d)}else u<=te&&(s+=u);return{width:s,height:r,x:c,y:f}}function Me(t,e){let n=rt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=j(t)?lt(t):$(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=o*s.x,u=i*s.y;return{width:r,height:c,x:f,y:u}}function ee(t,e,n){let i;if(e==="viewport")i=ze(t,n);else if(e==="document")i=Pe(F(t));else if(M(e))i=Me(e,n);else{let o=oe(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return et(i)}function se(t,e){let n=q(t);return n===e||!M(n)||ot(n)?!1:D(n).position==="fixed"||se(n,e)}function De(t,e){let n=e.get(t);if(n)return n;let i=st(t,[],!1).filter(c=>M(c)&&it(c)!=="body"),o=null,s=D(t).position==="fixed",r=s?q(t):t;for(;M(r)&&!ot(r);){let c=D(r),f=vt(r);!f&&c.position==="fixed"&&(o=null),(s?!f&&!o:!f&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ct(r)&&!f&&se(t,r))?i=i.filter(l=>l!==r):o=c,r=q(r)}return e.set(t,i),i}function ke(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ht(e)?[]:De(e,this._c):[].concat(n),i],c=ee(e,r[0],o),f=c.top,u=c.right,l=c.bottom,h=c.left;for(let m=1;m<r.length;m++){let a=ee(e,r[m],o);f=T(a.top,f),u=V(a.right,u),l=V(a.bottom,l),h=T(a.left,h)}return{width:u-h,height:l-f,x:h,y:f}}function Be(t){let{width:e,height:n}=ie(t);return{width:e,height:n}}function $e(t,e,n){let i=j(e),o=F(e),s=n==="fixed",r=rt(t,!0,s,e),c={scrollLeft:0,scrollTop:0},f=$(0);function u(){f.x=Ot(o)}if(i||!i&&!s)if((it(e)!=="body"||ct(o))&&(c=dt(e)),i){let a=rt(e,!0,s,e);f.x=a.x+e.clientLeft,f.y=a.y+e.clientTop}else o&&u();s&&!i&&o&&u();let l=o&&!i&&!s?re(o,c):$(0),h=r.left+c.scrollLeft-f.x-l.x,m=r.top+c.scrollTop-f.y-l.y;return{x:h,y:m,width:r.width,height:r.height}}function Pt(t){return D(t).position==="static"}function ne(t,e){if(!j(t)||D(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return F(t)===n&&(n=n.ownerDocument.body),n}function ce(t,e){let n=L(t);if(ht(t))return n;if(!j(t)){let o=q(t);for(;o&&!ot(o);){if(M(o)&&!Pt(o))return o;o=q(o)}return n}let i=ne(t,e);for(;i&&Jt(i)&&Pt(i);)i=ne(i,e);return i&&ot(i)&&Pt(i)&&!vt(i)?n:i||Qt(t)||n}var Fe=async function(t){let e=this.getOffsetParent||ce,n=this.getDimensions,i=await n(t.floating);return{reference:$e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ne(t){return D(t).direction==="rtl"}var He={convertOffsetParentRelativeRectToViewportRelativeRect:Te,getDocumentElement:F,getClippingRect:ke,getOffsetParent:ce,getElementRects:Fe,getClientRects:Le,getDimensions:Be,getScale:lt,isElement:M,isRTL:Ne};function le(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,i,o=F(t);function s(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function r(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),s();let u=t.getBoundingClientRect(),{left:l,top:h,width:m,height:a}=u;if(c||e(),!m||!a)return;let d=ut(h),p=ut(o.clientWidth-(l+m)),w=ut(o.clientHeight-(h+a)),g=ut(l),v={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:T(0,V(1,f))||1},b=!0;function R(E){let C=E[0].intersectionRatio;if(C!==f){if(!b)return r();C?r(!1,C):i=setTimeout(()=>{r(!1,1e-7)},1e3)}C===1&&!le(u,t.getBoundingClientRect())&&r(),b=!1}try{n=new IntersectionObserver(R,W(S({},v),{root:o.ownerDocument}))}catch(E){n=new IntersectionObserver(R,v)}n.observe(t)}return r(!0),s}function ae(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,u=zt(t),l=o||s?[...u?st(u):[],...e?st(e):[]]:[];l.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=u&&c?We(u,n):null,m=-1,a=null;r&&(a=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&a&&e&&(a.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=a)==null||v.observe(e)})),n()}),u&&!f&&a.observe(u),e&&a.observe(e));let d,p=f?rt(t):null;f&&w();function w(){let g=rt(t);p&&!le(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;l.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=a)==null||g.disconnect(),a=null,f&&cancelAnimationFrame(d)}}var fe=Yt;var ue=qt,he=Xt,Mt=Ut;var de=It;var me=(t,e,n)=>{let i=new Map,o=S({platform:He},n),s=W(S({},o.platform),{_c:i});return jt(t,e,W(S({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=ae(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[fe({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(Mt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(he({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(ue({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(Mt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(de({element:this.arrowEl,padding:this.arrowPadding})),me(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let c=getComputedStyle(this).direction==="rtl",f={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let u=s.arrow.x,l=s.arrow.y,h="",m="",a="",d="";if(this.arrowPlacement==="start"){let p=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=c?p:"",d=c?"":p}else if(this.arrowPlacement==="end"){let p=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=c?"":p,d=c?p:"",a=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof u=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof l=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof u=="number"?`${u}px`:"",h=typeof l=="number"?`${l}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:a,left:d,[f]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Rt`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Bt("isolate z-20",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Rt`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,Dt`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],A([Et('[part="popup"]')],x.prototype,"popup",2),A([Et('[part="arrow"]')],x.prototype,"arrowEl",2),A([O({reflect:!0})],x.prototype,"anchor",2),A([O({type:Boolean,reflect:!0})],x.prototype,"active",2),A([O({type:String,reflect:!0})],x.prototype,"placement",2),A([O({type:String,reflect:!0})],x.prototype,"strategy",2),A([O({type:Number,reflect:!0})],x.prototype,"distance",2),A([O({type:Number,reflect:!0})],x.prototype,"skidding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"arrow",2),A([O({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),A([O({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"flip",2),A([O({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),A([O({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),A([O({type:Object})],x.prototype,"flipBoundary",2),A([O({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),A([O({type:Boolean})],x.prototype,"shift",2),A([O({type:Object})],x.prototype,"shiftBoundary",2),A([O({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),A([O({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),A([O()],x.prototype,"sync",2),A([O({type:Object})],x.prototype,"autoSizeBoundary",2),A([O({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=A([kt("sd-6-24-
|
|
2
|
+
:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],A([Et('[part="popup"]')],x.prototype,"popup",2),A([Et('[part="arrow"]')],x.prototype,"arrowEl",2),A([O({reflect:!0})],x.prototype,"anchor",2),A([O({type:Boolean,reflect:!0})],x.prototype,"active",2),A([O({type:String,reflect:!0})],x.prototype,"placement",2),A([O({type:String,reflect:!0})],x.prototype,"strategy",2),A([O({type:Number,reflect:!0})],x.prototype,"distance",2),A([O({type:Number,reflect:!0})],x.prototype,"skidding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"arrow",2),A([O({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),A([O({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),A([O({type:Boolean,reflect:!0})],x.prototype,"flip",2),A([O({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),A([O({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),A([O({type:Object})],x.prototype,"flipBoundary",2),A([O({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),A([O({type:Boolean})],x.prototype,"shift",2),A([O({type:Object})],x.prototype,"shiftBoundary",2),A([O({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),A([O({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),A([O()],x.prototype,"sync",2),A([O({type:Object})],x.prototype,"autoSizeBoundary",2),A([O({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=A([kt("sd-6-24-2-popup")],x);export{x as a};
|