@solid-design-system/components 7.0.2 → 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.JQV2BZ2E.js +12 -0
- package/cdn/chunks/chunk.PEHSUZ2L.js +2 -0
- package/cdn/components/carousel/carousel.js +1 -1
- 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 +3 -3
- package/cdn/solid-components.iife.js +3 -3
- 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 +12 -0
- 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/carousel.js +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/chunks/{chunk.I46TZJHO.js → chunk.Z4IULIBO.js} +5 -5
- package/dist/components/carousel/carousel.js +1 -1
- 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 +2 -2
- 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.I46TZJHO.js → chunk.Z4IULIBO.js} +15 -15
- 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/carousel.js +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 +2 -2
- 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.5SQTIWWY.js +0 -12
- package/cdn/chunks/chunk.7OG7ICBB.js +0 -2
- package/cdn-versioned/chunks/chunk.5SQTIWWY.js +0 -12
- package/cdn-versioned/chunks/chunk.7OG7ICBB.js +0 -2
|
@@ -196,7 +196,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12,3rem);width:var(--
|
|
|
196
196
|
:host{position:relative;display:block}::slotted(sd-breadcrumb-item:not(:last-of-type))::after,sd-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-breadcrumb-item:not(:last-of-type))::after,sd-dropdown::after{display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (width >= 64rem){::slotted(sd-breadcrumb-item:nth-last-child(2))::after{background-color:rgba(var(--sd-breadcrumb__separator--current-color,45 157 0))}}::slotted(sd-breadcrumb-item),sd-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-breadcrumb-item),sd-dropdown{display:flex}}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],o([g('[part="base"]')],Ft.prototype,"base",2),o([g('[part="truncated"]')],Ft.prototype,"truncated",2),o([g('[part="truncated-dropdown"]')],Ft.prototype,"dropdown",2),o([g("slot")],Ft.prototype,"defaultSlot",2),o([d({type:String,reflect:!0})],Ft.prototype,"label",2),o([L()],Ft.prototype,"itemPositionsCached",2),o([L()],Ft.prototype,"isTruncated",2),Ft=o([E("sd-breadcrumb")],Ft);var Pt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return p`<a part="base" class="${c(this.standalone?"flex items-start":"inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":"interactive--default-color-text hover:text-primary-500 active:interactive--active-color-text focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"])}" href="${$(this.href||void 0)}" target="${$(this.target||void 0)}" download="${$(this.download)}" rel="${$(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${c("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Pt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
197
197
|
::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-text-xl,1.5rem);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],o([g("a")],Pt.prototype,"button",2),o([d({type:Boolean,reflect:!0})],Pt.prototype,"standalone",2),o([d({type:String,reflect:!0})],Pt.prototype,"size",2),o([d({type:Boolean,reflect:!0})],Pt.prototype,"inverted",2),o([d({type:String,reflect:!0})],Pt.prototype,"href",2),o([d({type:Boolean,attribute:"visually-disabled",reflect:!0})],Pt.prototype,"visuallyDisabled",2),o([d({type:String,reflect:!0})],Pt.prototype,"target",2),o([d({reflect:!0})],Pt.prototype,"download",2),Pt=o([E("sd-link")],Pt);var Zt=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return p`<sd-link part="base" href="${$(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Zt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
198
198
|
:host{display:inline-flex;align-items:center}sd-link::part(base){align-items:center}sd-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,104 104 104))}:host([current]) sd-link::part(label){text-decoration-line:none}`],o([g('[part="base"]')],Zt.prototype,"base",2),o([d({type:String,reflect:!0})],Zt.prototype,"href",2),o([d({type:String,reflect:!0})],Zt.prototype,"target",2),o([d({type:Boolean,reflect:!0})],Zt.prototype,"current",2),o([C("current")],Zt.prototype,"handleCurrentChange",1),Zt=o([E("sd-breadcrumb-item")],Zt);var Oi=class{constructor(r,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};r.addController(this),this.host=r,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(r){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},r)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function va(s,r,t){let e=i=>Object.is(i,-0)?0:i;return s<r?e(r):s>t?e(t):e(s)}var Ii=class{constructor(r){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=r}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(r){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,i)=>{i===r?this.show(e):this.hide(e)})}show(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),r.removeAttribute("inert"),r.setAttribute("aria-hidden","false")}hide(r){if(!this.isEnabled)return;let t=r.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),r.toggleAttribute("inert",!0),r.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let r=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(r.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=r.map(i=>{let a=i,n={position:a.style.position,opacity:a.style.opacity,zIndex:a.style.zIndex,transform:a.style.transform,classes:a.className};return a.classList.remove(...this.getAllFadeClasses()),a.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let i=r.map(n=>n.getBoundingClientRect().height),a=Math.max(...i);r.forEach((n,l)=>{let h=n,u=e[l];h.className=u.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=u[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),a>0&&(this.carousel.style.setProperty("--carousel-height",`${a}px`),t.style.height=`${a}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*ya(s,r){if(s!==void 0){let t=0;for(let e of s)yield r(e,t++)}}function*wa(s,r,t=1){let e=r===void 0?0:s;r!=null||(r=s);for(let i=e;t>0?i<r:r<i;i+=t)yield i}var xa=Symbol(),Cr=s=>(r,t,e)=>{let i=e.value;e.value=function(...a){clearTimeout(this[xa]),this[xa]=window.setTimeout(()=>{i.apply(this,a)},s)}};var Qr=class{constructor(r){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=r=>{if(r.pointerType==="touch")return;this.pointers.add(r.pointerId),this.mouseDragging&&!this.dragging&&r.button===0&&(r.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=r=>{let t=this.host.scrollContainer,e=!!r.movementX||!!r.movementY;!this.dragging&&e?(t.setPointerCapture(r.pointerId),this.handleDragStart()):t.hasPointerCapture(r.pointerId)&&this.handleDrag(r)};this.handlePointerUp=r=>{this.pointers.delete(r.pointerId),this.host.scrollContainer.releasePointerCapture(r.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=r=>{for(let t of r.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=r=>{for(let t of r.touches)this.pointers.add(t.identifier)};this.host=r,r.addController(this)}async hostConnected(){let r=this.host;await r.updateComplete;let t=r.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let r=this.host;this.dragging=!0,r.scrollContainer.style.setProperty("scroll-snap-type","unset"),r.requestUpdate()}handleDrag(r){this.host.scrollContainer.scrollBy({left:-r.movementX,top:-r.movementY})}async handleDragEnd(){let r=this.host,t=r.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,i=t.scrollTop;t.style.removeProperty("scroll-snap-type");let a=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:i,behavior:"auto"}),t.scrollTo({left:a,top:n,behavior:Hr()?"auto":"smooth"}),this.scrolling&&await J(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),r.requestUpdate()}};o([Cr(100)],Qr.prototype,"handleScrollEnd",1);var xe=class extends f{static isCarouselItem(r){return r instanceof Element&&r.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return p`<slot></slot>`}};xe.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
-
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],xe=o([E("sd-carousel-item")],xe);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Oi(this,()=>{this.isFocused||this.next()});this.scrollController=new Qr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Ii(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(a=>xe.isCarouselItem(a)&&!a.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let a=i.target;a.toggleAttribute("inert",!i.isIntersecting),a.classList.toggle("--in-view",i.isIntersecting),a.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&a.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,a){return Math.ceil((t-i)/a)-Math.ceil((t-i-e)/a)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",a=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),a&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(a=>a.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let a=Number(i.target.getAttribute("data-clone"));this.goToSlide(a,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),a=i.nextNode();for(;a;){if(a.nodeType===Node.TEXT_NODE){let l=(n=a.textContent)==null?void 0:n.trim();l&&e.push(l)}else a instanceof HTMLImageElement&&a.alt&&e.push(a.alt);a=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,a)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",a+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,a=t.slice(-i),n=t.slice(0,i);a.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((a,n)=>{a.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let a=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=a?`${a} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,a)=>{Math.abs(a-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let a=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(a);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:a,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=va(t+(a?i:0),0,u.length+1),y=u[b],v=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-v.left+n.scrollLeft,top:w.top-v.top+n.scrollTop,behavior:Hr()?"auto":e}),this.userInteracted&&!this.loop){let x=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;x?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),a=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||a>1,l=this.loop||a<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ya(wa(i),u=>{let m=u+1===a;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${a}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
|
+
:host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],xe=o([E("sd-carousel-item")],xe);var X=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.autoplayInterval=5;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.isFocused=!1;this.autoplayController=new Oi(this,()=>{this.isFocused||this.next()});this.scrollController=new Qr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Ii(this);this.handleUserInteraction=t=>{this.userInteracted=t.type==="keydown"};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(a=>xe.isCarouselItem(a)&&!a.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["mousedown","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction)),this.addEventListener("focusin",this.handleFocus),this.addEventListener("focusout",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown);let t=new IntersectionObserver(e=>{e.forEach(i=>{this.intersectionObserverEntries.set(i.target,i);let a=i.target;a.toggleAttribute("inert",!i.isIntersecting),a.classList.toggle("--in-view",i.isIntersecting),a.setAttribute("aria-hidden",i.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["mousedown","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.removeEventListener("focusin",this.handleFocus),this.removeEventListener("focusout",this.handleBlur),this.removeEventListener("keydown",this.handleKeyDown),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&a.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,i){return Math.ceil((t-e)/i)+1>0?Math.ceil((t-e)/i)+1:1}getCurrentPage(t,e,i,a){return Math.ceil((t-i)/a)-Math.ceil((t-i-e)/a)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,i=this.localize.dir()==="rtl",a=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!i&&t.key==="ArrowRight"||i&&t.key==="ArrowLeft",l=t.key==="ArrowUp"||!i&&t.key==="ArrowLeft"||i&&t.key==="ArrowRight";t.preventDefault(),l&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),a&&this.updateComplete.then(()=>{var u;let h=(u=this.shadowRoot)==null?void 0:u.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),i=[...this.intersectionObserverEntries.values()].find(a=>a.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let a=Number(i.target.getAttribute("data-clone"));this.goToSlide(a,"auto");return}i&&(this.activeSlide=t.indexOf(i.target))}handleFocus(){this.isFocused=!0}handleBlur(){this.isFocused=!1}getSlideText(t){var n;let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ALL),a=i.nextNode();for(;a;){if(a.nodeType===Node.TEXT_NODE){let l=(n=a.textContent)==null?void 0:n.trim();l&&e.push(l)}else a instanceof HTMLImageElement&&a.alt&&e.push(a.alt);a=i.nextNode()}return e.join(" ")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){this.pausedAutoplay?this.autoplayController.stop():this.autoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((i,a)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",a+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,a=t.slice(-i),n=t.slice(0,i);a.reverse().forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(t.length-h-1)),this.prepend(u)}),n.forEach((l,h)=>{let u=l.cloneNode(!0);u.setAttribute("data-clone",String(h)),this.append(u)})}this.getSlides({excludeClones:!1}).forEach(i=>{e.observe(i)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((a,n)=>{a.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);if(this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&(this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}}),this.announcementRegion)){let a=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=a?`${a} ${n}`:n})}let i=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>i&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((i,a)=>{Math.abs(a-e)%e===0?i.style.removeProperty("scroll-snap-align"):i.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(this.autoplayInterval*1e3)}handleautoplayIntervalChange(){!this.autoplay||this.pausedAutoplay||(this.autoplayController.stop(),this.autoplayController.start(this.autoplayInterval*1e3))}previous(t="smooth"){if(this.fade){let a=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(a);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,i=!1;for(;!i&&e>0;)e-=1,i=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:i,loop:a,scrollContainer:n,fade:l}=this,h=this.getSlides(),u=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,l)return;let b=va(t+(a?i:0),0,u.length+1),y=u[b],v=n.getBoundingClientRect(),w=y.getBoundingClientRect();if(n.scrollTo({left:w.left-v.left+n.scrollLeft,top:w.top-v.top+n.scrollTop,behavior:Hr()?"auto":e}),this.userInteracted&&!this.loop){let x=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,M=this.activeSlide===0;x?this.previousButton.focus({preventScroll:!0}):M&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),a=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||a>1,l=this.loop||a<i,h=this.localize.dir()==="ltr";return p`<div part="base" class="${c("carousel h-full w-full relative")}"><button class="${c("ml-6 !rounded-sm","!absolute !bottom-0 !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.pausedAutoplay?this.localize.term("startAutoplay"):this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${u=>{this.pausedAutoplay=!this.pausedAutoplay,u.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="play"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay||this.pausedAutoplay||this.isFocused?"polite":"off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(u=>!u.hasAttribute("data-clone")).length)}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @click="${n?u=>{this.previous(),this.unblockAutoplay(u,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-bottom":"chevron-top"}"></sd-icon></slot></button> ${this.variant==="dot"?p`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${ya(wa(i),u=>{let m=u+1===a;return p`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",u+1,i)}" @mousedown="${b=>b.preventDefault()}" @click="${b=>{this.goToSlide(u*e),this.unblockAutoplay(b,this.paginationItems[u])}}"><span class="${c("h-4 w-4 block border sd-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"sd-carousel__pager-dot--inverted-border hover:border-primary-200":"border-primary hover:border-primary-500",m&&"border-none",m?this.inverted?"sd-carousel__pager-dot--inverted-background hover:sd-carousel__pager-dot--inverted--hovered-background":"sd-carousel__pager-dot-background hover:bg-accent-550":"")}"></span></button>`})}</div>`:p`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2",this.inverted?"text-white sd-carousel--active--inverted-color-border":"text-black sd-carousel--active-color-border")}">${a}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${i}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!l}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?u=>{this.next(),this.unblockAutoplay(u,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-top":"chevron-bottom"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
200
200
|
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`],o([g('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),o([g('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),o([g('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),o([fi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),o([d({type:String,reflect:!0})],X.prototype,"variant",2),o([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),o([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),o([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),o([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),o([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),o([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),o([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),o([g("slot:not([name])")],X.prototype,"defaultSlot",2),o([g(".carousel__slides")],X.prototype,"scrollContainer",2),o([g(".carousel__pagination")],X.prototype,"paginationContainer",2),o([g(".carousel__announcement")],X.prototype,"announcementRegion",2),o([L()],X.prototype,"activeSlide",2),o([L()],X.prototype,"currentPage",2),o([L()],X.prototype,"pausedAutoplay",2),o([L()],X.prototype,"isFocused",2),o([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),o([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),o([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),o([C("activeSlide")],X.prototype,"handleSlideChange",1),o([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),o([C("autoplay")],X.prototype,"handleAutoplayChange",1),o([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=o([E("sd-carousel")],X);var Vt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(a,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(a===u){let b=h.converter||He,v=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:He.fromAttribute)(l,h.type);this[s]!==v&&(this[t]=v)}i.call(this,a,n,l)}};var{I:Sy}=ro;var Pi=s=>s.strings===void 0;var Pd={},ka=(s,r=Pd)=>s._$AH=r;var Se=se(class extends Re{constructor(s){if(super(s),s.type!==Xt.PROPERTY&&s.type!==Xt.ATTRIBUTE&&s.type!==Xt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Pi(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===At||r===U)return r;let t=s.element,e=s.name;if(s.type===Xt.PROPERTY){if(r===t[e])return At}else if(s.type===Xt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return At}else if(s.type===Xt.ATTRIBUTE&&t.getAttribute(e)===r+"")return At;return ka(s),r}});var ct=class extends f{constructor(){super(...arguments);this.formControlController=new dt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return p`<div class="flex flex-col"><label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${$(this.value)}" .indeterminate="${Se(this.indeterminate)}" .checked="${Se(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary outline-transparent",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400 group-hover:border-error-400",invalid:"border-error group-hover:border-error-400 sd-checkbox--invalid-color-background group-hover:bg-transparent",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div part="checkbox" class="${c("absolute h-3 transition-[width] right-0 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"sd-checkbox--invalid-color-background",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?p`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"><slot></slot></span></label><div id="invalid-icon-message" part="invalid-icon-message" class="${c("flex items-center gap-2",this.showInvalidStyle&&"mt-2")}">${this.showInvalidStyle?p`<sd-icon id="invalid-icon" part="invalid-icon" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div></div>`}};ct.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
201
201
|
:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-style:var(--tw-outline-style);outline-width:0}:host([required]) #label::after{content:' *'}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],o([g('input[type="checkbox"]')],ct.prototype,"input",2),o([g("#invalid-message")],ct.prototype,"invalidMessage",2),o([d({type:String,reflect:!0})],ct.prototype,"title",2),o([d({type:String,reflect:!0})],ct.prototype,"name",2),o([d()],ct.prototype,"value",2),o([d({type:String,reflect:!0})],ct.prototype,"size",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"disabled",2),o([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ct.prototype,"visuallyDisabled",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"checked",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"indeterminate",2),o([Vt("checked")],ct.prototype,"defaultChecked",2),o([d({type:String,reflect:!0})],ct.prototype,"form",2),o([d({type:Boolean,reflect:!0})],ct.prototype,"required",2),o([L()],ct.prototype,"showInvalidStyle",2),o([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ct.prototype,"handleDisabledChange",1),o([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ct.prototype,"handleStateChange",1),ct=o([E("sd-checkbox")],ct);var qt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,i=this.hasSlotController.test("help-text"),a=this.helpText?!0:i,n=p`<slot @slotchange="${this.syncCheckboxes}"></slot>`,l=this.hasSlotController.test("tooltip");return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||l?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",a?"block":"hidden")}" aria-hidden="${!a}">${this.helpText}</slot>`}};qt.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
202
202
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:0}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:0}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:0}`],o([d({type:String,reflect:!0})],qt.prototype,"size",2),o([d({type:String,reflect:!0})],qt.prototype,"orientation",2),o([d({type:String,reflect:!0})],qt.prototype,"label",2),o([d({type:String,attribute:"help-text",reflect:!0})],qt.prototype,"helpText",2),o([C("size",{waitUntilFirstUpdate:!0})],qt.prototype,"handleSizeChange",1),o([C("invalid",{waitUntilFirstUpdate:!0})],qt.prototype,"handleInvalid",1),qt=o([E("sd-checkbox-group")],qt);var St=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=this.removable&&!this.selected&&!this.toggleable,i=t?st`a`:e?st`div`:st`button`;return q`<${i} part="base" type="${$(t?void 0:"button")}" href="${$(t?this.href:void 0)}" rel="${$(t&&this.target?"noreferrer noopener":void 0)}" target="${$(t?this.target:void 0)}" download="${$(t?this.download:void 0)}" ?disabled="${$(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${$(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||e?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("flex border box-border sd-tag-border-radius items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 choice-control-font-weight sd-tag--size-lg-font-size gap-2",sm:"h-6 choice-control-font-weight sd-tag--size-sm-font-size gap-1"}[this.size],{lg:e?"sd-tag--removable--size-lg-padding-right sd-tag--removable--size-lg-padding-left py-3":"py-2 sd-tag--size-lg-padding-inline",sm:e?"sd-tag--removable--size-sm-padding-right sd-tag--removable--size-sm-padding-left py-2":"py-1 sd-tag--size-sm-padding-inline"}[this.size],this.disabled?c(!t&&"cursor-not-allowed",this.selected&&"bg-neutral-500 text-white","border-neutral-500 sd-tag--disabled-color-text"):this.selected?"sd-tag--selected-border-width sd-tag--selected--default-color-background sd-tag--selected--default-color-border sd-tag--selected--default-color-text hover:sd-tag--selected--hover-color-background hover:sd-tag--selected--hover-color-border hover:sd-tag--selected--hover-color-text":c("sd-tag--default-color-border sd-tag--default-color-text",e?"sd-tag--default-color-background has-[button:hover]:border-primary-500 has-[button:hover]:text-primary-500":"sd-tag--default-color-background hover:border-primary-500 hover:text-primary-500 hover:sd-tag--default--hover-color-background"))}"><slot name="icon-left" class="${c("flex-shrink-0",this.size==="lg"?"text-base":"text-[0.75rem]")}"></slot><slot id="content" part="content"></slot>${e&&!t?q`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}" ?disabled="${$(t?void 0:this.disabled)}"><slot part="removable-indicator" name="removable-indicator" class="${c(this.disabled&&"sd-tag--disabled-color-text")}"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${i}>`}};St.styles=[...f.styles,k`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
@@ -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 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.
|
|
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).",
|