@solid-design-system/components 4.0.9 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cdn/chunks/{chunk.EDD4HHHP.js → chunk.2F2YU5TY.js} +1 -1
- package/cdn/chunks/chunk.2POHB7E4.js +1 -0
- package/cdn/chunks/{chunk.BAO3UVTY.js → chunk.3EINSGT6.js} +1 -1
- package/cdn/chunks/{chunk.GX6NOXTL.js → chunk.6DTJTQ5Z.js} +1 -1
- package/cdn/chunks/{chunk.4QUXWXQ7.js → chunk.6VYBRKPB.js} +1 -1
- package/cdn/chunks/{chunk.ZWWTEE7R.js → chunk.6XHUCAAC.js} +1 -1
- package/cdn/chunks/{chunk.B6I2NZMP.js → chunk.7KT5V5SZ.js} +4 -4
- package/cdn/chunks/{chunk.ANH5V2SE.js → chunk.AWKHYUIP.js} +1 -1
- package/cdn/chunks/{chunk.DUM4IQT6.js → chunk.BMK7S33Z.js} +1 -1
- package/cdn/chunks/{chunk.B3H3PR6Y.js → chunk.BU5EDIFK.js} +1 -1
- package/cdn/chunks/{chunk.LPXG67S4.js → chunk.DOH6WUNR.js} +1 -1
- package/cdn/chunks/{chunk.AS7L23H2.js → chunk.DW5QL76L.js} +1 -1
- package/cdn/chunks/{chunk.Y67MAFTR.js → chunk.G7CN4YKD.js} +1 -1
- package/cdn/chunks/{chunk.QV7OIYLT.js → chunk.GQIUJUD4.js} +1 -1
- package/cdn/chunks/{chunk.D4RLVVDK.js → chunk.HKKRMPWF.js} +1 -1
- package/cdn/chunks/{chunk.3H546YPQ.js → chunk.HOPUF2NO.js} +1 -1
- package/cdn/chunks/{chunk.WVYVGVBF.js → chunk.HQYSQRUN.js} +1 -1
- package/cdn/chunks/{chunk.PPMFZ77L.js → chunk.HRNG2LIX.js} +1 -1
- package/cdn/chunks/{chunk.JUGW2WJP.js → chunk.HUSKVVWH.js} +1 -1
- package/cdn/chunks/{chunk.27EYM5XP.js → chunk.K4WR4LYF.js} +1 -1
- package/cdn/chunks/{chunk.25ETUACJ.js → chunk.LRINU3JN.js} +1 -1
- package/cdn/chunks/{chunk.OCT5SOOS.js → chunk.MBU5RGYE.js} +1 -1
- package/cdn/chunks/chunk.NQZZHVDV.js +10 -0
- package/cdn/chunks/{chunk.EP7OA5FU.js → chunk.NVTRGUUN.js} +1 -1
- package/cdn/chunks/chunk.OPMM2RN5.js +1 -0
- package/cdn/chunks/{chunk.N5OYRZY6.js → chunk.OY3MT73P.js} +1 -1
- package/cdn/chunks/{chunk.V3WIIJLB.js → chunk.PHRAQBQ7.js} +1 -1
- package/cdn/chunks/{chunk.IR3YQSPY.js → chunk.PMI5K2Z2.js} +1 -1
- package/cdn/chunks/chunk.PYHYYOBE.js +29 -0
- package/cdn/chunks/{chunk.4EXZ2RBI.js → chunk.QJVFSDOZ.js} +1 -1
- package/cdn/chunks/chunk.SIC7OWQL.js +1 -0
- package/cdn/chunks/{chunk.LQZOBUFT.js → chunk.SNCCOKIM.js} +1 -1
- package/cdn/chunks/chunk.SNS2IHBI.js +1 -0
- package/cdn/chunks/{chunk.F4GGY7NW.js → chunk.SXH5LQRL.js} +1 -1
- package/cdn/chunks/{chunk.B5YKUN6P.js → chunk.TET3RDMC.js} +1 -1
- package/cdn/chunks/{chunk.MOQCXANY.js → chunk.TY23JP7L.js} +1 -1
- package/cdn/chunks/{chunk.WNV6OGRG.js → chunk.UBO6O4CS.js} +1 -1
- package/cdn/chunks/{chunk.GNYJN5QM.js → chunk.V7YY3FWK.js} +1 -1
- package/cdn/chunks/{chunk.A772RQJV.js → chunk.VOX6F6LP.js} +1 -1
- package/cdn/chunks/{chunk.5CIQRJCC.js → chunk.WMCAUVW6.js} +1 -1
- package/cdn/chunks/{chunk.U5SOEJO4.js → chunk.XV2WIQSV.js} +1 -1
- package/cdn/chunks/{chunk.TR52VDPR.js → chunk.YFWVU3XM.js} +1 -1
- package/cdn/chunks/{chunk.7ZYFSBMR.js → chunk.YN6CIEPP.js} +1 -1
- package/cdn/chunks/{chunk.QOQO2KP5.js → chunk.YUUAUQGB.js} +1 -1
- package/cdn/chunks/{chunk.2H5XA4I4.js → chunk.ZYWB4GHH.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/badge/badge.js +1 -1
- package/cdn/components/brandshape/brandshape.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/dialog/dialog.js +1 -1
- package/cdn/components/divider/divider.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/expandable/expandable.js +1 -1
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/icon/icon.js +1 -1
- package/cdn/components/icon/library.js +1 -1
- package/cdn/components/icon/library.status.d.ts +12 -0
- package/cdn/components/icon/library.status.js +1 -0
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/link/link.js +1 -1
- package/cdn/components/map-marker/map-marker.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/optgroup/optgroup.js +1 -1
- package/cdn/components/option/option.js +1 -1
- package/cdn/components/popup/popup.js +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-button/radio-button.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/components/scrollable/scrollable.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/spinner/spinner.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/step-group/step-group.js +1 -1
- package/cdn/components/switch/switch.js +1 -1
- package/cdn/components/tab/tab.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/tab-panel/tab-panel.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/components/teaser/teaser.js +1 -1
- package/cdn/components/teaser-media/teaser-media.js +1 -1
- package/cdn/components/textarea/textarea.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/components/video/video.js +1 -1
- package/cdn/custom-elements.json +41 -1
- package/cdn/solid-components.bundle.js +48 -20
- package/cdn/solid-components.iife.js +49 -21
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/utilities/icon-library.js +1 -1
- package/cdn/utilities/localize.js +1 -1
- package/cdn/web-types.json +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.js +2 -2
- package/cdn-versioned/chunks/{chunk.EDD4HHHP.js → chunk.2F2YU5TY.js} +1 -1
- package/cdn-versioned/chunks/chunk.2POHB7E4.js +1 -0
- package/cdn-versioned/chunks/{chunk.BAO3UVTY.js → chunk.3EINSGT6.js} +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/{chunk.GX6NOXTL.js → chunk.6DTJTQ5Z.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4QUXWXQ7.js → chunk.6VYBRKPB.js} +2 -2
- package/cdn-versioned/chunks/{chunk.ZWWTEE7R.js → chunk.6XHUCAAC.js} +1 -1
- package/cdn-versioned/chunks/{chunk.B6I2NZMP.js → chunk.7KT5V5SZ.js} +4 -4
- package/cdn-versioned/chunks/{chunk.ANH5V2SE.js → chunk.AWKHYUIP.js} +2 -2
- package/cdn-versioned/chunks/{chunk.DUM4IQT6.js → chunk.BMK7S33Z.js} +1 -1
- package/cdn-versioned/chunks/{chunk.B3H3PR6Y.js → chunk.BU5EDIFK.js} +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.LPXG67S4.js → chunk.DOH6WUNR.js} +1 -1
- package/cdn-versioned/chunks/{chunk.AS7L23H2.js → chunk.DW5QL76L.js} +2 -2
- package/cdn-versioned/chunks/chunk.EJKLI2Q4.js +1 -1
- package/cdn-versioned/chunks/{chunk.Y67MAFTR.js → chunk.G7CN4YKD.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QV7OIYLT.js → chunk.GQIUJUD4.js} +1 -1
- package/cdn-versioned/chunks/chunk.GQU4LYQ6.js +1 -1
- package/cdn-versioned/chunks/{chunk.D4RLVVDK.js → chunk.HKKRMPWF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.3H546YPQ.js → chunk.HOPUF2NO.js} +1 -1
- package/cdn-versioned/chunks/{chunk.WVYVGVBF.js → chunk.HQYSQRUN.js} +1 -1
- package/cdn-versioned/chunks/{chunk.PPMFZ77L.js → chunk.HRNG2LIX.js} +1 -1
- package/cdn-versioned/chunks/{chunk.JUGW2WJP.js → chunk.HUSKVVWH.js} +1 -1
- package/cdn-versioned/chunks/{chunk.27EYM5XP.js → chunk.K4WR4LYF.js} +4 -4
- package/cdn-versioned/chunks/{chunk.25ETUACJ.js → chunk.LRINU3JN.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OCT5SOOS.js → chunk.MBU5RGYE.js} +1 -1
- package/cdn-versioned/chunks/chunk.NQZZHVDV.js +10 -0
- package/cdn-versioned/chunks/{chunk.EP7OA5FU.js → chunk.NVTRGUUN.js} +1 -1
- package/cdn-versioned/chunks/chunk.OPMM2RN5.js +1 -0
- package/cdn-versioned/chunks/{chunk.N5OYRZY6.js → chunk.OY3MT73P.js} +2 -2
- package/cdn-versioned/chunks/{chunk.V3WIIJLB.js → chunk.PHRAQBQ7.js} +1 -1
- package/cdn-versioned/chunks/{chunk.IR3YQSPY.js → chunk.PMI5K2Z2.js} +1 -1
- package/cdn-versioned/chunks/chunk.PYHYYOBE.js +29 -0
- package/cdn-versioned/chunks/{chunk.4EXZ2RBI.js → chunk.QJVFSDOZ.js} +1 -1
- package/cdn-versioned/chunks/chunk.QWPCVRMH.js +1 -1
- package/cdn-versioned/chunks/chunk.SIC7OWQL.js +1 -0
- package/cdn-versioned/chunks/chunk.SJ2JO4KS.js +1 -1
- package/cdn-versioned/chunks/{chunk.LQZOBUFT.js → chunk.SNCCOKIM.js} +1 -1
- package/cdn-versioned/chunks/chunk.SNS2IHBI.js +1 -0
- package/cdn-versioned/chunks/chunk.SWUGEKNC.js +1 -1
- package/cdn-versioned/chunks/{chunk.F4GGY7NW.js → chunk.SXH5LQRL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.B5YKUN6P.js → chunk.TET3RDMC.js} +1 -1
- package/cdn-versioned/chunks/{chunk.MOQCXANY.js → chunk.TY23JP7L.js} +2 -2
- package/cdn-versioned/chunks/{chunk.WNV6OGRG.js → chunk.UBO6O4CS.js} +1 -1
- package/cdn-versioned/chunks/{chunk.GNYJN5QM.js → chunk.V7YY3FWK.js} +4 -4
- package/cdn-versioned/chunks/{chunk.A772RQJV.js → chunk.VOX6F6LP.js} +1 -1
- package/cdn-versioned/chunks/chunk.VYV6SKST.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WADGCWRK.js +1 -1
- package/cdn-versioned/chunks/{chunk.5CIQRJCC.js → chunk.WMCAUVW6.js} +1 -1
- package/cdn-versioned/chunks/{chunk.U5SOEJO4.js → chunk.XV2WIQSV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.TR52VDPR.js → chunk.YFWVU3XM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7ZYFSBMR.js → chunk.YN6CIEPP.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QOQO2KP5.js → chunk.YUUAUQGB.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2H5XA4I4.js → chunk.ZYWB4GHH.js} +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion/accordion.js +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.js +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.js +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.js +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button/button.js +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.js +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.js +1 -1
- 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 +1 -1
- package/cdn-versioned/components/dialog/dialog.js +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.js +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.js +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.js +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.js +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.js +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.js +1 -1
- package/cdn-versioned/components/icon/library.js +1 -1
- package/cdn-versioned/components/icon/library.status.d.ts +12 -0
- package/cdn-versioned/components/icon/library.status.js +1 -0
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/input/input.js +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/link/link.js +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.js +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.js +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/cdn-versioned/components/optgroup/optgroup.js +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/option/option.js +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.js +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.js +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.js +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.js +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/cdn-versioned/components/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.js +1 -1
- 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 +1 -1
- package/cdn-versioned/components/spinner/spinner.js +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step/step.js +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.js +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.js +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.js +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.js +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.js +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.js +1 -1
- package/cdn-versioned/components/teaser/teaser.js +1 -1
- package/cdn-versioned/components/teaser-media/teaser-media.js +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.js +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.js +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/components/video/video.js +1 -1
- package/cdn-versioned/custom-elements.json +242 -202
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +50 -22
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +51 -23
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/utilities/icon-library.js +1 -1
- package/cdn-versioned/utilities/localize.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +80 -80
- package/cdn-versioned/web-types.json +137 -137
- package/dist/chunks/{chunk.BJIZPRT4.js → chunk.4SBQOWLU.js} +2 -1
- package/dist/chunks/chunk.4TPOL3LB.js +54 -0
- package/dist/chunks/{chunk.L32THKSR.js → chunk.5FOKRIWL.js} +4 -2
- package/dist/chunks/{chunk.JCK5DTZN.js → chunk.7WEXXSFH.js} +4 -1
- package/dist/chunks/{chunk.XQNY7RZD.js → chunk.BTJACUD5.js} +5 -3
- package/dist/chunks/{chunk.UTSM3BM3.js → chunk.D3I3AZEX.js} +6 -1
- package/dist/chunks/{chunk.Y7254YJM.js → chunk.RSPK767T.js} +4 -2
- package/dist/chunks/{chunk.X2PI2F35.js → chunk.UZKLVMCI.js} +4 -4
- package/dist/chunks/{chunk.4MHQ63NW.js → chunk.XOL74PNU.js} +1 -1
- package/dist/components/accordion/accordion.js +4 -3
- package/dist/components/accordion-group/accordion-group.js +4 -3
- package/dist/components/audio/audio.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/carousel/carousel.js +4 -3
- package/dist/components/checkbox/checkbox.js +3 -2
- package/dist/components/checkbox-group/checkbox-group.js +4 -3
- package/dist/components/combobox/combobox.js +5 -4
- package/dist/components/dialog/dialog.js +4 -3
- package/dist/components/drawer/drawer.js +4 -3
- package/dist/components/dropdown/dropdown.js +1 -1
- package/dist/components/expandable/expandable.js +1 -1
- package/dist/components/flipcard/flipcard.js +4 -3
- package/dist/components/icon/icon.js +3 -2
- package/dist/components/icon/library.js +2 -1
- package/dist/components/icon/library.status.d.ts +12 -0
- package/dist/components/icon/library.status.js +9 -0
- package/dist/components/input/input.js +5 -4
- package/dist/components/notification/notification.js +1 -1
- package/dist/components/option/option.js +3 -2
- package/dist/components/quickfact/quickfact.js +4 -3
- package/dist/components/radio/radio.js +3 -2
- package/dist/components/radio-group/radio-group.js +4 -3
- package/dist/components/scrollable/scrollable.js +1 -1
- package/dist/components/select/select.js +5 -4
- package/dist/components/spinner/spinner.js +1 -1
- package/dist/components/tab-group/tab-group.js +1 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/custom-elements.json +41 -1
- package/dist/solid-components.js +20 -19
- package/dist/utilities/icon-library.js +2 -1
- package/dist/utilities/localize.js +1 -1
- package/dist/web-types.json +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.js +2 -2
- package/dist-versioned/chunks/chunk.274HT4QS.js +3 -3
- package/dist-versioned/chunks/chunk.2FXKQI26.js +2 -2
- package/dist-versioned/chunks/chunk.4Q7KKH5Z.js +2 -2
- package/dist-versioned/chunks/{chunk.BJIZPRT4.js → chunk.4SBQOWLU.js} +7 -6
- package/dist-versioned/chunks/chunk.4TPOL3LB.js +54 -0
- package/dist-versioned/chunks/{chunk.L32THKSR.js → chunk.5FOKRIWL.js} +7 -5
- package/dist-versioned/chunks/chunk.674S2Z6M.js +1 -1
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.7E7C4YEQ.js +3 -3
- package/dist-versioned/chunks/{chunk.JCK5DTZN.js → chunk.7WEXXSFH.js} +4 -1
- package/dist-versioned/chunks/chunk.A5S7GZJI.js +3 -3
- package/dist-versioned/chunks/chunk.A625ONY2.js +2 -2
- package/dist-versioned/chunks/chunk.ACST636J.js +1 -1
- package/dist-versioned/chunks/chunk.AJ7V76EG.js +1 -1
- package/dist-versioned/chunks/chunk.AKF4KQEW.js +2 -2
- package/dist-versioned/chunks/chunk.AQZSZKBJ.js +13 -13
- package/dist-versioned/chunks/{chunk.XQNY7RZD.js → chunk.BTJACUD5.js} +34 -32
- package/dist-versioned/chunks/chunk.CCQCEONR.js +2 -2
- package/dist-versioned/chunks/chunk.D26WCHLT.js +6 -6
- package/dist-versioned/chunks/{chunk.UTSM3BM3.js → chunk.D3I3AZEX.js} +19 -14
- package/dist-versioned/chunks/chunk.DPY2TYIS.js +9 -9
- package/dist-versioned/chunks/chunk.DU3O42BH.js +2 -2
- package/dist-versioned/chunks/chunk.EH2FHVPN.js +3 -3
- package/dist-versioned/chunks/chunk.F63YFNZS.js +5 -5
- package/dist-versioned/chunks/chunk.FFKZQXJ2.js +2 -2
- package/dist-versioned/chunks/chunk.FTXUZOXH.js +2 -2
- package/dist-versioned/chunks/chunk.H5ARRBLT.js +2 -2
- package/dist-versioned/chunks/chunk.H5BDO4H5.js +11 -11
- package/dist-versioned/chunks/chunk.HFHUY7YD.js +1 -1
- package/dist-versioned/chunks/chunk.I5ZJV32M.js +1 -1
- package/dist-versioned/chunks/chunk.IN7RNHBF.js +1 -1
- package/dist-versioned/chunks/chunk.JIWTAZZS.js +5 -5
- package/dist-versioned/chunks/chunk.JZB2D4IZ.js +1 -1
- package/dist-versioned/chunks/chunk.K3JCC7KV.js +5 -5
- package/dist-versioned/chunks/chunk.KH4M6HPE.js +2 -2
- package/dist-versioned/chunks/chunk.KPA6BEFU.js +5 -5
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.LZA2QYUU.js +1 -1
- package/dist-versioned/chunks/chunk.NUIZDE7R.js +1 -1
- package/dist-versioned/chunks/chunk.OBWOMZNU.js +2 -2
- package/dist-versioned/chunks/chunk.OMBVLHXJ.js +1 -1
- package/dist-versioned/chunks/chunk.OR7JTZLE.js +2 -2
- package/dist-versioned/chunks/chunk.OZU372TI.js +2 -2
- package/dist-versioned/chunks/chunk.PRXP5CUW.js +5 -5
- package/dist-versioned/chunks/chunk.PT7MDSWH.js +1 -1
- package/dist-versioned/chunks/chunk.QTFIZJGB.js +2 -2
- package/dist-versioned/chunks/chunk.QUYKT56M.js +1 -1
- package/dist-versioned/chunks/{chunk.Y7254YJM.js → chunk.RSPK767T.js} +6 -4
- package/dist-versioned/chunks/chunk.SNCHAQYL.js +4 -4
- package/dist-versioned/chunks/chunk.TGJ2SBPH.js +6 -6
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/{chunk.X2PI2F35.js → chunk.UZKLVMCI.js} +5 -5
- package/dist-versioned/chunks/chunk.VTUCPGYW.js +1 -1
- package/dist-versioned/chunks/chunk.XL2PSGM5.js +2 -2
- package/dist-versioned/chunks/{chunk.4MHQ63NW.js → chunk.XOL74PNU.js} +27 -27
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion/accordion.js +4 -3
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +4 -3
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button/button.js +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.js +4 -3
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +3 -2
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.js +4 -3
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/combobox/combobox.js +5 -4
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +4 -3
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +4 -3
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.js +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.js +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.js +4 -3
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/icon/icon.js +3 -2
- package/dist-versioned/components/icon/library.js +2 -1
- package/dist-versioned/components/icon/library.status.d.ts +12 -0
- package/dist-versioned/components/icon/library.status.js +9 -0
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/input/input.js +5 -4
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/option/option.js +3 -2
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +4 -3
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio/radio.js +3 -2
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/dist-versioned/components/radio-group/radio-group.js +4 -3
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.js +1 -1
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/select/select.js +5 -4
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.js +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.js +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.js +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +242 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +20 -19
- package/dist-versioned/utilities/icon-library.js +2 -1
- package/dist-versioned/utilities/localize.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +80 -80
- package/dist-versioned/web-types.json +137 -137
- package/package.json +4 -4
- package/cdn/chunks/chunk.5YRTJVAZ.js +0 -1
- package/cdn/chunks/chunk.A63P52TG.js +0 -1
- package/cdn/chunks/chunk.QA3NVZY4.js +0 -1
- package/cdn/chunks/chunk.UCTR6UM6.js +0 -1
- package/cdn/chunks/chunk.WG3IQMLL.js +0 -10
- package/cdn-versioned/chunks/chunk.5YRTJVAZ.js +0 -1
- package/cdn-versioned/chunks/chunk.A63P52TG.js +0 -1
- package/cdn-versioned/chunks/chunk.QA3NVZY4.js +0 -1
- package/cdn-versioned/chunks/chunk.UCTR6UM6.js +0 -1
- package/cdn-versioned/chunks/chunk.WG3IQMLL.js +0 -10
- /package/cdn/chunks/{chunk.DCOFYPWX.js → chunk.TWQVHGYD.js} +0 -0
- /package/cdn-versioned/chunks/{chunk.DCOFYPWX.js → chunk.TWQVHGYD.js} +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{a as z}from"./chunk.64UNKF45.js";import{c as O}from"./chunk.3L472FD4.js";import{a as c,c as m}from"./chunk.A3DKF5BY.js";import{a as h,d as p}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as K}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.26YUWEYR.js";import{a as I}from"./chunk.
|
1
|
+
import{a as z}from"./chunk.64UNKF45.js";import{c as O}from"./chunk.3L472FD4.js";import{a as c,c as m}from"./chunk.A3DKF5BY.js";import{a as h,d as p}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as K}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.26YUWEYR.js";import{a as I}from"./chunk.TWQVHGYD.js";import{a as C,b as o,d as l,h as d}from"./chunk.GQU4LYQ6.js";import{b as M,e as A}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var n=class extends d{constructor(){super(...arguments);this.localize=new D(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let t=this.trigger.assignedElements({flatten:!0}).find(a=>z(a).start),s=null;if(t)switch(t.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":s=t.button;break;case"sd-navigation-item":s=t.button;break;default:s=t}return s}updateAccessibleTrigger(){let e=this.getAccessibleTrigger();e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let e=this.getAccessibleTrigger();typeof(e==null?void 0:e.focus)=="function"&&e.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(e=>e.tagName.toLowerCase()==="sd-menu")}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(e){var t;if(e.key==="Tab"){if(this.open&&((t=document.activeElement)==null?void 0:t.tagName.toLowerCase())==="sd-menu-item"){e.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{var a,r,g,f,y,w,b,E,v,k,T,L;let s=((y=(f=(g=(r=(a=document.activeElement)==null?void 0:a.shadowRoot)==null?void 0:r.activeElement)==null?void 0:g.shadowRoot)==null?void 0:f.activeElement)==null?void 0:y.getRootNode())instanceof ShadowRoot?(v=(E=(b=(w=document.activeElement)==null?void 0:w.shadowRoot)==null?void 0:b.activeElement)==null?void 0:E.shadowRoot)==null?void 0:v.activeElement:((k=this.containingElement)==null?void 0:k.getRootNode())instanceof ShadowRoot?(L=(T=document.activeElement)==null?void 0:T.shadowRoot)==null?void 0:L.activeElement:document.activeElement;(!this.containingElement||(s==null?void 0:s.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(e){let t=e.composedPath();this.containingElement&&!t.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(e){let t=e.target;O(t,this.panel)}handlePanelSelect(e){let t=e.target;!this.stayOpenOnSelect&&t.tagName.toLowerCase()==="sd-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(e){if(e.key==="Escape"&&this.open){e.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(e.key)){e.preventDefault(),this.handleTriggerClick();return}let t=this.getMenu();if(t){let s=t.defaultSlot.assignedElements({flatten:!0}),a=s[0],r=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),this.open||this.show(),s.length>0&&requestAnimationFrame(()=>{(e.key==="ArrowDown"||e.key==="Home")&&(t.setCurrentItem(a),a.focus()),(e.key==="ArrowUp"||e.key==="End")&&(t.setCurrentItem(r),r.focus())}))}}handleTriggerKeyUp(e){e.key===" "&&e.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}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")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await p(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:e,options:t}=m(this,"dropdown.show",{dir:this.localize.dir()});await h(this.popup.popup,e,t),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await p(this);let{keyframes:e,options:t}=m(this,"dropdown.hide",{dir:this.localize.dir()});await h(this.popup.popup,e,t),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return A`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${I("shadow bg-white",this.open?"block pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};n.styles=[...d.styles,M`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([l("#dropdown")],n.prototype,"popup",2),i([l("[part=trigger]")],n.prototype,"trigger",2),i([l("[part=panel]")],n.prototype,"panel",2),i([o({type:Boolean,reflect:!0})],n.prototype,"open",2),i([o({type:Boolean,reflect:!0})],n.prototype,"rounded",2),i([o({reflect:!0})],n.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],n.prototype,"disabled",2),i([o({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],n.prototype,"stayOpenOnSelect",2),i([o({attribute:!1})],n.prototype,"containingElement",2),i([o({type:Number})],n.prototype,"distance",2),i([o({type:Number})],n.prototype,"skidding",2),i([o({type:Boolean,reflect:!0,attribute:"no-auto-size"})],n.prototype,"noAutoSize",2),i([o({type:Boolean,reflect:!0,attribute:"no-flip"})],n.prototype,"noFlip",2),i([o({type:Boolean})],n.prototype,"hoist",2),i([K("open",{waitUntilFirstUpdate:!0})],n.prototype,"handleOpenChange",1),n=i([C("sd-dropdown")],n);c("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});c("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{n as a};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{a as w}from"./chunk.SXH5LQRL.js";import{b as C,c as E,d as V,e as k}from"./chunk.65NSSTJE.js";import{a as M}from"./chunk.EJKLI2Q4.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as f}from"./chunk.TWQVHGYD.js";import{a as y,b as n,c as u,d as c,h as p}from"./chunk.GQU4LYQ6.js";import{b as g,e as d}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var s=class extends p{constructor(){super(...arguments);this.formControlController=new C(this);this.hasSlotController=new b(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?k:t?V:E}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),l=this.getAllRadios(),i=this.value;e.disabled||(this.value=e.value,l.forEach(h=>h.checked=h===e),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var v;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(r=>!r.disabled),l=(v=e.find(r=>r.checked))!=null?v:e[0],i=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,h=this.value,a=e.indexOf(l)+i;a<0&&(a=e.length-1),a>e.length-1&&(a=0),this.getAllRadios().forEach(r=>{r.checked=!1,this.hasButtonGroup||(r.tabIndex=-1)}),this.value=e[a].value,e[a].checked=!0,this.hasButtonGroup?e[a].shadowRoot.querySelector("button").focus():(e[a].tabIndex=0,e[a].focus()),this.value!==h&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),l=t.find(i=>i.checked)||t[0];l&&l.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,l;let t=this.getAllRadios();if(await Promise.all(t.map(async i=>{await i.updateComplete,i.checked=i.value===this.value,i.size=this.size,i instanceof w&&(i.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(i=>i.tagName.toLowerCase()==="sd-radio-button"),!t.some(i=>i.checked))if(this.hasButtonGroup){let i=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");i&&(i.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let i=(l=this.shadowRoot)==null?void 0:l.querySelector("sd-button-group");i&&(i.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:!!t,l=this.hasSlotController.test("tooltip"),i=d`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return d`<fieldset part="form-control" class="${f("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message">${t||l?d`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${f("p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${l?d`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${f("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?d`<sd-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${i}</sd-button-group>`:i}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-button-group":M},s.styles=[...p.styles,g`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`],o([c("slot:not([name])")],s.prototype,"defaultSlot",2),o([c("#validation-input")],s.prototype,"validationInput",2),o([c("#invalid-message")],s.prototype,"invalidMessage",2),o([u()],s.prototype,"hasButtonGroup",2),o([u()],s.prototype,"defaultValue",2),o([u()],s.prototype,"showInvalidStyle",2),o([n({reflect:!0})],s.prototype,"size",2),o([n({type:Boolean,reflect:!0})],s.prototype,"required",2),o([n({reflect:!0})],s.prototype,"orientation",2),o([n()],s.prototype,"label",2),o([n({type:Boolean,reflect:!0})],s.prototype,"boldLabel",2),o([n()],s.prototype,"name",2),o([n({reflect:!0})],s.prototype,"value",2),o([n({reflect:!0})],s.prototype,"form",2),o([m("size",{waitUntilFirstUpdate:!0})],s.prototype,"handleSizeChange",1),o([m("showInvalidStyle",{waitUntilFirstUpdate:!0})],s.prototype,"handleInvalidChange",1),o([m("value")],s.prototype,"handleValueChange",1),s=o([y("sd-radio-group")],s);export{s as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.
|
1
|
+
import{a}from"./chunk.TWQVHGYD.js";import{a as p,b as o,c as d,d as v,h as n}from"./chunk.GQU4LYQ6.js";import{b as l,e as t}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var r=class extends n{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(e,s){return{0:this.smallSvg(s),414:this.mediumSvg(s),640:this.largeSvg(s)}[e]}largeSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return t`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return t`<div class="${a({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${a({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${a("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":t`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return t`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(e){return t`<div class="${a({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[e],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return t`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${a(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return t`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let e=this.variant.startsWith("border-")||this.variant==="image";return t`<div class="${a({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${e?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};r.styles=[...n.styles,l`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],i([v("[part=base]")],r.prototype,"containerElem",2),i([o({type:String})],r.prototype,"variant",2),i([o({type:Array})],r.prototype,"shapes",2),i([d()],r.prototype,"componentBreakpoint",2),r=i([p("sd-brandshape")],r);export{r as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as s}from"./chunk.HE2LNCWW.js";import{a as o,b as a}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.
|
1
|
+
import{a as s}from"./chunk.HE2LNCWW.js";import{a as o,b as a}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.TWQVHGYD.js";import{a as m,b as i,d as b,h as l}from"./chunk.GQU4LYQ6.js";import{b as p}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(r){this.tag.focus(r)}blur(){this.tag.blur()}render(){let r=this.isLink(),d=r?o`a`:o`button`;return a`<${d} part="base" type="${s(r?void 0:"button")}" href="${s(r?this.href:void 0)}" rel="${s(r&&this.target?"noreferrer noopener":void 0)}" target="${s(r?this.target:void 0)}" download="${s(r?this.download:void 0)}" ?disabled="${s(r?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${s(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${n("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!r&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?a`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${n({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-icon library="system" name="close" label="remove"></sd-icon></slot>`:""}</${d}>`}};e.styles=[...l.styles,p`:host{display:inline-block}`],t([b("a, button")],e.prototype,"tag",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"selected",2),t([i({type:Boolean,reflect:!0})],e.prototype,"toggleable",2),t([i({type:Boolean,reflect:!0})],e.prototype,"removable",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i()],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),e=t([m("sd-tag")],e);export{e as a};
|
@@ -1,3 +1,3 @@
|
|
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.
|
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.TWQVHGYD.js";import{a as h,b as l,c as u,d as o,h as s}from"./chunk.GQU4LYQ6.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
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-switch")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as o}from"./chunk.E2DRD2OX.js";import{a as u}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.
|
1
|
+
import{a as o}from"./chunk.E2DRD2OX.js";import{a as u}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.TWQVHGYD.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.GQU4LYQ6.js";import{b as c,e as s}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.hasSlotController=new u(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let l=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=l;return}l!==this.cachedTextLabel&&(this.cachedTextLabel=l,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var l;return((l=this.textContent)!=null?l:"").trim()}render(){let l={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return s`<div part="base" class="${i("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${i("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?s`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${i("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?s`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-icon>`:""}</span>`:""} ${l.left?s`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${l.right?s`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};e.styles=[...n.styles,c`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}`],t([d('[part="base"]')],e.prototype,"defaultSlot",2),t([r()],e.prototype,"current",2),t([r()],e.prototype,"selected",2),t([r()],e.prototype,"hasHover",2),t([a({reflect:!0})],e.prototype,"size",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checkbox",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a({reflect:!0})],e.prototype,"value",2),t([o("disabled")],e.prototype,"handleDisabledChange",1),t([o("selected")],e.prototype,"handleSelectedChange",1),t([o("value")],e.prototype,"handleValueChange",1),e=t([h("sd-option")],e);export{e as a};
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import{a as
|
1
|
+
import{a as V}from"./chunk.6DTJTQ5Z.js";import{a as F}from"./chunk.BMK7S33Z.js";import{a as A}from"./chunk.D7TMPF3D.js";import{c as z}from"./chunk.3L472FD4.js";import{b as M}from"./chunk.65NSSTJE.js";import{a as O,c as w}from"./chunk.A3DKF5BY.js";import{a as k,b as I}from"./chunk.SNCCOKIM.js";import{a as y,d as x}from"./chunk.RQYP7MH5.js";import{a as C}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as L}from"./chunk.6HO6CE4A.js";import{a as D}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.TWQVHGYD.js";import{a as $,b as n,c as u,d as c,g as E,h as g}from"./chunk.GQU4LYQ6.js";import{b as T,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var s=class extends g{constructor(){super(...arguments);this.formControlController=new M(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new L(this,"help-text","label");this.localize=new D(this);this.typeToSelectString="";this.hasHover=!1;this.displayLabel="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=e=>d`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
2
2
|
base:tag__base,
|
3
3
|
content:tag__content,
|
4
4
|
removable-indicator:tag__removable-indicator,
|
5
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()};this.handleDocumentKeyDown=e=>{let t=e.target,l=t.closest(".select__clear")!==null,a=t.closest("sd-icon-button")!==null;if(!(l||a)){if(e.key==="Escape"&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let h=this.getAllOptions(),o=h.indexOf(this.currentOption),r=Math.max(0,o);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(r=o+1,r>h.length-1&&(r=0)):e.key==="ArrowUp"?(r=o-1,r<0&&(r=h.length-1)):e.key==="Home"?r=0:e.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r])}if(e.key.length===1||e.key==="Backspace"){let h=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(let o of h)if(o.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(o);break}}}};this.handleDocumentMouseDown=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(e,t){var l,a,h;if(e.key==="Backspace"&&this.multiple){e.preventDefault(),e.stopPropagation();let o=(l=e.currentTarget)==null?void 0:l.parentElement,r=(a=o==null?void 0:o.previousElementSibling)==null?void 0:a.querySelector("sd-tag"),
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()};this.handleDocumentKeyDown=e=>{let t=e.target,l=t.closest(".select__clear")!==null,a=t.closest("sd-icon-button")!==null;if(!(l||a)){if(e.key==="Escape"&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let h=this.getAllOptions(),o=h.indexOf(this.currentOption),r=Math.max(0,o);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(r=o+1,r>h.length-1&&(r=0)):e.key==="ArrowUp"?(r=o-1,r<0&&(r=h.length-1)):e.key==="Home"?r=0:e.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r])}if(e.key.length===1||e.key==="Backspace"){let h=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(let o of h)if(o.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(o);break}}}};this.handleDocumentMouseDown=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(e,t){var l,a,h;if(e.key==="Backspace"&&this.multiple){e.preventDefault(),e.stopPropagation();let o=(l=e.currentTarget)==null?void 0:l.parentElement,r=(a=o==null?void 0:o.previousElementSibling)==null?void 0:a.querySelector("sd-tag"),m=(h=o==null?void 0:o.nextElementSibling)==null?void 0:h.querySelector("sd-tag");this.handleTagRemove(new CustomEvent("sd-remove"),t),this.updateComplete.then(()=>{m?m.focus():r?r.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(e){e.key==="Backspace"&&this.multiple&&(e.preventDefault(),e.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var l;let t=(l=this.shadowRoot)==null?void 0:l.querySelectorAll("sd-tag");t&&t.length>0?t==null||t[(t==null?void 0:t.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){let l=e.composedPath().some(a=>a instanceof HTMLSlotElement&&a.name==="removable-indicator");this.disabled||l||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){let l=e.target.closest("sd-option"),a=this.value;l&&!l.disabled&&(this.multiple?this.toggleOptionSelection(l):this.setSelectedOptions(l),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],l=[];customElements.get("sd-option")?(e.forEach(a=>{this.multiple&&(a.checkbox=!0),l.push(a.value)}),this.setSelectedOptions(e.filter(a=>t.includes(a.value)))):customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(e,t){e.stopPropagation(),t||this.clearSelect(),t&&!this.disabled&&(this.toggleOptionSelection(t,!1),this.deletedTagLabel=this.localize.term("removed",t.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){let t=this.getAllOptions(),l=Array.isArray(e)?e:[e];t.forEach(a=>a.selected=!1),l.length&&l.forEach(a=>a.selected=!0),Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}toggleOptionSelection(e,t){t===!0||t===!1?e.selected=t:e.selected=!e.selected,Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}selectionChanged(e){var t,l,a,h;e&&this.multiple?this.selectedOptions.find(o=>o.value===e.value)?this.selectedOptions=this.selectedOptions.filter(o=>o.value!==e.value):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=this.getAllOptions().filter(o=>o.selected),this.multiple?(this.value=this.selectedOptions.map(o=>o.value),this.useTags||this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(l=(t=this.selectedOptions[0])==null?void 0:t.value)!=null?l:"",this.displayLabel=(h=(a=this.selectedOptions[0])==null?void 0:a.getTextLabel())!=null?h:""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((e,t)=>{if(t<this.maxOptionsVisible||this.maxOptionsVisible<=0){let l=this.getTag(e,t);return d`<div @sd-remove="${a=>this.handleTagRemove(a,e)}">${typeof l=="string"?k(l):l}</div>`}return[d``]}):[d`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
6
6
|
base:tag__base,
|
7
7
|
content:tag__content,
|
8
8
|
removable-indicator:tag__removable-indicator,
|
9
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(e){let t=e.detail;t&&(this.currentPlacement=t)}handleUseTagsChange(){let e=this.getAllOptions();customElements.get("sd-option")&&e.forEach(t=>{t.checkbox=this.multiple})}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.multiple||this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await
|
9
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(e){let t=e.detail;t&&(this.currentPlacement=t)}handleUseTagsChange(){let e=this.getAllOptions();customElements.get("sd-option")&&e.forEach(t=>{t.checkbox=this.multiple})}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.multiple||this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await x(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:e,options:t}=w(this,"select.show",{dir:this.localize.dir()});await y(this.popup.popup,e,t),this.currentOption&&z(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await x(this);let{keyframes:e,options:t}=w(this,"select.hide",{dir:this.localize.dir()});await y(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(e=>{e.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(l=>t.includes(l.value)))}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,C(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,C(this,"sd-after-hide")}checkValidity(){var e;return(e=this.valueInput)==null?void 0:e.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){let e={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},t=this.label?!0:!!e.label,l=this.helpText?!0:!!e.helpText,a=this.clearable&&!this.disabled,h=!!e.tooltip,o=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",r=this.disabled?"cursor-not-allowed":"cursor-pointer",m={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],b={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${p("relative text-left",r,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" role="alert" aria-live="assertive">${this.deletedTagLabel}</span> ${t||h?d`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${t&&"inline-block"}" aria-hidden="${t?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${e.tooltip?d`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${p("relative w-full bg-white",o==="disabled"?"text-neutral-500":"text-black")}"><div part="border" class="${p("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[o],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${p("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
10
10
|
popup:popup__content,
|
11
|
-
"><div part="combobox" class="${p("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${p("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",
|
11
|
+
"><div part="combobox" class="${p("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${p("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",r,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?d`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(v=>v==null?void 0:v.getTextLabel()).join(", ")}</div><input class="${p("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",r)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${a?d`<button part="clear-button" class="${p("select__clear flex justify-center",m,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${p("text-icon-fill-neutral-800",b)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-icon part="invalid-icon" class="${p(m,b,"text-error")}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-icon part="valid-icon" class="${p("flex-shrink-0 text-success",m,b)}" library="system" name="status-check"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${p("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",this.disabled?"text-neutral-500":"text-primary",b)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${p("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${l?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-icon":I,"sd-popup":F,"sd-tag":V},s.styles=[...g.styles,T`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],i([E({selector:"sd-option"})],s.prototype,"_optionsInDefaultSlot",2),i([c("sd-popup")],s.prototype,"popup",2),i([c('[part="combobox"]')],s.prototype,"combobox",2),i([c('[part="display-input"]')],s.prototype,"displayInput",2),i([c(".value-input")],s.prototype,"valueInput",2),i([c('[part="listbox"]')],s.prototype,"listbox",2),i([c("#invalid-message")],s.prototype,"invalidMessage",2),i([u()],s.prototype,"hasHover",2),i([u()],s.prototype,"displayLabel",2),i([u()],s.prototype,"deletedTagLabel",2),i([u()],s.prototype,"hasFocus",2),i([u()],s.prototype,"currentOption",2),i([u()],s.prototype,"selectedOptions",2),i([u()],s.prototype,"showValidStyle",2),i([u()],s.prototype,"showInvalidStyle",2),i([A()],s.prototype,"defaultValue",2),i([n({type:Boolean,reflect:!0})],s.prototype,"open",2),i([n({reflect:!0})],s.prototype,"size",2),i([n({reflect:!0})],s.prototype,"placement",2),i([n()],s.prototype,"label",2),i([n()],s.prototype,"placeholder",2),i([n({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),i([n({type:Boolean,reflect:!0})],s.prototype,"disabled",2),i([n({attribute:"help-text"})],s.prototype,"helpText",2),i([u()],s.prototype,"currentPlacement",2),i([n({type:Boolean})],s.prototype,"clearable",2),i([n({type:Boolean,reflect:!0})],s.prototype,"multiple",2),i([n({type:Boolean,reflect:!0})],s.prototype,"useTags",2),i([n({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),i([n({reflect:!0})],s.prototype,"form",2),i([n()],s.prototype,"name",2),i([n({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],s.prototype,"value",2),i([n({type:Boolean,reflect:!0})],s.prototype,"required",2),i([n({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),i([n({type:Boolean})],s.prototype,"hoist",2),i([n()],s.prototype,"getTag",2),i([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),i([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),i([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),i([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),i([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),s=i([$("sd-select")],s);O("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});O("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{a as k}from"./chunk.CBQWVOOS.js";import{a as T}from"./chunk.EUGX6XW6.js";import{a as L}from"./chunk.SWUGEKNC.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.
|
1
|
+
import{a as k}from"./chunk.CBQWVOOS.js";import{a as T}from"./chunk.EUGX6XW6.js";import{a as L}from"./chunk.SWUGEKNC.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.TWQVHGYD.js";import{a as E,b as g,c as f,d as v,e as A,h as P}from"./chunk.GQU4LYQ6.js";import{b as x,e as b}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";function _(h,d,e){let i=t=>Object.is(t,-0)?0:t;return h<d?i(d):h>e?i(e):i(h)}function*C(h,d){if(h!==void 0){let e=0;for(let i of h)yield d(i,e++)}}function*I(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 k(this,()=>this.next());this.scrollController=new T(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new $(this);this.userInteracted=!1;this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>L.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")),["click","keydown"].forEach(i=>this.addEventListener(i,this.handleUserInteraction));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(),["click","keydown"].forEach(e=>this.removeEventListener(e,this.handleUserInteraction))}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=_(e+(s?t:0),0,u.length+1),y=u[p],w=l.getBoundingClientRect(),S=y.getBoundingClientRect();if(l.scrollTo({left:S.left-w.left+l.scrollLeft,top:S.top-w.top+l.scrollTop,behavior:M()?"auto":i}),this.userInteracted&&!this.loop){let O=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,B=this.activeSlide===0;O?this.previousButton.focus({preventScroll:!0}):B&&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
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-icon class="${n("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${u?"chevron-down":"chevron-up"}"></sd-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">${C(I(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-icon class="${n("h-6 w-6 rotate-90 grid place-items-center")}" library="system" name="${u?"chevron-up":"chevron-down"}"></sd-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-icon class="h-6 w-6 grid place-items-center" library="system" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${n(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="system" name="pause"></sd-icon></slot></button></div></div>`}};r.styles=[...P.styles,x`: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-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-carousel")],r);export{r as a};
|
4
4
|
/*! Bundled license information:
|
@@ -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.GQU4LYQ6.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-popup")],y);export{y as a};
|
1
|
+
import{a as Dt}from"./chunk.TWQVHGYD.js";import{a as kt,b as E,d as Et,h as Rt}from"./chunk.GQU4LYQ6.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-popup")],y);export{y as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.HE2LNCWW.js";import{a as n,b as s}from"./chunk.5ZILM4TA.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as i}from"./chunk.
|
1
|
+
import{a}from"./chunk.HE2LNCWW.js";import{a as n,b as s}from"./chunk.5ZILM4TA.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as i}from"./chunk.TWQVHGYD.js";import{a as u,b as r,h as o}from"./chunk.GQU4LYQ6.js";import{b as d}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.size="lg";this.orientation="horizontal";this.disabled=!1;this.current=!1;this.noTail=!1;this.notInteractive=!1;this.label="";this.description="";this.index=1;this.href=""}connectedCallback(){super.connectedCallback()}isLink(){return!!this.href}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleCurrentChange(){this.current&&(this.disabled=!1)}handleDisabledChange(){this.disabled&&(this.current=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1)}render(){let c=this.isLink(),h=this.notInteractive?n`div`:c?n`a`:n`button`;return s`<div role="listitem" part="base" class="${i("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-min overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${i("flex shrink-0 gap-2",this.noTail&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",this.orientation==="horizontal"?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3")}"><${h} part="circle" href="${a(c?this.href:void 0)}" aria-disabled="${a(this.disabled||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${a("label")}" aria-describedby="${a("description")}" class="${i("border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",this.disabled?"focus-visible:outline-none cursor-not-allowed":"focus-visible:focus-outline group-hover:cursor-pointer",this.notInteractive?this.size==="lg"?"w-[72px]":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&"border-primary group-hover:bg-primary-100 group-hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white")}"><slot name="circle-content" class="${i(!this.disabled&&!this.current&&!this.notInteractive&&"text-primary group-hover:text-primary-500 group-hover:fill-primary-500",this.notInteractive&&"text-primary",this.size==="lg"?"text-lg":"text-sm")}">${!this.disabled&&!this.current&&!this.notInteractive?s`<sd-icon name="status-check" library="system"></sd-icon>`:s`${this.index}`}</slot></${h}>${this.noTail?"":s`<div part="tail" class="${i(this.orientation==="horizontal"?"border-t w-full my-auto mr-2":"border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",!this.disabled&&!this.current&&!this.notInteractive?" border-primary group-hover:border-primary-500":"border-neutral-400")}"></div>`}</div><div part="text-container" class="${i("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"w-max text-left",this.disabled&&"!text-neutral-700",this.notInteractive?"ml-3":"mr-4")}"><div part="label" id="label" class="${i("!font-bold sd-paragraph",this.disabled&&"!text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive?"!text-primary group-hover:!text-primary-500 group-hover:cursor-pointer":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${i("sd-paragraph sd-paragraph--size-sm",this.disabled&&"!text-neutral-700")}">${this.description||s`<slot></slot>`}</div></div></div>`}};t.styles=[...o.styles,d`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}.translateLg{transform:translateX(55px)}.translateSm{transform:translateX(64px)}`],e([r({reflect:!0})],t.prototype,"size",2),e([r({reflect:!0})],t.prototype,"orientation",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([r({reflect:!0,type:Boolean,attribute:"no-tail"})],t.prototype,"noTail",2),e([r({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([r()],t.prototype,"label",2),e([r()],t.prototype,"description",2),e([r({type:Number,reflect:!0,attribute:"index"})],t.prototype,"index",2),e([r()],t.prototype,"href",2),e([l("current")],t.prototype,"handleCurrentChange",1),e([l("disabled")],t.prototype,"handleDisabledChange",1),e([l("notInteractive")],t.prototype,"handleInteractivityChange",1),t=e([u("sd-step")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as l}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.26YUWEYR.js";import{a as c}from"./chunk.
|
1
|
+
import{a as l}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.26YUWEYR.js";import{a as c}from"./chunk.TWQVHGYD.js";import{a as h,b as n,d as r,h as a}from"./chunk.GQU4LYQ6.js";import{b as d,e as o}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new m(this)}updateMaxHeight(){var s;let i=(s=this.contentPreview)==null?void 0:s.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${i}px`),this.style.setProperty("--max-height",i)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}onOpenChange(){this.open?(this.emit("sd-show"),this.updateComplete.then(()=>{this.emit("sd-after-show")})):(this.emit("sd-hide"),this.updateComplete.then(()=>{this.emit("sd-after-hide")})),this.details.setAttribute("open",this.open.toString())}async show(){if(!this.open)return this.onToggleClick(),l(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),l(this,"sd-after-hide")}render(){return o`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${c("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${c("h-full justify-center w-full text-base flex items-center toggle")}">${this.open?o`<slot name="toggle-open"><sd-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-icon>${this.localize.term("showLess")}</slot>`:o`<slot name="toggle-closed"><sd-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-icon>${this.localize.term("showMore")}</slot>`}</div></button><details part="details" aria-hidden="${!this.open}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let i=document.createElement("div");i.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(g=>{let u=g.cloneNode(!0);i.appendChild(u)}),this.appendChild(i)}};e.styles=[...a.styles,d`:host{--gradient-color-start:hsla(0,0%,100%,0);--gradient-color-end:#fff;--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start) 0%,var(--gradient-color-end) 80%,var(--gradient-color-end) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content{max-block-size:var(--max-height-pixel,1000vh)}:host(:not([open])) .content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);position:absolute;width:100%}:host([inverted]:not([open])) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,rgba(0,53,142,0) 0,#00358e 80%,#00358e 100%))}`],t([r(".content-preview")],e.prototype,"contentPreview",2),t([r("details")],e.prototype,"details",2),t([n({type:Boolean,reflect:!0})],e.prototype,"open",2),t([n({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([p("open",{waitUntilFirstUpdate:!0})],e.prototype,"onOpenChange",1),e=t([h("sd-expandable")],e);export{e as a};
|