@solid-design-system/components 6.24.0 → 6.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/{chunk.VC7IHCIX.js → chunk.4PBTCGFX.js} +1 -1
- package/cdn/chunks/{chunk.AX6E7G7K.js → chunk.GNQ2AH6R.js} +2 -2
- package/cdn/chunks/{chunk.CT2WXLLO.js → chunk.IXCKRXZP.js} +1 -1
- package/cdn/chunks/chunk.KQBMEX4Q.js +2 -0
- package/cdn/chunks/chunk.MXPGGLKX.js +2 -0
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +6 -6
- package/cdn/solid-components.iife.js +6 -6
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2FRV4JI3.js +1 -1
- package/cdn-versioned/chunks/chunk.2TCDQYYC.js +2 -2
- package/cdn-versioned/chunks/chunk.32WSNOK5.js +2 -2
- package/cdn-versioned/chunks/chunk.36LY3DX3.js +2 -2
- package/cdn-versioned/chunks/chunk.3FXWTJNG.js +2 -2
- package/cdn-versioned/chunks/chunk.3HJR4W7S.js +2 -2
- package/cdn-versioned/chunks/chunk.3NV5EFHF.js +9 -9
- package/cdn-versioned/chunks/{chunk.VC7IHCIX.js → chunk.4PBTCGFX.js} +2 -2
- package/cdn-versioned/chunks/chunk.4TEHVEJ5.js +2 -2
- package/cdn-versioned/chunks/chunk.5B4C742P.js +2 -2
- package/cdn-versioned/chunks/chunk.5D2QLOPO.js +2 -2
- package/cdn-versioned/chunks/chunk.5LQXIFL5.js +1 -1
- package/cdn-versioned/chunks/chunk.6ZVU7R22.js +2 -2
- package/cdn-versioned/chunks/chunk.7EYPTWOC.js +2 -2
- package/cdn-versioned/chunks/chunk.A3QRJ5ME.js +2 -2
- package/cdn-versioned/chunks/chunk.BJGMSYKC.js +1 -1
- package/cdn-versioned/chunks/chunk.BMOWDQOV.js +2 -2
- package/cdn-versioned/chunks/chunk.BS3GML7W.js +3 -3
- package/cdn-versioned/chunks/chunk.CIRCXXWS.js +2 -2
- package/cdn-versioned/chunks/chunk.CPEHJK3R.js +1 -1
- package/cdn-versioned/chunks/chunk.D4KX4Q6E.js +2 -2
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.E3RBLJOD.js +2 -2
- package/cdn-versioned/chunks/chunk.EDVI5WKO.js +3 -3
- package/cdn-versioned/chunks/chunk.FK2QE2LJ.js +2 -2
- package/cdn-versioned/chunks/chunk.GCCUJ5RI.js +3 -3
- package/cdn-versioned/chunks/chunk.GICLEIQR.js +1 -1
- package/cdn-versioned/chunks/{chunk.AX6E7G7K.js → chunk.GNQ2AH6R.js} +5 -5
- package/cdn-versioned/chunks/chunk.GWINLIF6.js +2 -2
- package/cdn-versioned/chunks/chunk.HA4FSESN.js +2 -2
- package/cdn-versioned/chunks/chunk.ISEX6JDK.js +2 -2
- package/cdn-versioned/chunks/{chunk.CT2WXLLO.js → chunk.IXCKRXZP.js} +2 -2
- package/cdn-versioned/chunks/chunk.KJ4O2AAU.js +2 -2
- package/cdn-versioned/chunks/chunk.KQBMEX4Q.js +2 -0
- package/cdn-versioned/chunks/chunk.L7DV2MLH.js +1 -1
- package/cdn-versioned/chunks/chunk.LVX7YSFZ.js +2 -2
- package/cdn-versioned/chunks/chunk.LWNOAXVZ.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.MXPGGLKX.js +2 -0
- package/cdn-versioned/chunks/chunk.NXUXZCC5.js +1 -1
- package/cdn-versioned/chunks/chunk.OFQAFMQN.js +2 -2
- package/cdn-versioned/chunks/chunk.OJN4DDNN.js +2 -2
- package/cdn-versioned/chunks/chunk.OW556SXG.js +2 -2
- package/cdn-versioned/chunks/chunk.P4GZNPGK.js +1 -1
- package/cdn-versioned/chunks/chunk.PQIUYCLY.js +2 -2
- package/cdn-versioned/chunks/chunk.PZSKPF3M.js +2 -2
- package/cdn-versioned/chunks/chunk.R3CFPFL7.js +2 -2
- package/cdn-versioned/chunks/chunk.RJ7RNCAD.js +2 -2
- package/cdn-versioned/chunks/chunk.SK3BEBJX.js +2 -2
- package/cdn-versioned/chunks/chunk.SW3IDYJO.js +1 -1
- package/cdn-versioned/chunks/chunk.TNHTS2QZ.js +2 -2
- package/cdn-versioned/chunks/chunk.TQXBNN2G.js +2 -2
- package/cdn-versioned/chunks/chunk.TTYJJ4T5.js +2 -2
- package/cdn-versioned/chunks/chunk.TYVGKCJX.js +2 -2
- package/cdn-versioned/chunks/chunk.U2Q5EORY.js +2 -2
- package/cdn-versioned/chunks/chunk.VMZSSKC5.js +1 -1
- package/cdn-versioned/chunks/chunk.VSRBSS6K.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WB2ATZAO.js +5 -5
- package/cdn-versioned/chunks/chunk.XND4CVBN.js +2 -2
- package/cdn-versioned/chunks/chunk.XQ2AM7JO.js +2 -2
- package/cdn-versioned/chunks/chunk.YDZ7FOAV.js +2 -2
- package/cdn-versioned/chunks/chunk.YGYXL3BZ.js +2 -2
- package/cdn-versioned/chunks/chunk.ZC3U3HHB.js +2 -2
- package/cdn-versioned/chunks/chunk.ZFTFC2P4.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.js +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.js +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/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +253 -253
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +81 -81
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +81 -81
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +109 -109
- package/cdn-versioned/web-types.json +165 -165
- package/dist/chunks/{chunk.5OP2MB2L.js → chunk.D6W4R7CF.js} +1 -1
- package/dist/chunks/{chunk.JB2XZ4FY.js → chunk.G5PJCSSV.js} +2 -2
- package/dist/chunks/{chunk.XH6YS5HC.js → chunk.GAQZ5NES.js} +1 -1
- package/dist/chunks/{chunk.X4BIP2Y2.js → chunk.GUWNLJ7W.js} +6 -2
- package/dist/chunks/{chunk.KTT6XPZB.js → chunk.JHHNBCX5.js} +7 -5
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/navigation-item/navigation-item.js +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +9 -9
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.2KU6UVWZ.js +2 -2
- package/dist-versioned/chunks/chunk.2N4PQ34O.js +11 -11
- package/dist-versioned/chunks/chunk.4F4N3QQ6.js +4 -4
- package/dist-versioned/chunks/chunk.4QZT4Y6W.js +3 -3
- package/dist-versioned/chunks/chunk.4SNDWIKF.js +2 -2
- package/dist-versioned/chunks/chunk.5XP6OIKT.js +3 -3
- package/dist-versioned/chunks/chunk.6DDIBH76.js +14 -14
- package/dist-versioned/chunks/chunk.6MMNEOUE.js +2 -2
- package/dist-versioned/chunks/chunk.6V7SKGRY.js +4 -4
- package/dist-versioned/chunks/chunk.AIG5N2FZ.js +1 -1
- package/dist-versioned/chunks/chunk.AXZSMHWW.js +4 -4
- package/dist-versioned/chunks/chunk.BCZIRWVM.js +3 -3
- package/dist-versioned/chunks/chunk.BIYQLL42.js +11 -11
- package/dist-versioned/chunks/chunk.BVWAKEFC.js +1 -1
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.CTVKYPFB.js +5 -5
- package/dist-versioned/chunks/chunk.D3CLWL6Z.js +13 -13
- package/dist-versioned/chunks/{chunk.5OP2MB2L.js → chunk.D6W4R7CF.js} +13 -13
- package/dist-versioned/chunks/chunk.DDBIUIIK.js +6 -6
- package/dist-versioned/chunks/chunk.DGV5QTN6.js +5 -5
- package/dist-versioned/chunks/chunk.EAJ3CM6N.js +4 -4
- package/dist-versioned/chunks/chunk.EHIUARAT.js +2 -2
- package/dist-versioned/chunks/chunk.EIHPDMVS.js +5 -5
- package/dist-versioned/chunks/chunk.EYTDOBZ4.js +6 -6
- package/dist-versioned/chunks/chunk.FMLTJI4Z.js +7 -7
- package/dist-versioned/chunks/chunk.FWMPHWGG.js +10 -10
- package/dist-versioned/chunks/{chunk.JB2XZ4FY.js → chunk.G5PJCSSV.js} +8 -8
- package/dist-versioned/chunks/{chunk.XH6YS5HC.js → chunk.GAQZ5NES.js} +5 -5
- package/dist-versioned/chunks/chunk.GQ4ENMDG.js +10 -10
- package/dist-versioned/chunks/chunk.GUTW4VQD.js +5 -5
- package/dist-versioned/chunks/{chunk.X4BIP2Y2.js → chunk.GUWNLJ7W.js} +31 -27
- package/dist-versioned/chunks/chunk.JHGRQU5N.js +6 -6
- package/dist-versioned/chunks/{chunk.KTT6XPZB.js → chunk.JHHNBCX5.js} +17 -15
- package/dist-versioned/chunks/chunk.JYUKVPUJ.js +1 -1
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KEUBCTKM.js +8 -8
- package/dist-versioned/chunks/chunk.KGQHJROJ.js +3 -3
- package/dist-versioned/chunks/chunk.LKDQ3TXG.js +2 -2
- package/dist-versioned/chunks/chunk.LMXGFI7F.js +11 -11
- package/dist-versioned/chunks/chunk.M52SSKFL.js +10 -10
- package/dist-versioned/chunks/chunk.MUOLK3RU.js +33 -33
- package/dist-versioned/chunks/chunk.N7WMSLKA.js +1 -1
- package/dist-versioned/chunks/chunk.NIKLDQ35.js +2 -2
- package/dist-versioned/chunks/chunk.NNMBBWIU.js +2 -2
- package/dist-versioned/chunks/chunk.OXCSSHRT.js +10 -10
- package/dist-versioned/chunks/chunk.P7RNSWL3.js +1 -1
- package/dist-versioned/chunks/chunk.QWPXBE3R.js +3 -3
- package/dist-versioned/chunks/chunk.R3ZRRK4P.js +4 -4
- package/dist-versioned/chunks/chunk.R6M52RPI.js +5 -5
- package/dist-versioned/chunks/chunk.RQN4WSFL.js +5 -5
- package/dist-versioned/chunks/chunk.RWGWOZ23.js +1 -1
- package/dist-versioned/chunks/chunk.SLLHUOTL.js +2 -2
- package/dist-versioned/chunks/chunk.SUQL6D3H.js +5 -5
- package/dist-versioned/chunks/chunk.TEHKQWUZ.js +6 -6
- package/dist-versioned/chunks/chunk.TEHS57B5.js +2 -2
- package/dist-versioned/chunks/chunk.TRG462TJ.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.WASJNAOH.js +25 -25
- package/dist-versioned/chunks/chunk.XFU4IJSC.js +5 -5
- package/dist-versioned/chunks/chunk.XRYVTNMS.js +3 -3
- package/dist-versioned/chunks/chunk.YEO5QKA7.js +2 -2
- package/dist-versioned/chunks/chunk.YNVPCLKL.js +5 -5
- package/dist-versioned/chunks/chunk.YSZ7WBON.js +1 -1
- package/dist-versioned/chunks/chunk.ZCOV36IT.js +2 -2
- package/dist-versioned/chunks/chunk.ZF4JCUFV.js +6 -6
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/progress-bar/progress-bar.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio/radio.js +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/radio-group/radio-group.js +2 -2
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +253 -253
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +9 -9
- package/dist-versioned/vscode.html-custom-data.json +109 -109
- package/dist-versioned/web-types.json +165 -165
- package/package.json +1 -1
- package/cdn/chunks/chunk.7R76DQCY.js +0 -2
- package/cdn/chunks/chunk.K6MRTZ5F.js +0 -2
- package/cdn-versioned/chunks/chunk.7R76DQCY.js +0 -2
- package/cdn-versioned/chunks/chunk.K6MRTZ5F.js +0 -2
|
@@ -194,7 +194,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
194
194
|
::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-text-base);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);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],a([v("a")],Vt.prototype,"button",2),a([d({type:Boolean,reflect:!0})],Vt.prototype,"standalone",2),a([d({type:String,reflect:!0})],Vt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],Vt.prototype,"inverted",2),a([d({type:String,reflect:!0})],Vt.prototype,"href",2),a([d({type:Boolean,attribute:"visually-disabled",reflect:!0})],Vt.prototype,"visuallyDisabled",2),a([d({type:String,reflect:!0})],Vt.prototype,"target",2),a([d({reflect:!0})],Vt.prototype,"download",2),Vt=a([k("sd-link")],Vt);var Jt=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="${E(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Jt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
195
195
|
:host{display:inline-flex;align-items:center}sd-link::part(base){align-items:center}sd-link::part(icon-left){margin-right:calc(var(--sd-spacing-1) * 0);display:inline-flex}:host([current]) sd-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,rgba(var(--sd-color-neutral-700))))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([v('[part="base"]')],Jt.prototype,"base",2),a([d({type:String,reflect:!0})],Jt.prototype,"href",2),a([d({type:String,reflect:!0})],Jt.prototype,"target",2),a([d({type:Boolean,reflect:!0})],Jt.prototype,"current",2),a([C("current")],Jt.prototype,"handleCurrentChange",1),Jt=a([k("sd-breadcrumb-item")],Jt);var Pi=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 po(s,r,t){let e=i=>Object.is(i,-0)?0:i;return s<r?e(r):s>t?e(t):e(s)}var Hi=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 o=i,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.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),o=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)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}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*mo(s,r){if(s!==void 0){let t=0;for(let e of s)yield r(e,t++)}}function*fo(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 bo=Symbol(),Tr=s=>(r,t,e)=>{let i=e.value;e.value=function(...o){clearTimeout(this[bo]),this[bo]=window.setTimeout(()=>{i.apply(this,o)},s)}};var Gr=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 o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:i,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:Nr()?"auto":"smooth"}),this.scrolling&&await Q(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),r.requestUpdate()}};a([Tr(100)],Gr.prototype,"handleScrollEnd",1);var Te=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>`}};Te.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
196
196
|
: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}`],Te=a([k("sd-carousel-item")],Te);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 Pi(this,()=>{this.isFocused||this.next()});this.scrollController=new Gr(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new D(this);this.userInteracted=!1;this.fadeController=new Hi(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(i=>[...i.addedNodes,...i.removedNodes].some(o=>Te.isCarouselItem(o)&&!o.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 o=i.target;o.toggleAttribute("inert",!i.isIntersecting),o.classList.toggle("--in-view",i.isIntersecting),o.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(o=>{o.isIntersecting&&o.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,o){return Math.ceil((t-i)/o)-Math.ceil((t-i-e)/o)+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",o=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),o&&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(o=>o.isIntersecting);if(this.loop&&(i!=null&&i.target.hasAttribute("data-clone"))){let o=Number(i.target.getAttribute("data-clone"));this.goToSlide(o,"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),o=i.nextNode();for(;o;){if(o.nodeType===Node.TEXT_NODE){let l=(n=o.textContent)==null?void 0:n.trim();l&&e.push(l)}else o instanceof HTMLImageElement&&o.alt&&e.push(o.alt);o=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,o)=>{e.unobserve(i),i.classList.remove("--in-view"),i.classList.remove("--is-active"),i.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),i.hasAttribute("data-clone")&&i.remove()}),this.loop&&!this.fade){let i=this.slidesPerPage,o=t.slice(-i),n=t.slice(0,i);o.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((o,n)=>{o.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 o=this.getSlideText(t[this.activeSlide]),n=this.localize.term("slideNum",this.activeSlide+1,t.length);requestAnimationFrame(()=>{this.announcementRegion.textContent=o?`${o} ${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,o)=>{Math.abs(o-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 o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);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:o,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=po(t+(o?i:0),0,u.length+1),w=u[b],g=n.getBoundingClientRect(),y=w.getBoundingClientRect();if(n.scrollTo({left:y.left-g.left+n.scrollLeft,top:y.top-g.top+n.scrollTop,behavior:Nr()?"auto":e}),this.userInteracted&&!this.loop){let T=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,z=this.activeSlide===0;T?this.previousButton.focus({preventScroll:!0}):z&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,i=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,l=this.loop||o<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="start"></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-down":"chevron-up"}"></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">${mo(fo(i),u=>{let m=u+1===o;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")}">${o}</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-up":"chevron-down"}"></sd-icon></slot></button></div></div></div>`}};X.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
197
|
-
: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}`],a([v('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),a([yi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),a([d({type:String,reflect:!0})],X.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),a([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),a([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),a([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),a([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),a([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),a([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),a([v("slot:not([name])")],X.prototype,"defaultSlot",2),a([v(".carousel__slides")],X.prototype,"scrollContainer",2),a([v(".carousel__pagination")],X.prototype,"paginationContainer",2),a([v(".carousel__announcement")],X.prototype,"announcementRegion",2),a([L()],X.prototype,"activeSlide",2),a([L()],X.prototype,"currentPage",2),a([L()],X.prototype,"pausedAutoplay",2),a([L()],X.prototype,"isFocused",2),a([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),a([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),a([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),a([C("activeSlide")],X.prototype,"handleSlideChange",1),a([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),a([C("autoplay")],X.prototype,"handleAutoplayChange",1),a([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=a([k("sd-carousel")],X);var Bt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(o===u){let b=h.converter||Oe,g=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Oe.fromAttribute)(l,h.type);this[s]!==g&&(this[t]=g)}i.call(this,o,n,l)}};var{I:F0}=aa;var Vi=s=>s.strings===void 0;var zd={},go=(s,r=zd)=>s._$AH=r;var Le=ee(class extends Pe{constructor(s){if(super(s),s.type!==Wt.PROPERTY&&s.type!==Wt.ATTRIBUTE&&s.type!==Wt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Vi(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===Mt||r===N)return r;let t=s.element,e=s.name;if(s.type===Wt.PROPERTY){if(r===t[e])return Mt}else if(s.type===Wt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return Mt}else if(s.type===Wt.ATTRIBUTE&&t.getAttribute(e)===r+"")return Mt;return go(s),r}});var ot=class extends f{constructor(){super(...arguments);this.formControlController=new ut(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="${E(this.value)}" .indeterminate="${Le(this.indeterminate)}" .checked="${Le(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
|
|
197
|
+
: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}`],a([v('[part~="autoplay-controls"]')],X.prototype,"autoplayControls",2),a([v('[part~="navigation-button--previous"]')],X.prototype,"previousButton",2),a([v('[part~="navigation-button--next"]')],X.prototype,"nextButton",2),a([yi('[part~="pagination-item"]')],X.prototype,"paginationItems",2),a([d({type:String,reflect:!0})],X.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],X.prototype,"inverted",2),a([d({type:Boolean,reflect:!0})],X.prototype,"loop",2),a([d({type:Boolean,reflect:!0})],X.prototype,"autoplay",2),a([d({type:Number,attribute:"autoplay-interval",reflect:!0})],X.prototype,"autoplayInterval",2),a([d({type:Boolean,reflect:!0})],X.prototype,"fade",2),a([d({type:Number,attribute:"slides-per-page",reflect:!0})],X.prototype,"slidesPerPage",2),a([d({type:Number,attribute:"slides-per-move",reflect:!0})],X.prototype,"slidesPerMove",2),a([v("slot:not([name])")],X.prototype,"defaultSlot",2),a([v(".carousel__slides")],X.prototype,"scrollContainer",2),a([v(".carousel__pagination")],X.prototype,"paginationContainer",2),a([v(".carousel__announcement")],X.prototype,"announcementRegion",2),a([L()],X.prototype,"activeSlide",2),a([L()],X.prototype,"currentPage",2),a([L()],X.prototype,"pausedAutoplay",2),a([L()],X.prototype,"isFocused",2),a([C("pausedAutoplay")],X.prototype,"handlePausedAutoplay",1),a([C("fade",{waitUntilFirstUpdate:!0})],X.prototype,"handleFadeChange",1),a([C("loop",{waitUntilFirstUpdate:!0}),C("slidesPerPage",{waitUntilFirstUpdate:!0})],X.prototype,"initializeSlides",1),a([C("activeSlide")],X.prototype,"handleSlideChange",1),a([C("slidesPerMove")],X.prototype,"handleSlidesPerMoveChange",1),a([C("autoplay")],X.prototype,"handleAutoplayChange",1),a([C("autoplayInterval")],X.prototype,"handleautoplayIntervalChange",1),X=a([k("sd-carousel")],X);var Bt=(s="value")=>(r,t)=>{let e=r.constructor,i=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,l){var m;let h=e.getPropertyOptions(s),u=typeof h.attribute=="string"?h.attribute:s;if(o===u){let b=h.converter||Oe,g=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Oe.fromAttribute)(l,h.type);this[s]!==g&&(this[t]=g)}i.call(this,o,n,l)}};var{I:F0}=aa;var Vi=s=>s.strings===void 0;var zd={},go=(s,r=zd)=>s._$AH=r;var Le=ee(class extends Pe{constructor(s){if(super(s),s.type!==Wt.PROPERTY&&s.type!==Wt.ATTRIBUTE&&s.type!==Wt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Vi(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[r]){if(r===Mt||r===N)return r;let t=s.element,e=s.name;if(s.type===Wt.PROPERTY){if(r===t[e])return Mt}else if(s.type===Wt.BOOLEAN_ATTRIBUTE){if(!!r===t.hasAttribute(e))return Mt}else if(s.type===Wt.ATTRIBUTE&&t.getAttribute(e)===r+"")return Mt;return go(s),r}});var ot=class extends f{constructor(){super(...arguments);this.formControlController=new ut(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="${E(this.value)}" .indeterminate="${Le(this.indeterminate)}" .checked="${Le(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 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:"",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>`}};ot.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
198
198
|
: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}`],a([v('input[type="checkbox"]')],ot.prototype,"input",2),a([v("#invalid-message")],ot.prototype,"invalidMessage",2),a([d({type:String,reflect:!0})],ot.prototype,"title",2),a([d({type:String,reflect:!0})],ot.prototype,"name",2),a([d()],ot.prototype,"value",2),a([d({type:String,reflect:!0})],ot.prototype,"size",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ot.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"indeterminate",2),a([Bt("checked")],ot.prototype,"defaultChecked",2),a([d({type:String,reflect:!0})],ot.prototype,"form",2),a([d({type:Boolean,reflect:!0})],ot.prototype,"required",2),a([L()],ot.prototype,"showInvalidStyle",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleDisabledChange",1),a([C(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ot.prototype,"handleStateChange",1),ot=a([k("sd-checkbox")],ot);var Yt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(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"),o=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",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Yt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
199
199
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}`],a([d({type:String,reflect:!0})],Yt.prototype,"size",2),a([d({type:String,reflect:!0})],Yt.prototype,"orientation",2),a([d({type:String,reflect:!0})],Yt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],Yt.prototype,"helpText",2),a([C("size",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleSizeChange",1),a([C("invalid",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleInvalid",1),Yt=a([k("sd-checkbox-group")],Yt);var _t=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?et`a`:e?et`div`:et`button`;return j`<${i} part="base" type="${E(t?void 0:"button")}" href="${E(t?this.href:void 0)}" rel="${E(t&&this.target?"noreferrer noopener":void 0)}" target="${E(t?this.target:void 0)}" download="${E(t?this.download:void 0)}" ?disabled="${E(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${E(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 sd-tag-font-weight sd-tag--size-lg-font-size gap-2",sm:"h-6 sd-tag-font-weight sd-tag--size-sm-font-size gap-1"}[this.size],{lg:e?"pl-4 pr-3 py-2":"px-4 py-2",sm:e?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.disabled?c(!t&&"cursor-not-allowed",this.selected&&"bg-neutral-500 text-white","sd-tag--disabled-color-border 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?j`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}" ?disabled="${E(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}>`}};_t.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
200
200
|
:host{display:inline-block;transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1))}:host([size=lg])::part(removable-indicator){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=sm])::part(removable-indicator){font-size:.75rem}.sd-tag--disabled-color-border{border-color:rgb(var(--sd-tag--disabled-color-border))}.sd-tag-font-weight{font-weight:var(--sd-tag-font-weight)}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],a([v("a, button, div")],_t.prototype,"tag",2),a([d({type:String,reflect:!0})],_t.prototype,"size",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"selected",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"toggleable",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"removable",2),a([d({type:Boolean,reflect:!0})],_t.prototype,"disabled",2),a([d({type:String,reflect:!0})],_t.prototype,"href",2),a([d({type:String,reflect:!0})],_t.prototype,"target",2),a([d({reflect:!0})],_t.prototype,"download",2),_t=a([k("sd-tag")],_t);var vo=s=>s;var $s=s=>Array.from(s.assignedElements({flatten:!0})),Sd=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Md=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",yo=s=>s.map(Sd),wo=s=>s.filter(Md),Fi=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var M=class extends f{constructor(){super(...arguments);this.formControlController=new ut(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new P(this,"help-text","label");this.localize=new D(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.floatingLabel=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=vo;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=Fi(t.value),o=Fi(t.getTextLabel()),n=Fi(e);return i.includes(n)||o.includes(n)};this.getTag=t=>p`<sd-tag class="min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
|
|
@@ -205,9 +205,9 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
205
205
|
base:tag__base,
|
|
206
206
|
content:tag__content,
|
|
207
207
|
removable-indicator:tag__removable-indicator,
|
|
208
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}async handleComboboxKeyDown(t){var e;if(t.key==="Tab"){if(this.displayInputValue="",this.displayInput.value="",this.open&&((e=this.shadowRoot)==null?void 0:e.activeElement)===this.displayInput){t.preventDefault(),this.open=!1,await this.updateComplete,this.displayInput.focus();return}return}this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleSearchClick(t){t.stopPropagation(),!(this.disabled||this.visuallyDisabled)&&this.emit("sd-search")}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-option"),o=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),o=e.indexOf(i),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),re(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,o;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var b,w,g;let o=i.cloneNode(!0);if(o.current=o.value===((b=this.lastOption)==null?void 0:b.value),o.selected=i.selected,o.checkbox=i.checkbox,o.size=i.size,!(((w=i.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=i.parentElement,h=(g=l.querySelector('[slot="label"]'))==null?void 0:g.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),h&&(u==null||u.appendChild(h));return}let m=l.cloneNode();return m.appendChild(o),h&&m.appendChild(h),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await Z(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:o}=W(this,"combobox.show",{dir:this.localize.dir()});await Y(this.popup.popup,i,o),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await Z(this);let{keyframes:t,options:e}=W(this,"combobox.hide",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([Q(this,"sd-after-show"),Q(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,Q(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return yo($s(this.defaultSlot)).flat()}getSlottedOptGroups(){return wo($s(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!i,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,h=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",g=this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],T={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],S=this.size==="lg"?this.floatingLabel?m?"py-3":"py-4":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",O={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${c("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${c(o&&"inline-block",o&&(this.visuallyDisabled||this.disabled)?"text-neutral-500":"form-control-color-text")}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200",h?O:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",m&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
208
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}async handleComboboxKeyDown(t){var e;if(t.key==="Tab"){if(this.displayInputValue="",this.displayInput.value="",this.open&&((e=this.shadowRoot)==null?void 0:e.activeElement)===this.displayInput){t.preventDefault(),this.open=!1,await this.updateComplete,this.displayInput.focus();return}return}this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleSearchClick(t){t.stopPropagation(),!(this.disabled||this.visuallyDisabled)&&this.emit("sd-search")}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-option"),o=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),o=e.indexOf(i),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),re(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,o;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var b,w,g;let o=i.cloneNode(!0);if(o.current=o.value===((b=this.lastOption)==null?void 0:b.value),o.selected=i.selected,o.checkbox=i.checkbox,o.size=i.size,!(((w=i.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=i.parentElement,h=(g=l.querySelector('[slot="label"]'))==null?void 0:g.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),h&&(u==null||u.appendChild(h));return}let m=l.cloneNode();return m.appendChild(o),h&&m.appendChild(h),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await Z(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:o}=W(this,"combobox.show",{dir:this.localize.dir()});await Y(this.popup.popup,i,o),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await Z(this);let{keyframes:t,options:e}=W(this,"combobox.hide",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([Q(this,"sd-after-show"),Q(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,Q(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return yo($s(this.defaultSlot)).flat()}getSlottedOptGroups(){return wo($s(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!i,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,h=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",g=this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],T={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],S=this.size==="lg"?this.floatingLabel?"py-3":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",O={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${c("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${c(o&&"inline-block",o&&(this.visuallyDisabled||this.disabled)?"text-neutral-500":"form-control-color-text")}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200",h?O:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",m&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
209
209
|
popup:popup__content,
|
|
210
|
-
"><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center form-control-border-radius transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:[@media(hover:hover)]:form-control--hover-color-background",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(b)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],S)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${c("inline-flex",T,g,z)}"></slot>`:""}<div class="${c("flex flex-wrap items-center gap-1 w-full min-w-0 relative",this.floatingLabel&&"mt-4")}">${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${c("flex flex-wrap items-center gap-1 min-w-0",T)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",w,this.selectedTextLabel&&!this.multiple?"placeholder:text-black":"placeholder:text-neutral-700",this.size==="sm"?m?"h-4":"h-6":m?"h-6":"h-8")}" type="text" placeholder="${!this.floatingLabel||m?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"></div><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(_=>_==null?void 0:_.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",w)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${c("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",z)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c(y,z,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",y,z)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",z)}">${this.type!=="search"?p`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${c("flex items-center sd-interactive",y)}" type="button" @mousedown="${this.preventLoosingFocus}" @click="${this.handleSearchClick}"><sd-icon class="${c(g,z)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2 sd-color-icon-fill-primary" tabindex="-1" aria-hidden="true" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow-listbox transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm mt-1",n?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};M.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
210
|
+
"><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center form-control-border-radius transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:[@media(hover:hover)]:form-control--hover-color-background",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(b)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],S)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${c("inline-flex",T,g,z)}"></slot>`:""}<div class="${c("flex flex-wrap items-center gap-1 w-full min-w-0 relative",this.floatingLabel&&m&&"mt-4",this.floatingLabel&&!m&&this.size==="lg"&&"mt-2")}">${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${c("flex flex-wrap items-center gap-1 min-w-0",T)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",w,this.selectedTextLabel&&!this.multiple?"placeholder:text-black":"placeholder:text-neutral-700",this.size==="sm"?m?"h-4":"h-6":m?"h-6":"h-8")}" type="text" placeholder="${!this.floatingLabel||m?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"></div><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(_=>_==null?void 0:_.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",w)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${c("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",z)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c(y,z,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",y,z)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"sd-icon-fill-primary",z)}">${this.type!=="search"?p`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${c("flex items-center sd-interactive",y)}" type="button" @mousedown="${this.preventLoosingFocus}" @click="${this.handleSearchClick}"><sd-icon class="${c(g,z)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2 sd-color-icon-fill-primary" tabindex="-1" aria-hidden="true" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow-listbox transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm mt-1",n?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};M.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
211
211
|
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);border-width:var(--sd-combobox__tag-border-width,var(--sd-spacing-0\\.25));padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}[part=chevron]{color:rgb(var(--sd-color-icon-fill-primary))}:host([disabled])::part(chevron),:host([visually-disabled])::part(chevron){color:rgba(var(--sd-color-icon-fill-neutral-500,--sd-color-neutral-500))}@property --tw-font-weight{syntax:"*";inherits:false}`],a([v("sd-popup")],M.prototype,"popup",2),a([v('[part="combobox"]')],M.prototype,"combobox",2),a([v('[part="display-input"]')],M.prototype,"displayInput",2),a([v(".value-input")],M.prototype,"valueInput",2),a([v('[part="listbox"]')],M.prototype,"listbox",2),a([v('[part="tags"]')],M.prototype,"tagWrapper",2),a([v('[part="filtered-listbox"]')],M.prototype,"filteredWrapper",2),a([v("slot:not([name])")],M.prototype,"defaultSlot",2),a([v("#invalid-message")],M.prototype,"invalidMessage",2),a([L()],M.prototype,"hasFocus",2),a([L()],M.prototype,"displayInputValue",2),a([L()],M.prototype,"selectedTextLabel",2),a([L()],M.prototype,"selectedOptions",2),a([L()],M.prototype,"filteredOptions",2),a([L()],M.prototype,"allOptions",2),a([L()],M.prototype,"lastOption",2),a([L()],M.prototype,"showValidStyle",2),a([L()],M.prototype,"showInvalidStyle",2),a([L()],M.prototype,"deletedTagLabel",2),a([d({reflect:!0})],M.prototype,"name",2),a([d({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],M.prototype,"value",2),a([Bt()],M.prototype,"defaultValue",2),a([d({type:String,reflect:!0})],M.prototype,"size",2),a([d({type:String,reflect:!0})],M.prototype,"placeholder",2),a([d({type:String,attribute:"max-options-tag-label",reflect:!0})],M.prototype,"maxOptionsTagLabel",2),a([d({type:Boolean,reflect:!0})],M.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],M.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],M.prototype,"clearable",2),a([d({type:Boolean,reflect:!0})],M.prototype,"open",2),a([d({type:Boolean,reflect:!0})],M.prototype,"hoist",2),a([d({type:String,reflect:!0})],M.prototype,"label",2),a([d({type:String,reflect:!0})],M.prototype,"placement",2),a([d({type:String,attribute:"help-text",reflect:!0})],M.prototype,"helpText",2),a([d({type:String,reflect:!0})],M.prototype,"form",2),a([d({type:Boolean,reflect:!0})],M.prototype,"required",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],M.prototype,"floatingLabel",2),a([d({type:String,reflect:!0})],M.prototype,"type",2),a([L()],M.prototype,"currentPlacement",2),a([d()],M.prototype,"getOption",2),a([d({type:Boolean,reflect:!0})],M.prototype,"multiple",2),a([d({type:Boolean,reflect:!0})],M.prototype,"useTags",2),a([d({type:Number,reflect:!0,attribute:"max-options-visible"})],M.prototype,"maxOptionsVisible",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],M.prototype,"styleOnValid",2),a([d()],M.prototype,"filter",2),a([d()],M.prototype,"getTag",2),a([C("filter",{waitUntilFirstUpdate:!0})],M.prototype,"handleFilterChange",1),a([C("useTags",{waitUntilFirstUpdate:!0})],M.prototype,"handleUseTagsChange",1),a([C("size",{waitUntilFirstUpdate:!0})],M.prototype,"applySizeToOptions",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],M.prototype,"handleDisabledChange",1),a([C("value",{waitUntilFirstUpdate:!0})],M.prototype,"handleValueChange",1),a([C("displayInputValue",{waitUntilFirstUpdate:!0})],M.prototype,"handleDisplayInputValueChange",1),a([C("open",{waitUntilFirstUpdate:!0})],M.prototype,"handleOpenChange",1),a([C(["size","floatingLabel"])],M.prototype,"handleSizeChange",1),M=a([k("sd-combobox")],M);R("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var ze=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")}">`}};ze.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
212
212
|
:host{margin:calc(var(--sd-spacing-1) * 0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],a([d({type:String,reflect:!0})],ze.prototype,"orientation",2),a([d({type:Boolean,reflect:!0})],ze.prototype,"inverted",2),ze=a([k("sd-divider")],ze);var $={startOfDayLocal:s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()),isSameDay:(s,r)=>!s||!r?!1:s.getFullYear()===r.getFullYear()&&s.getMonth()===r.getMonth()&&s.getDate()===r.getDate(),clampDateToMonth:(s,r)=>{let t=new Date(r.getFullYear(),r.getMonth(),1),e=new Date(r.getFullYear(),r.getMonth()+1,0);return s<t?t:s>e?e:s},toLocalISODate:s=>{let r=s.getFullYear(),t=String(s.getMonth()+1).padStart(2,"0"),e=String(s.getDate()).padStart(2,"0");return`${r}-${t}-${e}`},parseLocalISO:s=>{if(!s)return null;let r=s.trim();if(!r)return null;let e=r.replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;let i=Number(e[1]),o=Number(e[2])-1,n=Number(e[3]),l=new Date(i,o,n);return Number.isNaN(l.getTime())?null:l},compareDates:(s,r)=>{let t=$.startOfDayLocal(s).getTime(),e=$.startOfDayLocal(r).getTime();return t-e},isBetweenInclusive:(s,r,t)=>{let e=$.compareDates(r,t)<=0?r:t,i=$.compareDates(r,t)<=0?t:r;return $.compareDates(s,e)>=0&&$.compareDates(s,i)<=0}};var Lr={fromAttribute(s){if(!s)return null;let t=s.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,i=new Date(+t[1],+t[2]-1,+t[3]);return i.getFullYear()!==+t[1]||i.getMonth()!==+t[2]-1||i.getDate()!==+t[3]?null:e},toAttribute(s){return s!=null?s:""}},xo={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}`}},ko={fromAttribute(s){if(!s)return[];let r=[],t=s.trim();if(t.startsWith("["))try{let i=JSON.parse(t);Array.isArray(i)&&(r=i.map(String))}catch(i){return[]}else r=t.split(/[\s,]+/).map(i=>i.trim()).filter(Boolean);let e=[];for(let i of r){let n=i.replace(/[-/]/g,".").split(".");if(n.length!==3)continue;let[l,h,u]=n.map(Number);if(!l||!h||!u)continue;let m=new Date(l,h-1,u);if(m.getFullYear()!==l||m.getMonth()!==h-1||m.getDate()!==u)continue;let b=`${l}-${String(h).padStart(2,"0")}-${String(u).padStart(2,"0")}`;e.push(b)}return e},toAttribute(s){return s?s.join(","):""}};var A=class extends f{constructor(){super();this.localize=new D(this);this.hasSlotController=new P(this,"label","help-text","tooltip");this.formControlController=new ut(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=$.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(o=>{var n,l;return o instanceof HTMLElement&&(((n=o.classList)==null?void 0:n.contains("nav"))||((l=o.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,h,u,m,b;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,i=e.value,o=(u=e.selectionStart)!=null?u:i.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let w=i.replace(/\D/g,""),g=w.slice(0,8),y=w.slice(8,16),T=this.buildDmyFromDigits(g),z=this.buildDmyFromDigits(y),S;g.length===0?S="":g.length<8?S=T:y.length>0?S=`${T} - ${z}`:S=n?T:`${T} -`;let O=this.countDigitsBeforeCaret(i,o),_;if(O<=8){let I=this.digitIndexToDmyCaretPos(Math.min(O,8));_=Math.min(I,T.length)}else{let I=g.length<8?T.length:T.length+3,B=Math.min(O-8,8),K=this.digitIndexToDmyCaretPos(B);_=I+Math.min(K,z.length)}this.inputValue=S;let F=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(T)){let I=this.dmyToIso(T),B=I?$.parseLocalISO(I):null;B&&!this.isDisabled(B)&&this.inMinMax(B)&&this.rangeStart!==I&&(this.rangeStart=I,this.previewEnd=null,this.viewMonth=new Date(B.getFullYear(),B.getMonth(),1),this.focusedDate=$.startOfDayLocal(B),F=!0)}else this.rangeStart&&(this.rangeStart=null,F=!0),this.rangeEnd&&(this.rangeEnd=null,F=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(z)&&this.rangeStart){let I=$.parseLocalISO(this.rangeStart),B=this.dmyToIso(z),K=B?$.parseLocalISO(B):null;if(!!K&&!this.isDisabled(K)&&this.inMinMax(K)){let[bt,ct]=$.compareDates(I,K)<=0?[I,K]:[K,I],Tt=$.isSameDay(bt,ct);if((this.allowSameDayRange||!Tt)&&!this.wouldRangeContainDisabled(bt,ct)){let gt=$.toLocalISODate($.startOfDayLocal(bt)),st=$.toLocalISODate($.startOfDayLocal(ct));(this.rangeStart!==gt||this.rangeEnd!==st)&&(this.rangeStart=gt,this.rangeEnd=st,this.viewMonth=new Date(ct.getFullYear(),ct.getMonth(),1),this.focusedDate=$.startOfDayLocal(ct),F=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,F=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),F&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var B;let I=(B=this.input)!=null?B:e;I&&(I.value=this.inputValue,I.setSelectionRange(_,_))})})}else{let w=e,g=w.value,y=(b=w.selectionStart)!=null?b:g.length,T=g.replace(/\D/g,"").slice(0,8),z=T.slice(0,2),S=T.slice(2,4),O=T.slice(4,8),_="";z.length>0&&(_+=z,z.length===2&&(_+=".")),S.length>0&&z.length===2&&(_+=S,S.length===2&&(_+=".")),O.length>0&&z.length===2&&S.length===2&&(_+=O),_=_.replace(/\.\.+/g,".");let F=this.inputValue||"";this.inputValue=_;let I=y,B=tt=>{let gt=[];for(let st=0;st<tt.length;st++)tt[st]==="."&>.push(st);return gt},K=B(F),dt=B(_),bt=K.filter(tt=>tt<y).length,Tt=dt.filter(tt=>tt<y).length-bt;if(Tt>0?I+=Tt:!K.includes(y)&&dt.includes(y)&&(I+=1),I=Math.min(Math.max(0,I),_.length),requestAnimationFrame(()=>{var gt;let tt=(gt=this.input)!=null?gt:w;tt&&(tt.value=this.inputValue,tt.setSelectionRange(I,I))}),/^\d{2}\.\d{2}\.\d{4}$/.test(_)){let tt=this.parseInputText(_);this.applyParsedInput(tt)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let w=this.rangeStart?$.parseLocalISO(this.rangeStart):null,g=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;w&&!g?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(w)}`):w&&g&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(w)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(g)}`)}else if(this.value){let w=$.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(w)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,i,o)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){o&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var n,l;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,i=!0,o=new Date(this.focusedDate);switch(e){case"ArrowLeft":o.setDate(o.getDate()-1);break;case"ArrowRight":o.setDate(o.getDate()+1);break;case"ArrowUp":o.setDate(o.getDate()-7);break;case"ArrowDown":o.setDate(o.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:i=!1}if(i){t.preventDefault();let h=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(o.getMonth()!==h.getMonth()||o.getFullYear()!==h.getFullYear()){let w=new Date(o.getFullYear(),o.getMonth(),1);this.viewMonth=w;let g=this.formatMonthYear(w);this.setNavStatus(g)}let m=$.startOfDayLocal(o);m.getTime()!==((l=this.focusedDate)==null?void 0:l.getTime())&&(this.focusedDate=m);let b=m.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(b),this.requestUpdate(),requestAnimationFrame(()=>{let w=this.shadowRoot,g=w==null?void 0:w.querySelector("button.day.focused");g==null||g.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?$.parseLocalISO(this.value):null,e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,i=$.startOfDayLocal(new Date),o=this.range&&e?e:t!=null?t:i,n=(l=this.viewMonth)!=null?l:new Date(o.getFullYear(),o.getMonth(),1);this.viewMonth=n,this.focusedDate=$.clampDateToMonth(o,n),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var i;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&$.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&$.parseLocalISO(this.rangeStart)||this.value&&$.parseLocalISO(this.value)||this.today;if(!t)return;let e=$.clampDateToMonth(t,this.viewMonth);e.getTime()!==((i=this.focusedDate)==null?void 0:i.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?$.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=$.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var i;let e=this.input;if(e){e.value=(i=this.inputValue)!=null?i:"";let o=e.value.length;e.setSelectionRange(o,o)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?$.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=$.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let o=this.input;if(o){o.value=(n=this.inputValue)!=null?n:"";let l=o.value.length;o.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return $.parseLocalISO(t)}inMinMax(t){let e=n=>{if(n==null)return null;if(n instanceof Date)return $.startOfDayLocal(n);if(typeof n=="number")return $.startOfDayLocal(new Date(n));if(typeof n=="string"){let l=this.parseISO(n);return l?$.startOfDayLocal(l):null}return null},i=e(this.min),o=e(this.max);return!(i&&t<i||o&&t>o)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),n=`${e}-${i}-${o}`;return this.disabledDatesSet.has(n)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let i="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+i},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),i=this.ordinal(e),o=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${i} of ${o} ${n}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,o=e[(i-20)%10]||e[i]||e[0];return t+o}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let i=JSON.parse(e);Array.isArray(i)&&(t=i)}catch(i){t=[]}else e.length>0&&(t=e.split(",").map(i=>i.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let i=$.compareDates(t,e)<=0?$.startOfDayLocal(t):$.startOfDayLocal(e),o=$.compareDates(t,e)<=0?$.startOfDayLocal(e):$.startOfDayLocal(t),n=new Date(i);for(;$.compareDates(n,o)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=$.parseLocalISO(t);if(e||(e=$.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${i}.${o}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let i=Number(e[1]),o=Number(e[2]),n=Number(e[3]),l=new Date(n,o-1,i);if(l.getFullYear()!==n||l.getMonth()!==o-1||l.getDate()!==i)return null;let h=$.startOfDayLocal(l);return $.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),o=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${o} ${l}`:n&&!l?`${n} ${o}`:""}parseInputText(t){var o,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let u=this.dmyToIso(h);return u?{start:u,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(o=l[0])!=null?o:"",u=(n=l[1])!=null?n:"",m=h?this.dmyToIso(h):null,b=u?this.dmyToIso(u):null;return h&&!m?{start:null,end:null,valid:!1}:u&&!b?{start:null,end:null,valid:!1}:{start:m,end:b,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let i=this.dmyToIso(e);return i?{single:i,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,u,m,b;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=w=>{if(!w)return!0;let g=$.parseLocalISO(w);return!(!this.inMinMax(g)||this.isDisabled(g))},i=!1;if(this.range){let w=(h=t.start)!=null?h:null,g=(u=t.end)!=null?u:null;if(!e(w)||g&&!e(g))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let y=w?$.parseLocalISO(w):null,T=g?$.parseLocalISO(g):null;if(y&&T){if($.compareDates(y,T)>0){let O=y;y=T,T=O}if(!this.allowSameDayRange&&$.isSameDay(y,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(y,T))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let z=y?$.toLocalISODate($.startOfDayLocal(y)):null,S=T?$.toLocalISODate($.startOfDayLocal(T)):null;if(this.rangeStart!==z||this.rangeEnd!==S){this.rangeStart=z,this.rangeEnd=S,this.previewEnd=null,i=!0;let O=(m=y!=null?y:T)!=null?m:this.today;this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=$.startOfDayLocal(O),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let o=(b=t.single)!=null?b:null;if(!e(o))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=o?$.parseLocalISO(o):null,l=n?$.toLocalISODate($.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,i=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=$.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),i}buildDmyFromDigits(t){let e=t.slice(0,8),i=e.slice(0,2),o=e.slice(2,4),n=e.slice(4,8),l=i;return o.length&&(l+="."+o),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var i,o;((o=(i=t.composedPath)==null?void 0:i.call(t))!=null?o:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var n;let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth(),i=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear())return;this.viewMonth=i;let o=this.formatMonthYear(i);this.setNavStatus(o),this.emit("sd-month-change",{detail:{month:i}})}setYear(t){var n;let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth(),i=new Date(e.getFullYear()+t,e.getMonth(),1);if(i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth())return;this.viewMonth=i;let o=this.formatMonthYear(i);this.setNavStatus(o),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var o;let t=null;if(!this.range&&this.value){let n=$.parseLocalISO(this.value);n&&(t=$.startOfDayLocal(n))}if(this.range){let n=this.rangeStart?$.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;l?t=$.startOfDayLocal(l):n&&(t=$.startOfDayLocal(n))}let e=(o=this.viewMonth)!=null?o:this.ensureViewMonth();if(!(n=>n?n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()&&!this.isDisabled(n):!1)(t)){let{weeks:n}=this.getMonthMatrix(e),l=n.flat().find(h=>h.getMonth()===e.getMonth()&&$.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=$.startOfDayLocal(l);else{let h=n.flat().find(u=>u.getMonth()===e.getMonth()&&!this.isDisabled(u));t=h?$.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let n=this.shadowRoot,l=(n==null?void 0:n.querySelector("button.day.selected"))||(n==null?void 0:n.querySelector("button.day.focused"))||(n==null?void 0:n.querySelector('button.day[tabindex="0"]'))||(n==null?void 0:n.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=$.startOfDayLocal(t),i=$.toLocalISODate(e);if(this.value===i)return;this.value=i;let o=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(o),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=n.value.length;n.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=$.startOfDayLocal(t),i=this.rangeStart?$.parseLocalISO(this.rangeStart):null,o=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(!i&&!o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=l.value.length;l.setSelectionRange(u,u)})}))});return}if(i&&!o){if(this.isDisabled(e))return;if($.isSameDay(i,e)){if(!this.allowSameDayRange){this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let w=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${w}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var y;let g=this.input;g&&(g.value=(y=this.inputValue)!=null?y:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let T=g.value.length;g.setSelectionRange(T,T)})}))});return}this.rangeStart=$.toLocalISODate(e),this.rangeEnd=$.toLocalISODate(e),this.previewEnd=null;let b=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${b}`,40),this.announceSelect(`${this.termEndSelected()}: ${b}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var g;let w=this.input;w&&(w.value=(g=this.inputValue)!=null?g:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let y=w.value.length;w.setSelectionRange(y,y)})}))});return}let n=$.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,h]=$.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=$.toLocalISODate(l),this.rangeEnd=$.toLocalISODate(h),this.previewEnd=null;let u=this.formatSelectionLabel(l),m=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${u}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var w;let b=this.input;b&&(b.value=(w=this.inputValue)!=null?w:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let g=b.value.length;b.setSelectionRange(g,g)})}))});return}if(i&&o){if(this.isDisabled(e))return;this.rangeStart=$.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=l.value.length;l.setSelectionRange(u,u)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?$.parseLocalISO(this.value):null,e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,i=$.startOfDayLocal(new Date),o=this.range&&e?e:t!=null?t:i,n=new Date(o.getFullYear(),o.getMonth(),1);return this.viewMonth=n,n}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,i=new Date(t.getFullYear(),t.getMonth(),1),o=new Date(i),n=(i.getDay()-e+7)%7;o.setDate(i.getDate()-n);let l=[],h=o;for(let b=0;b<6;b++){let w=[];for(let g=0;g<7;g++)w.push(new Date(h)),h.setDate(h.getDate()+1);l.push(w)}let u=b=>b.every(w=>w.getMonth()!==t.getMonth());for(;l.length>0&&u(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var o;let t=(o=this.firstDayOfWeek)!=null?o:1,e=new Date(2021,7,1),i=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{i.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){i.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return i}getTabTargetDayForCurrentView(t){var n;let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth(),i=t.flat().find(l=>l.getMonth()===e.getMonth()&&$.isSameDay(l,this.today)&&!this.isDisabled(l));if(i)return $.startOfDayLocal(i);let o=t.flat().find(l=>l.getMonth()===e.getMonth()&&!this.isDisabled(l));return o?$.startOfDayLocal(o):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?$.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?$.parseLocalISO(this.rangeEnd):null;if(e&&!i){let o=$.startOfDayLocal(t);this.previewEnd=this.isDisabled(o)?null:o,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var w,g;let t=(w=this.viewMonth)!=null?w:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),o=this.weekdayLabels(),n=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,m=y=>!this.range||!l||h||!u?!1:$.isBetweenInclusive(y,l,u),b=this.getTabTargetDayForCurrentView(e);return p`<div part="datepicker" class="${c("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(g=this.currentPlacement)!=null&&g.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${i}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${y=>this.handleHeaderKeyDown(y,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-icon></button></div></div><sd-divider></sd-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${i}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${o.map((y,T)=>p`<div role="columnheader" aria-colindex="${T+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${y}" title="${y}" id="${"col-"+(T+1)}">${y}</div>`)}</div>${e.map((y,T)=>p`<div class="grid-row grid grid-cols-7 ${T===0?"mt-2":""}" role="row" aria-rowindex="${T+2}">${y.map((z,S)=>{let O=z.getMonth()===t.getMonth(),_=this.isDisabled(z)||!this.inMinMax(z),F=$.isSameDay(z,this.focusedDate),I=$.isSameDay(z,this.today),B=!this.range&&n?$.isSameDay(z,n):!1,K=this.range&&l?$.isSameDay(z,l):!1,dt=this.range&&h?$.isSameDay(z,h):!1,bt=this.range&&l&&h?$.isBetweenInclusive(z,l,h):!1,ct=m(z)&&!_,Tt=-1,tt=b&&$.isSameDay(z,b);(this.tabbingIntoGrid&&tt||!this.tabbingIntoGrid&&F)&&(Tt=0);let gt=this.isWeekend(z),st=z.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),Ot=K?this.localize.term("startDateSelected"):dt?this.localize.term("endDateSelected"):void 0;return p`<button type="button" part="day" class="${c("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",K||dt?F?"outline-none sd-datepicker__date-item--selected--hover-color-background sd-datepicker__date-item--selected--hover-color-text":"outline-none sd-datepicker__date-item--selected-color-background sd-datepicker__date-item--selected-color-text hover:sd-datepicker__date-item--selected--hover-color-background hover:sd-datepicker__date-item--selected--hover-color-text":"hover:sd-datepicker__date-item--hover--default-color-text",!K&&!dt&&!bt&&"hover:sd-datepicker__date-item--hover--default-color-background",B?"selected outline-none border-primary sd-datepicker__date-item--selected-color-background sd-datepicker__date-item--selected-color-text hover:sd-datepicker__date-item--selected--hover-color-text hover:sd-datepicker__date-item--selected--hover-color-background":O?this.isInDisabledDates(z)||!this.inMinMax(z)?"out-month text-neutral-500":this.disabledWeekends&>?"weekend-day text-neutral-500":"in-month sd-datepicker__date-item--default-color-text":this.disabledWeekends&>?"out-month weekend-day text-neutral-500":gt?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-datepicker__date-item--hover--prev-next-color-text hover:sd-datepicker__date-item--hover--prev-next-color-background",K?"rounded-l-md rounded-r-none":"",dt?"range-end rounded-r-md rounded-l-none":"",bt&&!K&&!dt?"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":"",!bt&&ct&&!K&&!dt?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",I&&!B&&!K&&!dt&&F?"today border-[1px] border-primary sd-datepicker__date-item--current-font-weight":"",_?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",F&&!I?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${S+1}" aria-labelledby="${"col-"+(S+1)}" .tabIndex="${Tt}" ?disabled="${_||this.disabled||this.readonly}" aria-disabled="${_||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${B||bt||K||dt?"true":"false"}" aria-current="${I?"date":N}" aria-label="${st}" aria-roledescription="${Ot!=null?Ot:N}" @focus="${()=>this.focusedDate=$.startOfDayLocal(z)}" @mouseenter="${()=>this.onDayMouseEnter(z)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=$.startOfDayLocal(z),this.selectDate(z)}}">${z.getDate()}</button>`})}</div>`)}</div></div>`}render(){var y,T;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,i=this.helpText?!0:!!t.helpText,o=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",w={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],g=this.size==="sm"?"text-sm":"text-base";return p`<div part="form-control" class="${c("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||o?p`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",g)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${c("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${c("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",w,this.open&&((y=this.currentPlacement)!=null&&y.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",(T=this.currentPlacement)!=null&&T.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${c("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",b==="disabled"||b==="visuallyDisabled"?"text-neutral-500":"text-black",b==="invalid"&&"form-control--invalid-color-background",b==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${i?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${c("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],g,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c("text-error",u,m)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?p`<sd-icon class="${c("text-success shrink-0",u,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}<sd-icon class="${c(h,u,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-icon></div>${this.renderCalendar()}</sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm mt-1",i?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!i}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};A.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
213
213
|
:host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,rgba(var(--sd-color-primary-500))))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,rgba(var(--sd-color-primary))))}.icon-color{color:rgb(var(--sd-color-icon-fill-primary))}.month-label{color:rgb(var(--sd-color-border-primary))!important}`],a([d({type:String,reflect:!0})],A.prototype,"locale",2),a([d({type:String,converter:Lr,reflect:!0})],A.prototype,"value",2),a([d({type:Boolean,reflect:!0})],A.prototype,"range",2),a([d({attribute:"range-start",converter:Lr,reflect:!0})],A.prototype,"rangeStart",2),a([d({attribute:"range-end",converter:Lr,reflect:!0})],A.prototype,"rangeEnd",2),a([d({type:Boolean})],A.prototype,"allowSameDayRange",2),a([d({type:String,converter:Lr,reflect:!0})],A.prototype,"min",2),a([d({type:String,converter:Lr,reflect:!0})],A.prototype,"max",2),a([d({attribute:"view-month",converter:xo})],A.prototype,"viewMonth",2),a([d({type:Number})],A.prototype,"firstDayOfWeek",2),a([d({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],A.prototype,"disabledWeekends",2),a([d({attribute:"disabled-dates",converter:ko})],A.prototype,"disabledDates",2),a([d({attribute:!1})],A.prototype,"isDateDisabled",2),a([d({type:String,reflect:!0})],A.prototype,"size",2),a([d({type:String})],A.prototype,"alignment",2),a([d({type:String,reflect:!0})],A.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],A.prototype,"helpText",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],A.prototype,"floatingLabel",2),a([d({type:Boolean,reflect:!0})],A.prototype,"disabled",2),a([d({type:Boolean,reflect:!0})],A.prototype,"required",2),a([d({type:Boolean,attribute:"visually-disabled"})],A.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],A.prototype,"styleOnValid",2),a([d({type:Boolean,reflect:!0})],A.prototype,"readonly",2),a([d({type:String,reflect:!0})],A.prototype,"placement",2),a([d({type:String,reflect:!0})],A.prototype,"placeholder",2),a([d({reflect:!0})],A.prototype,"name",2),a([d({type:String,reflect:!0})],A.prototype,"form",2),a([L()],A.prototype,"open",2),a([L()],A.prototype,"focusedDate",2),a([L()],A.prototype,"today",2),a([L()],A.prototype,"disabledDatesSet",2),a([L()],A.prototype,"previewEnd",2),a([L()],A.prototype,"statusNavText",2),a([L()],A.prototype,"statusSelectText",2),a([L()],A.prototype,"hasFocus",2),a([L()],A.prototype,"showValidStyle",2),a([L()],A.prototype,"showInvalidStyle",2),a([L()],A.prototype,"currentPlacement",2),a([L()],A.prototype,"inputValue",2),a([v("sd-popup")],A.prototype,"popup",2),a([v("#invalid-message")],A.prototype,"invalidMessage",2),a([v("#input")],A.prototype,"input",2),a([C("open",{waitUntilFirstUpdate:!0})],A.prototype,"handleOpenChange",1),a([C("locale")],A.prototype,"handleLocaleChange",1),a([C("viewMonth")],A.prototype,"handleViewMonthChange",1),a([C("disabledDates")],A.prototype,"handleDisabledDatesChange",1),a([C("value")],A.prototype,"handleValueChange",1),a([C("rangeStart"),C("rangeEnd")],A.prototype,"handleRangeChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],A.prototype,"handleDisabledChange",1),a([C(["size","floatingLabel"])],A.prototype,"handleSizeChange",1),A=a([k("sd-datepicker")],A);var Nt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"footer");this.localize=new D(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new or(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),sr(this))}disconnectedCallback(){super.disconnectedCallback(),ar(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let i=W(this,"dialog.denyClose",{dir:this.localize.dir()});Y(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=ir(),this.modal.activate(),sr(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([Z(this.dialog),Z(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});let e=this.prefersReducedMotion?W(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):W(this,"dialog.show",{dir:this.localize.dir()}),i=W(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([Y(this.panel,e.keyframes,e.options),Y(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Z(this.dialog),Z(this.overlay)]);let t=this.prefersReducedMotion?W(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):W(this,"dialog.hide",{dir:this.localize.dir()}),e=W(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([Y(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),Y(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,ar(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&i.isConnected&&setTimeout(()=>{try{i.focus({preventScroll:!0})}catch(o){i.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,Q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,Q(this,"sd-after-hide")}render(){return p`<div part="base" class="${c("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 overlay-color-background" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("panel-color-border border flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${E(this.headline?this.headline:void 0)}" aria-labelledby="${E(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?p`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:p`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":p`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${c("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};Nt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
@@ -235,14 +235,14 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
|
|
|
235
235
|
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?et`div`:t?et`a`:et`button`,i=xi(this.marker[this.variant]),o=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return j`<${e} part="base" class="${c("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${E(t?this.href:void 0)}" target="${E(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${E(this.notInteractive||t?void 0:"button")}" aria-label="${E(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${E(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${c("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-map-marker--cluster-color-text",main:"sd-color-fill-accent",place:"sd-map-marker--pin-color-text"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="${c("absolute inset-0 overflow-hidden pointer-events-none",{cluster:"sd-map-marker--cluster--default-color-background group-hover:sd-map-marker--cluster--hover-color-background",main:"sd-map-marker--main-color-background",place:"sd-map-marker--pin--default-color-background"}[this.variant])}" style="mask-image:${o};-webkit-mask-image:${o}"><div class="${c("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${c("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":this.state==="hover"?"bg-accent-550":"group-hover:bg-accent-550 group-active:bg-accent-700",place:this.state==="active"||this.state==="hover"?"sd-map-marker--pin--hover-color-background":"group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?j`<div id="marker-circle" class="absolute rounded-full"></div>`:""}</div>${i} ${this.variant==="cluster"?j`<div id="cluster-border" class="${c("absolute inset-0 sd-map-marker--cluster--default-color-background rounded-full opacity-30 hover:sd-map-marker--cluster--hover-color-background",this.state==="hover"&&"sd-map-marker--cluster--hover-color-background")}"></div>`:""}</div><div id="content" part="content" class="${c("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold sd-map-marker--cluster-color-text",this.variant==="place"&&"font-bold sd-map-marker--pin-color-text")}"><slot></slot></div></${e}>`}};qt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
236
236
|
:host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker--cluster--hover-color-background))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}#marker-circle{background-color:rgba(var(--sd-color-icon-fill-white,rgba(var(--sd-color-white))))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],a([d({type:String,reflect:!0})],qt.prototype,"variant",2),a([d({type:String,reflect:!0})],qt.prototype,"state",2),a([d({type:Boolean,reflect:!0})],qt.prototype,"animated",2),a([d({type:Boolean,reflect:!0,attribute:"not-interactive"})],qt.prototype,"notInteractive",2),a([d({type:String,reflect:!0})],qt.prototype,"href",2),a([d({type:String,reflect:!0})],qt.prototype,"target",2),a([d({reflect:!0})],qt.prototype,"label",2),qt=a([k("sd-map-marker")],qt);var Fe=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],i=t.composedPath(),o=i.find(u=>{var m;return e.includes(((m=u==null?void 0:u.getAttribute)==null?void 0:m.call(u,"role"))||"")});if(!o||i.find(u=>{var m;return((m=u==null?void 0:u.getAttribute)==null?void 0:m.call(u,"role"))==="menu"})!==this)return;let h=o;h.type==="checkbox"&&(h.checked=!h.checked),this.emit("sd-select",{detail:{item:h}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),i=this.getCurrentItem(),o=i?e.indexOf(i):0;if(i==null||i.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let n=(l,h)=>{let u=l;for(let m of e)if(u=(u+h+e.length)%e.length,!e[u].disabled)return u;return l};if(t.key==="ArrowDown")o=n(o,1);else if(t.key==="ArrowUp")o=n(o,-1);else if(t.key==="Home")o=e.findIndex(l=>!l.disabled),o===-1&&(o=0);else if(t.key==="End"){o=e.length-1;for(let l=e.length-1;l>=0;l--)if(!e[l].disabled){o=l;break}}this.setCurrentItem(e[o]),e[o].focus(),e[o].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(i=>{i.setAttribute("tabindex",i===t?"0":"-1")})}render(){return p`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};Fe.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
237
237
|
:host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md);padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-divider){padding-block:var(--sd-spacing-3)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],a([v("slot")],Fe.prototype,"defaultSlot",2),Fe=a([k("sd-menu")],Fe);var $o=()=>new Ss,Ss=class{},zs=new WeakMap,To=ee(class extends zr{render(s){return N}update(s,[r]){var e;let t=r!==this.G;return t&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=r,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),N}rt(s){var r;if(this.G!==void 0)if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=(r=this.ht)!=null?r:globalThis,e=zs.get(t);e===void 0&&(e=new WeakMap,zs.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,r,t;return typeof this.G=="function"?(r=zs.get((s=this.ht)!=null?s:globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Bi=class{constructor(r,t){this.popupRef=$o();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=r=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${r.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${r.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=r=>{switch(r.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":r.target!==this.host&&(r.preventDefault(),r.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(r);break;default:break}};this.handleClick=r=>{var t;r.target===this.host?(r.preventDefault(),r.stopPropagation()):r.target instanceof Element&&(r.target.tagName==="sd-menu-item"||(t=r.target.role)!=null&&t.startsWith("menuitem"))&&r.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=r=>{r.relatedTarget&&r.relatedTarget instanceof Element&&this.host.contains(r.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=r=>{r.stopPropagation()};this.handlePopupReposition=()=>{let r=this.host.renderRoot.querySelector("slot[name='submenu']"),t=r==null?void 0:r.assignedElements({flatten:!0}).filter(h=>h.localName==="sd-menu")[0],e=getComputedStyle(this.host).direction==="rtl";if(!t)return;let{left:i,top:o,width:n,height:l}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${e?i+n:i}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${e?i+n:i}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${o+l}px`)};(this.host=r).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(r){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let e=null;for(let i of t.assignedElements())if(e=i.querySelectorAll("sd-menu-item, [role^='menuitem']"),e.length!==0)break;if(!(!e||e.length===0)){e[0].setAttribute("tabindex","0");for(let i=1;i!==e.length;++i)e[i].setAttribute("tabindex","-1");this.popupRef.value&&(r.preventDefault(),r.stopPropagation(),this.popupRef.value.active?e[0]instanceof HTMLElement&&e[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{e[0]instanceof HTMLElement&&e[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(r){this.popupRef.value&&this.popupRef.value.active!==r&&(this.popupRef.value.active=r,this.host.requestUpdate())}enableSubmenu(r=!0){r?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var i;if(!((i=this.host.parentElement)!=null&&i.computedStyleMap))return;let r=this.host.parentElement.computedStyleMap(),e=["padding-top","border-top-width","margin-top"].reduce((o,n)=>{var m;let l=(m=r.get(n))!=null?m:new CSSUnitValue(0,"px"),u=(l instanceof CSSUnitValue?l:new CSSUnitValue(0,"px")).to("px");return o-u.value},0);this.skidding=e}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let r=getComputedStyle(this.host).direction==="rtl";return this.isConnected?p`<sd-popup ${To(this.popupRef)} placement="${r?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-popup>`:p`<slot name="submenu" hidden></slot>`}};var Lt=class extends f{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new P(this,"submenu");this.submenuController=new Bi(this,this.hasSlotController);this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Sa(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let t=this.submenuController.isExpanded(),e={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return p`<div id="anchor" part="base" class="${c("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap !navigable-border-radius",this.disabled?"outline-none cursor-not-allowed sd-menu--disabled-color-text hover:bg-transparent":"cursor-pointer sd-menu-color-text hover:bg-neutral-200",this.isSubmenu()&&t&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!t}">${this.type==="checkbox"?p`<span part="checked-icon" class="${c("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-icon></span>`:""} ${e.iconIndent?p`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?p`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};Lt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
238
|
-
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(.menu-item-focus) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}//TODO clean up sd-menu-color-icon variable replacing with sd-menu-item-color-icon-fill (breakingchange) :host [part=icon-indent],:host [part=checked-icon],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon,var(--sd-menu-item-color-icon-fill)))}//TODO clean up sd-menu--disabled-color-icon variable replacing with sd-menu-item--disabled-color-icon-fill (breakingchange) :host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon,var(--sd-menu-item--disabled-color-icon-fill)))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}.sd-menu-color-text{color:rgba(var(--sd-menu-color-text,var(--sd-menu-item-color-text)))}.sd-menu--disabled-color-text{color:rgba(var(--sd-menu--disabled-color-text,var(--sd-menu-item--disabled-color-text)))}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],a([v("slot:not([name])")],Lt.prototype,"defaultSlot",2),a([v('part="base"')],Lt.prototype,"menuItem",2),a([d()],Lt.prototype,"type",2),a([d({type:Boolean,reflect:!0})],Lt.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),a([d()],Lt.prototype,"value",2),a([d({type:Boolean,reflect:!0})],Lt.prototype,"chevron",2),a([C("checked")],Lt.prototype,"handleCheckedChange",1),a([C("disabled")],Lt.prototype,"handleDisabledChange",1),a([C("type")],Lt.prototype,"handleTypeChange",1),Lt=a([k("sd-menu-item")],Lt);var nt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new D(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.stacked=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var i;return e.nodeType===Node.TEXT_NODE?!((i=e.textContent)!=null&&i.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}get isStackedHorizontal(){return!this.vertical&&this.stacked}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?et`div`:this.isAccordion&&!this.isLink?et`summary`:this.isLink?et`a`:et`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,i=this.isButton,o=this.isAccordion,n=this.isIconOnly,l={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":this.isStackedHorizontal?"
|
|
238
|
+
:host{--submenu-offset:-6px;display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}[part=checked-icon]{margin-right:var(--sd-spacing-3)}.submenu-expanded::after{position:fixed;top:calc(var(--sd-spacing-1) * 0);right:calc(var(--sd-spacing-1) * 0);bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);z-index:calc(var(z-dropdown) - 1);--tw-content:'';content:var(--tw-content);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{background-color:rgba(var(--sd-color-background-neutral-200));--tw-outline-style:none;outline-style:none}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(.menu-item-focus) [part=base]{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:var(--outline-color-primary);outline-offset:-2px}:host(:hover) [part=base]{--tw-outline-style:none;outline-style:none}//TODO clean up sd-menu-color-icon variable replacing with sd-menu-item-color-icon-fill (breakingchange) :host [part=icon-indent],:host [part=checked-icon],:host [part=submenu-icon]{color:rgba(var(--sd-menu-color-icon,var(--sd-menu-item-color-icon-fill)))}//TODO clean up sd-menu--disabled-color-icon variable replacing with sd-menu-item--disabled-color-icon-fill (breakingchange) :host([aria-disabled=true]) [part=icon-indent]{color:rgba(var(--sd-menu--disabled-color-icon,var(--sd-menu-item--disabled-color-icon-fill)))}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);background-color:rgba(var(--sd-color-background-white));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}.sd-menu-color-text{color:rgba(var(--sd-menu-color-text,var(--sd-menu-item-color-text)))}.sd-menu--disabled-color-text{color:rgba(var(--sd-menu--disabled-color-text,var(--sd-menu-item--disabled-color-text)))}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],a([v("slot:not([name])")],Lt.prototype,"defaultSlot",2),a([v('part="base"')],Lt.prototype,"menuItem",2),a([d()],Lt.prototype,"type",2),a([d({type:Boolean,reflect:!0})],Lt.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),a([d()],Lt.prototype,"value",2),a([d({type:Boolean,reflect:!0})],Lt.prototype,"chevron",2),a([C("checked")],Lt.prototype,"handleCheckedChange",1),a([C("disabled")],Lt.prototype,"handleDisabledChange",1),a([C("type")],Lt.prototype,"handleTypeChange",1),Lt=a([k("sd-menu-item")],Lt);var nt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","description","children");this.localize=new D(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.stacked=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var i;return e.nodeType===Node.TEXT_NODE?!((i=e.textContent)!=null&&i.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}get isStackedHorizontal(){return!this.vertical&&this.stacked}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?et`div`:this.isAccordion&&!this.isLink?et`summary`:this.isLink?et`a`:et`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,i=this.isButton,o=this.isAccordion,n=this.isIconOnly,l={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":this.isStackedHorizontal?"py-1":"py-2",u=j`<${t} part="base" class="${c("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px] navigable-border-radius",this.isStackedHorizontal?"text-xs leading-4.5":{md:"navigable-font-size",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"sd-navigation-item-color-text",this.current&&!this.disabled&&"sd-navigation-item--current-color-text",this.current&&!this.isStackedHorizontal&&"font-bold",!this.current&&!this.isStackedHorizontal&&"choice-control-font-weight",!o&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&(this.isStackedHorizontal?"inline-flex flex-col items-center justify-center text-center rounded-full wrap":"inline-flex items-center"),!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",n?"justify-center aspect-square p-3":this.isStackedHorizontal?"px-8":"px-4")}" aria-current="${E(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${E(i?this.disabled:void 0)}" href="${E(e?this.href:void 0)}" target="${E(e?this.target:void 0)}" download="${E(e?this.download:void 0)}" rel="${E(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:i?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent pointer-events-none navigable__current-indicator-border-radius",this.vertical?"navigable__current-indicator-width h-[calc(100%-16px)] top-2 left-0 group-hover:h-full group-hover:top-0":this.isStackedHorizontal?"h-[2px] left-6 right-6 bottom-0":"navigable__current-indicator-height w-[calc(100%-16px)] left-2 bottom-0 group-hover:w-full group-hover:left-0 transition-all",this.disabled&&"bg-neutral-500")}"></div><div class="${c("inline-flex flex-col justify-center gap-1 w-full h-full",this.isStackedHorizontal&&"flex-col items-center")}"><span part="content-area" class="${c("relative inline-flex justify-between items-center",o?"grow":"w-full",this.isStackedHorizontal&&"justify-center",l.description&&"pt-3",!l.description&&!this.separated&&h,this.calculatePaddingX)}">${this.divider&&this.vertical?j`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="${c("inline-flex items-center",this.vertical?"flex-auto gap-2":this.isStackedHorizontal?"text-center":"flex-auto flex-col justify-center gap-1 text-center")}"><slot part="content" class="${c("inline-flex items-center",this.vertical?"gap-2":this.isStackedHorizontal?"flex-col justify-center gap-1 text-center":"justify-center gap-1 text-center")}"></slot></span>${this.chevron||l.children&&this.vertical&&!this.separated?j`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${l.description&&this.vertical?j`<slot id="description" name="description" part="description" class="${c("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?j`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${u} ${l.children&&this.vertical?j`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?j`<slot name="children"></slot>`:""}</div>`:o?j`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${u}<slot name="children"></slot></details>`:j`${u}`}};nt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
239
239
|
:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}:host([stacked]:not([vertical])) ::slotted(sd-icon){height:var(--sd-spacing-6);width:var(--sd-spacing-6)}.sd-navigation-item--current-color-text{color:rgb(var(--sd-navigation-item--current-color-text,var(--sd-navigation-item-color-text)))}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}`],a([v('[part="base"]')],nt.prototype,"button",2),a([v("slot:not([name])")],nt.prototype,"defaultSlot",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"vertical",2),a([d({type:String,reflect:!0})],nt.prototype,"size",2),a([d({reflect:!0})],nt.prototype,"href",2),a([d({type:String,reflect:!0})],nt.prototype,"target",2),a([d({reflect:!0})],nt.prototype,"download",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"current",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"stacked",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"chevron",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"relaxed",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"divider",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"indented",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"open",2),a([d({type:Boolean,reflect:!0})],nt.prototype,"separated",2),nt=a([k("sd-navigation-item")],nt);var Ni={"top-right":null,"bottom-center":null},Pd=()=>{Object.entries(Ni).forEach(([s])=>{let r=document.querySelector(`#sd-toast-stack--${s}`);if(r){r.setAttribute("role","region"),Ni[s]=r;return}Ni[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Pd();var Et=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return Ni[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([Z(this.base),Z(this.wrapper)]),this.wrapper.hidden=!1;let t=W(this,"notification.show",{dir:this.localize.dir()}),e=W(this,`notification.wrapper.show${kr(vs(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([Y(this.base,ke(t.keyframes,this.base.scrollHeight),t.options),Y(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([Z(this.base),Z(this.wrapper)]);let t=W(this,"notification.hide",{dir:this.localize.dir()}),e=W(this,`notification.wrapper.hide${kr(vs(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([Y(this.base,ke(t.keyframes,this.base.scrollHeight),t.options),Y(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,Q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,Q(this,"sd-after-hide")}async toast(){return new Promise(t=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),t()},{once:!0})})}render(){return p`<div part="base" class="${c("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="${E(this.closable?"0":void 0)}" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${c("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${c("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 sd-notification-color-border",{info:"sd-notification--info-color-background",success:"sd-notification--success-color-background",warning:"sd-notification--warning-color-background",error:"sd-notification--error-color-background"}[this.variant])}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?p`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?p`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("absolute w-0 h-[2px] bottom-0 sd-notification__duration-indicator-color-background z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div></div>`}};Et.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
240
240
|
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([v('[part~="base"]')],Et.prototype,"base",2),a([v('[part~="wrapper"]')],Et.prototype,"wrapper",2),a([v('[part~="close-button"]')],Et.prototype,"close",2),a([d({type:String,reflect:!0})],Et.prototype,"variant",2),a([d({type:Boolean,reflect:!0})],Et.prototype,"open",2),a([d({type:Boolean,reflect:!0})],Et.prototype,"closable",2),a([d({type:Number,reflect:!0})],Et.prototype,"duration",2),a([d({type:Boolean,reflect:!0,attribute:"duration-indicator"})],Et.prototype,"durationIndicator",2),a([d({type:String,reflect:!0,attribute:"toast-stack"})],Et.prototype,"toastStack",2),a([C("open",{waitUntilFirstUpdate:!0})],Et.prototype,"handleOpenChange",1),a([C("duration")],Et.prototype,"handleDurationChange",1),Et=a([k("sd-notification")],Et);R("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});R("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});R("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var ne=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return j`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};ne.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
241
241
|
:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([v("slot:not([name])")],ne.prototype,"defaultSlot",2),a([d({reflect:!0,type:Boolean})],ne.prototype,"disabled",2),a([d({type:String,reflect:!0})],ne.prototype,"label",2),a([C("disabled",{waitUntilFirstUpdate:!0})],ne.prototype,"handleDisabledChange",1),ne=a([k("sd-optgroup")],ne);var kt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return p`<div part="base" style="word-break:break-word" class="${c("px-4 flex items-start w-full transition-colors duration-fast ease-in-out text-left text-base relative",{sm:"text-base py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"text-black cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?p`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border sd-checkbox-border-width rounded-sm h-4 w-4 mr-2",{sm:"mt-0.5",md:"mt-1",lg:"mt-1"}[this.size],this.disabled?"sd-option--disabled-color-border":this.selected?"bg-accent border-accent":"bg-white form-control-color-border")}">${this.selected?p`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?p`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?p`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};kt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
242
242
|
:host{position:relative;display:block;width:100%;--tw-outline-style:none!important;outline-style:none!important}.focus-outline-offset{outline-offset:-2px}.sd-option--disabled-color-border{border-color:rgb(var(--sd-option--disabled-color-border))}`],a([v('[part="base"]')],kt.prototype,"defaultSlot",2),a([L()],kt.prototype,"current",2),a([L()],kt.prototype,"selected",2),a([L()],kt.prototype,"hasHover",2),a([L()],kt.prototype,"isKeyboardFocus",2),a([d({type:String,reflect:!0})],kt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],kt.prototype,"checkbox",2),a([d({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([d({type:String,reflect:!0})],kt.prototype,"value",2),a([C("disabled")],kt.prototype,"handleDisabledChange",1),a([C("selected")],kt.prototype,"handleSelectedChange",1),a([C("value")],kt.prototype,"handleValueChange",1),kt=a([k("sd-option")],kt);var Kt=class extends f{constructor(){super();this.hasSlotController=new P(this,"label");this.value=null;this.max=100;this.label="";this.valuePosition=null;this.inverted=!1;this.showLabel=!1;this.localize=new D(this);this.valueFormatter=this.localize.number.bind(this.localize)}get safeMax(){return this.max>0?this.max:100}get clampedValue(){var t;return Math.min(Math.max((t=this.value)!=null?t:0,0),this.safeMax)}get percentage(){return this.clampedValue/this.safeMax*100}get isLoading(){return this.value===void 0||this.value===null||isNaN(this.value)}get showValue(){return!this.isLoading&&(this.valuePosition==="right"||this.valuePosition==="bottom")}render(){let t={label:this.hasSlotController.test("label")},e=this.label?!0:!!t.label;return p`<div part="base" class="text-start" aria-hidden="${!e}">${e?p`<label part="label" id="label" class="${c("text-base",!this.showLabel&&"sr-only",this.inverted?"text-white":"text-black")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label>`:N}<div class="${c(this.valuePosition==="right"?"flex flex-row items-center gap-2 -mt-1":this.valuePosition==="bottom"?"flex flex-col gap-1 mt-1":"mt-1")}"><div part="bar" id="bar" class="${c("w-full h-[var(--height,0.125rem)]",this.isLoading?"relative ":"flex")}" role="progressbar" aria-valuemin="0" aria-valuemax="${this.safeMax}" aria-valuenow="${E(this.isLoading?void 0:this.valueFormatter(this.clampedValue))}" aria-valuetext="${E(this.isLoading?this.localize.term("loading"):this.valueFormatter(this.clampedValue))}" aria-label="${E(e?void 0:this.label||this.localize.term("progress"))}" aria-labelledby="${E(e?"label":this.label)}" style="${`--percentage: ${this.percentage}%;`}">${this.isLoading?p`<div part="track" class="${c("absolute top-0 left-0 h-full progress-bar__track--loading-left",this.inverted?"sd-progress-bar__slide-bar--inverted-color-background":"sd-progress-bar__slide-bar-color-background")}"></div><div part="track" class="${c("absolute top-0 right-0 h-full progress-bar__track--loading-right",this.inverted?"sd-progress-bar__slide-bar--inverted-color-background":"sd-progress-bar__slide-bar-color-background")}"></div><div part="indicator" class="${c("absolute top-0 h-full progress-bar__indicator--loading",this.inverted?"sd-progress-bar--active--inverted-color-background":"bg-accent")}"></div>`:p`<div part="indicator" class="${c("w-[var(--percentage)]",this.inverted?"sd-progress-bar--active--inverted-color-background":"bg-accent")}"></div>${this.value&&this.value>0&&this.value<this.safeMax?p`<div class="w-0.5 shrink-0"></div>`:N}<div part="track" class="${c("flex-1",this.inverted?"sd-progress-bar__slide-bar--inverted-color-background":"sd-progress-bar__slide-bar-color-background")}"></div>`}</div>${this.showValue?p`<span class="${c("text-neutral-700 text-xs w-shrink-0",this.inverted?"text-white":"text-neutral-700",this.valuePosition==="bottom"?"text-start":"text-center",this.valuePosition==="right"&&"whitespace-nowrap")}" part="value-${this.valuePosition}">${this.valueFormatter(this.clampedValue)}</span>`:N}</div></div>`}};Kt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
243
243
|
:host{display:block;width:100%}.progress-bar__indicator--loading{width:25%;animation:progress-loading-indicator 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-left{animation:progress-loading-track-left 1.25s ease-in-out infinite alternate}.progress-bar__track--loading-right{animation:progress-loading-track-right 1.25s ease-in-out infinite alternate}@keyframes progress-loading-indicator{0%{left:0}100%{left:75%}}@keyframes progress-loading-track-left{0%{width:0}100%{width:calc(75% - .25rem)}}@keyframes progress-loading-track-right{0%{width:calc(75% - .25rem)}100%{width:0}}`],a([d({type:Number,reflect:!0})],Kt.prototype,"value",2),a([d({type:Number,reflect:!0})],Kt.prototype,"max",2),a([d({type:String,reflect:!0})],Kt.prototype,"label",2),a([d({type:String,reflect:!0,attribute:"value-position"})],Kt.prototype,"valuePosition",2),a([d({type:Boolean,reflect:!0})],Kt.prototype,"inverted",2),a([d({type:Boolean,reflect:!0,attribute:"show-label"})],Kt.prototype,"showLabel",2),a([d({attribute:!1})],Kt.prototype,"valueFormatter",2),Kt=a([k("sd-progress-bar")],Kt);var Re=class extends Pt{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?et`details`:et`div`,e=this.expandable?et`summary`:et`div`;return j`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${c("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${E(this.expandable?"button":void 0)}" aria-expanded="${E(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${E(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${c("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"sd-quickfact--expandable-color-text":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${c("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};Re.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
244
|
-
:host{display:block}[part=header]::-webkit-details-marker{display:none}[part=summary-icon]{color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=icon]{font-size:var(--sd-spacing-12,3rem);color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([d({type:Boolean,reflect:!0})],Re.prototype,"expandable",2),Re=a([k("sd-quickfact")],Re);R("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});R("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var $t=class extends f{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return p`<span part="base" class="${c("sd-radio group flex items-
|
|
245
|
-
:host{display:block
|
|
244
|
+
:host{display:block}[part=header]::-webkit-details-marker{display:none}[part=summary-icon]{color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}[part=icon]{font-size:var(--sd-spacing-12,3rem);color:rgba(var(--sd-color-icon-fill-primary,rgba(var(--sd-color-primary))))}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([d({type:Boolean,reflect:!0})],Re.prototype,"expandable",2),Re=a([k("sd-quickfact")],Re);R("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});R("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var $t=class extends f{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return p`<span part="base" class="${c("sd-radio group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${c("flex-initial shrink-0 relative inline-flex items-center justify-center border sd-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?c("border-error hover:border-error-400 group-hover:border-error-400",this.checked?"sd-radio--checked--invalid--default-color-background":"sd-radio--default--invalid-color-background"):this.checked?"sd-radio--checked--default-color-background hover:sd-radio--checked--hover-color-background group-hover:sd-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550":"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${c("rounded-full inline-flex text-white sd-radio__checked-height sd-radio__checked-width transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"sd-radio--checked--disabled__icon-color-background":this.visuallyDisabled?"bg-white":this.invalid?"sd-radio--checked--invalid--default__icon-color-background hover:sd-radio--checked--invalid--hover__icon-color-background group-hover:sd-radio--checked--invalid--hover__icon-color-background":this.checked?"sd-radio--checked--default__icon-color-background hover:sd-radio--checked--hover__icon-color-background group-hover:sd-radio--checked--hover__icon-color-background":"bg-neutral-800")}"></span></span><slot part="label" class="${c("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-black")}"></slot></span>`}};$t.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
245
|
+
:host{display:block}:host(:focus-visible){--tw-outline-style:none;outline-style:none}[part=control--checked],[part=control--unchecked]{outline-color:transparent}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-width:1px;outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:rgba(var(--sd-color-border-primary,var(--sd-color-primary)))}[part=control--checked],[part=control--unchecked]{margin-top:.23em}:host([size=sm]) [part=control--checked],:host([size=sm]) [part=control--unchecked]{margin-top:.15em}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([L()],$t.prototype,"checked",2),a([L()],$t.prototype,"hasFocus",2),a([d({type:String,reflect:!0})],$t.prototype,"size",2),a([d({type:Boolean,reflect:!0})],$t.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],$t.prototype,"visuallyDisabled",2),a([d()],$t.prototype,"value",2),a([d({type:Boolean,reflect:!0})],$t.prototype,"invalid",2),a([C("checked")],$t.prototype,"handleCheckedChange",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],$t.prototype,"handleDisabledChange",1),$t=a([k("sd-radio")],$t);var Dt=class extends f{constructor(){super(...arguments);this.hasSlotController=new P(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),i=`${this.size}-${t?"label":"no-label"}`;return p`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${c("relative text-center sd-radio-button-border-radius transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline choice-control-font-weight",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"sd-button--primary--default-color-background sd-button--primary--default-color-text hover:sd-button--primary--hover-color-background hover:text-primary-100":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent sd-radio-button-color-text border-primary cursor-pointer hover:sd-radio-button--hover-color-background hover:sd-radio-button--hover-color-text",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",i)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${E(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${c(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?p`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};Dt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
246
246
|
:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;position:absolute;inset:calc(var(--sd-spacing-1) * 0);z-index:calc(10 * -1);opacity:var(--sd-opacity-0);outline-style:var(--tw-outline-style);outline-width:1px;outline-color:rgba(var(--sd-color-border-error,var(--sd-color-error)));--tw-outline-style:dotted;outline-style:dotted}.lg-label{height:46px}.lg-no-label{height:46px;padding-inline:calc(var(--sd-spacing-1) * 5)}.md-label{height:38px}.md-no-label{height:38px;padding-inline:var(--sd-spacing-4)}.sm-label{height:30px}.sm-no-label{height:30px;padding-inline:var(--sd-spacing-3)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3) * -1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2) * -1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1) * -1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus){z-index:30}:host(.sd-button-group__button[checked]){z-index:40}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],a([v(".button")],Dt.prototype,"input",2),a([v(".hidden-input")],Dt.prototype,"hiddenInput",2),a([L()],Dt.prototype,"hasFocus",2),a([d({type:String,reflect:!0})],Dt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],Dt.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],Dt.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],Dt.prototype,"checked",2),a([d()],Dt.prototype,"value",2),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],Dt.prototype,"handleDisabledChange",1),Dt=a([k("sd-radio-button")],Dt);var Se=class extends f{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(t){let e=ti(t.target);e==null||e.classList.add("sd-button-group__button--focus")}handleBlur(t){let e=ti(t.target);e==null||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){let e=ti(t.target);e==null||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){let e=ti(t.target);e==null||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach(e=>{let i=t.indexOf(e),o=ti(e);o!==null&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",i===0),o.classList.toggle("sd-button-group__button--inner",i>0&&i<t.length-1),o.classList.toggle("sd-button-group__button--last",i===t.length-1),o.classList.toggle("sd-button-group__button--radio",o.tagName.toLowerCase()==="sd-radio-button"))})}render(){return p`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};Se.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
247
247
|
:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],a([v("slot")],Se.prototype,"defaultSlot",2),a([L()],Se.prototype,"disableRole",2),a([d({type:String,reflect:!0})],Se.prototype,"label",2),Se=a([k("sd-button-group")],Se);function ti(s){var t;let r="sd-button, sd-radio-button";return(t=s.closest(r))!=null?t:s.querySelector(r)}var rt=class extends f{constructor(){super(...arguments);this.formControlController=new ut(this);this.hasSlotController=new P(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?za:t?La:xr}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}updated(t){super.updated(t),this.syncAriaDescription()}syncAriaDescription(){var i;let t=(i=this.shadowRoot)==null?void 0:i.querySelector("fieldset"),e=this.showInvalidStyle?this.validationMessage:"";e?t==null||t.setAttribute("aria-description",e):t==null||t.removeAttribute("aria-description")}getAllRadios(){let t=[...this.querySelectorAll("sd-radio, sd-radio-button")];return t.length===0&&console.warn("No radios found in the radio group."),t}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),i=this.value,o=this.getAllRadios();o.length!==0&&(e.disabled||(this.value=e.value,o.forEach(n=>n.checked=n===e),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input"))))}handleKeyDown(t){var h;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(u=>!u.disabled);if(e.length===0)return;let i=(h=e.find(u=>u.checked))!=null?h:e[0],o=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,l=e.indexOf(i)+o;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(u=>{u.checked=!1,this.hasButtonGroup||(u.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios();if(t.length===0)return;let i=t.find(o=>o.checked)||t[0];i&&i.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,i;let t=this.getAllRadios();if(t.length===0){this.hasButtonGroup=!1;return}if(await Promise.all(t.map(async o=>{await o.updateComplete,o.checked=o.value===this.value,o.size=this.size,o instanceof $t&&(o.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(o=>o.tagName.toLowerCase()==="sd-radio-button"),!t.some(o=>o.checked))if(this.hasButtonGroup){let o=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");o&&(o.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let o=(i=this.shadowRoot)==null?void 0:i.querySelector("sd-button-group");o&&(o.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){let t=this.getAllRadios();t.length!==0&&(t.forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid))}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,i=this.hasSlotController.test("help-text"),o=this.helpText?!0:!!i,n=this.hasSlotController.test("tooltip"),l=p`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return p`<fieldset part="form-control" class="${c("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?p`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black text-left",e?"inline-block":"hidden")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?p`<sd-button-group class="border border-primary sd-radio-button-group-border-radius sd-radio-button-group-border-width sd-radio-button-group-padding" part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-button-group>`:l}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot><div part="invalid-icon-message" class="flex items-center gap-2 mt-2">${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${c("text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.formControlController.renderInvalidMessage(this.size)}</div>`}};rt.styles=[...f.styles,x`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
248
248
|
:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:calc(var(--sd-spacing-1) * 0)}:host([required]) #label::after{content:' *'}:host:has(sd-button-group){display:inline-flex}`],a([v("slot:not([name])")],rt.prototype,"defaultSlot",2),a([v("#validation-input")],rt.prototype,"validationInput",2),a([v("#invalid-message")],rt.prototype,"invalidMessage",2),a([L()],rt.prototype,"hasButtonGroup",2),a([L()],rt.prototype,"defaultValue",2),a([L()],rt.prototype,"showInvalidStyle",2),a([d({type:String,reflect:!0})],rt.prototype,"size",2),a([d({type:Boolean,reflect:!0})],rt.prototype,"required",2),a([d({type:String,reflect:!0})],rt.prototype,"orientation",2),a([d({type:String,reflect:!0})],rt.prototype,"label",2),a([d({type:String,attribute:"help-text",reflect:!0})],rt.prototype,"helpText",2),a([d({type:String,reflect:!0})],rt.prototype,"name",2),a([d()],rt.prototype,"value",2),a([d({type:String,reflect:!0})],rt.prototype,"form",2),a([C("size",{waitUntilFirstUpdate:!0})],rt.prototype,"handleSizeChange",1),a([C("showInvalidStyle",{waitUntilFirstUpdate:!0})],rt.prototype,"handleInvalidChange",1),a([C("value")],rt.prototype,"handleValueChange",1),rt=a([k("sd-radio-group")],rt);var vt=class extends f{constructor(){super(...arguments);this.localize=new D(this);this.hasSlotController=new P(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.closeTrigger="click focus escape";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("click",this.handleDocumentClick),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction),document.removeEventListener("click",this.handleDocumentClick)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(i=>{var o,n;i.nodeType===Node.TEXT_NODE&&!((o=i==null?void 0:i.textContent)!=null&&o.trim())&&((n=i==null?void 0:i.parentNode)==null||n.removeChild(i))})}handleBlur(){this.hasCloseTrigger("focus")&&this.hide()}handleClick(){this.open&&this.hasCloseTrigger("click")?this.hide():this.hasTrigger("click")&&this.show()}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&this.hasCloseTrigger("escape")&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=yr(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasCloseTrigger("hover")){let t=yr(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}handleDocumentClick(t){if(!this.open||this.interactionType==="keyboard")return;let e=t.composedPath();this.hasCloseTrigger("focus")&&!e.includes(this)&&!e.includes(this.popup)&&this.hide()}hasTrigger(t){return this.trigger.split(" ").includes(t)}hasCloseTrigger(t){return this.closeTrigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await Z(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=W(this,"tooltip.show",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await Z(this.body);let{keyframes:t,options:e}=W(this,"tooltip.hide",{dir:this.localize.dir()});await Y(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),Q(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return p`<sd-popup part="base" exportparts="
|