@solid-design-system/components 4.0.1 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/cdn/_components/menu/menu.d.ts +1 -1
- package/cdn/_components/menu-item/menu-item.d.ts +1 -1
- package/cdn/chunks/chunk.EBZIGJAF.js +11 -0
- package/cdn/chunks/{chunk.F3I2ZAJZ.js → chunk.Y2IK2VHT.js} +2 -2
- package/cdn/components/accordion/accordion.d.ts +1 -1
- package/cdn/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn/components/animation/animation.d.ts +1 -1
- package/cdn/components/audio/audio.d.ts +1 -1
- package/cdn/components/badge/badge.d.ts +1 -1
- package/cdn/components/button/button.d.ts +1 -1
- package/cdn/components/button-group/button-group.d.ts +1 -1
- package/cdn/components/carousel/carousel.d.ts +1 -1
- package/cdn/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn/components/checkbox/checkbox.d.ts +1 -1
- package/cdn/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/dialog/dialog.d.ts +1 -1
- package/cdn/components/divider/divider.d.ts +1 -1
- package/cdn/components/drawer/drawer.d.ts +1 -1
- package/cdn/components/dropdown/dropdown.d.ts +1 -1
- package/cdn/components/expandable/expandable.d.ts +1 -1
- package/cdn/components/flipcard/flipcard.d.ts +1 -1
- package/cdn/components/header/header.d.ts +1 -1
- package/cdn/components/icon/icon.d.ts +1 -1
- package/cdn/components/include/include.d.ts +1 -1
- package/cdn/components/input/input.d.ts +1 -1
- package/cdn/components/link/link.d.ts +1 -1
- package/cdn/components/map-marker/map-marker.d.ts +1 -1
- package/cdn/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn/components/notification/notification.d.ts +1 -1
- package/cdn/components/optgroup/optgroup.d.ts +1 -1
- package/cdn/components/option/option.d.ts +1 -1
- package/cdn/components/popup/popup.d.ts +1 -1
- package/cdn/components/quickfact/quickfact.d.ts +1 -1
- package/cdn/components/radio/radio.d.ts +1 -1
- package/cdn/components/radio-button/radio-button.d.ts +1 -1
- package/cdn/components/radio-group/radio-group.d.ts +1 -1
- package/cdn/components/scrollable/scrollable.d.ts +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/spinner/spinner.d.ts +1 -1
- package/cdn/components/step/step.d.ts +1 -1
- package/cdn/components/step-group/step-group.d.ts +1 -1
- package/cdn/components/switch/switch.d.ts +1 -1
- package/cdn/components/tab/tab.d.ts +1 -1
- package/cdn/components/tab-group/tab-group.d.ts +1 -1
- package/cdn/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn/components/tag/tag.d.ts +1 -1
- package/cdn/components/teaser/teaser.d.ts +1 -1
- package/cdn/components/teaser-media/teaser-media.d.ts +1 -1
- package/cdn/components/textarea/textarea.d.ts +1 -1
- package/cdn/components/tooltip/tooltip.d.ts +1 -1
- package/cdn/components/video/video.d.ts +1 -1
- package/cdn/custom-elements.json +17 -1
- package/cdn/internal/form.d.ts +1 -1
- package/cdn/internal/longpress.d.ts +1 -1
- package/cdn/solid-components.bundle.js +5 -5
- package/cdn/solid-components.iife.js +4 -4
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +7 -5
- package/cdn-versioned/_components/menu/menu.d.ts +1 -1
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/chunk.2MKIKDQY.js +1 -1
- package/cdn-versioned/chunks/chunk.2RKC4PX2.js +1 -1
- package/cdn-versioned/chunks/chunk.37AKROZQ.js +1 -1
- package/cdn-versioned/chunks/chunk.3CMEDI5Q.js +2 -2
- package/cdn-versioned/chunks/chunk.4LW22GLX.js +1 -1
- package/cdn-versioned/chunks/chunk.5KCSOAA3.js +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.6BCGXAUV.js +1 -1
- package/cdn-versioned/chunks/chunk.6HMIEKMA.js +1 -1
- package/cdn-versioned/chunks/chunk.AQYKEDSK.js +1 -1
- package/cdn-versioned/chunks/chunk.BSXRWVFJ.js +1 -1
- package/cdn-versioned/chunks/chunk.C7B7IJTF.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.EBZIGJAF.js +11 -0
- package/cdn-versioned/chunks/chunk.ENXPYC3I.js +1 -1
- package/cdn-versioned/chunks/chunk.ERIS2E6E.js +1 -1
- package/cdn-versioned/chunks/chunk.FNE6AWAP.js +1 -1
- package/cdn-versioned/chunks/chunk.FPDKP6PN.js +1 -1
- package/cdn-versioned/chunks/chunk.FX3IWUZL.js +2 -2
- package/cdn-versioned/chunks/chunk.GI6GBMRK.js +1 -1
- package/cdn-versioned/chunks/chunk.I6KWEJL5.js +1 -1
- package/cdn-versioned/chunks/chunk.JE65MGDL.js +1 -1
- package/cdn-versioned/chunks/chunk.KHK74CJA.js +1 -1
- package/cdn-versioned/chunks/chunk.KT6CS7MB.js +1 -1
- package/cdn-versioned/chunks/chunk.L5LJFTUA.js +1 -1
- package/cdn-versioned/chunks/chunk.LFTAVPYP.js +1 -1
- package/cdn-versioned/chunks/chunk.LKHCEWG6.js +2 -2
- package/cdn-versioned/chunks/chunk.MD77BZE7.js +1 -1
- package/cdn-versioned/chunks/chunk.MVMJOYL7.js +1 -1
- package/cdn-versioned/chunks/chunk.MX2AOQKK.js +1 -1
- package/cdn-versioned/chunks/chunk.N7DREP3X.js +1 -1
- package/cdn-versioned/chunks/chunk.NCSRAXCO.js +1 -1
- package/cdn-versioned/chunks/chunk.NJPQO7AM.js +1 -1
- package/cdn-versioned/chunks/chunk.O657MMFX.js +1 -1
- package/cdn-versioned/chunks/chunk.OJILWIHU.js +1 -1
- package/cdn-versioned/chunks/chunk.OYVDI4G4.js +3 -3
- package/cdn-versioned/chunks/chunk.QK2P72CA.js +1 -1
- package/cdn-versioned/chunks/chunk.RNVF7IN5.js +1 -1
- package/cdn-versioned/chunks/chunk.RORUJY5E.js +1 -1
- package/cdn-versioned/chunks/chunk.RWS4N2NC.js +1 -1
- package/cdn-versioned/chunks/chunk.SH5F4YM4.js +1 -1
- package/cdn-versioned/chunks/chunk.TTAYTI3M.js +1 -1
- package/cdn-versioned/chunks/chunk.UCPHLOPM.js +1 -1
- package/cdn-versioned/chunks/chunk.VHSIUWDX.js +1 -1
- package/cdn-versioned/chunks/chunk.VVLFNR53.js +1 -1
- package/cdn-versioned/chunks/chunk.VWVU4BWU.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WDX7NMBB.js +1 -1
- package/cdn-versioned/chunks/chunk.WRDPMPPA.js +1 -1
- package/cdn-versioned/chunks/chunk.XTSUFBWJ.js +1 -1
- package/cdn-versioned/chunks/{chunk.F3I2ZAJZ.js → chunk.Y2IK2VHT.js} +4 -4
- package/cdn-versioned/chunks/chunk.YHWKY6MV.js +1 -1
- package/cdn-versioned/chunks/chunk.ZAYOIELL.js +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +2 -2
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +2 -2
- package/cdn-versioned/components/animation/animation.d.ts +2 -2
- package/cdn-versioned/components/audio/audio.d.ts +2 -2
- package/cdn-versioned/components/badge/badge.d.ts +2 -2
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +2 -2
- package/cdn-versioned/components/button-group/button-group.d.ts +2 -2
- package/cdn-versioned/components/carousel/carousel.d.ts +2 -2
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +2 -2
- package/cdn-versioned/components/checkbox/checkbox.d.ts +2 -2
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +2 -2
- package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +2 -2
- package/cdn-versioned/components/divider/divider.d.ts +2 -2
- package/cdn-versioned/components/drawer/drawer.d.ts +2 -2
- package/cdn-versioned/components/dropdown/dropdown.d.ts +2 -2
- package/cdn-versioned/components/expandable/expandable.d.ts +2 -2
- package/cdn-versioned/components/flipcard/flipcard.d.ts +2 -2
- package/cdn-versioned/components/header/header.d.ts +2 -2
- package/cdn-versioned/components/icon/icon.d.ts +2 -2
- package/cdn-versioned/components/include/include.d.ts +2 -2
- package/cdn-versioned/components/input/input.d.ts +2 -2
- package/cdn-versioned/components/link/link.d.ts +2 -2
- package/cdn-versioned/components/map-marker/map-marker.d.ts +2 -2
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +2 -2
- package/cdn-versioned/components/notification/notification.d.ts +2 -2
- package/cdn-versioned/components/optgroup/optgroup.d.ts +3 -3
- package/cdn-versioned/components/option/option.d.ts +2 -2
- package/cdn-versioned/components/popup/popup.d.ts +2 -2
- package/cdn-versioned/components/quickfact/quickfact.d.ts +2 -2
- package/cdn-versioned/components/radio/radio.d.ts +2 -2
- package/cdn-versioned/components/radio-button/radio-button.d.ts +2 -2
- package/cdn-versioned/components/radio-group/radio-group.d.ts +3 -3
- package/cdn-versioned/components/scrollable/scrollable.d.ts +2 -2
- package/cdn-versioned/components/select/select.d.ts +4 -4
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +2 -2
- package/cdn-versioned/components/step/step.d.ts +2 -2
- package/cdn-versioned/components/step-group/step-group.d.ts +2 -2
- package/cdn-versioned/components/switch/switch.d.ts +2 -2
- package/cdn-versioned/components/tab/tab.d.ts +2 -2
- package/cdn-versioned/components/tab-group/tab-group.d.ts +2 -2
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +2 -2
- package/cdn-versioned/components/tag/tag.d.ts +2 -2
- package/cdn-versioned/components/teaser/teaser.d.ts +1 -1
- package/cdn-versioned/components/teaser-media/teaser-media.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +2 -2
- package/cdn-versioned/components/tooltip/tooltip.d.ts +2 -2
- package/cdn-versioned/components/video/video.d.ts +2 -2
- package/cdn-versioned/custom-elements.json +218 -202
- package/cdn-versioned/internal/form.d.ts +1 -1
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/internal/longpress.d.ts +1 -1
- package/cdn-versioned/solid-components.bundle.js +17 -17
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +17 -17
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +80 -80
- package/cdn-versioned/web-types.json +143 -141
- package/dist/_components/menu/menu.d.ts +1 -1
- package/dist/_components/menu-item/menu-item.d.ts +1 -1
- package/dist/chunks/{chunk.XW3H7TX7.js → chunk.BPGRUHFA.js} +3 -3
- package/dist/chunks/{chunk.G6LYMXKT.js → chunk.HDX43J5W.js} +3 -3
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/components/animation/animation.d.ts +1 -1
- package/dist/components/audio/audio.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -1
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/expandable/expandable.d.ts +1 -1
- package/dist/components/flipcard/flipcard.d.ts +1 -1
- package/dist/components/header/header.d.ts +1 -1
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/include/include.d.ts +1 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/map-marker/map-marker.d.ts +1 -1
- package/dist/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/components/notification/notification.d.ts +1 -1
- package/dist/components/optgroup/optgroup.d.ts +1 -1
- package/dist/components/option/option.d.ts +1 -1
- package/dist/components/popup/popup.d.ts +1 -1
- package/dist/components/quickfact/quickfact.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio-button/radio-button.d.ts +1 -1
- package/dist/components/radio-group/radio-group.d.ts +1 -1
- package/dist/components/scrollable/scrollable.d.ts +1 -1
- package/dist/components/select/select.js +1 -1
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/step/step.d.ts +1 -1
- package/dist/components/step-group/step-group.d.ts +1 -1
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/tab/tab.d.ts +1 -1
- package/dist/components/tab-group/tab-group.d.ts +1 -1
- package/dist/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/teaser/teaser.d.ts +1 -1
- package/dist/components/teaser-media/teaser-media.d.ts +1 -1
- package/dist/components/textarea/textarea.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/video/video.d.ts +1 -1
- package/dist/custom-elements.json +17 -1
- package/dist/internal/form.d.ts +1 -1
- package/dist/internal/longpress.d.ts +1 -1
- package/dist/solid-components.js +5 -5
- package/dist/web-types.json +7 -5
- package/dist-versioned/_components/menu/menu.d.ts +1 -1
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/chunk.23WUCVW6.js +1 -1
- package/dist-versioned/chunks/chunk.2FWAXOB3.js +13 -13
- package/dist-versioned/chunks/chunk.336SOZQ7.js +2 -2
- package/dist-versioned/chunks/chunk.3IIJI2YI.js +2 -2
- package/dist-versioned/chunks/chunk.47Y6CRA6.js +1 -1
- package/dist-versioned/chunks/chunk.4LA6375U.js +5 -5
- package/dist-versioned/chunks/chunk.4NORTB4T.js +2 -2
- package/dist-versioned/chunks/chunk.5UXE3YAT.js +2 -2
- package/dist-versioned/chunks/chunk.5ZWBIPBJ.js +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6US5BJNM.js +2 -2
- package/dist-versioned/chunks/chunk.7JO5FCU4.js +3 -3
- package/dist-versioned/chunks/chunk.A7ETNRKR.js +2 -2
- package/dist-versioned/chunks/chunk.AFZXA6KB.js +13 -13
- package/dist-versioned/chunks/chunk.B2FZCDD2.js +2 -2
- package/dist-versioned/chunks/{chunk.XW3H7TX7.js → chunk.BPGRUHFA.js} +31 -31
- package/dist-versioned/chunks/chunk.BTN23KPO.js +1 -1
- package/dist-versioned/chunks/chunk.BZNIT6S5.js +1 -1
- package/dist-versioned/chunks/chunk.DHEEQPKB.js +3 -3
- package/dist-versioned/chunks/chunk.DID2HIGU.js +9 -9
- package/dist-versioned/chunks/chunk.DQUOULN6.js +2 -2
- package/dist-versioned/chunks/chunk.EYDGWH4T.js +1 -1
- package/dist-versioned/chunks/chunk.FAMYJDBN.js +2 -2
- package/dist-versioned/chunks/chunk.GMOZ5YXA.js +6 -6
- package/dist-versioned/chunks/chunk.GSDAOG7M.js +5 -5
- package/dist-versioned/chunks/chunk.GWYRJFJU.js +1 -1
- package/dist-versioned/chunks/{chunk.G6LYMXKT.js → chunk.HDX43J5W.js} +28 -28
- package/dist-versioned/chunks/chunk.KGZ3GBGJ.js +1 -1
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.LBHA2DC4.js +2 -2
- package/dist-versioned/chunks/chunk.MFJDLGGR.js +2 -2
- package/dist-versioned/chunks/chunk.NEZVEG7K.js +6 -6
- package/dist-versioned/chunks/chunk.NU62KGCW.js +4 -4
- package/dist-versioned/chunks/chunk.OZXJCMQU.js +2 -2
- package/dist-versioned/chunks/chunk.QDCDOA3O.js +1 -1
- package/dist-versioned/chunks/chunk.QEMNNDQN.js +5 -5
- package/dist-versioned/chunks/chunk.QZF3GDJ6.js +1 -1
- package/dist-versioned/chunks/chunk.R3AKTB5D.js +1 -1
- package/dist-versioned/chunks/chunk.REUL4QMO.js +1 -1
- package/dist-versioned/chunks/chunk.RGLEFOOR.js +3 -3
- package/dist-versioned/chunks/chunk.SWDIWUUU.js +3 -3
- package/dist-versioned/chunks/chunk.THY5BDBS.js +1 -1
- package/dist-versioned/chunks/chunk.TPF3IUIC.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UJYVSZ25.js +5 -5
- package/dist-versioned/chunks/chunk.V3JNM4K3.js +2 -2
- package/dist-versioned/chunks/chunk.VBMNECRY.js +5 -5
- package/dist-versioned/chunks/chunk.VX3KGPNB.js +2 -2
- package/dist-versioned/chunks/chunk.WLPV5EZN.js +11 -11
- package/dist-versioned/chunks/chunk.XVR2P4CC.js +3 -3
- package/dist-versioned/chunks/chunk.Y3F3Y4DX.js +2 -2
- package/dist-versioned/chunks/chunk.YA3KZ3ZS.js +5 -5
- package/dist-versioned/chunks/chunk.YFF7OIOH.js +1 -1
- package/dist-versioned/components/accordion/accordion.d.ts +2 -2
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +2 -2
- package/dist-versioned/components/animation/animation.d.ts +2 -2
- package/dist-versioned/components/audio/audio.d.ts +2 -2
- package/dist-versioned/components/badge/badge.d.ts +2 -2
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +2 -2
- package/dist-versioned/components/button-group/button-group.d.ts +2 -2
- package/dist-versioned/components/carousel/carousel.d.ts +2 -2
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +2 -2
- package/dist-versioned/components/checkbox/checkbox.d.ts +2 -2
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +2 -2
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/combobox/combobox.js +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +2 -2
- package/dist-versioned/components/divider/divider.d.ts +2 -2
- package/dist-versioned/components/drawer/drawer.d.ts +2 -2
- package/dist-versioned/components/dropdown/dropdown.d.ts +2 -2
- package/dist-versioned/components/expandable/expandable.d.ts +2 -2
- package/dist-versioned/components/flipcard/flipcard.d.ts +2 -2
- package/dist-versioned/components/header/header.d.ts +2 -2
- package/dist-versioned/components/icon/icon.d.ts +2 -2
- package/dist-versioned/components/include/include.d.ts +2 -2
- package/dist-versioned/components/input/input.d.ts +2 -2
- package/dist-versioned/components/link/link.d.ts +2 -2
- package/dist-versioned/components/map-marker/map-marker.d.ts +2 -2
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +2 -2
- package/dist-versioned/components/notification/notification.d.ts +2 -2
- package/dist-versioned/components/optgroup/optgroup.d.ts +3 -3
- package/dist-versioned/components/option/option.d.ts +2 -2
- package/dist-versioned/components/popup/popup.d.ts +2 -2
- package/dist-versioned/components/quickfact/quickfact.d.ts +2 -2
- package/dist-versioned/components/radio/radio.d.ts +2 -2
- package/dist-versioned/components/radio-button/radio-button.d.ts +2 -2
- package/dist-versioned/components/radio-group/radio-group.d.ts +3 -3
- package/dist-versioned/components/scrollable/scrollable.d.ts +2 -2
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/select/select.js +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +2 -2
- package/dist-versioned/components/step/step.d.ts +2 -2
- package/dist-versioned/components/step-group/step-group.d.ts +2 -2
- package/dist-versioned/components/switch/switch.d.ts +2 -2
- package/dist-versioned/components/tab/tab.d.ts +2 -2
- package/dist-versioned/components/tab-group/tab-group.d.ts +2 -2
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +2 -2
- package/dist-versioned/components/tag/tag.d.ts +2 -2
- package/dist-versioned/components/teaser/teaser.d.ts +1 -1
- package/dist-versioned/components/teaser-media/teaser-media.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +2 -2
- package/dist-versioned/components/tooltip/tooltip.d.ts +2 -2
- package/dist-versioned/components/video/video.d.ts +2 -2
- package/dist-versioned/custom-elements.json +218 -202
- package/dist-versioned/internal/form.d.ts +1 -1
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/internal/longpress.d.ts +1 -1
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +5 -5
- package/dist-versioned/vscode.html-custom-data.json +80 -80
- package/dist-versioned/web-types.json +143 -141
- package/package.json +2 -1
- package/cdn/chunks/chunk.ANSLHQOM.js +0 -11
- package/cdn/chunks/chunk.UH4KE6MR.js +0 -0
- package/cdn-versioned/chunks/chunk.ANSLHQOM.js +0 -11
- package/cdn-versioned/chunks/chunk.UH4KE6MR.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{a as c}from"./chunk.6HO6CE4A.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as d,b as a,d as h,h as l}from"./chunk.ERIS2E6E.js";import{b as p,e as r}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new c(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}setVideoInert(t){var s,n;t?(s=this.video)==null||s.setAttribute("inert",""):(n=this.video)==null||n.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.fadeoutPoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var s;(s=this.video)==null||s.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return r`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${o(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${o(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline")}"><slot name="play-icon" part="play-icon" class="${o(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-4-0-
|
1
|
+
import{a as c}from"./chunk.6HO6CE4A.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as d,b as a,d as h,h as l}from"./chunk.ERIS2E6E.js";import{b as p,e as r}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new c(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}setVideoInert(t){var s,n;t?(s=this.video)==null||s.setAttribute("inert",""):(n=this.video)==null||n.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.fadeoutPoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var s;(s=this.video)==null||s.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return r`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${o(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${o(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline")}"><slot name="play-icon" part="play-icon" class="${o(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-4-0-3-icon id="default-play-icon" library="system" name="start"></sd-4-0-3-icon></slot></div></button> ${this.hasSlotController.test("poster")?r`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>`:null}<slot></slot></div>`}};e.styles=[...l.styles,p`:host{display:inline-block;overflow:hidden;position:relative}.play-pause-transition,::slotted([slot=poster]){transition-duration:.3s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}::slotted([slot=poster]){left:var(--sd-spacing-0,0);position:absolute;top:var(--sd-spacing-0,0);width:100%;z-index:10}#default-play-icon,::slotted([slot=play-icon]){left:50%;position:absolute;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}`],i([h("[part=base]")],e.prototype,"hostEl",2),i([a({type:Boolean,reflect:!0})],e.prototype,"playing",2),i([a({type:Boolean})],e.prototype,"isBelowBreakpoint",2),e=i([d("sd-4-0-3-video")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.ERIS2E6E.js";import{b as d,e as i}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.hasSlotController=new c(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(r){if(this.disabled){r.preventDefault(),r.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("[default]"),o=this.hasSlotController.test("icon"),m=`${this.size}-${r?"label":"no-label"}`;return i`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${n("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 border-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",r&&"px-4",this.hasFocus&&"focused-class",r&&"button--has-label",o&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${n(o&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!o}"></slot>${r?i`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...l.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-
|
1
|
+
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.ERIS2E6E.js";import{b as d,e as i}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.hasSlotController=new c(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(r){if(this.disabled){r.preventDefault(),r.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("[default]"),o=this.hasSlotController.test("icon"),m=`${this.size}-${r?"label":"no-label"}`;return i`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${n("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 border-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",r&&"px-4",this.hasFocus&&"focused-class",r&&"button--has-label",o&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${n(o&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!o}"></slot>${r?i`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...l.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-3-button-group__button--first:not(.sd-4-0-3-button-group__button--last)) button{border-bottom-right-radius:var(--sd-border-radius-none,0);border-top-right-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-3-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-3-button-group__button--last:not(.sd-4-0-3-button-group__button--first)) button{border-bottom-left-radius:var(--sd-border-radius-none,0);border-top-left-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-3-button-group__button:not(.sd-4-0-3-button-group__button--first)){margin-inline-start:-1px}:host(.sd-4-0-3-button-group__button--hover){z-index:10}:host(.sd-4-0-3-button-group__button--focus),:host(.sd-4-0-3-button-group__button[checked]){z-index:20}`],e([a(".button")],t.prototype,"input",2),e([a(".hidden-input")],t.prototype,"hiddenInput",2),e([b()],t.prototype,"hasFocus",2),e([s({reflect:!0})],t.prototype,"size",2),e([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s({type:Boolean,reflect:!0})],t.prototype,"checked",2),e([s()],t.prototype,"value",2),e([h("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([u("sd-4-0-3-radio-button")],t);export{t as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{a as k,b as l,c as H}from"./chunk.SPDB3L7V.js";import{a as M}from"./chunk.TWZDCIM2.js";import{a as T,b as L,c as u}from"./chunk.5YRTJVAZ.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as x,b as o,c as C,h as f}from"./chunk.ERIS2E6E.js";import{b,e as y,h as w,i as m}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var i=class extends H{constructor(e){if(super(e),this.it=m,e.type!==k.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===w)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var N=l(i);var a=class extends i{};a.directiveName="unsafeSVG",a.resultType=2;var A=l(a);var d,t=class extends f{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),T(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),L(this)}getUrl(){let r=u(this.library);return this.name&&r?r.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var v;let r=u(this.library),n=this.getUrl();if(d||(d=new DOMParser),n)try{let c=await M(n);if(n===this.getUrl())if(c.ok){let h=d.parseFromString(c.svg,"text/html").body.querySelector("svg");h!==null?((v=r==null?void 0:r.mutator)==null||v.call(r,h),this.svg=h.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(c){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return y`${A(this.svg)}`}};t.styles=[...f.styles,b`:host{box-sizing:content-box!important;display:inline-block;height:1em;width:1em}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity,1))}:host([color=white]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity,1))}`],s([C()],t.prototype,"svg",2),s([o({reflect:!0})],t.prototype,"name",2),s([o()],t.prototype,"src",2),s([o()],t.prototype,"label",2),s([o({reflect:!0})],t.prototype,"library",2),s([o({reflect:!0})],t.prototype,"color",2),s([p("label")],t.prototype,"handleLabelChange",1),s([p(["name","src","library"])],t.prototype,"setIcon",1),t=s([x("sd-4-0-
|
1
|
+
import{a as k,b as l,c as H}from"./chunk.SPDB3L7V.js";import{a as M}from"./chunk.TWZDCIM2.js";import{a as T,b as L,c as u}from"./chunk.5YRTJVAZ.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as x,b as o,c as C,h as f}from"./chunk.ERIS2E6E.js";import{b,e as y,h as w,i as m}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var i=class extends H{constructor(e){if(super(e),this.it=m,e.type!==k.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===w)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var N=l(i);var a=class extends i{};a.directiveName="unsafeSVG",a.resultType=2;var A=l(a);var d,t=class extends f{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),T(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),L(this)}getUrl(){let r=u(this.library);return this.name&&r?r.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var v;let r=u(this.library),n=this.getUrl();if(d||(d=new DOMParser),n)try{let c=await M(n);if(n===this.getUrl())if(c.ok){let h=d.parseFromString(c.svg,"text/html").body.querySelector("svg");h!==null?((v=r==null?void 0:r.mutator)==null||v.call(r,h),this.svg=h.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(c){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return y`${A(this.svg)}`}};t.styles=[...f.styles,b`:host{box-sizing:content-box!important;display:inline-block;height:1em;width:1em}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity,1))}:host([color=white]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity,1))}`],s([C()],t.prototype,"svg",2),s([o({reflect:!0})],t.prototype,"name",2),s([o()],t.prototype,"src",2),s([o()],t.prototype,"label",2),s([o({reflect:!0})],t.prototype,"library",2),s([o({reflect:!0})],t.prototype,"color",2),s([p("label")],t.prototype,"handleLabelChange",1),s([p(["name","src","library"])],t.prototype,"setIcon",1),t=s([x("sd-4-0-3-icon")],t);export{N as a,t as b};
|
2
2
|
/*! Bundled license information:
|
3
3
|
|
4
4
|
lit-html/directives/unsafe-html.js:
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import{a as T}from"./chunk.CBQWVOOS.js";import{a as k}from"./chunk.EUGX6XW6.js";import{a as _}from"./chunk.WDX7NMBB.js";import{c as M}from"./chunk.RQYP7MH5.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as $}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as E,b as g,c as f,d as v,e as A,h as P}from"./chunk.ERIS2E6E.js";import{b as S,e as b}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";function C(h,d,e){let i=t=>Object.is(t,-0)?0:t;return h<d?i(d):h>e?i(e):i(h)}function*L(h,d){if(h!==void 0){let e=0;for(let i of h)yield d(i,e++)}}function*O(h,d,e=1){let i=d===void 0?0:h;d!=null||(d=h);for(let t=i;e>0?t<d:d<t;t+=e)yield t}var r=class extends P{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new T(this,()=>this.next());this.scrollController=new k(this);this.slides=this.getElementsByTagName("sd-4-0-
|
1
|
+
import{a as T}from"./chunk.CBQWVOOS.js";import{a as k}from"./chunk.EUGX6XW6.js";import{a as _}from"./chunk.WDX7NMBB.js";import{c as M}from"./chunk.RQYP7MH5.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as $}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as E,b as g,c as f,d as v,e as A,h as P}from"./chunk.ERIS2E6E.js";import{b as S,e as b}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";function C(h,d,e){let i=t=>Object.is(t,-0)?0:t;return h<d?i(d):h>e?i(e):i(h)}function*L(h,d){if(h!==void 0){let e=0;for(let i of h)yield d(i,e++)}}function*O(h,d,e=1){let i=d===void 0?0:h;d!=null||(d=h);for(let t=i;e>0?t<d:d<t;t+=e)yield t}var r=class extends P{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new T(this,()=>this.next());this.scrollController=new k(this);this.slides=this.getElementsByTagName("sd-4-0-3-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new $(this);this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>_.isCarouselItem(s)&&!s.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(e,i)=>{e.detail&&i.blur()}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-label",this.localize.term("carousel"));let e=new IntersectionObserver(i=>{i.forEach(t=>{this.intersectionObserverEntries.set(t.target,t);let s=t.target;s.toggleAttribute("inert",!t.isIntersecting),s.classList.toggle("--in-view",t.isIntersecting),s.setAttribute("aria-hidden",t.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=e,e.takeRecords().forEach(i=>{this.intersectionObserverEntries.set(i.target,i)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(){this.initializeSlides(),this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1})}getPageCount(e,i,t){return Math.ceil((e-i)/t)+1>0?Math.ceil((e-i)/t)+1:1}getCurrentPage(e,i,t,s){return Math.ceil((e-t)/s)-Math.ceil((e-t-i)/s)+1}getSlides({excludeClones:e=!0}={}){return[...this.slides].filter(i=>!e||!i.hasAttribute("data-clone"))}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){let i=e.target,t=this.localize.dir()==="rtl",s=i.closest('[part~="pagination-item"]')!==null,l=e.key==="ArrowDown"||!t&&e.key==="ArrowRight"||t&&e.key==="ArrowLeft",c=e.key==="ArrowUp"||!t&&e.key==="ArrowLeft"||t&&e.key==="ArrowRight";e.preventDefault(),c&&this.previous(),l&&this.next(),e.key==="Home"&&this.goToSlide(0),e.key==="End"&&this.goToSlide(this.getSlides().length-1),s&&this.updateComplete.then(()=>{var a;let u=(a=this.shadowRoot)==null?void 0:a.querySelector('[part~="pagination-item--active"]');u&&u.focus()})}}handleScrollEnd(){let e=this.getSlides(),t=[...this.intersectionObserverEntries.values()].find(s=>s.isIntersecting);if(this.loop&&(t!=null&&t.target.hasAttribute("data-clone"))){let s=Number(t.target.getAttribute("data-clone"));this.goToSlide(s,"auto");return}t&&(this.activeSlide=e.indexOf(t.target))}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var e,i;this.pausedAutoplay?(this.autoplayController.stop(),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(i=this.autoplayControls)==null||i.setAttribute("aria-pressed","true"))}initializeSlides(){let e=this.getSlides(),i=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((t,s)=>{i.unobserve(t),t.classList.remove("--in-view"),t.classList.remove("--is-active"),t.setAttribute("aria-label",this.localize.term("slideNum",s+1,e.length)),t.hasAttribute("data-clone")&&t.remove()}),this.loop){let t=this.slidesPerPage,s=e.slice(-t),l=e.slice(0,t);s.reverse().forEach((c,u)=>{let a=c.cloneNode(!0);a.setAttribute("data-clone",String(e.length-u-1)),this.prepend(a)}),l.forEach((c,u)=>{let a=c.cloneNode(!0);a.setAttribute("data-clone",String(u)),this.append(a)})}this.getSlides({excludeClones:!1}).forEach(t=>{i.observe(t)}),this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let e=this.getSlides();e.forEach((s,l)=>{s.classList.toggle("--is-active",l===this.activeSlide)});let i=this.getCurrentPage(e.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==i&&(this.currentPage=i),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}});let t=this.getPageCount(e.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>t&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){let e=this.getSlides({excludeClones:!1}),i=this.slidesPerMove;e.forEach((t,s)=>{Math.abs(s-i)%i===0?t.style.removeProperty("scroll-snap-align"):t.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(e="smooth"){let i=this.activeSlide||this.activeSlide-this.slidesPerMove,t=!1;for(;!t&&i>0;)i-=1,t=Math.abs(i-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,e):this.goToSlide(i,e)}next(e="smooth"){this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,e):this.loop&&this.nextTillFirst(e)}nextTillFirst(e="smooth"){for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,e);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(e,i="smooth"){let{slidesPerPage:t,loop:s,scrollContainer:l}=this,c=this.getSlides(),u=this.getSlides({excludeClones:!1}),a=(e+c.length)%c.length;this.activeSlide=a;let p=C(e+(s?t:0),0,u.length+1),y=u[p],w=l.getBoundingClientRect(),x=y.getBoundingClientRect();l.scrollTo({left:x.left-w.left+l.scrollLeft,top:x.top-w.top+l.scrollTop,behavior:M()?"auto":i}),this.activeSlide===c.length-1&&!this.loop?this.previousButton.focus({preventScroll:!0}):this.activeSlide===0&&!this.loop&&this.nextButton.focus({preventScroll:!0})}render(){let{scrollController:e,slidesPerMove:i}=this,t=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),s=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),l=this.loop||s>1,c=this.loop||s<t,u=this.localize.dir()==="ltr";return b`<div part="base" class="${n("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${n(`carousel__slides mb-6
|
2
2
|
grid max-h-full w-full items-center justify-items-center overflow-auto`,this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",`overscroll-x-contain grid-flow-col auto-rows-[100%]
|
3
|
-
snap-x snap-mandatory overflow-y-hidden`)}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" role="status" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${n("w-full flex items-center justify-center relative")}"><div part="navigation" class="${n("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!l}" class="${n("!mr-6 !rounded-sm sd-interactive",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-4-0-
|
3
|
+
snap-x snap-mandatory overflow-y-hidden`)}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" role="status" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${n("w-full flex items-center justify-center relative")}"><div part="navigation" class="${n("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!l}" class="${n("!mr-6 !rounded-sm sd-interactive",!l&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${l?"false":"true"}" @click="${l?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-4-0-3-icon class="${n("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${u?"chevron-down":"chevron-up"}"></sd-4-0-3-icon></slot></button> ${this.variant==="dot"?b`<div part="pagination-dot" role="tablist" class="${n("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${L(O(t),a=>{let p=a+1===s;return b`<button part="pagination-item ${p?"pagination-item--active":""}" class="${n("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",p?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${p?"true":"false"}" aria-label="${this.localize.term("goToSlide",a+1,t)}" @click="${y=>{this.goToSlide(a*i),this.unblockAutoplay(y,this.paginationItems[a])}}" @keydown="${this.handleKeyDown}"><span class="${n("h-4 w-4 block border hover:border-primary-500 rounded-full",this.inverted?"border-white hover:border-primary-500":"border-primary",p&&"bg-accent border-none",p?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:b`<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="${n("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${s}</span> <span part="pagination-divider" class="${n("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${n("w-5 text-center",this.inverted?"text-white":"text-black")}">${t}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!c}" class="${n("!ml-6 !rounded-sm sd-interactive ",!c&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${c?"false":"true"}" @click="${c?a=>{this.next(),this.unblockAutoplay(a,this.nextButton)}:null}"><slot name="next-icon"><sd-4-0-3-icon class="${n("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${u?"chevron-up":"chevron-down"}"></sd-4-0-3-icon></slot></button></div><button class="${n("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${a=>{this.pausedAutoplay=!this.pausedAutoplay,a.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${n(this.pausedAutoplay?"":"hidden")}"><sd-4-0-3-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-4-0-3-icon></slot><slot name="autoplay-pause" class="${n(this.pausedAutoplay?"hidden":"")}"><sd-4-0-3-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-4-0-3-icon></slot></button></div></div>`}};r.styles=[...P.styles,S`: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));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-4-0-3-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],o([v('[part~="autoplay-controls"]')],r.prototype,"autoplayControls",2),o([v('[part~="navigation-button--previous"]')],r.prototype,"previousButton",2),o([v('[part~="navigation-button--next"]')],r.prototype,"nextButton",2),o([A('[part~="pagination-item"]')],r.prototype,"paginationItems",2),o([g({type:String,reflect:!0})],r.prototype,"variant",2),o([g({type:Boolean,reflect:!0})],r.prototype,"inverted",2),o([g({type:Boolean,reflect:!0})],r.prototype,"loop",2),o([g({type:Boolean,reflect:!0})],r.prototype,"autoplay",2),o([g({type:Number,attribute:"slides-per-page"})],r.prototype,"slidesPerPage",2),o([g({type:Number,attribute:"slides-per-move"})],r.prototype,"slidesPerMove",2),o([v("slot:not([name])")],r.prototype,"defaultSlot",2),o([v(".carousel__slides")],r.prototype,"scrollContainer",2),o([v(".carousel__pagination")],r.prototype,"paginationContainer",2),o([f()],r.prototype,"activeSlide",2),o([f()],r.prototype,"currentPage",2),o([f()],r.prototype,"pausedAutoplay",2),o([m("pausedAutoplay")],r.prototype,"handlePausedAutoplay",1),o([m("loop",{waitUntilFirstUpdate:!0}),m("slidesPerPage",{waitUntilFirstUpdate:!0})],r.prototype,"initializeSlides",1),o([m("activeSlide")],r.prototype,"handleSlideChange",1),o([m("slidesPerMove")],r.prototype,"handleSlidesPerMoveChange",1),o([m("autoplay")],r.prototype,"handleAutoplayChange",1),r=o([E("sd-4-0-3-carousel")],r);export{r as a};
|
4
4
|
/*! Bundled license information:
|
5
5
|
|
6
6
|
lit-html/directives/map.js:
|
@@ -1 +1 @@
|
|
1
|
-
import{a as n}from"./chunk.DCOFYPWX.js";import{a as l,b as e,h as o}from"./chunk.ERIS2E6E.js";import{b as a,e as i}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return i`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,a`:host{margin:var(--sd-spacing-0,0)}:host(sd-4-0-
|
1
|
+
import{a as n}from"./chunk.DCOFYPWX.js";import{a as l,b as e,h as o}from"./chunk.ERIS2E6E.js";import{b as a,e as i}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return i`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,a`:host{margin:var(--sd-spacing-0,0)}:host(sd-4-0-3-divider[orientation=horizontal]){display:block}:host(sd-4-0-3-divider[orientation=vertical]){display:inline-block}`],r([e({reflect:!0})],t.prototype,"orientation",2),r([e({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=r([l("sd-4-0-3-divider")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as s}from"./chunk.HE2LNCWW.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.ERIS2E6E.js";import{b as l,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(a){a.code==="Enter"&&this.front===a.target&&this.flipFront()}handleBackKeydown(a){a.code==="Enter"&&this.back===a.target&&this.flipBack()}render(){return d`<div part="base" class="${r("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${r("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${r("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${r("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${r("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-4-0-
|
1
|
+
import{a as s}from"./chunk.HE2LNCWW.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.ERIS2E6E.js";import{b as l,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(a){a.code==="Enter"&&this.front===a.target&&this.flipFront()}handleBackKeydown(a){a.code==="Enter"&&this.back===a.target&&this.flipBack()}render(){return d`<div part="base" class="${r("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${r("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${r("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${r("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${r("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-4-0-3-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${r("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-4-0-3-icon library="system" name="reload" label="Flip to Back"></sd-4-0-3-icon></sd-4-0-3-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${s(this.activeSide==="front"||void 0)}" class="${r("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${r("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${r("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${r("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-4-0-3-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${r("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-4-0-3-icon library="system" name="reload" label="Flip to Front"></sd-4-0-3-icon></sd-4-0-3-button></div></div>`}};t.styles=[...n.styles,l`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],i([o('[part="front"]')],t.prototype,"front",2),i([o('[part="back"]')],t.prototype,"back",2),i([e({reflect:!0,attribute:"flip-direction"})],t.prototype,"flipDirection",2),i([e({reflect:!0})],t.prototype,"placement",2),i([e({type:String,reflect:!0,attribute:"front-variant"})],t.prototype,"frontVariant",2),i([e({type:String,reflect:!0,attribute:"back-variant"})],t.prototype,"backVariant",2),i([m()],t.prototype,"activeSide",2),t=i([c("sd-4-0-3-flipcard")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as Dt}from"./chunk.DCOFYPWX.js";import{a as kt,b as E,d as Et,h as Rt}from"./chunk.ERIS2E6E.js";import{b as Mt,e as Ot}from"./chunk.IRWHG2Q4.js";import{a as C,b as W,c as dt,e as b}from"./chunk.TJOCV4DC.js";var V=Math.min,T=Math.max,at=Math.round,ft=Math.floor,B=t=>({x:t,y:t}),ue={left:"right",right:"left",bottom:"top",top:"bottom"},he={start:"end",end:"start"};function pt(t,e,n){return T(t,V(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}function G(t){return["top","bottom"].includes(I(t))?"y":"x"}function wt(t){return Ct(G(t))}function Bt(t,e,n){n===void 0&&(n=!1);let i=Q(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=ct(r)),[r,ct(r)]}function Ft(t){let e=ct(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>he[e])}function de(t,e,n){let i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?s:r;default:return[]}}function $t(t,e,n,i){let o=Q(t),s=de(I(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function ct(t){return t.replace(/left|right|bottom|top/g,e=>ue[e])}function me(t){return C({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?me(t):{top:t,right:t,bottom:t,left:t}}function Z(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Nt(t,e,n){let{reference:i,floating:o}=t,s=G(e),r=wt(e),l=gt(r),a=I(e),c=s==="y",f=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,h;switch(a){case"top":h={x:f,y:i.y-o.height};break;case"bottom":h={x:f,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-o.width,y:u};break;default:h={x:i.x,y:i.y}}switch(Q(e)){case"start":h[r]-=m*(n&&c?-1:1);break;case"end":h[r]+=m*(n&&c?-1:1);break}return h}var Ht=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=Nt(c,i,a),m=i,h={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x,y:v,data:A,reset:O}=await g({x:f,y:u,initialPlacement:i,placement:m,strategy:o,middlewareData:h,rects:c,platform:r,elements:{reference:t,floating:e}});f=x!=null?x:f,u=v!=null?v:u,h=W(C({},h),{[w]:C(C({},h[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:f,y:u}=Nt(c,m,a)),p=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:h}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=J(e,t),d=Tt(h),w=l[m?u==="floating"?"reference":"floating":u],g=Z(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),x=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},O=Z(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:v,strategy:a}):x);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var Wt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:f=0}=J(t,e)||{};if(c==null)return{};let u=Tt(f),m={x:n,y:i},h=wt(o),d=gt(h),p=await r.getDimensions(c),w=h==="y",g=w?"top":"left",x=w?"bottom":"right",v=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[h]-m[h]-s.floating[d],O=m[h]-s.reference[h],M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),R=M?M[v]:0;(!R||!await(r.isElement==null?void 0:r.isElement(M)))&&(R=l.floating[v]||s.floating[d]);let j=A/2-O/2,N=R/2-p[d]/2-1,k=V(u[g],N),q=V(u[x],N),H=k,X=R-p[d]-q,L=R/2-p[d]/2+j,D=pt(H,L,X),it=!a.arrow&&Q(o)!=null&&L!==D&&s.reference[d]/2-(L<H?k:q)-p[d]/2<0,_=it?L<H?L-H:L-X:0;return{[h]:m[h]+_,data:C({[h]:D,centerOffset:L-D-_},it&&{alignmentOffset:_}),reset:it}}});var Vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=e,L=J(t,e),{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=L,w=dt(L,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),x=G(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[ct(l)]:Ft(l)),M=d!=="none";!m&&M&&O.push(...$t(l,p,d,A));let R=[l,...O],j=await yt(e,w),N=[],k=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&N.push(j[g]),u){let D=Bt(o,r,A);N.push(j[D[0]],j[D[1]])}if(k=[...k,{placement:o,overflows:N}],!N.every(D=>D<=0)){var q,H;let D=(((q=s.flip)==null?void 0:q.index)||0)+1,it=R[D];if(it)return{data:{index:D,overflows:k},reset:{placement:it}};let _=(H=k.filter(ot=>ot.overflows[0]<=0).sort((ot,U)=>ot.overflows[1]-U.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(h){case"bestFit":{var X;let ot=(X=k.filter(U=>{if(M){let K=G(U.placement);return K===x||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,fe)=>K+fe,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:X[0];ot&&(_=ot);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function pe(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=I(n),l=Q(n),a=G(n)==="y",c=["left","top"].includes(r)?-1:1,f=s&&a?-1:1,u=J(e,t),{mainAxis:m,crossAxis:h,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof d=="number"&&(h=l==="end"?d*-1:d),a?{x:h*f,y:m*c}:{x:m*c,y:h*f}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,a=await pe(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:W(C({},a),{placement:r})}}}},_t=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=J(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x,y:v}=g;return{x,y:v}}}}=w,a=dt(w,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},f=await yt(e,a),u=G(I(o)),m=Ct(u),h=c[m],d=c[u];if(s){let g=m==="y"?"top":"left",x=m==="y"?"bottom":"right",v=h+f[g],A=h-f[x];h=pt(v,h,A)}if(r){let g=u==="y"?"top":"left",x=u==="y"?"bottom":"right",v=d+f[g],A=d-f[x];d=pt(v,d,A)}let p=l.fn(W(C({},e),{[m]:h,[u]:d}));return W(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[u]:r}}})}}};var It=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,k=J(t,e),{apply:a=()=>{}}=k,c=dt(k,["apply"]),f=await yt(e,c),u=I(o),m=Q(o),h=G(o)==="y",{width:d,height:p}=s.floating,w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");let x=p-f.top-f.bottom,v=d-f.left-f.right,A=V(p-f[w],x),O=V(d-f[g],v),M=!e.middlewareData.shift,R=A,j=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=x),M&&!m){let q=T(f.left,0),H=T(f.right,0),X=T(f.top,0),L=T(f.bottom,0);h?j=d-2*(q!==0||H!==0?q+H:T(f.left,f.right)):R=p-2*(X!==0||L!==0?X+L:T(f.top,f.bottom))}await a(W(C({},e),{availableWidth:j,availableHeight:R}));let N=await r.getDimensions(l.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function tt(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function F(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return xt()?t instanceof Node||t instanceof P(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof P(t).Element:!1}function $(t){return xt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function Xt(t){return["table","td","th"].includes(tt(t))}function ut(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(n){return!1}})}function vt(t){let e=bt(),n=z(t)?S(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Ut(t){let e=Y(t);for(;$(e)&&!et(e);){if(vt(e))return e;if(ut(e))return null;e=Y(e)}return null}function bt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(tt(t))}function S(t){return P(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Y(t){if(tt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||F(t);return Yt(e)?e.host:e}function Kt(t){let e=Y(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&st(e)?e:Kt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Kt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=P(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){let e=S(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=$(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=at(n)!==s||at(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Lt(t){return z(t)?t:t.contextElement}function lt(t){let e=Lt(t);if(!$(e))return B(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=Qt(e),r=(s?at(n.width):n.width)/i,l=(s?at(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var ge=B(0);function Zt(t){let e=P(t);return!bt()||!e.visualViewport?ge:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function we(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function nt(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Lt(t),r=B(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=we(s,n,i)?Zt(s):B(0),a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,f=o.width/r.x,u=o.height/r.y;if(s){let m=P(s),h=i&&z(i)?P(i):i,d=m,p=At(d);for(;p&&i&&h!==d;){let w=lt(p),g=p.getBoundingClientRect(),x=S(p),v=g.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,u*=w.y,a+=v,c+=A,d=P(p),p=At(d)}}return Z({width:f,height:u,x:a,y:c})}function zt(t,e){let n=ht(t).scrollLeft;return e?e.left+n:nt(F(t)).left+n}function te(t,e,n){n===void 0&&(n=!1);let i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:zt(t,i)),s=i.top+e.scrollTop;return{x:o,y:s}}function ye(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=F(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=B(1),f=B(0),u=$(i);if((u||!u&&!s)&&((tt(i)!=="body"||st(r))&&(a=ht(i)),$(i))){let h=nt(i);c=lt(i),f.x=h.x+i.clientLeft,f.y=h.y+i.clientTop}let m=r&&!u&&!s?te(r,a,!0):B(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-a.scrollTop*c.y+f.y+m.y}}function xe(t){return Array.from(t.getClientRects())}function ve(t){let e=F(t),n=ht(t),i=t.ownerDocument.body,o=T(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=T(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return S(i).direction==="rtl"&&(r+=T(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function be(t,e){let n=P(t),i=F(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;let c=bt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Ae(t,e){let n=nt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=$(t)?lt(t):B(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Gt(t,e,n){let i;if(e==="viewport")i=be(t,n);else if(e==="document")i=ve(F(t));else if(z(e))i=Ae(e,n);else{let o=Zt(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Z(i)}function ee(t,e){let n=Y(t);return n===e||!z(n)||et(n)?!1:S(n).position==="fixed"||ee(n,e)}function Oe(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&tt(l)!=="body"),o=null,s=S(t).position==="fixed",r=s?Y(t):t;for(;z(r)&&!et(r);){let l=S(r),a=vt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(r)&&!a&&ee(t,r))?i=i.filter(f=>f!==r):o=l,r=Y(r)}return e.set(t,i),i}function Ee(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Oe(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let u=Gt(e,f,o);return c.top=T(u.top,c.top),c.right=V(u.right,c.right),c.bottom=V(u.bottom,c.bottom),c.left=T(u.left,c.left),c},Gt(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Re(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Ce(t,e,n){let i=$(e),o=F(e),s=n==="fixed",r=nt(t,!0,s,e),l={scrollLeft:0,scrollTop:0},a=B(0);if(i||!i&&!s)if((tt(e)!=="body"||st(o))&&(l=ht(e)),i){let m=nt(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else o&&(a.x=zt(o));let c=o&&!i&&!s?te(o,l):B(0),f=r.left+l.scrollLeft-a.x-c.x,u=r.top+l.scrollTop-a.y-c.y;return{x:f,y:u,width:r.width,height:r.height}}function Pt(t){return S(t).position==="static"}function Jt(t,e){if(!$(t)||S(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return F(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=P(t);if(ut(t))return n;if(!$(t)){let o=Y(t);for(;o&&!et(o);){if(z(o)&&!Pt(o))return o;o=Y(o)}return n}let i=Jt(t,e);for(;i&&Xt(i)&&Pt(i);)i=Jt(i,e);return i&&et(i)&&Pt(i)&&!vt(i)?n:i||Ut(t)||n}var Te=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,i=await n(t.floating);return{reference:Ce(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Pe(t){return S(t).direction==="rtl"}var Le={convertOffsetParentRelativeRectToViewportRelativeRect:ye,getDocumentElement:F,getClippingRect:Ee,getOffsetParent:ne,getElementRects:Te,getClientRects:xe,getDimensions:Re,getScale:lt,isElement:z,isRTL:Pe};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ze(t,e){let n=null,i,o=F(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();let c=t.getBoundingClientRect(),{left:f,top:u,width:m,height:h}=c;if(l||e(),!m||!h)return;let d=ft(u),p=ft(o.clientWidth-(f+m)),w=ft(o.clientHeight-(u+h)),g=ft(f),v={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:T(0,V(1,a))||1},A=!0;function O(M){let R=M[0].intersectionRatio;if(R!==a){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!ie(c,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,W(C({},v),{root:o.ownerDocument}))}catch(M){n=new IntersectionObserver(O,v)}n.observe(t)}return r(!0),s}function oe(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=Lt(t),f=o||s?[...c?rt(c):[],...rt(e)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let u=c&&l?ze(c,n):null,m=-1,h=null;r&&(h=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),n()}),c&&!a&&h.observe(c),h.observe(e));let d,p=a?nt(t):null;a&&w();function w(){let g=nt(t);p&&!ie(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(d)}}var re=jt;var se=_t,le=Vt,St=It;var ce=Wt;var ae=(t,e,n)=>{let i=new Map,o=C({platform:Le},n),s=W(C({},o.platform),{_c:i});return Ht(t,e,W(C({},o),{platform:s}))};var y=class extends Rt{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=oe(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[re({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(St({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(le({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(se({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(St({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ce({element:this.arrowEl,padding:this.arrowPadding})),ae(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let c=s.arrow.x,f=s.arrow.y,u="",m="",h="",d="";if(this.arrowPlacement==="start"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",h=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof c=="number"?`${c}px`:"",u=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:u,right:m,bottom:h,left:d,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Ot`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Ot`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};y.styles=[...Rt.styles,Mt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],b([Et('[part="popup"]')],y.prototype,"popup",2),b([Et('[part="arrow"]')],y.prototype,"arrowEl",2),b([E()],y.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],y.prototype,"active",2),b([E({reflect:!0})],y.prototype,"placement",2),b([E({reflect:!0})],y.prototype,"strategy",2),b([E({type:Number})],y.prototype,"distance",2),b([E({type:Number})],y.prototype,"skidding",2),b([E({type:Boolean})],y.prototype,"arrow",2),b([E({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",2),b([E({type:Boolean})],y.prototype,"flip",2),b([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],y.prototype,"flipFallbackPlacements",2),b([E({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",2),b([E({type:Object})],y.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",2),b([E({type:Boolean})],y.prototype,"shift",2),b([E({type:Object})],y.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",2),b([E({attribute:"auto-size"})],y.prototype,"autoSize",2),b([E()],y.prototype,"sync",2),b([E({type:Object})],y.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",2),y=b([kt("sd-4-0-1-popup")],y);export{y as a};
|
1
|
+
import{a as Dt}from"./chunk.DCOFYPWX.js";import{a as kt,b as E,d as Et,h as Rt}from"./chunk.ERIS2E6E.js";import{b as Mt,e as Ot}from"./chunk.IRWHG2Q4.js";import{a as C,b as W,c as dt,e as b}from"./chunk.TJOCV4DC.js";var V=Math.min,T=Math.max,at=Math.round,ft=Math.floor,B=t=>({x:t,y:t}),ue={left:"right",right:"left",bottom:"top",top:"bottom"},he={start:"end",end:"start"};function pt(t,e,n){return T(t,V(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}function G(t){return["top","bottom"].includes(I(t))?"y":"x"}function wt(t){return Ct(G(t))}function Bt(t,e,n){n===void 0&&(n=!1);let i=Q(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=ct(r)),[r,ct(r)]}function Ft(t){let e=ct(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>he[e])}function de(t,e,n){let i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?s:r;default:return[]}}function $t(t,e,n,i){let o=Q(t),s=de(I(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function ct(t){return t.replace(/left|right|bottom|top/g,e=>ue[e])}function me(t){return C({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?me(t):{top:t,right:t,bottom:t,left:t}}function Z(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Nt(t,e,n){let{reference:i,floating:o}=t,s=G(e),r=wt(e),l=gt(r),a=I(e),c=s==="y",f=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,h;switch(a){case"top":h={x:f,y:i.y-o.height};break;case"bottom":h={x:f,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-o.width,y:u};break;default:h={x:i.x,y:i.y}}switch(Q(e)){case"start":h[r]-=m*(n&&c?-1:1);break;case"end":h[r]+=m*(n&&c?-1:1);break}return h}var Ht=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=Nt(c,i,a),m=i,h={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x,y:v,data:A,reset:O}=await g({x:f,y:u,initialPlacement:i,placement:m,strategy:o,middlewareData:h,rects:c,platform:r,elements:{reference:t,floating:e}});f=x!=null?x:f,u=v!=null?v:u,h=W(C({},h),{[w]:C(C({},h[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:f,y:u}=Nt(c,m,a)),p=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:h}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=J(e,t),d=Tt(h),w=l[m?u==="floating"?"reference":"floating":u],g=Z(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),x=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},O=Z(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:v,strategy:a}):x);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var Wt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:f=0}=J(t,e)||{};if(c==null)return{};let u=Tt(f),m={x:n,y:i},h=wt(o),d=gt(h),p=await r.getDimensions(c),w=h==="y",g=w?"top":"left",x=w?"bottom":"right",v=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[h]-m[h]-s.floating[d],O=m[h]-s.reference[h],M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),R=M?M[v]:0;(!R||!await(r.isElement==null?void 0:r.isElement(M)))&&(R=l.floating[v]||s.floating[d]);let j=A/2-O/2,N=R/2-p[d]/2-1,k=V(u[g],N),q=V(u[x],N),H=k,X=R-p[d]-q,L=R/2-p[d]/2+j,D=pt(H,L,X),it=!a.arrow&&Q(o)!=null&&L!==D&&s.reference[d]/2-(L<H?k:q)-p[d]/2<0,_=it?L<H?L-H:L-X:0;return{[h]:m[h]+_,data:C({[h]:D,centerOffset:L-D-_},it&&{alignmentOffset:_}),reset:it}}});var Vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=e,L=J(t,e),{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=L,w=dt(L,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),x=G(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[ct(l)]:Ft(l)),M=d!=="none";!m&&M&&O.push(...$t(l,p,d,A));let R=[l,...O],j=await yt(e,w),N=[],k=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&N.push(j[g]),u){let D=Bt(o,r,A);N.push(j[D[0]],j[D[1]])}if(k=[...k,{placement:o,overflows:N}],!N.every(D=>D<=0)){var q,H;let D=(((q=s.flip)==null?void 0:q.index)||0)+1,it=R[D];if(it)return{data:{index:D,overflows:k},reset:{placement:it}};let _=(H=k.filter(ot=>ot.overflows[0]<=0).sort((ot,U)=>ot.overflows[1]-U.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(h){case"bestFit":{var X;let ot=(X=k.filter(U=>{if(M){let K=G(U.placement);return K===x||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,fe)=>K+fe,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:X[0];ot&&(_=ot);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function pe(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=I(n),l=Q(n),a=G(n)==="y",c=["left","top"].includes(r)?-1:1,f=s&&a?-1:1,u=J(e,t),{mainAxis:m,crossAxis:h,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof d=="number"&&(h=l==="end"?d*-1:d),a?{x:h*f,y:m*c}:{x:m*c,y:h*f}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,a=await pe(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:W(C({},a),{placement:r})}}}},_t=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=J(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x,y:v}=g;return{x,y:v}}}}=w,a=dt(w,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},f=await yt(e,a),u=G(I(o)),m=Ct(u),h=c[m],d=c[u];if(s){let g=m==="y"?"top":"left",x=m==="y"?"bottom":"right",v=h+f[g],A=h-f[x];h=pt(v,h,A)}if(r){let g=u==="y"?"top":"left",x=u==="y"?"bottom":"right",v=d+f[g],A=d-f[x];d=pt(v,d,A)}let p=l.fn(W(C({},e),{[m]:h,[u]:d}));return W(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[u]:r}}})}}};var It=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,k=J(t,e),{apply:a=()=>{}}=k,c=dt(k,["apply"]),f=await yt(e,c),u=I(o),m=Q(o),h=G(o)==="y",{width:d,height:p}=s.floating,w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");let x=p-f.top-f.bottom,v=d-f.left-f.right,A=V(p-f[w],x),O=V(d-f[g],v),M=!e.middlewareData.shift,R=A,j=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=x),M&&!m){let q=T(f.left,0),H=T(f.right,0),X=T(f.top,0),L=T(f.bottom,0);h?j=d-2*(q!==0||H!==0?q+H:T(f.left,f.right)):R=p-2*(X!==0||L!==0?X+L:T(f.top,f.bottom))}await a(W(C({},e),{availableWidth:j,availableHeight:R}));let N=await r.getDimensions(l.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function tt(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function F(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return xt()?t instanceof Node||t instanceof P(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof P(t).Element:!1}function $(t){return xt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function Xt(t){return["table","td","th"].includes(tt(t))}function ut(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(n){return!1}})}function vt(t){let e=bt(),n=z(t)?S(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Ut(t){let e=Y(t);for(;$(e)&&!et(e);){if(vt(e))return e;if(ut(e))return null;e=Y(e)}return null}function bt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(tt(t))}function S(t){return P(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Y(t){if(tt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||F(t);return Yt(e)?e.host:e}function Kt(t){let e=Y(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&st(e)?e:Kt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Kt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=P(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){let e=S(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=$(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=at(n)!==s||at(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Lt(t){return z(t)?t:t.contextElement}function lt(t){let e=Lt(t);if(!$(e))return B(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=Qt(e),r=(s?at(n.width):n.width)/i,l=(s?at(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var ge=B(0);function Zt(t){let e=P(t);return!bt()||!e.visualViewport?ge:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function we(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function nt(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Lt(t),r=B(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=we(s,n,i)?Zt(s):B(0),a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,f=o.width/r.x,u=o.height/r.y;if(s){let m=P(s),h=i&&z(i)?P(i):i,d=m,p=At(d);for(;p&&i&&h!==d;){let w=lt(p),g=p.getBoundingClientRect(),x=S(p),v=g.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,u*=w.y,a+=v,c+=A,d=P(p),p=At(d)}}return Z({width:f,height:u,x:a,y:c})}function zt(t,e){let n=ht(t).scrollLeft;return e?e.left+n:nt(F(t)).left+n}function te(t,e,n){n===void 0&&(n=!1);let i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:zt(t,i)),s=i.top+e.scrollTop;return{x:o,y:s}}function ye(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=F(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=B(1),f=B(0),u=$(i);if((u||!u&&!s)&&((tt(i)!=="body"||st(r))&&(a=ht(i)),$(i))){let h=nt(i);c=lt(i),f.x=h.x+i.clientLeft,f.y=h.y+i.clientTop}let m=r&&!u&&!s?te(r,a,!0):B(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-a.scrollTop*c.y+f.y+m.y}}function xe(t){return Array.from(t.getClientRects())}function ve(t){let e=F(t),n=ht(t),i=t.ownerDocument.body,o=T(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=T(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return S(i).direction==="rtl"&&(r+=T(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function be(t,e){let n=P(t),i=F(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;let c=bt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Ae(t,e){let n=nt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=$(t)?lt(t):B(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Gt(t,e,n){let i;if(e==="viewport")i=be(t,n);else if(e==="document")i=ve(F(t));else if(z(e))i=Ae(e,n);else{let o=Zt(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Z(i)}function ee(t,e){let n=Y(t);return n===e||!z(n)||et(n)?!1:S(n).position==="fixed"||ee(n,e)}function Oe(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&tt(l)!=="body"),o=null,s=S(t).position==="fixed",r=s?Y(t):t;for(;z(r)&&!et(r);){let l=S(r),a=vt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(r)&&!a&&ee(t,r))?i=i.filter(f=>f!==r):o=l,r=Y(r)}return e.set(t,i),i}function Ee(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Oe(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let u=Gt(e,f,o);return c.top=T(u.top,c.top),c.right=V(u.right,c.right),c.bottom=V(u.bottom,c.bottom),c.left=T(u.left,c.left),c},Gt(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Re(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Ce(t,e,n){let i=$(e),o=F(e),s=n==="fixed",r=nt(t,!0,s,e),l={scrollLeft:0,scrollTop:0},a=B(0);if(i||!i&&!s)if((tt(e)!=="body"||st(o))&&(l=ht(e)),i){let m=nt(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else o&&(a.x=zt(o));let c=o&&!i&&!s?te(o,l):B(0),f=r.left+l.scrollLeft-a.x-c.x,u=r.top+l.scrollTop-a.y-c.y;return{x:f,y:u,width:r.width,height:r.height}}function Pt(t){return S(t).position==="static"}function Jt(t,e){if(!$(t)||S(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return F(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=P(t);if(ut(t))return n;if(!$(t)){let o=Y(t);for(;o&&!et(o);){if(z(o)&&!Pt(o))return o;o=Y(o)}return n}let i=Jt(t,e);for(;i&&Xt(i)&&Pt(i);)i=Jt(i,e);return i&&et(i)&&Pt(i)&&!vt(i)?n:i||Ut(t)||n}var Te=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,i=await n(t.floating);return{reference:Ce(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Pe(t){return S(t).direction==="rtl"}var Le={convertOffsetParentRelativeRectToViewportRelativeRect:ye,getDocumentElement:F,getClippingRect:Ee,getOffsetParent:ne,getElementRects:Te,getClientRects:xe,getDimensions:Re,getScale:lt,isElement:z,isRTL:Pe};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ze(t,e){let n=null,i,o=F(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();let c=t.getBoundingClientRect(),{left:f,top:u,width:m,height:h}=c;if(l||e(),!m||!h)return;let d=ft(u),p=ft(o.clientWidth-(f+m)),w=ft(o.clientHeight-(u+h)),g=ft(f),v={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:T(0,V(1,a))||1},A=!0;function O(M){let R=M[0].intersectionRatio;if(R!==a){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!ie(c,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,W(C({},v),{root:o.ownerDocument}))}catch(M){n=new IntersectionObserver(O,v)}n.observe(t)}return r(!0),s}function oe(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=Lt(t),f=o||s?[...c?rt(c):[],...rt(e)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let u=c&&l?ze(c,n):null,m=-1,h=null;r&&(h=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),n()}),c&&!a&&h.observe(c),h.observe(e));let d,p=a?nt(t):null;a&&w();function w(){let g=nt(t);p&&!ie(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(d)}}var re=jt;var se=_t,le=Vt,St=It;var ce=Wt;var ae=(t,e,n)=>{let i=new Map,o=C({platform:Le},n),s=W(C({},o.platform),{_c:i});return Ht(t,e,W(C({},o),{platform:s}))};var y=class extends Rt{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=oe(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[re({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(St({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(le({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(se({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(St({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ce({element:this.arrowEl,padding:this.arrowPadding})),ae(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let c=s.arrow.x,f=s.arrow.y,u="",m="",h="",d="";if(this.arrowPlacement==="start"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",h=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof c=="number"?`${c}px`:"",u=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:u,right:m,bottom:h,left:d,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Ot`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Ot`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};y.styles=[...Rt.styles,Mt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],b([Et('[part="popup"]')],y.prototype,"popup",2),b([Et('[part="arrow"]')],y.prototype,"arrowEl",2),b([E()],y.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],y.prototype,"active",2),b([E({reflect:!0})],y.prototype,"placement",2),b([E({reflect:!0})],y.prototype,"strategy",2),b([E({type:Number})],y.prototype,"distance",2),b([E({type:Number})],y.prototype,"skidding",2),b([E({type:Boolean})],y.prototype,"arrow",2),b([E({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",2),b([E({type:Boolean})],y.prototype,"flip",2),b([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],y.prototype,"flipFallbackPlacements",2),b([E({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",2),b([E({type:Object})],y.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",2),b([E({type:Boolean})],y.prototype,"shift",2),b([E({type:Object})],y.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",2),b([E({attribute:"auto-size"})],y.prototype,"autoSize",2),b([E()],y.prototype,"sync",2),b([E({type:Object})],y.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",2),y=b([kt("sd-4-0-3-popup")],y);export{y as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as d,b as i,d as c,h as l}from"./chunk.ERIS2E6E.js";import{b as s,e as n}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var h=0,t=class extends l{constructor(){super(...arguments);this.attrId=++h;this.componentId=`sd-4-0-
|
1
|
+
import{a}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as d,b as i,d as c,h as l}from"./chunk.ERIS2E6E.js";import{b as s,e as n}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var h=0,t=class extends l{constructor(){super(...arguments);this.attrId=++h;this.componentId=`sd-4-0-3-tab-${this.attrId}`;this.hasSlotController=new b(this,"left");this.variant="default";this.active=!1;this.disabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(o){this.tab.focus(o)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let o={left:this.hasSlotController.test("left")};return n`<div part="base" class="${r("inline-flex min-w-max h-12 px-3 leading-none items-center justify-center whitespace-nowrap select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",this.variant==="container"&&" rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled?"opacity-50 !cursor-not-allowed":"hover:bg-neutral-200")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><slot name="left" class="${r(o.left&&"block pr-2",this.disabled?"text-neutral-500":"text-primary")}"></slot><slot class="${r(this.disabled?"text-neutral-500":"text-primary")}"></slot><div part="active-tab-indicator" class="${r((!this.active||this.disabled)&&"hidden","absolute bottom-0 h-1 bg-accent",this.variant==="default"?"w-full":"w-3/4 group-hover:w-full transition-all duration-200 ease-in-out")}"></div><div part="hover-bottom-border" class="${r(!this.active&&!this.disabled&&"absolute w-full h-0.25 bottom-0 border-b border-neutral-400 invisible group-hover:visible")}"></div></div>`}};t.styles=[...l.styles,s`:host{box-sizing:border-box;display:block}.tab--active-container-border:after{border-width:1px;content:"";height:100%;position:absolute;width:100%;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));border-bottom:none;border-radius:4px 4px 0 0}`],e([c("[part=base]")],t.prototype,"tab",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({reflect:!0})],t.prototype,"panel",2),e([a("active")],t.prototype,"handleActiveChange",1),e([a("disabled")],t.prototype,"handleDisabledChange",1),t=e([d("sd-4-0-3-tab")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as p,c as m}from"./chunk.A3DKF5BY.js";import{b as w}from"./chunk.5ZILM4TA.js";import{a as h,d,e as c}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as g}from"./chunk.26YUWEYR.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as y,b as n,d as a,h as l}from"./chunk.ERIS2E6E.js";import{b as f}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.localize=new g(this);this.open=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0",this.open&&(this.accordion.open=!0),this.accordionObserver=new MutationObserver(e=>{for(let s of e)s.type==="attributes"&&s.attributeName==="open"&&(this.accordion.open?this.show():this.hide())}),this.accordionObserver.observe(this.accordion,{attributes:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.accordionObserver)==null||e.disconnect()}handleSummaryClick(e){e.preventDefault(),this.open?this.hide():this.show()}handleSummaryKeyDown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.open?this.hide():this.show()),(e.key==="ArrowUp"||e.key==="ArrowLeft")&&(e.preventDefault(),this.hide()),(e.key==="ArrowDown"||e.key==="ArrowRight")&&(e.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.accordion.open=!0,this.emit("sd-show",{cancelable:!0}).defaultPrevented){this.open=!1,this.accordion.open=!1;return}await d(this.body),this.body.hidden=!1;let{keyframes:s,options:r}=m(this,"accordion.show",{dir:this.localize.dir()});await h(this.body,c(s,this.body.scrollHeight),r),this.body.style.height="auto",this.emit("sd-after-show")}else{if(this.emit("sd-hide",{cancelable:!0}).defaultPrevented){this.accordion.open=!0,this.open=!0;return}await d(this.body);let{keyframes:s,options:r}=m(this,"accordion.hide",{dir:this.localize.dir()});await h(this.body,c(s,this.body.scrollHeight),r),this.body.hidden=!0,this.body.style.height="auto",this.accordion.open=!1,this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}render(){return w`<details part="base" class="border-y border-neutral-400"><summary part="header" id="header" class="${o("flex text-base gap-4 font-bold items-center cursor-pointer select-none px-4 py-3 focus-visible:focus-outline text-primary hover:bg-neutral-200 relative group")}" aria-expanded="${this.open?"true":"false"}" aria-controls="content" tabindex="0" @click="${this.handleSummaryClick}" @keydown="${this.handleSummaryKeyDown}"><div part="summary-border" class="${o(!this.open&&"opacity-0","w-1 bg-accent absolute left-0 transition-all h-[calc(100%-16px)] group-hover:h-full")}"></div><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${o("flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",this.open&&"rotate-180")}"><slot name="expand-icon" class="${o(this.open&&"hidden")}"><sd-4-0-
|
1
|
+
import{a as p,c as m}from"./chunk.A3DKF5BY.js";import{b as w}from"./chunk.5ZILM4TA.js";import{a as h,d,e as c}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as g}from"./chunk.26YUWEYR.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as y,b as n,d as a,h as l}from"./chunk.ERIS2E6E.js";import{b as f}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.localize=new g(this);this.open=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0",this.open&&(this.accordion.open=!0),this.accordionObserver=new MutationObserver(e=>{for(let s of e)s.type==="attributes"&&s.attributeName==="open"&&(this.accordion.open?this.show():this.hide())}),this.accordionObserver.observe(this.accordion,{attributes:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.accordionObserver)==null||e.disconnect()}handleSummaryClick(e){e.preventDefault(),this.open?this.hide():this.show()}handleSummaryKeyDown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.open?this.hide():this.show()),(e.key==="ArrowUp"||e.key==="ArrowLeft")&&(e.preventDefault(),this.hide()),(e.key==="ArrowDown"||e.key==="ArrowRight")&&(e.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.accordion.open=!0,this.emit("sd-show",{cancelable:!0}).defaultPrevented){this.open=!1,this.accordion.open=!1;return}await d(this.body),this.body.hidden=!1;let{keyframes:s,options:r}=m(this,"accordion.show",{dir:this.localize.dir()});await h(this.body,c(s,this.body.scrollHeight),r),this.body.style.height="auto",this.emit("sd-after-show")}else{if(this.emit("sd-hide",{cancelable:!0}).defaultPrevented){this.accordion.open=!0,this.open=!0;return}await d(this.body);let{keyframes:s,options:r}=m(this,"accordion.hide",{dir:this.localize.dir()});await h(this.body,c(s,this.body.scrollHeight),r),this.body.hidden=!0,this.body.style.height="auto",this.accordion.open=!1,this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}render(){return w`<details part="base" class="border-y border-neutral-400"><summary part="header" id="header" class="${o("flex text-base gap-4 font-bold items-center cursor-pointer select-none px-4 py-3 focus-visible:focus-outline text-primary hover:bg-neutral-200 relative group")}" aria-expanded="${this.open?"true":"false"}" aria-controls="content" tabindex="0" @click="${this.handleSummaryClick}" @keydown="${this.handleSummaryKeyDown}"><div part="summary-border" class="${o(!this.open&&"opacity-0","w-1 bg-accent absolute left-0 transition-all h-[calc(100%-16px)] group-hover:h-full")}"></div><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${o("flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",this.open&&"rotate-180")}"><slot name="expand-icon" class="${o(this.open&&"hidden")}"><sd-4-0-3-icon library="system" name="chevron-down"></sd-4-0-3-icon></slot><slot name="collapse-icon" class="${o(!this.open&&"hidden")}"><sd-4-0-3-icon library="system" name="chevron-down"></sd-4-0-3-icon></slot></span></summary><div part="content" id="content" class="overflow-hidden"><slot part="content__slot" class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></details>`}};t.styles=[...l.styles,f`:host{display:block}`],i([a('[part="base"]')],t.prototype,"accordion",2),i([a('[part="header"]')],t.prototype,"header",2),i([a('[part="content"]')],t.prototype,"body",2),i([n({type:Boolean,reflect:!0})],t.prototype,"open",2),i([n()],t.prototype,"summary",2),i([b("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),t=i([y("sd-4-0-3-accordion")],t);p("accordion.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:300,easing:"ease"}});p("accordion.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:300,easing:"ease"}});export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as k}from"./chunk.X2O263YD.js";import{a as f,b as y}from"./chunk.3L472FD4.js";import{a as l,c as r}from"./chunk.A3DKF5BY.js";import{a,d}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as b,b as h,d as c,h as m}from"./chunk.ERIS2E6E.js";import{b as v,e as n}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var t=class extends m{constructor(){super(...arguments);this.hasSlotController=new x(this,"footer");this.localize=new w(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new k(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),f(this))}disconnectedCallback(){super.disconnectedCallback(),y(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let i=r(this,"dialog.denyClose",{dir:this.localize.dir()});a(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),f(this);let e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([d(this.dialog),d(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});let s=r(this,"dialog.show",{dir:this.localize.dir()}),i=r(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([a(this.panel,s.keyframes,s.options),a(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([d(this.dialog),d(this.overlay)]);let e=r(this,"dialog.hide",{dir:this.localize.dir()}),s=r(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([a(this.overlay,s.keyframes,s.options).then(()=>{this.overlay.hidden=!0}),a(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,y(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&setTimeout(()=>i.focus()),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}render(){return n`<div part="base" class="${p("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${p("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="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?n`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:n`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":n`<sd-4-0-
|
1
|
+
import{a as k}from"./chunk.X2O263YD.js";import{a as f,b as y}from"./chunk.3L472FD4.js";import{a as l,c as r}from"./chunk.A3DKF5BY.js";import{a,d}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as b,b as h,d as c,h as m}from"./chunk.ERIS2E6E.js";import{b as v,e as n}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var t=class extends m{constructor(){super(...arguments);this.hasSlotController=new x(this,"footer");this.localize=new w(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new k(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),f(this))}disconnectedCallback(){super.disconnectedCallback(),y(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let i=r(this,"dialog.denyClose",{dir:this.localize.dir()});a(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),f(this);let e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([d(this.dialog),d(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});let s=r(this,"dialog.show",{dir:this.localize.dir()}),i=r(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([a(this.panel,s.keyframes,s.options),a(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([d(this.dialog),d(this.overlay)]);let e=r(this,"dialog.hide",{dir:this.localize.dir()}),s=r(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([a(this.overlay,s.keyframes,s.options).then(()=>{this.overlay.hidden=!0}),a(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,y(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&setTimeout(()=>i.focus()),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}render(){return n`<div part="base" class="${p("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${p("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="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?n`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:n`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":n`<sd-4-0-3-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${p("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-4-0-3-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-0-3-icon></sd-4-0-3-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>`}};t.styles=[...m.styles,v`:host{--width:662px}[part=panel]{width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],o([c('[part="base"]')],t.prototype,"dialog",2),o([c('[part="panel"]')],t.prototype,"panel",2),o([c('[part="overlay"]')],t.prototype,"overlay",2),o([h({type:Boolean,reflect:!0})],t.prototype,"open",2),o([h({reflect:!0})],t.prototype,"headline",2),o([h({attribute:"no-close-button",type:Boolean,reflect:!0})],t.prototype,"noCloseButton",2),o([g("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),t=o([b("sd-4-0-3-dialog")],t);l("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});l("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});l("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});l("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});l("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as o}from"./chunk.MHWW3RZB.js";import{a as d,b as l,h as r}from"./chunk.ERIS2E6E.js";import{b as s,e as a}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var e;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(e){super.updated(e),e.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return a`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(e){e.target.assignedElements().length>0&&(this.refHeaderElement=e.currentTarget,this.setCalculatedHeightProperty())}};t.styles=[...r.styles,s`:host{display:block}:host([fixed]){left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:"";height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],i([l({reflect:!0,type:Boolean})],t.prototype,"fixed",2),i([o(100)],t.prototype,"onResize",1),t=i([d("sd-4-0-
|
1
|
+
import{a as o}from"./chunk.MHWW3RZB.js";import{a as d,b as l,h as r}from"./chunk.ERIS2E6E.js";import{b as s,e as a}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var e;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(e){super.updated(e),e.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return a`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(e){e.target.assignedElements().length>0&&(this.refHeaderElement=e.currentTarget,this.setCalculatedHeightProperty())}};t.styles=[...r.styles,s`:host{display:block}:host([fixed]){left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:"";height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],i([l({reflect:!0,type:Boolean})],t.prototype,"fixed",2),i([o(100)],t.prototype,"onResize",1),t=i([d("sd-4-0-3-header")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as n,b as i,g as c,h as o}from"./chunk.ERIS2E6E.js";import{b as a,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.closeOthers=!1;this.handleAccordionShow=r=>{this.closeOthers&&this._accordionsInDefaultSlot.forEach(s=>{s!==r.target&&s.parentNode===r.target.parentNode&&s.removeAttribute("open")})}}connectedCallback(){super.connectedCallback(),this.addEventListener("sd-show",this.handleAccordionShow)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sd-show",this.handleAccordionShow)}render(){return l`<div part="base"><slot></slot></div>`}};e.styles=[...o.styles,a`:host{display:block}::slotted(sd-4-0-
|
1
|
+
import{a as n,b as i,g as c,h as o}from"./chunk.ERIS2E6E.js";import{b as a,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.closeOthers=!1;this.handleAccordionShow=r=>{this.closeOthers&&this._accordionsInDefaultSlot.forEach(s=>{s!==r.target&&s.parentNode===r.target.parentNode&&s.removeAttribute("open")})}}connectedCallback(){super.connectedCallback(),this.addEventListener("sd-show",this.handleAccordionShow)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sd-show",this.handleAccordionShow)}render(){return l`<div part="base"><slot></slot></div>`}};e.styles=[...o.styles,a`:host{display:block}::slotted(sd-4-0-3-accordion:not(:first-of-type)){margin-top:-1px}`],t([c({selector:"sd-4-0-3-accordion"})],e.prototype,"_accordionsInDefaultSlot",2),t([i({attribute:"close-others",type:Boolean})],e.prototype,"closeOthers",2),e=t([n("sd-4-0-3-accordion-group")],e);export{e as a};
|
@@ -27,14 +27,14 @@ import{a as s}from"./chunk.HE2LNCWW.js";import{a as o}from"./chunk.NCSRAXCO.js";
|
|
27
27
|
part="summary-icon"
|
28
28
|
class=${e("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}
|
29
29
|
><slot name="expand-icon" class=${e(this.open&&"hidden")}>
|
30
|
-
<sd-4-0-
|
30
|
+
<sd-4-0-3-icon library="system" name="chevron-down"></sd-4-0-3-icon>
|
31
31
|
</slot>
|
32
32
|
<slot name="collapse-icon" class=${e(!this.open&&"hidden")}>
|
33
|
-
<sd-4-0-
|
33
|
+
<sd-4-0-3-icon library="system" name="chevron-down"></sd-4-0-3-icon> </slot
|
34
34
|
></span>
|
35
35
|
</${l}>
|
36
36
|
<div part="content" id="content" class=${e("overflow-hidden",!this.expandable&&"hidden")}>
|
37
37
|
<slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot>
|
38
38
|
</div>
|
39
39
|
</${r}>
|
40
|
-
`}};t.styles=[...o.styles,d`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],i([p({type:Boolean,reflect:!0})],t.prototype,"expandable",2),t=i([m("sd-4-0-
|
40
|
+
`}};t.styles=[...o.styles,d`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],i([p({type:Boolean,reflect:!0})],t.prototype,"expandable",2),t=i([m("sd-4-0-3-quickfact")],t);n("quickfact.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:300,easing:"ease"}});n("quickfact.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:300,easing:"ease"}});export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as h,c as m}from"./chunk.A3DKF5BY.js";import{a as d,d as c}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as f,b as s,d as b,h as l}from"./chunk.ERIS2E6E.js";import{b as p,e as r}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var y=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),v=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"}),t=class extends l{constructor(){super(...arguments);this.localize=new w(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()}firstUpdated(){this.base.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()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await c(this.base),this.base.hidden=!1;let{keyframes:a,options:i}=m(this,"notification.show",{dir:this.localize.dir()});await d(this.base,a,i),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await c(this.base);let{keyframes:a,options:i}=m(this,"notification.hide",{dir:this.localize.dir()});await d(this.base,a,i),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}async toast(){return new Promise(a=>{let i=this.toastStack==="bottom-center"?v:y;i.parentElement===null&&document.body.append(i),i.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{i.removeChild(this),a(),i.querySelector("sd-4-0-
|
1
|
+
import{a as h,c as m}from"./chunk.A3DKF5BY.js";import{a as d,d as c}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as f,b as s,d as b,h as l}from"./chunk.ERIS2E6E.js";import{b as p,e as r}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var y=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),v=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"}),t=class extends l{constructor(){super(...arguments);this.localize=new w(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()}firstUpdated(){this.base.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()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await c(this.base),this.base.hidden=!1;let{keyframes:a,options:i}=m(this,"notification.show",{dir:this.localize.dir()});await d(this.base,a,i),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await c(this.base);let{keyframes:a,options:i}=m(this,"notification.hide",{dir:this.localize.dir()});await d(this.base,a,i),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}async toast(){return new Promise(a=>{let i=this.toastStack==="bottom-center"?v:y;i.parentElement===null&&document.body.append(i),i.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{i.removeChild(this),a(),i.querySelector("sd-4-0-3-notification")===null&&i.remove()},{once:!0})})}render(){return r`<div part="base" class="${o("w-full overflow-hidden flex items-stretch relative m-2")}" role="alert" id="notification" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}"><slot name="icon" part="icon" class="${o("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-4-0-3-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-4-0-3-icon></slot><div part="content" class="${o("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable?r`<sd-4-0-3-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-4-0-3-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-0-3-icon></sd-4-0-3-button>`:""}</div>${this.durationIndicator?r`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${o("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div>`}};t.styles=[...l.styles,p`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([b('[part~="base"]')],t.prototype,"base",2),e([s({reflect:!0})],t.prototype,"variant",2),e([s({type:Boolean,reflect:!0})],t.prototype,"open",2),e([s({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([s({type:Number})],t.prototype,"duration",2),e([s({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([s({reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([n("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([n("duration")],t.prototype,"handleDurationChange",1),t=e([f("sd-4-0-3-notification")],t);h("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});h("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as i}from"./chunk.HE2LNCWW.js";import{a as l,b as m}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as a,h as c}from"./chunk.ERIS2E6E.js";import{b as v,f as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.marker={cluster:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" opacity="1" r="20"/><circle cx="25" cy="25" opacity=".3" r="25"/></svg>`,main:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/><circle cx="30" cy="28" r="10" fill="#fff"/></svg>`,place:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd"/></svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let r=this.isLink(),o=this.notInteractive?l`div`:r?l`a`:l`button`;return m`<${o} part="base" class="${n("flex justify-center",!this.notInteractive&&"focus:outline focus:outline-2 focus:outline-primary focus:outline-offset-2")}" href="${i(r?this.href:void 0)}" target="${i(r?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||r?void 0:"button")}" aria-labelledby="${i(this.notInteractive?void 0:"content")}"><div part="marker" class="${n("inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-all duration-200 ease-in-out hover:scale-110 hover:fill-primary-500",this.variant==="main"&&this.state==="hover"&&"fill-accent-550",this.variant==="main"&&this.state==="active"&&"fill-accent-700",this.variant==="main"&&!this.notInteractive&&"hover:fill-accent-550 active:fill-accent-700",this.variant==="place"&&this.state==="default"&&"fill-white",this.variant==="place"&&this.state==="hover"&&"fill-primary-100",this.variant==="place"&&this.state==="active"&&"fill-primary-200",this.variant==="place"&&!this.notInteractive&&"hover:fill-primary-100",{cluster:"fill-primary",main:"fill-accent *:drop-shadow-md",place:"*:drop-shadow-md"}[this.variant])}">${this.marker[this.variant]}</div><div id="content" part="content" class="${n("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}: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]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1))}`],e([a({reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a()],t.prototype,"href",2),e([a()],t.prototype,"target",2),t=e([h("sd-4-0-
|
1
|
+
import{a as i}from"./chunk.HE2LNCWW.js";import{a as l,b as m}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as a,h as c}from"./chunk.ERIS2E6E.js";import{b as v,f as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.marker={cluster:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" opacity="1" r="20"/><circle cx="25" cy="25" opacity=".3" r="25"/></svg>`,main:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/><circle cx="30" cy="28" r="10" fill="#fff"/></svg>`,place:s`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75"><path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd"/></svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let r=this.isLink(),o=this.notInteractive?l`div`:r?l`a`:l`button`;return m`<${o} part="base" class="${n("flex justify-center",!this.notInteractive&&"focus:outline focus:outline-2 focus:outline-primary focus:outline-offset-2")}" href="${i(r?this.href:void 0)}" target="${i(r?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||r?void 0:"button")}" aria-labelledby="${i(this.notInteractive?void 0:"content")}"><div part="marker" class="${n("inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-all duration-200 ease-in-out hover:scale-110 hover:fill-primary-500",this.variant==="main"&&this.state==="hover"&&"fill-accent-550",this.variant==="main"&&this.state==="active"&&"fill-accent-700",this.variant==="main"&&!this.notInteractive&&"hover:fill-accent-550 active:fill-accent-700",this.variant==="place"&&this.state==="default"&&"fill-white",this.variant==="place"&&this.state==="hover"&&"fill-primary-100",this.variant==="place"&&this.state==="active"&&"fill-primary-200",this.variant==="place"&&!this.notInteractive&&"hover:fill-primary-100",{cluster:"fill-primary",main:"fill-accent *:drop-shadow-md",place:"*:drop-shadow-md"}[this.variant])}">${this.marker[this.variant]}</div><div id="content" part="content" class="${n("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}: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]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1))}`],e([a({reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a()],t.prototype,"href",2),e([a()],t.prototype,"target",2),t=e([h("sd-4-0-3-map-marker")],t);export{t as a};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import{b as f}from"./chunk.5CK64GWQ.js";import{a as m}from"./chunk.D7TMPF3D.js";import{b as c}from"./chunk.65NSSTJE.js";import{a as p}from"./chunk.HE2LNCWW.js";import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as h,b as l,c as u,d as o,h as s}from"./chunk.ERIS2E6E.js";import{b as n,e as d}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends s{constructor(){super(...arguments);this.formControlController=new c(this,{value:i=>i.checked?i.value||"on":void 0,defaultValue:i=>i.defaultChecked,setValue:(i,b)=>i.checked=b});this.showInvalidStyle=!1;this.title="";this.name="";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i),this.invalidMessage.textContent=i.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(i){this.input.focus(i)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(i){this.input.setCustomValidity(i),this.formControlController.updateValidity()}render(){return d`<label part="base" class="${r("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" role="switch" title="${this.title}" name="${this.name}" value="${p(this.value)}" .checked="${f(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="invalid-message" @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"}" class="${r(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
|
2
2
|
peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
|
3
|
-
peer-focus-visible:outline-primary`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${r("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${r("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...s.styles,n`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],t([o("input")],e.prototype,"input",2),t([o("#invalid-message")],e.prototype,"invalidMessage",2),t([u()],e.prototype,"showInvalidStyle",2),t([l()],e.prototype,"title",2),t([l()],e.prototype,"name",2),t([l()],e.prototype,"value",2),t([l({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([l({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([m("checked")],e.prototype,"defaultChecked",2),t([l({reflect:!0})],e.prototype,"form",2),t([l({type:Boolean,reflect:!0})],e.prototype,"required",2),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([a(["checked"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([h("sd-4-0-
|
3
|
+
peer-focus-visible:outline-primary`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${r("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${r("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...s.styles,n`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],t([o("input")],e.prototype,"input",2),t([o("#invalid-message")],e.prototype,"invalidMessage",2),t([u()],e.prototype,"showInvalidStyle",2),t([l()],e.prototype,"title",2),t([l()],e.prototype,"name",2),t([l()],e.prototype,"value",2),t([l({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([l({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([m("checked")],e.prototype,"defaultChecked",2),t([l({reflect:!0})],e.prototype,"form",2),t([l({type:Boolean,reflect:!0})],e.prototype,"required",2),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([a(["checked"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([h("sd-4-0-3-switch")],e);export{e as a};
|