@solid-design-system/components 7.0.3 → 7.1.0
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.PEHSUZ2L.js +2 -0
- package/cdn/components/datepicker/datepicker.d.ts +4 -0
- package/cdn/components/datepicker/datepicker.js +1 -1
- package/cdn/custom-elements.json +33 -1
- package/cdn/solid-components.bundle.js +2 -2
- package/cdn/solid-components.iife.js +2 -2
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +6 -1
- package/cdn/web-types.json +24 -2
- package/cdn-versioned/chunks/chunk.2C3UQTSS.js +2 -2
- package/cdn-versioned/chunks/chunk.2O3FM7UB.js +2 -2
- package/cdn-versioned/chunks/chunk.35XPUMS2.js +1 -1
- package/cdn-versioned/chunks/chunk.37JCS2XH.js +5 -5
- package/cdn-versioned/chunks/chunk.3IZUMERL.js +2 -2
- package/cdn-versioned/chunks/chunk.3RIAU3TH.js +3 -3
- package/cdn-versioned/chunks/chunk.4GA43M6X.js +2 -2
- package/cdn-versioned/chunks/chunk.4QTJXGRR.js +2 -2
- package/cdn-versioned/chunks/chunk.ADVB3FPU.js +2 -2
- package/cdn-versioned/chunks/chunk.AJGTKHU5.js +2 -2
- package/cdn-versioned/chunks/chunk.C37LGAL3.js +2 -2
- package/cdn-versioned/chunks/chunk.CGMKBGJU.js +2 -2
- package/cdn-versioned/chunks/chunk.CQNFI34K.js +2 -2
- package/cdn-versioned/chunks/chunk.DCAJAXUP.js +2 -2
- package/cdn-versioned/chunks/chunk.DS2MKMMN.js +3 -3
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.GA3PWYR4.js +2 -2
- package/cdn-versioned/chunks/chunk.HNBY226D.js +1 -1
- package/cdn-versioned/chunks/chunk.HY624TPC.js +2 -2
- package/cdn-versioned/chunks/chunk.I7OVY27Y.js +10 -10
- package/cdn-versioned/chunks/chunk.IFLRUJCI.js +2 -2
- package/cdn-versioned/chunks/chunk.IQBZ7GRB.js +2 -2
- package/cdn-versioned/chunks/chunk.J45556RK.js +1 -1
- package/cdn-versioned/chunks/chunk.JMX6KLDZ.js +2 -2
- package/cdn-versioned/chunks/chunk.JQV2BZ2E.js +2 -2
- package/cdn-versioned/chunks/chunk.KE2YEQDL.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.MR54F6CV.js +2 -2
- package/cdn-versioned/chunks/chunk.MYPRMCUO.js +1 -1
- package/cdn-versioned/chunks/chunk.N4L76IWF.js +1 -1
- package/cdn-versioned/chunks/chunk.NGU7NO3O.js +5 -5
- package/cdn-versioned/chunks/chunk.NJKSWXOS.js +2 -2
- package/cdn-versioned/chunks/chunk.NOP4DTP2.js +2 -2
- package/cdn-versioned/chunks/chunk.OOIX4OAP.js +2 -2
- package/cdn-versioned/chunks/chunk.P7GMFHO5.js +1 -1
- package/cdn-versioned/chunks/chunk.PCXVXYU2.js +2 -2
- package/cdn-versioned/chunks/chunk.PEHSUZ2L.js +2 -0
- package/cdn-versioned/chunks/chunk.PFPUD5HR.js +2 -2
- package/cdn-versioned/chunks/chunk.PKCNX4R2.js +2 -2
- package/cdn-versioned/chunks/chunk.PQW77KHE.js +2 -2
- package/cdn-versioned/chunks/chunk.PURR56D5.js +2 -2
- package/cdn-versioned/chunks/chunk.Q63S2Z2M.js +2 -2
- package/cdn-versioned/chunks/chunk.QK3WCIP5.js +2 -2
- package/cdn-versioned/chunks/chunk.RHC6WZ6V.js +2 -2
- package/cdn-versioned/chunks/chunk.RRJCCIDH.js +1 -1
- package/cdn-versioned/chunks/chunk.SPL6VR5S.js +2 -2
- package/cdn-versioned/chunks/chunk.SSE7T5OF.js +2 -2
- package/cdn-versioned/chunks/chunk.SZNU4NHI.js +1 -1
- package/cdn-versioned/chunks/chunk.T7I5MFNS.js +2 -2
- package/cdn-versioned/chunks/chunk.TIMZJKMF.js +2 -2
- package/cdn-versioned/chunks/chunk.TX5WPWH2.js +2 -2
- package/cdn-versioned/chunks/chunk.UI3ZVKSU.js +2 -2
- package/cdn-versioned/chunks/chunk.V6IM4GAA.js +2 -2
- package/cdn-versioned/chunks/chunk.VPBXFCBA.js +2 -2
- package/cdn-versioned/chunks/chunk.VSX5LY2D.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WL6NNNG5.js +2 -2
- package/cdn-versioned/chunks/chunk.WQZWYMH3.js +1 -1
- package/cdn-versioned/chunks/chunk.WUXX2P2S.js +2 -2
- package/cdn-versioned/chunks/chunk.XGVG7F7T.js +2 -2
- package/cdn-versioned/chunks/chunk.XHYIXZF4.js +2 -2
- package/cdn-versioned/chunks/chunk.XZ5JTM6K.js +2 -2
- package/cdn-versioned/chunks/chunk.Y4ZS3BWH.js +2 -2
- package/cdn-versioned/chunks/chunk.YUDSN6HJ.js +3 -3
- package/cdn-versioned/chunks/chunk.Z2M7BQV5.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/datepicker/datepicker.d.ts +5 -1
- package/cdn-versioned/components/datepicker/datepicker.js +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/file-selector/file-selector.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/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/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 +298 -266
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +81 -81
- package/cdn-versioned/solid-components.css +3 -3
- 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 +120 -115
- package/cdn-versioned/web-types.json +195 -173
- package/dist/chunks/{chunk.UDTZN5OG.js → chunk.RRSERGVO.js} +37 -2
- package/dist/components/datepicker/datepicker.d.ts +4 -0
- package/dist/components/datepicker/datepicker.js +1 -1
- package/dist/custom-elements.json +33 -1
- package/dist/solid-components.js +4 -4
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +24 -2
- package/dist-versioned/chunks/chunk.2EXNVXP2.js +2 -2
- package/dist-versioned/chunks/chunk.2M6Y3YHU.js +4 -4
- package/dist-versioned/chunks/chunk.2NXJZVSN.js +11 -11
- package/dist-versioned/chunks/chunk.2OT7JZJP.js +10 -10
- package/dist-versioned/chunks/chunk.2Y2MTVGF.js +3 -3
- package/dist-versioned/chunks/chunk.3PHACHZ2.js +7 -7
- package/dist-versioned/chunks/chunk.42XKKRQ2.js +6 -6
- package/dist-versioned/chunks/chunk.4FXMBMSY.js +3 -3
- package/dist-versioned/chunks/chunk.4JC6XNQW.js +4 -4
- package/dist-versioned/chunks/chunk.4VWOZ477.js +4 -4
- package/dist-versioned/chunks/chunk.5JPFIM5W.js +3 -3
- package/dist-versioned/chunks/chunk.5TU4CAN7.js +6 -6
- package/dist-versioned/chunks/chunk.65FELEDA.js +3 -3
- package/dist-versioned/chunks/chunk.67LY7Y75.js +4 -4
- package/dist-versioned/chunks/chunk.6F52A4JB.js +3 -3
- package/dist-versioned/chunks/chunk.72LCNWVE.js +3 -3
- package/dist-versioned/chunks/chunk.7DQB3MN6.js +7 -7
- package/dist-versioned/chunks/chunk.7EXDALNL.js +5 -5
- package/dist-versioned/chunks/chunk.AHIYNPL4.js +1 -1
- package/dist-versioned/chunks/chunk.ALJ34SPY.js +4 -4
- package/dist-versioned/chunks/chunk.B5BWUIZC.js +2 -2
- package/dist-versioned/chunks/chunk.BW5BXFWA.js +5 -5
- package/dist-versioned/chunks/chunk.C3L34J75.js +1 -1
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.C4HDZU75.js +2 -2
- package/dist-versioned/chunks/chunk.CB7PF3MZ.js +6 -6
- package/dist-versioned/chunks/chunk.CXFXIMXV.js +13 -13
- package/dist-versioned/chunks/chunk.DF2LZ65H.js +2 -2
- package/dist-versioned/chunks/chunk.DGLSKBZE.js +3 -3
- package/dist-versioned/chunks/chunk.DZED227Y.js +1 -1
- package/dist-versioned/chunks/chunk.EQIZ7J5Z.js +25 -25
- package/dist-versioned/chunks/chunk.ES5DW7MC.js +2 -2
- package/dist-versioned/chunks/chunk.HFRDUE6W.js +11 -11
- package/dist-versioned/chunks/chunk.I3DVEGNB.js +11 -11
- package/dist-versioned/chunks/chunk.JKJXDDJU.js +3 -3
- package/dist-versioned/chunks/chunk.JPGYEMXS.js +2 -2
- package/dist-versioned/chunks/chunk.JXDY64LH.js +10 -10
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KSU44YSO.js +7 -7
- package/dist-versioned/chunks/chunk.KXUT6UJL.js +2 -2
- package/dist-versioned/chunks/chunk.MPHRXV2B.js +1 -1
- package/dist-versioned/chunks/chunk.N5RQE7OC.js +1 -1
- package/dist-versioned/chunks/chunk.PAXRRXRW.js +4 -4
- package/dist-versioned/chunks/chunk.PGECK7YI.js +1 -1
- package/dist-versioned/chunks/chunk.QGCJ4WUV.js +5 -5
- package/dist-versioned/chunks/chunk.QIYLIH7P.js +5 -5
- package/dist-versioned/chunks/chunk.QNHUD2SQ.js +42 -42
- package/dist-versioned/chunks/{chunk.UDTZN5OG.js → chunk.RRSERGVO.js} +46 -11
- package/dist-versioned/chunks/chunk.S2ZVBJYN.js +5 -5
- package/dist-versioned/chunks/chunk.SEWHXNAY.js +5 -5
- package/dist-versioned/chunks/chunk.SG7H3CVK.js +12 -12
- package/dist-versioned/chunks/chunk.SMRP2JEM.js +1 -1
- package/dist-versioned/chunks/chunk.TFAIMBF7.js +11 -11
- package/dist-versioned/chunks/chunk.TLAI6IVF.js +2 -2
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UORTR6WB.js +5 -5
- package/dist-versioned/chunks/chunk.VX7JXCCH.js +2 -2
- package/dist-versioned/chunks/chunk.XAU2YS2A.js +5 -5
- package/dist-versioned/chunks/chunk.XQMBT64Z.js +8 -8
- package/dist-versioned/chunks/chunk.YJ46MX3X.js +6 -6
- package/dist-versioned/chunks/chunk.YKGIJFJM.js +23 -23
- package/dist-versioned/chunks/chunk.YRKHHYV5.js +2 -2
- package/dist-versioned/chunks/chunk.Z4IULIBO.js +10 -10
- package/dist-versioned/chunks/chunk.ZLPWCNY6.js +14 -14
- package/dist-versioned/chunks/chunk.ZQ6CXL6H.js +5 -5
- 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/datepicker/datepicker.d.ts +5 -1
- package/dist-versioned/components/datepicker/datepicker.js +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/file-selector/file-selector.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/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/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 +298 -266
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +3 -3
- package/dist-versioned/solid-components.js +4 -4
- package/dist-versioned/vscode.html-custom-data.json +120 -115
- package/dist-versioned/web-types.json +195 -173
- package/package.json +3 -3
- package/cdn/chunks/chunk.7OG7ICBB.js +0 -2
- package/cdn-versioned/chunks/chunk.7OG7ICBB.js +0 -2
|
@@ -212,8 +212,8 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12,3rem);width:var(--
|
|
|
212
212
|
popup:popup__content,
|
|
213
213
|
"><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],z)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${c("inline-flex",x,v,M)}"></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",x)}">${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",y,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(O=>O==null?void 0:O.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",y)}" 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",w,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",M)}" name="close-circle" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c(w,M,"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",w,M)}" 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":"form-control-color-icon-fill",M)}">${this.type!=="search"?p`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-bottom" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${c("flex items-center",w)}" type="button" @mousedown="${this.preventLoosingFocus}" @click="${this.handleSearchClick}"><sd-icon class="${c(v,M)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="combobox-button absolute top-2" 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="${$(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,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
214
214
|
: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,174 174 174))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500,174 174 174))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4,1rem);height:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3,.75rem);height:var(--sd-spacing-8,2rem);width:var(--sd-spacing-8,2rem)}[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,.25rem);border-width:var(--sd-combobox__tag-border-width,.0625rem);padding-inline:var(--sd-spacing-1,.25rem)}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,.5rem)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100,236 240 249))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold, 600);font-weight:var(--sd-font-weight-bold,600);color:inherit}:host([type=search]) sd-icon[name=magnifying-glass],[part=chevron]{color:rgba(var(--sd-form-control-color-icon-fill))}:host([disabled])::part(chevron),:host([type=search][disabled]) sd-icon[name=magnifying-glass],:host([type=search][visually-disabled]) sd-icon[name=magnifying-glass],: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}`],o([g("sd-popup")],S.prototype,"popup",2),o([g('[part="combobox"]')],S.prototype,"combobox",2),o([g('[part="display-input"]')],S.prototype,"displayInput",2),o([g(".value-input")],S.prototype,"valueInput",2),o([g('[part="listbox"]')],S.prototype,"listbox",2),o([g('[part="tags"]')],S.prototype,"tagWrapper",2),o([g('[part="filtered-listbox"]')],S.prototype,"filteredWrapper",2),o([g("slot:not([name])")],S.prototype,"defaultSlot",2),o([g("#invalid-message")],S.prototype,"invalidMessage",2),o([L()],S.prototype,"hasFocus",2),o([L()],S.prototype,"displayInputValue",2),o([L()],S.prototype,"selectedTextLabel",2),o([L()],S.prototype,"selectedOptions",2),o([L()],S.prototype,"filteredOptions",2),o([L()],S.prototype,"allOptions",2),o([L()],S.prototype,"lastOption",2),o([L()],S.prototype,"showValidStyle",2),o([L()],S.prototype,"showInvalidStyle",2),o([L()],S.prototype,"deletedTagLabel",2),o([d({reflect:!0})],S.prototype,"name",2),o([d({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],S.prototype,"value",2),o([Vt()],S.prototype,"defaultValue",2),o([d({type:String,reflect:!0})],S.prototype,"size",2),o([d({type:String,reflect:!0})],S.prototype,"placeholder",2),o([d({type:String,attribute:"max-options-tag-label",reflect:!0})],S.prototype,"maxOptionsTagLabel",2),o([d({type:Boolean,reflect:!0})],S.prototype,"disabled",2),o([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],S.prototype,"visuallyDisabled",2),o([d({type:Boolean,reflect:!0})],S.prototype,"clearable",2),o([d({type:Boolean,reflect:!0})],S.prototype,"open",2),o([d({type:Boolean,reflect:!0})],S.prototype,"hoist",2),o([d({type:String,reflect:!0})],S.prototype,"label",2),o([d({type:String,reflect:!0})],S.prototype,"placement",2),o([d({type:String,attribute:"help-text",reflect:!0})],S.prototype,"helpText",2),o([d({type:String,reflect:!0})],S.prototype,"form",2),o([d({type:Boolean,reflect:!0})],S.prototype,"required",2),o([d({attribute:"floating-label",type:Boolean,reflect:!0})],S.prototype,"floatingLabel",2),o([d({type:String,reflect:!0})],S.prototype,"type",2),o([L()],S.prototype,"currentPlacement",2),o([d()],S.prototype,"getOption",2),o([d({type:Boolean,reflect:!0})],S.prototype,"multiple",2),o([d({type:Boolean,reflect:!0})],S.prototype,"useTags",2),o([d({type:Number,reflect:!0,attribute:"max-options-visible"})],S.prototype,"maxOptionsVisible",2),o([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],S.prototype,"styleOnValid",2),o([d()],S.prototype,"filter",2),o([d()],S.prototype,"getTag",2),o([C("filter",{waitUntilFirstUpdate:!0})],S.prototype,"handleFilterChange",1),o([C("useTags",{waitUntilFirstUpdate:!0})],S.prototype,"handleUseTagsChange",1),o([C("size",{waitUntilFirstUpdate:!0})],S.prototype,"applySizeToOptions",1),o([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],S.prototype,"handleDisabledChange",1),o([C("value",{waitUntilFirstUpdate:!0})],S.prototype,"handleValueChange",1),o([C("displayInputValue",{waitUntilFirstUpdate:!0})],S.prototype,"handleDisplayInputValueChange",1),o([C("open",{waitUntilFirstUpdate:!0})],S.prototype,"handleOpenChange",1),o([C(["size","floatingLabel"])],S.prototype,"handleSizeChange",1),S=o([E("sd-combobox")],S);F("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});F("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var ke=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")}">`}};ke.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
215
|
-
:host{margin:0}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],o([d({type:String,reflect:!0})],ke.prototype,"orientation",2),o([d({type:Boolean,reflect:!0})],ke.prototype,"inverted",2),ke=o([E("sd-divider")],ke);var T={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]),a=Number(e[2])-1,n=Number(e[3]),l=new Date(i,a,n);return Number.isNaN(l.getTime())?null:l},compareDates:(s,r)=>{let t=T.startOfDayLocal(s).getTime(),e=T.startOfDayLocal(r).getTime();return t-e},isBetweenInclusive:(s,r,t)=>{let e=T.compareDates(r,t)<=0?r:t,i=T.compareDates(r,t)<=0?t:r;return T.compareDates(s,e)>=0&&T.compareDates(s,i)<=0}};var Er={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:""}},Ta={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}`}},La={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 _=class extends f{constructor(){super();this.localize=new D(this);this.hasSlotController=new A(this,"label","help-text","tooltip");this.formControlController=new dt(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=T.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(a=>{var n,l;return a instanceof HTMLElement&&(((n=a.classList)==null?void 0:n.contains("nav"))||((l=a.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleCalendarIconClick=t=>{if(t.preventDefault(),t.stopPropagation(),!(this.disabled||this.visuallyDisabled||this.readonly)){if(this.open){this.hide(),this.emit("sd-datepicker-close");return}this.show(),this.updateComplete.then(()=>{var e;return(e=this.input)==null?void 0:e.focus({preventScroll:!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,a=(u=e.selectionStart)!=null?u:i.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let y=i.replace(/\D/g,""),v=y.slice(0,8),w=y.slice(8,16),x=this.buildDmyFromDigits(v),M=this.buildDmyFromDigits(w),z;v.length===0?z="":v.length<8?z=x:w.length>0?z=`${x} - ${M}`:z=n?x:`${x} -`;let P=this.countDigitsBeforeCaret(i,a),O;if(P<=8){let H=this.digitIndexToDmyCaretPos(Math.min(P,8));O=Math.min(H,x.length)}else{let H=v.length<8?x.length:x.length+3,B=Math.min(P-8,8),G=this.digitIndexToDmyCaretPos(B);O=H+Math.min(G,M.length)}this.inputValue=z;let R=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(x)){let H=this.dmyToIso(x),B=H?T.parseLocalISO(H):null;B&&!this.isDisabled(B)&&this.inMinMax(B)&&this.rangeStart!==H&&(this.rangeStart=H,this.previewEnd=null,this.viewMonth=new Date(B.getFullYear(),B.getMonth(),1),this.focusedDate=T.startOfDayLocal(B),R=!0)}else this.rangeStart&&(this.rangeStart=null,R=!0),this.rangeEnd&&(this.rangeEnd=null,R=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(M)&&this.rangeStart){let H=T.parseLocalISO(this.rangeStart),B=this.dmyToIso(M),G=B?T.parseLocalISO(B):null;if(!!G&&!this.isDisabled(G)&&this.inMinMax(G)){let[tt,et]=T.compareDates(H,G)<=0?[H,G]:[G,H],Gt=T.isSameDay(tt,et);if((this.allowSameDayRange||!Gt)&&!this.wouldRangeContainDisabled(tt,et)){let vt=T.toLocalISODate(T.startOfDayLocal(tt)),$t=T.toLocalISODate(T.startOfDayLocal(et));(this.rangeStart!==vt||this.rangeEnd!==$t)&&(this.rangeStart=vt,this.rangeEnd=$t,this.viewMonth=new Date(et.getFullYear(),et.getMonth(),1),this.focusedDate=T.startOfDayLocal(et),R=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,R=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),R&&(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 B;let H=(B=this.input)!=null?B:e;H&&(H.value=this.inputValue,H.setSelectionRange(O,O))})})}else{let y=e,v=y.value,w=(b=y.selectionStart)!=null?b:v.length,x=v.replace(/\D/g,"").slice(0,8),M=x.slice(0,2),z=x.slice(2,4),P=x.slice(4,8),O="";M.length>0&&(O+=M,M.length===2&&(O+=".")),z.length>0&&M.length===2&&(O+=z,z.length===2&&(O+=".")),P.length>0&&M.length===2&&z.length===2&&(O+=P),O=O.replace(/\.\.+/g,".");let R=this.inputValue||"";this.inputValue=O;let H=w,B=nt=>{let vt=[];for(let $t=0;$t<nt.length;$t++)nt[$t]==="."&&vt.push($t);return vt},G=B(R),it=B(O),tt=G.filter(nt=>nt<w).length,Gt=it.filter(nt=>nt<w).length-tt;if(Gt>0?H+=Gt:!G.includes(w)&&it.includes(w)&&(H+=1),H=Math.min(Math.max(0,H),O.length),requestAnimationFrame(()=>{var vt;let nt=(vt=this.input)!=null?vt:y;nt&&(nt.value=this.inputValue,nt.setSelectionRange(H,H))}),/^\d{2}\.\d{2}\.\d{4}$/.test(O)){let nt=this.parseInputText(O);this.applyParsedInput(nt)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let y=this.rangeStart?T.parseLocalISO(this.rangeStart):null,v=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;y&&!v?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}`):y&&v&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(v)}`)}else if(this.value){let y=T.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(y)}`)}};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,a)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Escape"&&this.open){t.preventDefault(),t.stopPropagation(),this.hide(),this.emit("sd-datepicker-close");return}if(t.key==="Tab"&&!t.shiftKey){a&&(this.hide(),this.emit("sd-datepicker-close"));return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var n,l,h,u;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),t.stopPropagation(),(l=(n=this.shadowRoot)==null?void 0:n.querySelector('button[part="prev-year-button"]'))==null||l.focus({preventScroll:!0});return}let e=t.key,i=!0,a=new Date(this.focusedDate);switch(e){case"ArrowLeft":a.setDate(a.getDate()-1);break;case"ArrowRight":a.setDate(a.getDate()+1);break;case"ArrowUp":a.setDate(a.getDate()-7);break;case"ArrowDown":a.setDate(a.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 m=(h=this.viewMonth)!=null?h:this.ensureViewMonth();if(a.getMonth()!==m.getMonth()||a.getFullYear()!==m.getFullYear()){let w=new Date(a.getFullYear(),a.getMonth(),1);this.viewMonth=w;let x=this.formatMonthYear(w);this.setNavStatus(x)}let y=T.startOfDayLocal(a);y.getTime()!==((u=this.focusedDate)==null?void 0:u.getTime())&&(this.focusedDate=y);let v=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(v),this.requestUpdate(),requestAnimationFrame(()=>{let w=this.shadowRoot,x=w==null?void 0:w.querySelector("button.day.focused");x==null||x.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey&&this.open){t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay();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?T.parseLocalISO(this.value):null,e=this.rangeStart?T.parseLocalISO(this.rangeStart):null,i=T.startOfDayLocal(new Date),a=this.range&&e?e:t!=null?t:i,n=(l=this.viewMonth)!=null?l:new Date(a.getFullYear(),a.getMonth(),1);this.viewMonth=n,this.focusedDate=T.clampDateToMonth(a,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&&T.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&T.parseLocalISO(this.rangeStart)||this.value&&T.parseLocalISO(this.value)||this.today;if(!t)return;let e=T.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?T.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=T.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 a=e.value.length;e.setSelectionRange(a,a)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?T.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=T.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let a=this.input;if(a){a.value=(n=this.inputValue)!=null?n:"";let l=a.value.length;a.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 T.parseLocalISO(t)}inMinMax(t){let e=n=>{if(n==null)return null;if(n instanceof Date)return T.startOfDayLocal(n);if(typeof n=="number")return T.startOfDayLocal(new Date(n));if(typeof n=="string"){let l=this.parseISO(n);return l?T.startOfDayLocal(l):null}return null},i=e(this.min),a=e(this.max);return!(i&&t<i||a&&t>a)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=`${e}-${i}-${a}`;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),a=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${i} of ${a} ${n}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,a=e[(i-20)%10]||e[i]||e[0];return t+a}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=T.compareDates(t,e)<=0?T.startOfDayLocal(t):T.startOfDayLocal(e),a=T.compareDates(t,e)<=0?T.startOfDayLocal(e):T.startOfDayLocal(t),n=new Date(i);for(;T.compareDates(n,a)<=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=T.parseLocalISO(t);if(e||(e=T.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${i}.${a}.${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]),a=Number(e[2]),n=Number(e[3]),l=new Date(n,a-1,i);if(l.getFullYear()!==n||l.getMonth()!==a-1||l.getDate()!==i)return null;let h=T.startOfDayLocal(l);return T.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),a=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} ${a} ${l}`:n&&!l?`${n} ${a}`:""}parseInputText(t){var a,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=(a=l[0])!=null?a:"",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=y=>{if(!y)return!0;let v=T.parseLocalISO(y);return!(!this.inMinMax(v)||this.isDisabled(v))},i=!1;if(this.range){let y=(h=t.start)!=null?h:null,v=(u=t.end)!=null?u:null;if(!e(y)||v&&!e(v))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let w=y?T.parseLocalISO(y):null,x=v?T.parseLocalISO(v):null;if(w&&x){if(T.compareDates(w,x)>0){let P=w;w=x,x=P}if(!this.allowSameDayRange&&T.isSameDay(w,x))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(w,x))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let M=w?T.toLocalISODate(T.startOfDayLocal(w)):null,z=x?T.toLocalISODate(T.startOfDayLocal(x)):null;if(this.rangeStart!==M||this.rangeEnd!==z){this.rangeStart=M,this.rangeEnd=z,this.previewEnd=null,i=!0;let P=(m=w!=null?w:x)!=null?m:this.today;this.viewMonth=new Date(P.getFullYear(),P.getMonth(),1),this.focusedDate=T.startOfDayLocal(P),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 a=(b=t.single)!=null?b:null;if(!e(a))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=a?T.parseLocalISO(a):null,l=n?T.toLocalISODate(T.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,i=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=T.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),a=e.slice(2,4),n=e.slice(4,8),l=i;return a.length&&(l+="."+a),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,a;((a=(i=t.composedPath)==null?void 0:i.call(t))!=null?a:[]).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 a=this.formatMonthYear(i);this.setNavStatus(a),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 a=this.formatMonthYear(i);this.setNavStatus(a),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var a;let t=null;if(!this.range&&this.value){let n=T.parseLocalISO(this.value);n&&(t=T.startOfDayLocal(n))}if(this.range){let n=this.rangeStart?T.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;n?t=T.startOfDayLocal(n):l&&(t=T.startOfDayLocal(l))}let e=(a=this.viewMonth)!=null?a: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()&&T.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=T.startOfDayLocal(l);else{let h=n.flat().find(u=>u.getMonth()===e.getMonth()&&!this.isDisabled(u));t=h?T.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let n=this.shadowRoot,l=(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.selected"))||(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=T.startOfDayLocal(t),i=T.toLocalISODate(e);if(this.value===i)return;this.value=i;let a=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(a),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=T.startOfDayLocal(t),i=this.rangeStart?T.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;if(!i&&!a){if(this.isDisabled(e))return;this.rangeStart=T.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&&!a){if(this.isDisabled(e))return;if(T.isSameDay(i,e)){if(!this.allowSameDayRange){this.rangeStart=T.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let y=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${y}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var w;let v=this.input;v&&(v.value=(w=this.inputValue)!=null?w:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let x=v.value.length;v.setSelectionRange(x,x)})}))});return}this.rangeStart=T.toLocalISODate(e),this.rangeEnd=T.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 v;let y=this.input;y&&(y.value=(v=this.inputValue)!=null?v:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let w=y.value.length;y.setSelectionRange(w,w)})}))});return}let n=T.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,h]=T.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=T.toLocalISODate(l),this.rangeEnd=T.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 y;let b=this.input;b&&(b.value=(y=this.inputValue)!=null?y:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let v=b.value.length;b.setSelectionRange(v,v)})}))});return}if(i&&a){if(this.isDisabled(e))return;this.rangeStart=T.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?T.parseLocalISO(this.value):null,e=this.rangeStart?T.parseLocalISO(this.rangeStart):null,i=T.startOfDayLocal(new Date),a=this.range&&e?e:t!=null?t:i,n=new Date(a.getFullYear(),a.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),a=new Date(i),n=(i.getDay()-e+7)%7;a.setDate(i.getDate()-n);let l=[],h=a;for(let b=0;b<6;b++){let y=[];for(let v=0;v<7;v++)y.push(new Date(h)),h.setDate(h.getDate()+1);l.push(y)}let u=b=>b.every(y=>y.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 a;let t=(a=this.firstDayOfWeek)!=null?a: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 h;let e=(h=this.viewMonth)!=null?h:this.ensureViewMonth(),i=null;if(!this.range&&this.value){let u=T.parseLocalISO(this.value);u&&(i=T.startOfDayLocal(u))}if(this.range){let u=this.rangeStart?T.parseLocalISO(this.rangeStart):null,m=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;u?i=T.startOfDayLocal(u):m&&(i=T.startOfDayLocal(m))}if((u=>u?u.getFullYear()===e.getFullYear()&&u.getMonth()===e.getMonth()&&!this.isDisabled(u):!1)(i))return i;let n=t.flat().find(u=>u.getMonth()===e.getMonth()&&T.isSameDay(u,this.today)&&!this.isDisabled(u));if(n)return T.startOfDayLocal(n);let l=t.flat().find(u=>u.getMonth()===e.getMonth()&&!this.isDisabled(u));return l?T.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?T.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;if(e&&!i){let a=T.startOfDayLocal(t);this.previewEnd=this.isDisabled(a)?null:a,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var v,w;let t=(v=this.viewMonth)!=null?v:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),a=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=x=>!this.range||!l||h||!u?!1:T.isBetweenInclusive(x,l,u),b=this.getTabTargetDayForCurrentView(e),y=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return p`<div part="datepicker" id="calendar" role="dialog" aria-label="${this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")}" class="${c("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(w=this.currentPlacement)!=null&&w.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="${c("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-small-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="${c("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"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="${c("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"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="${c("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-small-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">${a.map((x,M)=>p`<div role="columnheader" aria-colindex="${M+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${x}" title="${x}" id="${"col-"+(M+1)}">${x}</div>`)}</div>${e.map((x,M)=>p`<div class="grid-row grid grid-cols-7 ${M===0?"mt-2":""}" role="row" aria-rowindex="${M+2}">${x.map((z,P)=>{let O=z.getMonth()===t.getMonth(),R=this.isDisabled(z)||!this.inMinMax(z),H=T.isSameDay(z,this.focusedDate),B=T.isSameDay(z,this.today),G=!this.range&&n?T.isSameDay(z,n):!1,it=this.range&&l?T.isSameDay(z,l):!1,tt=this.range&&h?T.isSameDay(z,h):!1,et=this.range&&l&&h?T.isBetweenInclusive(z,l,h):!1,Gt=m(z)&&!R,nt=-1,vt=b&&T.isSameDay(z,b);(this.tabbingIntoGrid&&vt||!this.tabbingIntoGrid&&H)&&(nt=0);let $t=this.isWeekend(z),Wt=z.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),re=it?this.localize.term("startDateSelected"):tt?this.localize.term("endDateSelected"):void 0;return p`<button type="button" part="day" class="${c("cell day relative flex items-center justify-center rounded w-[36px] focus-visible:focus-outline focus-visible:z-10",this.size==="sm"?"text-sm h-6":"text-base h-8",it||tt?"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",!it&&!tt&&!et&&"hover:sd-datepicker__date-item--hover--default-color-background",G?"selected 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":(it||tt)&&!O?"out-month":O?this.isInDisabledDates(z)||!this.inMinMax(z)?"out-month text-neutral-500":this.disabledWeekends&&$t?"weekend-day text-neutral-500":"in-month sd-datepicker__date-item--default-color-text":this.disabledWeekends&&$t?"out-month weekend-day text-neutral-500":$t?"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",it?"rounded-l-md rounded-r-none":"",tt?"range-end rounded-r-md rounded-l-none":"",et&&!it&&!tt?"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":"",!et&&Gt&&!it&&!tt?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",B&&!G&&!it&&!tt&&H?"today border-[1px] border-primary focus-visible:border-transparent sd-datepicker__date-item--current-font-weight":"",R?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",H?"focused":"")}" role="gridcell" aria-colindex="${P+1}" aria-labelledby="${"col-"+(P+1)}" .tabIndex="${nt}" ?disabled="${this.disabled||this.readonly}" aria-disabled="${R||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${G||et||it||tt?"true":"false"}" aria-current="${B?"date":U}" aria-label="${Wt}" aria-roledescription="${re!=null?re:U}" @focus="${()=>this.focusedDate=T.startOfDayLocal(z)}" @mouseenter="${()=>this.onDayMouseEnter(z)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=T.startOfDayLocal(z),this.selectDate(z)}}">${z.getDate()}</button>`})}</div>`)}</div></div>`}render(){var w,x;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,a=!!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&&!this.open?"activeInvalid":this.hasFocus&&!this.open&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",y={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],v=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||a?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",v)}" 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",y,this.open&&((w=this.currentPlacement)!=null&&w.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",(x=this.currentPlacement)!=null&&x.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" 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],v,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.handleCalendarIconClick}"></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)}`}};_.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
216
|
-
: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,70 109 175))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,0 53 142))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],o([d({type:String,reflect:!0})],_.prototype,"locale",2),o([d({type:String,converter:Er,reflect:!0})],_.prototype,"value",2),o([d({type:Boolean,reflect:!0})],_.prototype,"range",2),o([d({attribute:"range-start",converter:Er,reflect:!0})],_.prototype,"rangeStart",2),o([d({attribute:"range-end",converter:Er,reflect:!0})],_.prototype,"rangeEnd",2),o([d({type:Boolean})],_.prototype,"allowSameDayRange",2),o([d({type:String,converter:Er,reflect:!0})],_.prototype,"min",2),o([d({type:String,converter:Er,reflect:!0})],_.prototype,"max",2),o([d({attribute:"view-month",converter:Ta})],_.prototype,"viewMonth",2),o([d({type:Number})],_.prototype,"firstDayOfWeek",2),o([d({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],_.prototype,"disabledWeekends",2),o([d({attribute:"disabled-dates",converter:La})],_.prototype,"disabledDates",2),o([d({attribute:!1})],_.prototype,"isDateDisabled",2),o([d({type:String,reflect:!0})],_.prototype,"size",2),o([d({type:String})],_.prototype,"alignment",2),o([d({type:String,reflect:!0})],_.prototype,"label",2),o([d({type:String,attribute:"help-text",reflect:!0})],_.prototype,"helpText",2),o([d({attribute:"floating-label",type:Boolean,reflect:!0})],_.prototype,"floatingLabel",2),o([d({type:Boolean,reflect:!0})],_.prototype,"disabled",2),o([d({type:Boolean,reflect:!0})],_.prototype,"required",2),o([d({type:Boolean,attribute:"visually-disabled"})],_.prototype,"visuallyDisabled",2),o([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],_.prototype,"styleOnValid",2),o([d({type:Boolean,reflect:!0})],_.prototype,"readonly",2),o([d({type:String,reflect:!0})],_.prototype,"placement",2),o([d({type:String,reflect:!0})],_.prototype,"placeholder",2),o([d({reflect:!0})],_.prototype,"name",2),o([d({type:String,reflect:!0})],_.prototype,"form",2),o([L()],_.prototype,"open",2),o([L()],_.prototype,"focusedDate",2),o([L()],_.prototype,"today",2),o([L()],_.prototype,"disabledDatesSet",2),o([L()],_.prototype,"previewEnd",2),o([L()],_.prototype,"statusNavText",2),o([L()],_.prototype,"statusSelectText",2),o([L()],_.prototype,"hasFocus",2),o([L()],_.prototype,"showValidStyle",2),o([L()],_.prototype,"showInvalidStyle",2),o([L()],_.prototype,"currentPlacement",2),o([L()],_.prototype,"inputValue",2),o([g("sd-popup")],_.prototype,"popup",2),o([g("#invalid-message")],_.prototype,"invalidMessage",2),o([g("#input")],_.prototype,"input",2),o([C("open",{waitUntilFirstUpdate:!0})],_.prototype,"handleOpenChange",1),o([C("locale")],_.prototype,"handleLocaleChange",1),o([C("viewMonth")],_.prototype,"handleViewMonthChange",1),o([C("disabledDates")],_.prototype,"handleDisabledDatesChange",1),o([C("value")],_.prototype,"handleValueChange",1),o([C("rangeStart"),C("rangeEnd")],_.prototype,"handleRangeChange",1),o([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],_.prototype,"handleDisabledChange",1),o([C(["size","floatingLabel"])],_.prototype,"handleSizeChange",1),_=o([E("sd-datepicker")],_);var Rt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new D(this);this.hasUiMotion=!1;this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.updateMotionTheme()}firstUpdated(){this.dialog.addEventListener("cancel",t=>{t.preventDefault(),this.requestClose("keyboard")}),this.open&&this.dialog.showModal()}onThemeChange(){this.updateMotionTheme()}updateMotionTheme(){let t=getComputedStyle(this).getPropertyValue("--sd-theme").trim().replace(/['"]/g,"");this.hasUiMotion=t===""||t==="ui-light"||t==="ui-dark"}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=j(this,this.hasUiMotion?"dialog.denyClose":"dialog.denyCloseSimple",{dir:this.localize.dir()});Y(this.panel,i.keyframes,i.options);return}this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show");let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await rt(this.dialog),this.dialog.showModal(),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.hasUiMotion?"dialog.show":"dialog.showSimple",i=this.prefersReducedMotion?j(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):j(this,e,{dir:this.localize.dir()}),a=this.hasUiMotion?"dialog.overlay.show":"dialog.overlay.showSimple",n=j(this,a,{dir:this.localize.dir()});await Promise.all([Y(this.panel,i.keyframes,i.options),Y(this.overlay,n.keyframes,n.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),await rt(this.dialog);let t=this.hasUiMotion?"dialog.hide":"dialog.hideSimple",e=this.prefersReducedMotion?j(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):j(this,t,{dir:this.localize.dir()}),i=this.hasUiMotion?"dialog.overlay.hide":"dialog.overlay.hideSimple",a=j(this,i,{dir:this.localize.dir()});await Promise.all([Y(this.overlay,a.keyframes,a.options).then(()=>{this.overlay.hidden=!0}),Y(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.close(),this.overlay.hidden=!1,this.panel.hidden=!1,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`<sd-theme-listener></sd-theme-listener><dialog part="base" class="${c("flex items-center justify-center p-0 m-auto bg-transparent border-none overflow-visible",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0" @click="${()=>this.requestClose("overlay")}"></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")}" aria-label="${$(this.headline?this.headline:void 0)}" aria-labelledby="${$(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="px-6 sm:px-10"><slot name="footer"></slot></footer></div></dialog>`}};Rt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
215
|
+
:host{margin:0}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],o([d({type:String,reflect:!0})],ke.prototype,"orientation",2),o([d({type:Boolean,reflect:!0})],ke.prototype,"inverted",2),ke=o([E("sd-divider")],ke);var T={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]),a=Number(e[2])-1,n=Number(e[3]),l=new Date(i,a,n);return Number.isNaN(l.getTime())?null:l},compareDates:(s,r)=>{let t=T.startOfDayLocal(s).getTime(),e=T.startOfDayLocal(r).getTime();return t-e},isBetweenInclusive:(s,r,t)=>{let e=T.compareDates(r,t)<=0?r:t,i=T.compareDates(r,t)<=0?t:r;return T.compareDates(s,e)>=0&&T.compareDates(s,i)<=0}};var Er={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:""}},Ta={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}`}},La={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 _=class extends f{constructor(){super();this.localize=new D(this);this.hasSlotController=new A(this,"label","help-text","tooltip");this.formControlController=new dt(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.clearable=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=T.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.clearing=!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(a=>{var n,l;return a instanceof HTMLElement&&(((n=a.classList)==null?void 0:n.contains("nav"))||((l=a.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleCalendarIconClick=t=>{if(t.preventDefault(),t.stopPropagation(),!(this.disabled||this.visuallyDisabled||this.readonly)){if(this.open){this.hide(),this.emit("sd-datepicker-close");return}this.show(),this.updateComplete.then(()=>{var e;return(e=this.input)==null?void 0:e.focus({preventScroll:!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,a=(u=e.selectionStart)!=null?u:i.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let y=i.replace(/\D/g,""),v=y.slice(0,8),w=y.slice(8,16),x=this.buildDmyFromDigits(v),M=this.buildDmyFromDigits(w),z;v.length===0?z="":v.length<8?z=x:w.length>0?z=`${x} - ${M}`:z=n?x:`${x} -`;let P=this.countDigitsBeforeCaret(i,a),O;if(P<=8){let H=this.digitIndexToDmyCaretPos(Math.min(P,8));O=Math.min(H,x.length)}else{let H=v.length<8?x.length:x.length+3,B=Math.min(P-8,8),G=this.digitIndexToDmyCaretPos(B);O=H+Math.min(G,M.length)}this.inputValue=z;let R=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(x)){let H=this.dmyToIso(x),B=H?T.parseLocalISO(H):null;B&&!this.isDisabled(B)&&this.inMinMax(B)&&this.rangeStart!==H&&(this.rangeStart=H,this.previewEnd=null,this.viewMonth=new Date(B.getFullYear(),B.getMonth(),1),this.focusedDate=T.startOfDayLocal(B),R=!0)}else this.rangeStart&&(this.rangeStart=null,R=!0),this.rangeEnd&&(this.rangeEnd=null,R=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(M)&&this.rangeStart){let H=T.parseLocalISO(this.rangeStart),B=this.dmyToIso(M),G=B?T.parseLocalISO(B):null;if(!!G&&!this.isDisabled(G)&&this.inMinMax(G)){let[tt,et]=T.compareDates(H,G)<=0?[H,G]:[G,H],Gt=T.isSameDay(tt,et);if((this.allowSameDayRange||!Gt)&&!this.wouldRangeContainDisabled(tt,et)){let vt=T.toLocalISODate(T.startOfDayLocal(tt)),$t=T.toLocalISODate(T.startOfDayLocal(et));(this.rangeStart!==vt||this.rangeEnd!==$t)&&(this.rangeStart=vt,this.rangeEnd=$t,this.viewMonth=new Date(et.getFullYear(),et.getMonth(),1),this.focusedDate=T.startOfDayLocal(et),R=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,R=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),R&&(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 B;let H=(B=this.input)!=null?B:e;H&&(H.value=this.inputValue,H.setSelectionRange(O,O))})})}else{let y=e,v=y.value,w=(b=y.selectionStart)!=null?b:v.length,x=v.replace(/\D/g,"").slice(0,8),M=x.slice(0,2),z=x.slice(2,4),P=x.slice(4,8),O="";M.length>0&&(O+=M,M.length===2&&(O+=".")),z.length>0&&M.length===2&&(O+=z,z.length===2&&(O+=".")),P.length>0&&M.length===2&&z.length===2&&(O+=P),O=O.replace(/\.\.+/g,".");let R=this.inputValue||"";this.inputValue=O;let H=w,B=nt=>{let vt=[];for(let $t=0;$t<nt.length;$t++)nt[$t]==="."&&vt.push($t);return vt},G=B(R),it=B(O),tt=G.filter(nt=>nt<w).length,Gt=it.filter(nt=>nt<w).length-tt;if(Gt>0?H+=Gt:!G.includes(w)&&it.includes(w)&&(H+=1),H=Math.min(Math.max(0,H),O.length),requestAnimationFrame(()=>{var vt;let nt=(vt=this.input)!=null?vt:y;nt&&(nt.value=this.inputValue,nt.setSelectionRange(H,H))}),/^\d{2}\.\d{2}\.\d{4}$/.test(O)){let nt=this.parseInputText(O);this.applyParsedInput(nt)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let y=this.rangeStart?T.parseLocalISO(this.rangeStart):null,v=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;y&&!v?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}`):y&&v&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(y)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(v)}`)}else if(this.value){let y=T.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(y)}`)}};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,a)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Escape"&&this.open){t.preventDefault(),t.stopPropagation(),this.hide(),this.emit("sd-datepicker-close");return}if(t.key==="Tab"&&!t.shiftKey){a&&(this.hide(),this.emit("sd-datepicker-close"));return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var n,l,h,u;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),t.stopPropagation(),(l=(n=this.shadowRoot)==null?void 0:n.querySelector('button[part="prev-year-button"]'))==null||l.focus({preventScroll:!0});return}let e=t.key,i=!0,a=new Date(this.focusedDate);switch(e){case"ArrowLeft":a.setDate(a.getDate()-1);break;case"ArrowRight":a.setDate(a.getDate()+1);break;case"ArrowUp":a.setDate(a.getDate()-7);break;case"ArrowDown":a.setDate(a.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 m=(h=this.viewMonth)!=null?h:this.ensureViewMonth();if(a.getMonth()!==m.getMonth()||a.getFullYear()!==m.getFullYear()){let w=new Date(a.getFullYear(),a.getMonth(),1);this.viewMonth=w;let x=this.formatMonthYear(w);this.setNavStatus(x)}let y=T.startOfDayLocal(a);y.getTime()!==((u=this.focusedDate)==null?void 0:u.getTime())&&(this.focusedDate=y);let v=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(v),this.requestUpdate(),requestAnimationFrame(()=>{let w=this.shadowRoot,x=w==null?void 0:w.querySelector("button.day.focused");x==null||x.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey&&this.open){t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay();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?T.parseLocalISO(this.value):null,e=this.rangeStart?T.parseLocalISO(this.rangeStart):null,i=T.startOfDayLocal(new Date),a=this.range&&e?e:t!=null?t:i,n=(l=this.viewMonth)!=null?l:new Date(a.getFullYear(),a.getMonth(),1);this.viewMonth=n,this.focusedDate=T.clampDateToMonth(a,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&&T.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&T.parseLocalISO(this.rangeStart)||this.value&&T.parseLocalISO(this.value)||this.today;if(!t)return;let e=T.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?T.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=T.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 a=e.value.length;e.setSelectionRange(a,a)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?T.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=T.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let a=this.input;if(a){a.value=(n=this.inputValue)!=null?n:"";let l=a.value.length;a.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 T.parseLocalISO(t)}inMinMax(t){let e=n=>{if(n==null)return null;if(n instanceof Date)return T.startOfDayLocal(n);if(typeof n=="number")return T.startOfDayLocal(new Date(n));if(typeof n=="string"){let l=this.parseISO(n);return l?T.startOfDayLocal(l):null}return null},i=e(this.min),a=e(this.max);return!(i&&t<i||a&&t>a)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=`${e}-${i}-${a}`;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),a=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${i} of ${a} ${n}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,a=e[(i-20)%10]||e[i]||e[0];return t+a}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=T.compareDates(t,e)<=0?T.startOfDayLocal(t):T.startOfDayLocal(e),a=T.compareDates(t,e)<=0?T.startOfDayLocal(e):T.startOfDayLocal(t),n=new Date(i);for(;T.compareDates(n,a)<=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=T.parseLocalISO(t);if(e||(e=T.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${i}.${a}.${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]),a=Number(e[2]),n=Number(e[3]),l=new Date(n,a-1,i);if(l.getFullYear()!==n||l.getMonth()!==a-1||l.getDate()!==i)return null;let h=T.startOfDayLocal(l);return T.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),a=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} ${a} ${l}`:n&&!l?`${n} ${a}`:""}parseInputText(t){var a,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=(a=l[0])!=null?a:"",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=y=>{if(!y)return!0;let v=T.parseLocalISO(y);return!(!this.inMinMax(v)||this.isDisabled(v))},i=!1;if(this.range){let y=(h=t.start)!=null?h:null,v=(u=t.end)!=null?u:null;if(!e(y)||v&&!e(v))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let w=y?T.parseLocalISO(y):null,x=v?T.parseLocalISO(v):null;if(w&&x){if(T.compareDates(w,x)>0){let P=w;w=x,x=P}if(!this.allowSameDayRange&&T.isSameDay(w,x))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(w,x))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let M=w?T.toLocalISODate(T.startOfDayLocal(w)):null,z=x?T.toLocalISODate(T.startOfDayLocal(x)):null;if(this.rangeStart!==M||this.rangeEnd!==z){this.rangeStart=M,this.rangeEnd=z,this.previewEnd=null,i=!0;let P=(m=w!=null?w:x)!=null?m:this.today;this.viewMonth=new Date(P.getFullYear(),P.getMonth(),1),this.focusedDate=T.startOfDayLocal(P),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 a=(b=t.single)!=null?b:null;if(!e(a))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=a?T.parseLocalISO(a):null,l=n?T.toLocalISODate(T.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,i=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=T.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),a=e.slice(2,4),n=e.slice(4,8),l=i;return a.length&&(l+="."+a),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,a;((a=(i=t.composedPath)==null?void 0:i.call(t))!=null?a:[]).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()}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleClearClick(t){t.stopPropagation(),this.inputValue&&(this.value=null,this.rangeStart=null,this.rangeEnd=null,this.previewEnd=null,this.inputValue="",this.showInvalidStyle=!1,this.showValidStyle=!1,this.input.setCustomValidity(""),this.clearing=!0,this.input.focus({preventScroll:!0}),this.clearing=!1,this.updateComplete.then(()=>{this.input.value="",this.formControlController.updateValidity(),this.emit("sd-clear")}))}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.clearing&&!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 a=this.formatMonthYear(i);this.setNavStatus(a),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 a=this.formatMonthYear(i);this.setNavStatus(a),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var a;let t=null;if(!this.range&&this.value){let n=T.parseLocalISO(this.value);n&&(t=T.startOfDayLocal(n))}if(this.range){let n=this.rangeStart?T.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;n?t=T.startOfDayLocal(n):l&&(t=T.startOfDayLocal(l))}let e=(a=this.viewMonth)!=null?a: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()&&T.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=T.startOfDayLocal(l);else{let h=n.flat().find(u=>u.getMonth()===e.getMonth()&&!this.isDisabled(u));t=h?T.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let n=this.shadowRoot,l=(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.selected"))||(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=T.startOfDayLocal(t),i=T.toLocalISODate(e);if(this.value===i)return;this.value=i;let a=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(a),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=T.startOfDayLocal(t),i=this.rangeStart?T.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;if(!i&&!a){if(this.isDisabled(e))return;this.rangeStart=T.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&&!a){if(this.isDisabled(e))return;if(T.isSameDay(i,e)){if(!this.allowSameDayRange){this.rangeStart=T.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let y=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${y}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var w;let v=this.input;v&&(v.value=(w=this.inputValue)!=null?w:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let x=v.value.length;v.setSelectionRange(x,x)})}))});return}this.rangeStart=T.toLocalISODate(e),this.rangeEnd=T.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 v;let y=this.input;y&&(y.value=(v=this.inputValue)!=null?v:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let w=y.value.length;y.setSelectionRange(w,w)})}))});return}let n=T.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,h]=T.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=T.toLocalISODate(l),this.rangeEnd=T.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 y;let b=this.input;b&&(b.value=(y=this.inputValue)!=null?y:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let v=b.value.length;b.setSelectionRange(v,v)})}))});return}if(i&&a){if(this.isDisabled(e))return;this.rangeStart=T.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?T.parseLocalISO(this.value):null,e=this.rangeStart?T.parseLocalISO(this.rangeStart):null,i=T.startOfDayLocal(new Date),a=this.range&&e?e:t!=null?t:i,n=new Date(a.getFullYear(),a.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),a=new Date(i),n=(i.getDay()-e+7)%7;a.setDate(i.getDate()-n);let l=[],h=a;for(let b=0;b<6;b++){let y=[];for(let v=0;v<7;v++)y.push(new Date(h)),h.setDate(h.getDate()+1);l.push(y)}let u=b=>b.every(y=>y.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 a;let t=(a=this.firstDayOfWeek)!=null?a: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 h;let e=(h=this.viewMonth)!=null?h:this.ensureViewMonth(),i=null;if(!this.range&&this.value){let u=T.parseLocalISO(this.value);u&&(i=T.startOfDayLocal(u))}if(this.range){let u=this.rangeStart?T.parseLocalISO(this.rangeStart):null,m=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;u?i=T.startOfDayLocal(u):m&&(i=T.startOfDayLocal(m))}if((u=>u?u.getFullYear()===e.getFullYear()&&u.getMonth()===e.getMonth()&&!this.isDisabled(u):!1)(i))return i;let n=t.flat().find(u=>u.getMonth()===e.getMonth()&&T.isSameDay(u,this.today)&&!this.isDisabled(u));if(n)return T.startOfDayLocal(n);let l=t.flat().find(u=>u.getMonth()===e.getMonth()&&!this.isDisabled(u));return l?T.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?T.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?T.parseLocalISO(this.rangeEnd):null;if(e&&!i){let a=T.startOfDayLocal(t);this.previewEnd=this.isDisabled(a)?null:a,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var v,w;let t=(v=this.viewMonth)!=null?v:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),a=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=x=>!this.range||!l||h||!u?!1:T.isBetweenInclusive(x,l,u),b=this.getTabTargetDayForCurrentView(e),y=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return p`<div part="datepicker" id="calendar" role="dialog" aria-label="${this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")}" class="${c("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(w=this.currentPlacement)!=null&&w.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="${c("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-small-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="${c("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"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="${c("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"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="${c("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",y)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${x=>this.handleHeaderKeyDown(x,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-small-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">${a.map((x,M)=>p`<div role="columnheader" aria-colindex="${M+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${x}" title="${x}" id="${"col-"+(M+1)}">${x}</div>`)}</div>${e.map((x,M)=>p`<div class="grid-row grid grid-cols-7 ${M===0?"mt-2":""}" role="row" aria-rowindex="${M+2}">${x.map((z,P)=>{let O=z.getMonth()===t.getMonth(),R=this.isDisabled(z)||!this.inMinMax(z),H=T.isSameDay(z,this.focusedDate),B=T.isSameDay(z,this.today),G=!this.range&&n?T.isSameDay(z,n):!1,it=this.range&&l?T.isSameDay(z,l):!1,tt=this.range&&h?T.isSameDay(z,h):!1,et=this.range&&l&&h?T.isBetweenInclusive(z,l,h):!1,Gt=m(z)&&!R,nt=-1,vt=b&&T.isSameDay(z,b);(this.tabbingIntoGrid&&vt||!this.tabbingIntoGrid&&H)&&(nt=0);let $t=this.isWeekend(z),Wt=z.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),re=it?this.localize.term("startDateSelected"):tt?this.localize.term("endDateSelected"):void 0;return p`<button type="button" part="day" class="${c("cell day relative flex items-center justify-center rounded w-[36px] focus-visible:focus-outline focus-visible:z-10",this.size==="sm"?"text-sm h-6":"text-base h-8",it||tt?"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",!it&&!tt&&!et&&"hover:sd-datepicker__date-item--hover--default-color-background",G?"selected 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":(it||tt)&&!O?"out-month":O?this.isInDisabledDates(z)||!this.inMinMax(z)?"out-month text-neutral-500":this.disabledWeekends&&$t?"weekend-day text-neutral-500":"in-month sd-datepicker__date-item--default-color-text":this.disabledWeekends&&$t?"out-month weekend-day text-neutral-500":$t?"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",it?"rounded-l-md rounded-r-none":"",tt?"range-end rounded-r-md rounded-l-none":"",et&&!it&&!tt?"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":"",!et&&Gt&&!it&&!tt?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",B&&!G&&!it&&!tt&&H?"today border-[1px] border-primary focus-visible:border-transparent sd-datepicker__date-item--current-font-weight":"",R?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",H?"focused":"")}" role="gridcell" aria-colindex="${P+1}" aria-labelledby="${"col-"+(P+1)}" .tabIndex="${nt}" ?disabled="${this.disabled||this.readonly}" aria-disabled="${R||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${G||et||it||tt?"true":"false"}" aria-current="${B?"date":U}" aria-label="${Wt}" aria-roledescription="${re!=null?re:U}" @focus="${()=>this.focusedDate=T.startOfDayLocal(z)}" @mouseenter="${()=>this.onDayMouseEnter(z)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=T.startOfDayLocal(z),this.selectDate(z)}}">${z.getDate()}</button>`})}</div>`)}</div></div>`}render(){var x,M;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,a=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.clearable&&!this.readonly&&!this.disabled&&!this.visuallyDisabled,h=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,u=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",m={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],b={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],y=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle&&!this.open?"activeInvalid":this.hasFocus&&!this.open&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",v={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"}[y],w=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||a?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",w)}" 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",h?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",h&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!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",v,this.open&&((x=this.currentPlacement)!=null&&x.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",(M=this.currentPlacement)!=null&&M.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",y==="disabled"||y==="visuallyDisabled"?"text-neutral-500":"text-black",y==="invalid"&&"form-control--invalid-color-background",y==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar" 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],w,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||h?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}"> ${l?p`<button part="clear-button" class="${c("flex justify-center",m,this.inputValue.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",b)}" library="_internal" name="close-circle"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c("text-error",m,b)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?p`<sd-icon class="${c("text-success shrink-0",m,b)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}<sd-icon class="${c(u,m,b,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.handleCalendarIconClick}"></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)}`}};_.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
216
|
+
: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,70 109 175))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,0 53 142))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],o([d({type:String,reflect:!0})],_.prototype,"locale",2),o([d({type:String,converter:Er,reflect:!0})],_.prototype,"value",2),o([d({type:Boolean,reflect:!0})],_.prototype,"range",2),o([d({attribute:"range-start",converter:Er,reflect:!0})],_.prototype,"rangeStart",2),o([d({attribute:"range-end",converter:Er,reflect:!0})],_.prototype,"rangeEnd",2),o([d({type:Boolean})],_.prototype,"allowSameDayRange",2),o([d({type:String,converter:Er,reflect:!0})],_.prototype,"min",2),o([d({type:String,converter:Er,reflect:!0})],_.prototype,"max",2),o([d({attribute:"view-month",converter:Ta})],_.prototype,"viewMonth",2),o([d({type:Number})],_.prototype,"firstDayOfWeek",2),o([d({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],_.prototype,"disabledWeekends",2),o([d({attribute:"disabled-dates",converter:La})],_.prototype,"disabledDates",2),o([d({attribute:!1})],_.prototype,"isDateDisabled",2),o([d({type:String,reflect:!0})],_.prototype,"size",2),o([d({type:String})],_.prototype,"alignment",2),o([d({type:String,reflect:!0})],_.prototype,"label",2),o([d({type:String,attribute:"help-text",reflect:!0})],_.prototype,"helpText",2),o([d({attribute:"floating-label",type:Boolean,reflect:!0})],_.prototype,"floatingLabel",2),o([d({type:Boolean,reflect:!0})],_.prototype,"disabled",2),o([d({type:Boolean,reflect:!0})],_.prototype,"required",2),o([d({type:Boolean,attribute:"visually-disabled"})],_.prototype,"visuallyDisabled",2),o([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],_.prototype,"styleOnValid",2),o([d({type:Boolean,reflect:!0})],_.prototype,"readonly",2),o([d({type:Boolean,reflect:!0})],_.prototype,"clearable",2),o([d({type:String,reflect:!0})],_.prototype,"placement",2),o([d({type:String,reflect:!0})],_.prototype,"placeholder",2),o([d({reflect:!0})],_.prototype,"name",2),o([d({type:String,reflect:!0})],_.prototype,"form",2),o([L()],_.prototype,"open",2),o([L()],_.prototype,"focusedDate",2),o([L()],_.prototype,"today",2),o([L()],_.prototype,"disabledDatesSet",2),o([L()],_.prototype,"previewEnd",2),o([L()],_.prototype,"statusNavText",2),o([L()],_.prototype,"statusSelectText",2),o([L()],_.prototype,"hasFocus",2),o([L()],_.prototype,"showValidStyle",2),o([L()],_.prototype,"showInvalidStyle",2),o([L()],_.prototype,"currentPlacement",2),o([L()],_.prototype,"inputValue",2),o([g("sd-popup")],_.prototype,"popup",2),o([g("#invalid-message")],_.prototype,"invalidMessage",2),o([g("#input")],_.prototype,"input",2),o([C("open",{waitUntilFirstUpdate:!0})],_.prototype,"handleOpenChange",1),o([C("locale")],_.prototype,"handleLocaleChange",1),o([C("viewMonth")],_.prototype,"handleViewMonthChange",1),o([C("disabledDates")],_.prototype,"handleDisabledDatesChange",1),o([C("value")],_.prototype,"handleValueChange",1),o([C("rangeStart"),C("rangeEnd")],_.prototype,"handleRangeChange",1),o([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],_.prototype,"handleDisabledChange",1),o([C(["size","floatingLabel"])],_.prototype,"handleSizeChange",1),_=o([E("sd-datepicker")],_);var Rt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new D(this);this.hasUiMotion=!1;this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.updateMotionTheme()}firstUpdated(){this.dialog.addEventListener("cancel",t=>{t.preventDefault(),this.requestClose("keyboard")}),this.open&&this.dialog.showModal()}onThemeChange(){this.updateMotionTheme()}updateMotionTheme(){let t=getComputedStyle(this).getPropertyValue("--sd-theme").trim().replace(/['"]/g,"");this.hasUiMotion=t===""||t==="ui-light"||t==="ui-dark"}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=j(this,this.hasUiMotion?"dialog.denyClose":"dialog.denyCloseSimple",{dir:this.localize.dir()});Y(this.panel,i.keyframes,i.options);return}this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show");let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await rt(this.dialog),this.dialog.showModal(),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.hasUiMotion?"dialog.show":"dialog.showSimple",i=this.prefersReducedMotion?j(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):j(this,e,{dir:this.localize.dir()}),a=this.hasUiMotion?"dialog.overlay.show":"dialog.overlay.showSimple",n=j(this,a,{dir:this.localize.dir()});await Promise.all([Y(this.panel,i.keyframes,i.options),Y(this.overlay,n.keyframes,n.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),await rt(this.dialog);let t=this.hasUiMotion?"dialog.hide":"dialog.hideSimple",e=this.prefersReducedMotion?j(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):j(this,t,{dir:this.localize.dir()}),i=this.hasUiMotion?"dialog.overlay.hide":"dialog.overlay.hideSimple",a=j(this,i,{dir:this.localize.dir()});await Promise.all([Y(this.overlay,a.keyframes,a.options).then(()=>{this.overlay.hidden=!0}),Y(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.close(),this.overlay.hidden=!1,this.panel.hidden=!1,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`<sd-theme-listener></sd-theme-listener><dialog part="base" class="${c("flex items-center justify-center p-0 m-auto bg-transparent border-none overflow-visible",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0" @click="${()=>this.requestClose("overlay")}"></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")}" aria-label="${$(this.headline?this.headline:void 0)}" aria-labelledby="${$(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="px-6 sm:px-10"><slot name="footer"></slot></footer></div></dialog>`}};Rt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
217
217
|
:host{--width:662px;display:contents}[part=base]:not([open]){display:none}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}::backdrop{display:none}[part=overlay]{background-color:rgb(var(--sd-overlay-color-background,5 21 48 / .9))}@media (max-width:414px){:host{--width:335px}[part=body]{min-height:50px}}`],o([g('[part="base"]')],Rt.prototype,"dialog",2),o([g('[part="overlay"]')],Rt.prototype,"overlay",2),o([g('[part="panel"]')],Rt.prototype,"panel",2),o([d({type:Boolean,reflect:!0})],Rt.prototype,"open",2),o([d({type:String,reflect:!0})],Rt.prototype,"headline",2),o([d({attribute:"no-close-button",type:Boolean,reflect:!0})],Rt.prototype,"noCloseButton",2),o([C("open",{waitUntilFirstUpdate:!0})],Rt.prototype,"handleOpenChange",1),Rt=o([E("sd-dialog")],Rt);F("dialog.show",{keyframes:[{opacity:0,transform:"translate(-50%, 100%)"},{opacity:1,transform:"translate(0, 0)"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});F("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});F("dialog.showSimple",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});F("dialog.hide",{keyframes:[{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(50%, -100%)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});F("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});F("dialog.hideSimple",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});F("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});F("dialog.denyCloseSimple",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});F("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});F("dialog.overlay.showSimple",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250,reducedMotion:"allow"}});F("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});F("dialog.overlay.hideSimple",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250,reducedMotion:"allow"}});var Kt=class extends f{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new D(this)}updateMaxHeight(){var e;let t=(e=this.contentPreview)==null?void 0:e.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${t}px`),this.style.setProperty("--max-height",t)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await rt(this.body);let{keyframes:t,options:e}=j(this,"expandable.show",{dir:this.localize.dir()});await Y(this.body,$e(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await rt(this.body);let{keyframes:t,options:e}=j(this,"expandable.hide",{dir:this.localize.dir()});await Y(this.body,$e(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),J(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),J(this,"sd-after-hide")}render(){return p`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${c("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${c("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${c("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-bottom" class="text-xl"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-bottom" class="text-xl"></sd-icon></slot></span><slot name="toggle-closed" class="${c(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${c(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${$(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let t=document.createElement("div");t.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(i=>{let a=i.cloneNode(!0);t.appendChild(a)}),this.appendChild(t)}};Kt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
218
218
|
:host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(
|
|
219
219
|
--gradient-color-start,
|
package/cdn/solid-components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue}from"./chunks/chunk.MR54F6CV.js";import"./chunks/chunk.HAL7R4WT.js";import{a as ee}from"./chunks/chunk.HY624TPC.js";import{a as
|
|
1
|
+
import{a as ue}from"./chunks/chunk.MR54F6CV.js";import"./chunks/chunk.HAL7R4WT.js";import{a as ee}from"./chunks/chunk.HY624TPC.js";import{a as oe}from"./chunks/chunk.PFPUD5HR.js";import{a as re}from"./chunks/chunk.3IZUMERL.js";import{a as ae}from"./chunks/chunk.JMX6KLDZ.js";import{a as K}from"./chunks/chunk.NGU7NO3O.js";import{a as U}from"./chunks/chunk.WUXX2P2S.js";import{a as W}from"./chunks/chunk.TX5WPWH2.js";import{a as X}from"./chunks/chunk.AJGTKHU5.js";import{a as Y}from"./chunks/chunk.3RIAU3TH.js";import{a as Z}from"./chunks/chunk.SPL6VR5S.js";import{a as _}from"./chunks/chunk.XGVG7F7T.js";import{a as $}from"./chunks/chunk.PKCNX4R2.js";import{a as H}from"./chunks/chunk.VSX5LY2D.js";import{a as V}from"./chunks/chunk.XHYIXZF4.js";import{a as j}from"./chunks/chunk.IFLRUJCI.js";import{a as Q}from"./chunks/chunk.V6IM4GAA.js";import{a as y}from"./chunks/chunk.QK3WCIP5.js";import{a as q}from"./chunks/chunk.DS2MKMMN.js";import"./chunks/chunk.IVHEBGOY.js";import{a as z}from"./chunks/chunk.Z2M7BQV5.js";import{a as J}from"./chunks/chunk.PQW77KHE.js";import{a as P}from"./chunks/chunk.Q63S2Z2M.js";import"./chunks/chunk.DSKB3SEU.js";import{a as v}from"./chunks/chunk.4QTJXGRR.js";import{a as F}from"./chunks/chunk.PCXVXYU2.js";import{a as N}from"./chunks/chunk.CQNFI34K.js";import{a as O}from"./chunks/chunk.C37LGAL3.js";import{a as E}from"./chunks/chunk.RHC6WZ6V.js";import{a as R}from"./chunks/chunk.35XPUMS2.js";import{a as A}from"./chunks/chunk.XZ5JTM6K.js";import"./chunks/chunk.ICEC5PGK.js";import{a as w}from"./chunks/chunk.T7I5MFNS.js";import{a as L}from"./chunks/chunk.PURR56D5.js";import{a as G}from"./chunks/chunk.IQBZ7GRB.js";import{a as M}from"./chunks/chunk.DCAJAXUP.js";import{a as h}from"./chunks/chunk.PEHSUZ2L.js";import"./chunks/chunk.WWGARXPI.js";import"./chunks/chunk.23WKPZET.js";import{a as C}from"./chunks/chunk.Y4ZS3BWH.js";import{a as I}from"./chunks/chunk.SSE7T5OF.js";import{a as D}from"./chunks/chunk.UI3ZVKSU.js";import{a as te}from"./chunks/chunk.VPBXFCBA.js";import{a as T}from"./chunks/chunk.4GA43M6X.js";import"./chunks/chunk.SAEYIL5V.js";import"./chunks/chunk.IF6Y3ILD.js";import{a as g}from"./chunks/chunk.NJKSWXOS.js";import{a as B}from"./chunks/chunk.37JCS2XH.js";import"./chunks/chunk.54DO3JVH.js";import{a as k}from"./chunks/chunk.WL6NNNG5.js";import"./chunks/chunk.ERP45OHF.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as l}from"./chunks/chunk.2C3UQTSS.js";import{a as m}from"./chunks/chunk.NOP4DTP2.js";import{a as S}from"./chunks/chunk.2O3FM7UB.js";import{a as x}from"./chunks/chunk.YUDSN6HJ.js";import"./chunks/chunk.OKNJ5BPS.js";import{a as s}from"./chunks/chunk.MYPRMCUO.js";import{a as n}from"./chunks/chunk.ADVB3FPU.js";import{a as i}from"./chunks/chunk.SZNU4NHI.js";import"./chunks/chunk.CGMKBGJU.js";import{a as b}from"./chunks/chunk.JQV2BZ2E.js";import"./chunks/chunk.BJBQEPZV.js";import"./chunks/chunk.EOXYPQZI.js";import"./chunks/chunk.MHWW3RZB.js";import{a as c}from"./chunks/chunk.N4L76IWF.js";import"./chunks/chunk.CBQWVOOS.js";import{a as r}from"./chunks/chunk.P7GMFHO5.js";import{a as o}from"./chunks/chunk.KE2YEQDL.js";import{a}from"./chunks/chunk.WQZWYMH3.js";import"./chunks/chunk.D4E5ZIRW.js";import{a as u}from"./chunks/chunk.TIMZJKMF.js";import{a as p}from"./chunks/chunk.OOIX4OAP.js";import"./chunks/chunk.I2H6CZK5.js";import{a as f}from"./chunks/chunk.I7OVY27Y.js";import{a as d}from"./chunks/chunk.HNBY226D.js";import{a as t}from"./chunks/chunk.RRJCCIDH.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.GA3PWYR4.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import"./chunks/chunk.W5O4FM6B.js";import"./chunks/chunk.QQD62QOV.js";import{d as de,e as fe}from"./chunks/chunk.552X4W43.js";import"./chunks/chunk.TRGIF57L.js";import"./chunks/chunk.LWLOMMIE.js";import"./chunks/chunk.J4FJ2SAP.js";import"./chunks/chunk.NJIXLFKZ.js";import{a as pe}from"./chunks/chunk.MEDJPDBB.js";import"./chunks/chunk.4XZDW2BJ.js";import"./chunks/chunk.SOLVKQIM.js";import"./chunks/chunk.4XDRYWQQ.js";import"./chunks/chunk.4ZZFYCXX.js";import"./chunks/chunk.NYKJXI3Q.js";import"./chunks/chunk.J45556RK.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,u as SdAudio,l as SdBadge,m as SdBrandshape,S as SdBreadcrumb,n as SdBreadcrumbItem,f as SdButton,b as SdCarousel,c as SdCarouselItem,T as SdCheckbox,g as SdCheckboxGroup,B as SdCombobox,h as SdDatepicker,C as SdDialog,I as SdDivider,p as SdDrawer,x as SdDropdown,D as SdExpandable,te as SdFileSelector,G as SdFlipcard,M as SdHeader,e as SdIcon,R as SdInclude,A as SdInput,i as SdLink,t as SdLoader,w as SdMapMarker,L as SdMenu,P as SdMenuItem,v as SdNavigationItem,F as SdNotification,N as SdOptgroup,O as SdOption,s as SdPopup,E as SdProgressBar,H as SdQuickfact,Q as SdRadio,V as SdRadioButton,j as SdRadioGroup,y as SdRange,z as SdRangeTick,J as SdScrollable,K as SdSelect,U as SdSkeleton,W as SdStep,X as SdStepGroup,Y as SdSwitch,Z as SdTab,_ as SdTabGroup,$ as SdTabPanel,k as SdTag,ee as SdTeaser,oe as SdTeaserMedia,re as SdTextarea,d as SdThemeListener,q as SdTooltip,ae as SdVideo,de as registerIconLibrary,ue as setupAutocomplete,fe as unregisterIconLibrary};
|
|
@@ -853,7 +853,7 @@
|
|
|
853
853
|
},
|
|
854
854
|
{
|
|
855
855
|
"name": "sd-datepicker",
|
|
856
|
-
"description": "Used to enter or select a date or a range of dates using a calendar view.\n---\n\n\n### **Events:**\n - **sd-change** - Emitted when the date selection changes.\n- **sd-range-select** - Emitted when the date range selection changes.\n- **sd-select** - Emitted when the date selection changes.\n- **sd-datepicker-close** - Emitted when the datepicker is closed.\n- **sd-focus** - Emitted when the datepicker is focused.\n- **sd-blur** - Emitted when the datepicker is blurred.\n- **sd-month-change** - Emitted when the month is changed.\n- **sd-month-year** - Emitted when the year is changed.\n\n### **Methods:**\n - **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The default slot.\n- **label** - The label for the date input.\n- **help-text** - The help text, displayed below the input.\n- **tooltip** - The tooltip icon and content.\n\n### **CSS Properties:**\n - **--sd-form-control-color-text** - The text color for the datepicker. _(default: undefined)_\n- **--sd-form-control-border-radius** - The border radius for the datepicker. _(default: undefined)_\n- **--sd-form-control-color-border** - The default border color for the datepicker. _(default: undefined)_\n- **--sd-form-control--filled__floating-label-color-text** - The text color for the floating label when the input is filled. _(default: undefined)_\n- **--sd-form-control--invalid-color-background** - The background color for the input when it is invalid. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-left-radius** - The border radius for the bottom left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-right-radius** - The border radius for the bottom right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-left-radius** - The border radius for the top left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-right-radius** - The border radius for the top right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control--hover-color-background** - The background color for form controls on hover. _(default: undefined)_\n- **--sd-form-control--read-only-color-background** - The background color for read-only form controls. _(default: undefined)_\n- **--sd-form-control-color-icon-fill** - The color for form control icons. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-text** - The default text color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-background** - The background color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-text** - The text color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-border** - The default border color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-text** - The text color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-background** - The background color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-text** - The text color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--current-font-weight** - The font weight for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-background** - The background color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-background** - The background color for selected date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--range-color-background** - The background color for date items that are within the selected range. _(default: undefined)_\n- **--sd-datepicker__date-item--current-color-text** - The text color for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-text** - The text color for selected date items in hover state. _(default: undefined)_\n\n### **CSS Parts:**\n - **datepicker** - The component's base wrapper.\n- **header** - The header containing the month/year and navigation buttons.\n- **prev-year-button** - The button to go to the previous year.\n- **prev-month-button** - The button to go to the previous month.\n- **month-label** - The month and year label.\n- **next-month-button** - The button to go to the next month.\n- **next-year-button** - The button to go to the next year.\n- **grid** - The calendar grid container.\n- **weekday** - Each weekday label in the calendar header.\n- **day** - Each day button in the calendar grid.\n- **form-control** - The form control wrapper around the input.\n- **form-control-label** - The label for the input.\n- **form-control-input** - The input element.\n- **border** - The border around the input.\n- **invalid-icon** - The icon shown when the input is invalid.\n- **valid-icon** - The icon shown when the input is valid.\n- **form-control-help-text** - The help text, displayed below the input.",
|
|
856
|
+
"description": "Used to enter or select a date or a range of dates using a calendar view.\n---\n\n\n### **Events:**\n - **sd-change** - Emitted when the date selection changes.\n- **sd-range-select** - Emitted when the date range selection changes.\n- **sd-select** - Emitted when the date selection changes.\n- **sd-datepicker-close** - Emitted when the datepicker is closed.\n- **sd-focus** - Emitted when the datepicker is focused.\n- **sd-blur** - Emitted when the datepicker is blurred.\n- **sd-month-change** - Emitted when the month is changed.\n- **sd-month-year** - Emitted when the year is changed.\n- **sd-clear** - Emitted when the clear button is activated.\n\n### **Methods:**\n - **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The default slot.\n- **label** - The label for the date input.\n- **help-text** - The help text, displayed below the input.\n- **tooltip** - The tooltip icon and content.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n\n### **CSS Properties:**\n - **--sd-form-control-color-text** - The text color for the datepicker. _(default: undefined)_\n- **--sd-form-control-border-radius** - The border radius for the datepicker. _(default: undefined)_\n- **--sd-form-control-color-border** - The default border color for the datepicker. _(default: undefined)_\n- **--sd-form-control--filled__floating-label-color-text** - The text color for the floating label when the input is filled. _(default: undefined)_\n- **--sd-form-control--invalid-color-background** - The background color for the input when it is invalid. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-left-radius** - The border radius for the bottom left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-right-radius** - The border radius for the bottom right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-left-radius** - The border radius for the top left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-right-radius** - The border radius for the top right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control--hover-color-background** - The background color for form controls on hover. _(default: undefined)_\n- **--sd-form-control--read-only-color-background** - The background color for read-only form controls. _(default: undefined)_\n- **--sd-form-control-color-icon-fill** - The color for form control icons. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-text** - The default text color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-background** - The background color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-text** - The text color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-border** - The default border color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-text** - The text color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-background** - The background color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-text** - The text color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--current-font-weight** - The font weight for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-background** - The background color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-background** - The background color for selected date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--range-color-background** - The background color for date items that are within the selected range. _(default: undefined)_\n- **--sd-datepicker__date-item--current-color-text** - The text color for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-text** - The text color for selected date items in hover state. _(default: undefined)_\n\n### **CSS Parts:**\n - **datepicker** - The component's base wrapper.\n- **header** - The header containing the month/year and navigation buttons.\n- **prev-year-button** - The button to go to the previous year.\n- **prev-month-button** - The button to go to the previous month.\n- **month-label** - The month and year label.\n- **next-month-button** - The button to go to the next month.\n- **next-year-button** - The button to go to the next year.\n- **grid** - The calendar grid container.\n- **weekday** - Each weekday label in the calendar header.\n- **day** - Each day button in the calendar grid.\n- **form-control** - The form control wrapper around the input.\n- **form-control-label** - The label for the input.\n- **form-control-input** - The input element.\n- **border** - The border around the input.\n- **invalid-icon** - The icon shown when the input is invalid.\n- **valid-icon** - The icon shown when the input is valid.\n- **form-control-help-text** - The help text, displayed below the input.\n- **clear-button** - The clear button.",
|
|
857
857
|
"attributes": [
|
|
858
858
|
{
|
|
859
859
|
"name": "locale",
|
|
@@ -965,6 +965,11 @@
|
|
|
965
965
|
"description": "Makes the input read-only (non-editable) when true.",
|
|
966
966
|
"values": []
|
|
967
967
|
},
|
|
968
|
+
{
|
|
969
|
+
"name": "clearable",
|
|
970
|
+
"description": "Adds a clear button when the datepicker is not empty.",
|
|
971
|
+
"values": []
|
|
972
|
+
},
|
|
968
973
|
{
|
|
969
974
|
"name": "placement",
|
|
970
975
|
"description": "Preferred placement of the flyout relative to the input (top|bottom).",
|
package/cdn/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@solid-design-system/components",
|
|
4
|
-
"version": "7.0
|
|
4
|
+
"version": "7.1.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -1963,7 +1963,7 @@
|
|
|
1963
1963
|
},
|
|
1964
1964
|
{
|
|
1965
1965
|
"name": "sd-datepicker",
|
|
1966
|
-
"description": "Used to enter or select a date or a range of dates using a calendar view.\n---\n\n\n### **Events:**\n - **sd-change** - Emitted when the date selection changes.\n- **sd-range-select** - Emitted when the date range selection changes.\n- **sd-select** - Emitted when the date selection changes.\n- **sd-datepicker-close** - Emitted when the datepicker is closed.\n- **sd-focus** - Emitted when the datepicker is focused.\n- **sd-blur** - Emitted when the datepicker is blurred.\n- **sd-month-change** - Emitted when the month is changed.\n- **sd-month-year** - Emitted when the year is changed.\n\n### **Methods:**\n - **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The default slot.\n- **label** - The label for the date input.\n- **help-text** - The help text, displayed below the input.\n- **tooltip** - The tooltip icon and content.\n\n### **CSS Properties:**\n - **--sd-form-control-color-text** - The text color for the datepicker. _(default: undefined)_\n- **--sd-form-control-border-radius** - The border radius for the datepicker. _(default: undefined)_\n- **--sd-form-control-color-border** - The default border color for the datepicker. _(default: undefined)_\n- **--sd-form-control--filled__floating-label-color-text** - The text color for the floating label when the input is filled. _(default: undefined)_\n- **--sd-form-control--invalid-color-background** - The background color for the input when it is invalid. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-left-radius** - The border radius for the bottom left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-right-radius** - The border radius for the bottom right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-left-radius** - The border radius for the top left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-right-radius** - The border radius for the top right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control--hover-color-background** - The background color for form controls on hover. _(default: undefined)_\n- **--sd-form-control--read-only-color-background** - The background color for read-only form controls. _(default: undefined)_\n- **--sd-form-control-color-icon-fill** - The color for form control icons. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-text** - The default text color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-background** - The background color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-text** - The text color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-border** - The default border color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-text** - The text color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-background** - The background color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-text** - The text color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--current-font-weight** - The font weight for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-background** - The background color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-background** - The background color for selected date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--range-color-background** - The background color for date items that are within the selected range. _(default: undefined)_\n- **--sd-datepicker__date-item--current-color-text** - The text color for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-text** - The text color for selected date items in hover state. _(default: undefined)_\n\n### **CSS Parts:**\n - **datepicker** - The component's base wrapper.\n- **header** - The header containing the month/year and navigation buttons.\n- **prev-year-button** - The button to go to the previous year.\n- **prev-month-button** - The button to go to the previous month.\n- **month-label** - The month and year label.\n- **next-month-button** - The button to go to the next month.\n- **next-year-button** - The button to go to the next year.\n- **grid** - The calendar grid container.\n- **weekday** - Each weekday label in the calendar header.\n- **day** - Each day button in the calendar grid.\n- **form-control** - The form control wrapper around the input.\n- **form-control-label** - The label for the input.\n- **form-control-input** - The input element.\n- **border** - The border around the input.\n- **invalid-icon** - The icon shown when the input is invalid.\n- **valid-icon** - The icon shown when the input is valid.\n- **form-control-help-text** - The help text, displayed below the input.",
|
|
1966
|
+
"description": "Used to enter or select a date or a range of dates using a calendar view.\n---\n\n\n### **Events:**\n - **sd-change** - Emitted when the date selection changes.\n- **sd-range-select** - Emitted when the date range selection changes.\n- **sd-select** - Emitted when the date selection changes.\n- **sd-datepicker-close** - Emitted when the datepicker is closed.\n- **sd-focus** - Emitted when the datepicker is focused.\n- **sd-blur** - Emitted when the datepicker is blurred.\n- **sd-month-change** - Emitted when the month is changed.\n- **sd-month-year** - Emitted when the year is changed.\n- **sd-clear** - Emitted when the clear button is activated.\n\n### **Methods:**\n - **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The default slot.\n- **label** - The label for the date input.\n- **help-text** - The help text, displayed below the input.\n- **tooltip** - The tooltip icon and content.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n\n### **CSS Properties:**\n - **--sd-form-control-color-text** - The text color for the datepicker. _(default: undefined)_\n- **--sd-form-control-border-radius** - The border radius for the datepicker. _(default: undefined)_\n- **--sd-form-control-color-border** - The default border color for the datepicker. _(default: undefined)_\n- **--sd-form-control--filled__floating-label-color-text** - The text color for the floating label when the input is filled. _(default: undefined)_\n- **--sd-form-control--invalid-color-background** - The background color for the input when it is invalid. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-left-radius** - The border radius for the bottom left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-bottom-right-radius** - The border radius for the bottom right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-left-radius** - The border radius for the top left corner of the datepicker. _(default: undefined)_\n- **--sd-form-control__listbox-border-top-right-radius** - The border radius for the top right corner of the datepicker. _(default: undefined)_\n- **--sd-form-control--hover-color-background** - The background color for form controls on hover. _(default: undefined)_\n- **--sd-form-control--read-only-color-background** - The background color for read-only form controls. _(default: undefined)_\n- **--sd-form-control-color-icon-fill** - The color for form control icons. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-text** - The default text color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-background** - The background color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--default-color-text** - The text color for date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--default-color-border** - The default border color for date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-text** - The text color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-background** - The background color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--hover--prev-next-color-text** - The text color for date items in hover state when they are previous/next month days. _(default: undefined)_\n- **--sd-datepicker__date-item--current-font-weight** - The font weight for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected-color-background** - The background color for selected date items. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-background** - The background color for selected date items in hover state. _(default: undefined)_\n- **--sd-datepicker__date-item--range-color-background** - The background color for date items that are within the selected range. _(default: undefined)_\n- **--sd-datepicker__date-item--current-color-text** - The text color for the current date item. _(default: undefined)_\n- **--sd-datepicker__date-item--selected--hover-color-text** - The text color for selected date items in hover state. _(default: undefined)_\n\n### **CSS Parts:**\n - **datepicker** - The component's base wrapper.\n- **header** - The header containing the month/year and navigation buttons.\n- **prev-year-button** - The button to go to the previous year.\n- **prev-month-button** - The button to go to the previous month.\n- **month-label** - The month and year label.\n- **next-month-button** - The button to go to the next month.\n- **next-year-button** - The button to go to the next year.\n- **grid** - The calendar grid container.\n- **weekday** - Each weekday label in the calendar header.\n- **day** - Each day button in the calendar grid.\n- **form-control** - The form control wrapper around the input.\n- **form-control-label** - The label for the input.\n- **form-control-input** - The input element.\n- **border** - The border around the input.\n- **invalid-icon** - The icon shown when the input is invalid.\n- **valid-icon** - The icon shown when the input is valid.\n- **form-control-help-text** - The help text, displayed below the input.\n- **clear-button** - The clear button.",
|
|
1967
1967
|
"doc-url": "",
|
|
1968
1968
|
"attributes": [
|
|
1969
1969
|
{
|
|
@@ -2082,6 +2082,11 @@
|
|
|
2082
2082
|
"description": "Makes the input read-only (non-editable) when true.",
|
|
2083
2083
|
"value": { "type": "boolean", "default": "false" }
|
|
2084
2084
|
},
|
|
2085
|
+
{
|
|
2086
|
+
"name": "clearable",
|
|
2087
|
+
"description": "Adds a clear button when the datepicker is not empty.",
|
|
2088
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2089
|
+
},
|
|
2085
2090
|
{
|
|
2086
2091
|
"name": "placement",
|
|
2087
2092
|
"description": "Preferred placement of the flyout relative to the input (top|bottom).",
|
|
@@ -2123,6 +2128,10 @@
|
|
|
2123
2128
|
{
|
|
2124
2129
|
"name": "tooltip",
|
|
2125
2130
|
"description": "The tooltip icon and content."
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"name": "clear-icon",
|
|
2134
|
+
"description": "An icon to use in lieu of the default clear icon."
|
|
2126
2135
|
}
|
|
2127
2136
|
],
|
|
2128
2137
|
"events": [
|
|
@@ -2157,6 +2166,10 @@
|
|
|
2157
2166
|
{
|
|
2158
2167
|
"name": "sd-month-year",
|
|
2159
2168
|
"description": "Emitted when the year is changed."
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
"name": "sd-clear",
|
|
2172
|
+
"description": "Emitted when the clear button is activated."
|
|
2160
2173
|
}
|
|
2161
2174
|
],
|
|
2162
2175
|
"js": {
|
|
@@ -2280,6 +2293,11 @@
|
|
|
2280
2293
|
"description": "Makes the input read-only (non-editable) when true.",
|
|
2281
2294
|
"type": "boolean"
|
|
2282
2295
|
},
|
|
2296
|
+
{
|
|
2297
|
+
"name": "clearable",
|
|
2298
|
+
"description": "Adds a clear button when the datepicker is not empty.",
|
|
2299
|
+
"type": "boolean"
|
|
2300
|
+
},
|
|
2283
2301
|
{
|
|
2284
2302
|
"name": "placement",
|
|
2285
2303
|
"description": "Preferred placement of the flyout relative to the input (top|bottom).",
|
|
@@ -2365,6 +2383,10 @@
|
|
|
2365
2383
|
{
|
|
2366
2384
|
"name": "sd-month-year",
|
|
2367
2385
|
"description": "Emitted when the year is changed."
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
"name": "sd-clear",
|
|
2389
|
+
"description": "Emitted when the clear button is activated."
|
|
2368
2390
|
}
|
|
2369
2391
|
]
|
|
2370
2392
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk.4ZZFYCXX.js";import{a,b as r,h as s}from"./chunk.J45556RK.js";import{b as n,e as d}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-7-0-
|
|
2
|
-
:host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1,.25rem) * 5);min-width:calc(var(--sd-spacing-1,.25rem) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-7-0-
|
|
1
|
+
import{a as i}from"./chunk.4ZZFYCXX.js";import{a,b as r,h as s}from"./chunk.J45556RK.js";import{b as n,e as d}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-7-1-0-badge--blue--inverted-color-text sd-7-1-0-badge--blue--inverted-color-background sd-7-1-0-badge--inverted-color-border":"text-white sd-7-1-0-badge--blue-color-background border-white",green:this.inverted?"sd-7-1-0-badge--green-color--inverted-text sd-7-1-0-badge--green-color--inverted-background sd-7-1-0-badge--inverted-color-border":"text-white sd-7-1-0-badge--green-color-background border-white",red:this.inverted?"sd-7-1-0-badge--red--inverted-text sd-7-1-0-badge--red--inverted-background sd-7-1-0-badge--inverted-color-border":"text-white sd-7-1-0-badge--red-color-background border-white"}[this.variant])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1,.25rem) * 5);min-width:calc(var(--sd-spacing-1,.25rem) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-7-1-0-badge")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk.MEDJPDBB.js";import{a as g}from"./chunk.4ZZFYCXX.js";import{a as b,b as f,c,d as o,h}from"./chunk.J45556RK.js";import{b as m,e as u}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var e=class extends h{constructor(){super(...arguments);this.localize=new v(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-7-0-
|
|
2
|
-
:host{position:relative;display:block}::slotted(sd-7-0-
|
|
1
|
+
import{a as v}from"./chunk.MEDJPDBB.js";import{a as g}from"./chunk.4ZZFYCXX.js";import{a as b,b as f,c,d as o,h}from"./chunk.J45556RK.js";import{b as m,e as u}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var e=class extends h{constructor(){super(...arguments);this.localize=new v(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-7-1-0-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:r}=t.getBoundingClientRect();t.dataset.size=`${r}`}),this.itemPositionsCached=!0}handleTruncation(){var a;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:r}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let n=0;for(let[p,i]of Array.from(this.items).reverse().entries()){let l=parseFloat(`${(a=i.dataset.size)!=null?a:i.getBoundingClientRect().width}`);if(i.hidden=!1,this.isTruncated){let d=i.cloneNode(!0);this.dropdown.prepend(d),i.hidden=!0;continue}if(p===0||p===1){n+=l;continue}if(this.isTruncated=n+l+r>t,this.isTruncated){let d=i.cloneNode(!0);this.dropdown.prepend(d),i.hidden=!0}else n+=l}}handleMobileChevron(){var r,n,a;let t=document.createElement("sd-7-1-0-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(a=(n=(r=Array.from(this.items).at(-2))==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("sd-7-1-0-link"))==null||a.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-7-1-0-dropdown part="truncated" class="${g(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-7-1-0-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};e.styles=[...h.styles,m`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;display:block}::slotted(sd-7-1-0-breadcrumb-item:not(:last-of-type))::after,sd-7-1-0-dropdown::after{margin-inline:var(--sd-spacing-2,.5rem);display:none;height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem);border-radius:var(--sd-radius-full,624.9375rem);background-color:rgba(var(--sd-breadcrumb__separator-color,195 195 195));--tw-content:'';content:var(--tw-content)}@media (width >= 64rem){::slotted(sd-7-1-0-breadcrumb-item:not(:last-of-type))::after,sd-7-1-0-dropdown::after{display:inline-block}}::slotted(sd-7-1-0-breadcrumb-item:nth-last-child(2)){display:flex}@media (width >= 64rem){::slotted(sd-7-1-0-breadcrumb-item:nth-last-child(2))::after{background-color:rgba(var(--sd-breadcrumb__separator--current-color,45 157 0))}}::slotted(sd-7-1-0-breadcrumb-item),sd-7-1-0-dropdown{display:none;align-items:center;font-size:var(--sd-text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@media (width >= 64rem){::slotted(sd-7-1-0-breadcrumb-item),sd-7-1-0-dropdown{display:flex}}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],s([o('[part="base"]')],e.prototype,"base",2),s([o('[part="truncated"]')],e.prototype,"truncated",2),s([o('[part="truncated-dropdown"]')],e.prototype,"dropdown",2),s([o("slot")],e.prototype,"defaultSlot",2),s([f({type:String,reflect:!0})],e.prototype,"label",2),s([c()],e.prototype,"itemPositionsCached",2),s([c()],e.prototype,"isTruncated",2),e=s([b("sd-7-1-0-breadcrumb")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as m}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as n,b as o,h as a}from"./chunk.J45556RK.js";import{b as c,e as l}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await m(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return l`<slot></slot>`}};t.styles=[...a.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-7-0-
|
|
2
|
+
:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-7-1-0-include")],t);export{t as a};
|