@solid-design-system/components 4.0.0-next.11 → 4.0.0-next.12
Sign up to get free protection for your applications and to get access to all the features.
- package/cdn/chunks/{chunk.THDWAEAB.js → chunk.27P4XVMA.js} +1 -1
- package/cdn/chunks/{chunk.2WQRB4G2.js → chunk.2CYKFWL2.js} +1 -1
- package/cdn/chunks/chunk.3BP4JKVA.js +73 -0
- package/cdn/chunks/{chunk.DQE76XPR.js → chunk.3IPN77DT.js} +1 -1
- package/cdn/chunks/{chunk.IR4B3LG3.js → chunk.3SSIAAEU.js} +1 -1
- package/cdn/chunks/{chunk.AJK5LUSQ.js → chunk.5BMT34AY.js} +1 -1
- package/cdn/chunks/{chunk.HGEAXZVW.js → chunk.647JLNTI.js} +1 -1
- package/cdn/chunks/{chunk.WW7BWZOA.js → chunk.6BDCEAVF.js} +1 -1
- package/cdn/chunks/{chunk.LUAMD5NB.js → chunk.7VSDQRWQ.js} +1 -1
- package/cdn/chunks/{chunk.TYSBPPAJ.js → chunk.A4G6Y76O.js} +1 -1
- package/cdn/chunks/{chunk.6XTN7OUT.js → chunk.ADINOF7M.js} +1 -1
- package/cdn/chunks/{chunk.OWNT475M.js → chunk.AET67HPL.js} +1 -1
- package/cdn/chunks/{chunk.GSMVVBRW.js → chunk.BKAM7ZYV.js} +1 -1
- package/cdn/chunks/{chunk.CDCLW5PL.js → chunk.BURIKJWK.js} +1 -1
- package/cdn/chunks/{chunk.JTHXBNS4.js → chunk.DLTYLPXF.js} +1 -1
- package/cdn/chunks/{chunk.D5YFVJY7.js → chunk.EH4OGY33.js} +1 -1
- package/cdn/chunks/{chunk.3MQOF4L7.js → chunk.EY7SRDP7.js} +1 -1
- package/cdn/chunks/{chunk.5BGVVPGP.js → chunk.FZOGKJ6K.js} +1 -1
- package/cdn/chunks/{chunk.QSPB3OMH.js → chunk.GCJNU5BB.js} +1 -1
- package/cdn/chunks/{chunk.ZGIRYY7O.js → chunk.GU6YYER3.js} +1 -1
- package/cdn/chunks/{chunk.3KPGYN76.js → chunk.HWHDT555.js} +1 -1
- package/cdn/chunks/{chunk.STESQME4.js → chunk.HZ4OPRVF.js} +1 -1
- package/cdn/chunks/{chunk.LBE4KTJ6.js → chunk.IDCOAEYV.js} +1 -1
- package/cdn/chunks/{chunk.L5Z6774H.js → chunk.INQ5A3RT.js} +1 -1
- package/cdn/chunks/{chunk.FFABHDTK.js → chunk.JMR5LRM4.js} +1 -1
- package/cdn/chunks/{chunk.RLKJKYGF.js → chunk.M4RFSHFF.js} +1 -1
- package/cdn/chunks/{chunk.AZ7KRWQV.js → chunk.MNUMMNDI.js} +1 -1
- package/cdn/chunks/{chunk.WMTCKCH6.js → chunk.NHZ6UIWO.js} +1 -1
- package/cdn/chunks/{chunk.4S5ZZBIO.js → chunk.NLBGFAEL.js} +2 -2
- package/cdn/chunks/{chunk.4WLPUJ37.js → chunk.NSYOAWT4.js} +1 -1
- package/cdn/chunks/{chunk.UOTMKIHA.js → chunk.NZ5V2VSI.js} +1 -1
- package/cdn/chunks/{chunk.BQAVG3SW.js → chunk.OYCPNRQV.js} +1 -1
- package/cdn/chunks/{chunk.YPQKQ7IW.js → chunk.PCWU4TKS.js} +1 -1
- package/cdn/chunks/{chunk.OYGDL4GH.js → chunk.PDS5EJLY.js} +1 -1
- package/cdn/chunks/{chunk.L62ZYOAF.js → chunk.PY4OL3TM.js} +1 -1
- package/cdn/chunks/{chunk.NSLWRESX.js → chunk.QKDYT7VV.js} +1 -1
- package/cdn/chunks/{chunk.6PEHFG6N.js → chunk.ROPE253M.js} +1 -1
- package/cdn/chunks/{chunk.EKQQLF47.js → chunk.TNLTS4Y3.js} +1 -1
- package/cdn/chunks/{chunk.CP7YLONJ.js → chunk.TU2SAF4G.js} +1 -1
- package/cdn/chunks/{chunk.JONEZH7P.js → chunk.U34WY52I.js} +1 -1
- package/cdn/chunks/chunk.U7AQLAX6.js +1 -0
- package/cdn/chunks/{chunk.F7ZQQZEU.js → chunk.U7T4LLPE.js} +1 -1
- package/cdn/chunks/{chunk.7ZR3QYFN.js → chunk.V2TDTGPP.js} +1 -1
- package/cdn/chunks/{chunk.FHQJZKY3.js → chunk.WEAE6ZBM.js} +1 -1
- package/cdn/chunks/{chunk.X625Z327.js → chunk.WZC3XCIR.js} +1 -1
- package/cdn/chunks/{chunk.ASY3VCEL.js → chunk.XHNPUCSF.js} +1 -1
- package/cdn/chunks/{chunk.R5NFYUPY.js → chunk.XODZQ2XV.js} +1 -1
- package/cdn/chunks/{chunk.4H33YR6W.js → chunk.XYADX7DL.js} +1 -1
- package/cdn/chunks/{chunk.YP22GOJF.js → chunk.YMD2XYIC.js} +1 -1
- package/cdn/chunks/{chunk.ESSUKJBO.js → chunk.Z5YG3CRT.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/animation/animation.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/button-group/button-group.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/carousel-item/carousel-item.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/header/header.js +1 -1
- package/cdn/components/icon/icon.js +1 -1
- package/cdn/components/include/include.js +1 -1
- 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 +5 -1
- package/cdn/solid-components.bundle.js +3 -3
- package/cdn/solid-components.iife.js +3 -3
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/vscode.html-custom-data.json +1 -1
- package/cdn/web-types.json +2 -2
- 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.THDWAEAB.js → chunk.27P4XVMA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2WQRB4G2.js → chunk.2CYKFWL2.js} +1 -1
- package/cdn-versioned/chunks/chunk.3BP4JKVA.js +73 -0
- package/cdn-versioned/chunks/{chunk.DQE76XPR.js → chunk.3IPN77DT.js} +1 -1
- package/cdn-versioned/chunks/{chunk.IR4B3LG3.js → chunk.3SSIAAEU.js} +1 -1
- package/cdn-versioned/chunks/{chunk.AJK5LUSQ.js → chunk.5BMT34AY.js} +1 -1
- package/cdn-versioned/chunks/{chunk.HGEAXZVW.js → chunk.647JLNTI.js} +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/{chunk.WW7BWZOA.js → chunk.6BDCEAVF.js} +4 -4
- package/cdn-versioned/chunks/{chunk.LUAMD5NB.js → chunk.7VSDQRWQ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.TYSBPPAJ.js → chunk.A4G6Y76O.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6XTN7OUT.js → chunk.ADINOF7M.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OWNT475M.js → chunk.AET67HPL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.GSMVVBRW.js → chunk.BKAM7ZYV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CDCLW5PL.js → chunk.BURIKJWK.js} +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.JTHXBNS4.js → chunk.DLTYLPXF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.D5YFVJY7.js → chunk.EH4OGY33.js} +2 -2
- package/cdn-versioned/chunks/{chunk.3MQOF4L7.js → chunk.EY7SRDP7.js} +2 -2
- package/cdn-versioned/chunks/{chunk.5BGVVPGP.js → chunk.FZOGKJ6K.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QSPB3OMH.js → chunk.GCJNU5BB.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ZGIRYY7O.js → chunk.GU6YYER3.js} +1 -1
- package/cdn-versioned/chunks/{chunk.3KPGYN76.js → chunk.HWHDT555.js} +1 -1
- package/cdn-versioned/chunks/{chunk.STESQME4.js → chunk.HZ4OPRVF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.LBE4KTJ6.js → chunk.IDCOAEYV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.L5Z6774H.js → chunk.INQ5A3RT.js} +1 -1
- package/cdn-versioned/chunks/{chunk.FFABHDTK.js → chunk.JMR5LRM4.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RLKJKYGF.js → chunk.M4RFSHFF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.AZ7KRWQV.js → chunk.MNUMMNDI.js} +2 -2
- package/cdn-versioned/chunks/{chunk.WMTCKCH6.js → chunk.NHZ6UIWO.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4S5ZZBIO.js → chunk.NLBGFAEL.js} +4 -4
- package/cdn-versioned/chunks/{chunk.4WLPUJ37.js → chunk.NSYOAWT4.js} +1 -1
- package/cdn-versioned/chunks/{chunk.UOTMKIHA.js → chunk.NZ5V2VSI.js} +1 -1
- package/cdn-versioned/chunks/{chunk.BQAVG3SW.js → chunk.OYCPNRQV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.YPQKQ7IW.js → chunk.PCWU4TKS.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OYGDL4GH.js → chunk.PDS5EJLY.js} +1 -1
- package/cdn-versioned/chunks/{chunk.L62ZYOAF.js → chunk.PY4OL3TM.js} +2 -2
- package/cdn-versioned/chunks/{chunk.NSLWRESX.js → chunk.QKDYT7VV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6PEHFG6N.js → chunk.ROPE253M.js} +1 -1
- package/cdn-versioned/chunks/{chunk.EKQQLF47.js → chunk.TNLTS4Y3.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CP7YLONJ.js → chunk.TU2SAF4G.js} +4 -4
- package/cdn-versioned/chunks/{chunk.JONEZH7P.js → chunk.U34WY52I.js} +1 -1
- package/cdn-versioned/chunks/chunk.U7AQLAX6.js +1 -0
- package/cdn-versioned/chunks/{chunk.F7ZQQZEU.js → chunk.U7T4LLPE.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7ZR3QYFN.js → chunk.V2TDTGPP.js} +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/{chunk.FHQJZKY3.js → chunk.WEAE6ZBM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.X625Z327.js → chunk.WZC3XCIR.js} +2 -2
- package/cdn-versioned/chunks/{chunk.ASY3VCEL.js → chunk.XHNPUCSF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.R5NFYUPY.js → chunk.XODZQ2XV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4H33YR6W.js → chunk.XYADX7DL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.YP22GOJF.js → chunk.YMD2XYIC.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ESSUKJBO.js → chunk.Z5YG3CRT.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/animation/animation.js +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/button-group/button-group.js +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/carousel-item/carousel-item.js +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/header/header.js +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/include/include.d.ts +1 -1
- package/cdn-versioned/components/include/include.js +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 +206 -202
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +17 -17
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +17 -17
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +81 -81
- package/cdn-versioned/web-types.json +138 -138
- package/dist/chunks/{chunk.NVHRZE37.js → chunk.3MB5BULP.js} +1 -1
- package/dist/chunks/{chunk.O37UUDLF.js → chunk.72RQXFUJ.js} +1 -1
- package/dist/chunks/{chunk.ZGRX6PY5.js → chunk.7A4PCELQ.js} +1 -1
- package/dist/chunks/{chunk.ARGAIVTZ.js → chunk.7TH6VN75.js} +2 -2
- package/dist/chunks/{chunk.ZRYBN4IO.js → chunk.AFNKNM3P.js} +5 -5
- package/dist/chunks/{chunk.RMWDQZ5A.js → chunk.ASAXVCVJ.js} +1 -1
- package/dist/chunks/{chunk.S2SWZRSZ.js → chunk.BAKEFAQ3.js} +1 -1
- package/dist/chunks/{chunk.LHOEG5AE.js → chunk.C3IVTPFT.js} +1 -1
- package/dist/chunks/{chunk.37664KT7.js → chunk.CWZMGP22.js} +1 -1
- package/dist/chunks/{chunk.27SQRFDZ.js → chunk.DWIJB4FE.js} +4 -4
- package/dist/chunks/{chunk.7RBU4QLX.js → chunk.E5RK2KNC.js} +1 -1
- package/dist/chunks/{chunk.JQLMRRV4.js → chunk.EOK7GTLB.js} +1 -1
- package/dist/chunks/{chunk.QS7JZELX.js → chunk.EROZOZSD.js} +1 -1
- package/dist/chunks/{chunk.QGX7W3RC.js → chunk.EZZY6RYW.js} +1 -1
- package/dist/chunks/{chunk.MH53Q556.js → chunk.FTPI46H7.js} +1 -1
- package/dist/chunks/{chunk.3ZXUWSEL.js → chunk.FXAD3J2G.js} +1 -1
- package/dist/chunks/{chunk.TCQ2FKF6.js → chunk.G4S2CHVG.js} +4 -4
- package/dist/chunks/chunk.GC3PXZ6M.js +65 -0
- package/dist/chunks/{chunk.6674RGIJ.js → chunk.GLFF67DA.js} +1 -1
- package/dist/chunks/{chunk.X4EIUBHA.js → chunk.I4JQIHL5.js} +1 -1
- package/dist/chunks/{chunk.6TF5WSJN.js → chunk.IJKJEQKZ.js} +1 -1
- package/dist/chunks/{chunk.CLK342K3.js → chunk.JN6UBBKL.js} +1 -1
- package/dist/chunks/{chunk.B46YO2DU.js → chunk.JWJRZKES.js} +1 -1
- package/dist/chunks/{chunk.TE6Y3FYE.js → chunk.KARKPO6D.js} +1 -1
- package/dist/chunks/{chunk.JLAN3PNI.js → chunk.KCHA5X3N.js} +1 -1
- package/dist/chunks/{chunk.XOBSRYP5.js → chunk.KXWPB4EA.js} +1 -1
- package/dist/chunks/{chunk.MX7GY5XQ.js → chunk.LIHVJG34.js} +1 -1
- package/dist/chunks/{chunk.WB5MD7EZ.js → chunk.LOHV3SQ7.js} +1 -1
- package/dist/chunks/{chunk.RD6YNTHQ.js → chunk.MEYIIQQC.js} +1 -1
- package/dist/chunks/{chunk.7DX4PB23.js → chunk.MSBRGBZ3.js} +2 -2
- package/dist/chunks/{chunk.ZDQYPV5E.js → chunk.N443KN6M.js} +1 -1
- package/dist/chunks/{chunk.7Y2R5BEJ.js → chunk.RJG7FDQN.js} +1 -1
- package/dist/chunks/{chunk.IV33PV6V.js → chunk.S4MVT4ZE.js} +2 -2
- package/dist/chunks/{chunk.WFDQNLQL.js → chunk.S5ODUYDD.js} +1 -1
- package/dist/chunks/{chunk.T7T2LPLI.js → chunk.SAHCI5Y5.js} +1 -1
- package/dist/chunks/{chunk.W4THOWU4.js → chunk.SNEFSXVE.js} +1 -1
- package/dist/chunks/{chunk.LS4AX4SN.js → chunk.SWWBX77U.js} +1 -1
- package/dist/chunks/{chunk.BV77EY65.js → chunk.SX66NTJS.js} +1 -1
- package/dist/chunks/{chunk.RMYHGT7L.js → chunk.V542QHOM.js} +1 -1
- package/dist/chunks/{chunk.IWGFPJAK.js → chunk.VA4H4TO6.js} +1 -1
- package/dist/chunks/{chunk.WTFEKMUV.js → chunk.VDF7KHYO.js} +1 -1
- package/dist/chunks/{chunk.BD26OX54.js → chunk.VYFAJUCN.js} +1 -1
- package/dist/chunks/{chunk.72J5QL5P.js → chunk.WSGE4KVS.js} +3 -3
- package/dist/chunks/{chunk.XRAWUIHI.js → chunk.XW5FWVSL.js} +1 -1
- package/dist/chunks/{chunk.5XUZOO7Z.js → chunk.YMMZA3LC.js} +1 -1
- package/dist/chunks/{chunk.4OXUMYNO.js → chunk.YQ6ZGCYS.js} +1 -1
- package/dist/chunks/{chunk.V7NZEUUG.js → chunk.ZDM4363V.js} +1 -1
- package/dist/chunks/{chunk.SSO3SWRT.js → chunk.ZXUJNQSP.js} +1 -1
- package/dist/chunks/{chunk.LHLEDGCK.js → chunk.ZY536C6C.js} +1 -1
- package/dist/chunks/{chunk.DRB2G3P6.js → chunk.ZYCCX6R7.js} +1 -1
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion-group/accordion-group.js +4 -4
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/audio/audio.js +2 -2
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/brandshape/brandshape.js +2 -2
- package/dist/components/button/button.js +3 -3
- package/dist/components/button-group/button-group.js +2 -2
- package/dist/components/carousel/carousel.js +4 -4
- package/dist/components/carousel-item/carousel-item.js +2 -2
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/combobox/combobox.js +5 -5
- package/dist/components/dialog/dialog.js +5 -5
- package/dist/components/divider/divider.js +2 -2
- package/dist/components/drawer/drawer.js +5 -5
- package/dist/components/dropdown/dropdown.js +3 -3
- package/dist/components/expandable/expandable.js +2 -2
- package/dist/components/flipcard/flipcard.js +5 -5
- package/dist/components/header/header.js +2 -2
- package/dist/components/icon/icon.js +2 -2
- package/dist/components/include/include.js +2 -2
- package/dist/components/input/input.js +3 -3
- package/dist/components/link/link.js +2 -2
- package/dist/components/map-marker/map-marker.js +2 -2
- package/dist/components/navigation-item/navigation-item.js +2 -2
- package/dist/components/notification/notification.js +2 -2
- package/dist/components/optgroup/optgroup.js +3 -3
- package/dist/components/option/option.js +3 -3
- package/dist/components/popup/popup.js +2 -2
- package/dist/components/quickfact/quickfact.js +4 -4
- package/dist/components/radio/radio.js +3 -3
- package/dist/components/radio-button/radio-button.js +2 -2
- package/dist/components/radio-group/radio-group.js +5 -5
- package/dist/components/scrollable/scrollable.js +2 -2
- package/dist/components/select/select.js +5 -5
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/step/step.js +2 -2
- package/dist/components/step-group/step-group.js +2 -2
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/tab/tab.js +2 -2
- package/dist/components/tab-group/tab-group.js +2 -2
- package/dist/components/tab-panel/tab-panel.js +2 -2
- package/dist/components/tag/tag.js +2 -2
- package/dist/components/teaser/teaser.js +2 -2
- package/dist/components/teaser-media/teaser-media.js +2 -2
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/components/video/video.js +2 -2
- package/dist/custom-elements.json +5 -1
- package/dist/solid-components.js +50 -50
- package/dist/utilities/autocomplete-config.js +2 -2
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +2 -2
- 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.NVHRZE37.js → chunk.3MB5BULP.js} +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/{chunk.O37UUDLF.js → chunk.72RQXFUJ.js} +3 -3
- package/dist-versioned/chunks/{chunk.ZGRX6PY5.js → chunk.7A4PCELQ.js} +2 -2
- package/dist-versioned/chunks/{chunk.ARGAIVTZ.js → chunk.7TH6VN75.js} +5 -5
- package/dist-versioned/chunks/{chunk.ZRYBN4IO.js → chunk.AFNKNM3P.js} +34 -34
- package/dist-versioned/chunks/{chunk.RMWDQZ5A.js → chunk.ASAXVCVJ.js} +4 -4
- package/dist-versioned/chunks/{chunk.S2SWZRSZ.js → chunk.BAKEFAQ3.js} +2 -2
- package/dist-versioned/chunks/{chunk.LHOEG5AE.js → chunk.C3IVTPFT.js} +3 -3
- package/dist-versioned/chunks/{chunk.37664KT7.js → chunk.CWZMGP22.js} +3 -3
- package/dist-versioned/chunks/{chunk.27SQRFDZ.js → chunk.DWIJB4FE.js} +5 -5
- package/dist-versioned/chunks/{chunk.7RBU4QLX.js → chunk.E5RK2KNC.js} +3 -3
- package/dist-versioned/chunks/{chunk.JQLMRRV4.js → chunk.EOK7GTLB.js} +2 -2
- package/dist-versioned/chunks/{chunk.QS7JZELX.js → chunk.EROZOZSD.js} +2 -2
- package/dist-versioned/chunks/{chunk.QGX7W3RC.js → chunk.EZZY6RYW.js} +4 -4
- package/dist-versioned/chunks/{chunk.MH53Q556.js → chunk.FTPI46H7.js} +3 -3
- package/dist-versioned/chunks/{chunk.3ZXUWSEL.js → chunk.FXAD3J2G.js} +3 -3
- package/dist-versioned/chunks/{chunk.TCQ2FKF6.js → chunk.G4S2CHVG.js} +30 -30
- package/dist-versioned/chunks/chunk.GC3PXZ6M.js +65 -0
- package/dist-versioned/chunks/{chunk.6674RGIJ.js → chunk.GLFF67DA.js} +6 -6
- package/dist-versioned/chunks/{chunk.X4EIUBHA.js → chunk.I4JQIHL5.js} +7 -7
- package/dist-versioned/chunks/{chunk.6TF5WSJN.js → chunk.IJKJEQKZ.js} +3 -3
- package/dist-versioned/chunks/{chunk.CLK342K3.js → chunk.JN6UBBKL.js} +3 -3
- package/dist-versioned/chunks/{chunk.B46YO2DU.js → chunk.JWJRZKES.js} +12 -12
- package/dist-versioned/chunks/{chunk.TE6Y3FYE.js → chunk.KARKPO6D.js} +3 -3
- package/dist-versioned/chunks/{chunk.JLAN3PNI.js → chunk.KCHA5X3N.js} +6 -6
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/{chunk.XOBSRYP5.js → chunk.KXWPB4EA.js} +10 -10
- package/dist-versioned/chunks/{chunk.MX7GY5XQ.js → chunk.LIHVJG34.js} +2 -2
- package/dist-versioned/chunks/{chunk.WB5MD7EZ.js → chunk.LOHV3SQ7.js} +2 -2
- package/dist-versioned/chunks/{chunk.RD6YNTHQ.js → chunk.MEYIIQQC.js} +14 -14
- package/dist-versioned/chunks/{chunk.7DX4PB23.js → chunk.MSBRGBZ3.js} +8 -8
- package/dist-versioned/chunks/{chunk.ZDQYPV5E.js → chunk.N443KN6M.js} +2 -2
- package/dist-versioned/chunks/{chunk.7Y2R5BEJ.js → chunk.RJG7FDQN.js} +3 -3
- package/dist-versioned/chunks/{chunk.IV33PV6V.js → chunk.S4MVT4ZE.js} +7 -7
- package/dist-versioned/chunks/{chunk.WFDQNLQL.js → chunk.S5ODUYDD.js} +6 -6
- package/dist-versioned/chunks/{chunk.T7T2LPLI.js → chunk.SAHCI5Y5.js} +2 -2
- package/dist-versioned/chunks/{chunk.W4THOWU4.js → chunk.SNEFSXVE.js} +6 -6
- package/dist-versioned/chunks/{chunk.LS4AX4SN.js → chunk.SWWBX77U.js} +3 -3
- package/dist-versioned/chunks/{chunk.BV77EY65.js → chunk.SX66NTJS.js} +6 -6
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/{chunk.RMYHGT7L.js → chunk.V542QHOM.js} +3 -3
- package/dist-versioned/chunks/{chunk.IWGFPJAK.js → chunk.VA4H4TO6.js} +3 -3
- package/dist-versioned/chunks/{chunk.WTFEKMUV.js → chunk.VDF7KHYO.js} +2 -2
- package/dist-versioned/chunks/{chunk.BD26OX54.js → chunk.VYFAJUCN.js} +3 -3
- package/dist-versioned/chunks/{chunk.72J5QL5P.js → chunk.WSGE4KVS.js} +16 -16
- package/dist-versioned/chunks/{chunk.XRAWUIHI.js → chunk.XW5FWVSL.js} +2 -2
- package/dist-versioned/chunks/{chunk.5XUZOO7Z.js → chunk.YMMZA3LC.js} +4 -4
- package/dist-versioned/chunks/{chunk.4OXUMYNO.js → chunk.YQ6ZGCYS.js} +3 -3
- package/dist-versioned/chunks/{chunk.V7NZEUUG.js → chunk.ZDM4363V.js} +5 -5
- package/dist-versioned/chunks/{chunk.SSO3SWRT.js → chunk.ZXUJNQSP.js} +2 -2
- package/dist-versioned/chunks/{chunk.LHLEDGCK.js → chunk.ZY536C6C.js} +2 -2
- package/dist-versioned/chunks/{chunk.DRB2G3P6.js → chunk.ZYCCX6R7.js} +4 -4
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion/accordion.js +3 -3
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +4 -4
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/animation/animation.js +2 -2
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +2 -2
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/badge/badge.js +2 -2
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.js +2 -2
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button/button.js +3 -3
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.js +2 -2
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.js +4 -4
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.js +2 -2
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +3 -3
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.js +3 -3
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/combobox/combobox.js +5 -5
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +5 -5
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/divider/divider.js +2 -2
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +5 -5
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.js +3 -3
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.js +2 -2
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.js +5 -5
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/header/header.js +2 -2
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/icon/icon.js +2 -2
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/include/include.js +2 -2
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/input/input.js +3 -3
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/link/link.js +2 -2
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.js +2 -2
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +2 -2
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +2 -2
- package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/dist-versioned/components/optgroup/optgroup.js +3 -3
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/option/option.js +3 -3
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/popup/popup.js +2 -2
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +4 -4
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio/radio.js +3 -3
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.js +2 -2
- package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/dist-versioned/components/radio-group/radio-group.js +5 -5
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.js +2 -2
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/select/select.js +5 -5
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.js +2 -2
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step/step.js +2 -2
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.js +2 -2
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/switch/switch.js +2 -2
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab/tab.js +2 -2
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +2 -2
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.js +2 -2
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/tag/tag.js +2 -2
- package/dist-versioned/components/teaser/teaser.js +2 -2
- package/dist-versioned/components/teaser-media/teaser-media.js +2 -2
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.js +2 -2
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.js +3 -3
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/components/video/video.js +2 -2
- package/dist-versioned/custom-elements.json +206 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +50 -50
- package/dist-versioned/utilities/autocomplete-config.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +81 -81
- package/dist-versioned/web-types.json +138 -138
- package/package.json +2 -2
- package/cdn/chunks/chunk.KNBE5U7L.js +0 -1
- package/cdn/chunks/chunk.KXC4ESLY.js +0 -73
- package/cdn-versioned/chunks/chunk.KNBE5U7L.js +0 -1
- package/cdn-versioned/chunks/chunk.KXC4ESLY.js +0 -73
- package/dist/chunks/chunk.YZQTF7B4.js +0 -65
- package/dist-versioned/chunks/chunk.YZQTF7B4.js +0 -65
@@ -1 +1 @@
|
|
1
|
-
import{a as Dt}from"./chunk.DCOFYPWX.js";import{a as Mt,b as E,d as Et,h as Rt}from"./chunk.KXC4ESLY.js";import{b as kt,e as Ot}from"./chunk.IRWHG2Q4.js";import{a as R,b as W,c as dt,e as b}from"./chunk.TJOCV4DC.js";var V=Math.min,C=Math.max,at=Math.round,ft=Math.floor,B=t=>({x:t,y:t}),fe={left:"right",right:"left",bottom:"top",top:"bottom"},ue={start:"end",end:"start"};function pt(t,e,n){return C(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 $t(t){let e=ct(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>ue[e])}function he(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 Ft(t,e,n,i){let o=Q(t),s=he(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=>fe[e])}function de(t){return R({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?de(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,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=y!=null?y:f,u=v!=null?v:u,h=W(R({},h),{[w]:R(R({},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})),y=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:y,offsetParent:v,strategy:a}):y);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",y=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],L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),k=L?L[v]:0;(!k||!await(r.isElement==null?void 0:r.isElement(L)))&&(k=l.floating[v]||s.floating[d]);let j=A/2-O/2,N=k/2-p[d]/2-1,M=V(u[g],N),X=V(u[y],N),H=M,q=k-p[d]-X,P=k/2-p[d]/2+j,D=pt(H,P,q),it=!a.arrow&&Q(o)!=null&&P!==D&&s.reference[d]/2-(P<H?M:X)-p[d]/2<0,_=it?P<H?P-H:P-q:0;return{[h]:m[h]+_,data:R({[h]:D,centerOffset:P-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,P=J(t,e),{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=dt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),y=G(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[ct(l)]:$t(l)),L=d!=="none";!m&&L&&O.push(...Ft(l,p,d,A));let k=[l,...O],j=await yt(e,w),N=[],M=((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(M=[...M,{placement:o,overflows:N}],!N.every(D=>D<=0)){var X,H;let D=(((X=s.flip)==null?void 0:X.index)||0)+1,it=k[D];if(it)return{data:{index:D,overflows:M},reset:{placement:it}};let _=(H=M.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 q;let ot=(q=M.filter(U=>{if(L){let K=G(U.placement);return K===y||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,ae)=>K+ae,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:q[0];ot&&(_=ot);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function me(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 me(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(R({},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,y:v}=g;return{x:y,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",y=m==="y"?"bottom":"right",v=h+f[g],A=h-f[y];h=pt(v,h,A)}if(r){let g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",v=d+f[g],A=d-f[y];d=pt(v,d,A)}let p=l.fn(W(R({},e),{[m]:h,[u]:d}));return W(R({},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,M=J(t,e),{apply:a=()=>{}}=M,c=dt(M,["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 y=p-f.top-f.bottom,v=d-f.left-f.right,A=V(p-f[w],y),O=V(d-f[g],v),L=!e.middlewareData.shift,k=A,j=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(k=y),L&&!m){let X=C(f.left,0),H=C(f.right,0),q=C(f.top,0),P=C(f.bottom,0);h?j=d-2*(X!==0||H!==0?X+H:C(f.left,f.right)):k=p-2*(q!==0||P!==0?q+P:C(f.top,f.bottom))}await a(W(R({},e),{availableWidth:j,availableHeight:k}));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 Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function F(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function Yt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(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 qt(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 n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","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(;F(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 T(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||$(t);return Yt(e)?e.host:e}function Kt(t){let e=Y(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:F(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=T(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=F(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(!F(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 pe=B(0);function Zt(t){let e=T(t);return!bt()||!e.visualViewport?pe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ge(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(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=ge(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=T(s),h=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&h!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=S(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,u*=w.y,a+=v,c+=A,d=T(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($(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 we(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(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=F(i);if((u||!u&&!s)&&((tt(i)!=="body"||st(r))&&(a=ht(i)),F(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 ye(t){return Array.from(t.getClientRects())}function xe(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=C(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=C(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return S(i).direction==="rtl"&&(r+=C(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ve(t,e){let n=T(t),i=$(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 be(t,e){let n=nt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=F(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=ve(t,n);else if(e==="document")i=xe($(t));else if(z(e))i=be(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 Ae(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 Oe(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ae(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let u=Gt(e,f,o);return c.top=C(u.top,c.top),c.right=V(u.right,c.right),c.bottom=V(u.bottom,c.bottom),c.left=C(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 Ee(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Re(t,e,n){let i=F(e),o=$(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(!F(t)||S(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=T(t);if(ut(t))return n;if(!F(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&&qt(i)&&Pt(i);)i=Jt(i,e);return i&&et(i)&&Pt(i)&&!vt(i)?n:i||Ut(t)||n}var Ce=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,i=await n(t.floating);return{reference:Re(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Te(t){return S(t).direction==="rtl"}var Pe={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:$,getClippingRect:Oe,getOffsetParent:ne,getElementRects:Ce,getClientRects:ye,getDimensions:Ee,getScale:lt,isElement:z,isRTL:Te};function Le(t,e){let n=null,i,o=$(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{left:c,top:f,width:u,height:m}=t.getBoundingClientRect();if(l||e(),!u||!m)return;let h=ft(f),d=ft(o.clientWidth-(c+u)),p=ft(o.clientHeight-(f+m)),w=ft(c),y={rootMargin:-h+"px "+-d+"px "+-p+"px "+-w+"px",threshold:C(0,V(1,a))||1},v=!0;function A(O){let L=O[0].intersectionRatio;if(L!==a){if(!v)return r();L?r(!1,L):i=setTimeout(()=>{r(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(A,W(R({},y),{root:o.ownerDocument}))}catch(O){n=new IntersectionObserver(A,y)}n.observe(t)}return r(!0),s}function ie(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?Le(c,n):null,m=-1,h=null;r&&(h=new ResizeObserver(g=>{let[y]=g;y&&y.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&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(d)}}var oe=jt;var re=_t,se=Vt,St=It;var le=Wt;var ce=(t,e,n)=>{let i=new Map,o=R({platform:Pe},n),s=W(R({},o.platform),{_c:i});return Ht(t,e,W(R({},o),{platform:s}))};var x=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=ie(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=[oe({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(se({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(re({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(le({element:this.arrowEl,padding:this.arrowPadding})),ce(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>`}};x.styles=[...Rt.styles,kt`: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"]')],x.prototype,"popup",2),b([Et('[part="arrow"]')],x.prototype,"arrowEl",2),b([E()],x.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],x.prototype,"active",2),b([E({reflect:!0})],x.prototype,"placement",2),b([E({reflect:!0})],x.prototype,"strategy",2),b([E({type:Number})],x.prototype,"distance",2),b([E({type:Number})],x.prototype,"skidding",2),b([E({type:Boolean})],x.prototype,"arrow",2),b([E({attribute:"arrow-placement"})],x.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number})],x.prototype,"arrowPadding",2),b([E({type:Boolean})],x.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(" ")}})],x.prototype,"flipFallbackPlacements",2),b([E({attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),b([E({type:Object})],x.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),b([E({type:Boolean})],x.prototype,"shift",2),b([E({type:Object})],x.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),b([E({attribute:"auto-size"})],x.prototype,"autoSize",2),b([E()],x.prototype,"sync",2),b([E({type:Object})],x.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=b([Mt("sd-4-0-0-next-11-popup")],x);export{x as a};
|
1
|
+
import{a as Dt}from"./chunk.DCOFYPWX.js";import{a as Mt,b as E,d as Et,h as Rt}from"./chunk.3BP4JKVA.js";import{b as kt,e as Ot}from"./chunk.IRWHG2Q4.js";import{a as R,b as W,c as dt,e as b}from"./chunk.TJOCV4DC.js";var V=Math.min,C=Math.max,at=Math.round,ft=Math.floor,B=t=>({x:t,y:t}),fe={left:"right",right:"left",bottom:"top",top:"bottom"},ue={start:"end",end:"start"};function pt(t,e,n){return C(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 $t(t){let e=ct(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>ue[e])}function he(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 Ft(t,e,n,i){let o=Q(t),s=he(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=>fe[e])}function de(t){return R({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?de(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,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=y!=null?y:f,u=v!=null?v:u,h=W(R({},h),{[w]:R(R({},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})),y=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:y,offsetParent:v,strategy:a}):y);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",y=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],L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),k=L?L[v]:0;(!k||!await(r.isElement==null?void 0:r.isElement(L)))&&(k=l.floating[v]||s.floating[d]);let j=A/2-O/2,N=k/2-p[d]/2-1,M=V(u[g],N),X=V(u[y],N),H=M,q=k-p[d]-X,P=k/2-p[d]/2+j,D=pt(H,P,q),it=!a.arrow&&Q(o)!=null&&P!==D&&s.reference[d]/2-(P<H?M:X)-p[d]/2<0,_=it?P<H?P-H:P-q:0;return{[h]:m[h]+_,data:R({[h]:D,centerOffset:P-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,P=J(t,e),{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=dt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),y=G(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[ct(l)]:$t(l)),L=d!=="none";!m&&L&&O.push(...Ft(l,p,d,A));let k=[l,...O],j=await yt(e,w),N=[],M=((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(M=[...M,{placement:o,overflows:N}],!N.every(D=>D<=0)){var X,H;let D=(((X=s.flip)==null?void 0:X.index)||0)+1,it=k[D];if(it)return{data:{index:D,overflows:M},reset:{placement:it}};let _=(H=M.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 q;let ot=(q=M.filter(U=>{if(L){let K=G(U.placement);return K===y||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,ae)=>K+ae,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:q[0];ot&&(_=ot);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function me(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 me(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(R({},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,y:v}=g;return{x:y,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",y=m==="y"?"bottom":"right",v=h+f[g],A=h-f[y];h=pt(v,h,A)}if(r){let g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",v=d+f[g],A=d-f[y];d=pt(v,d,A)}let p=l.fn(W(R({},e),{[m]:h,[u]:d}));return W(R({},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,M=J(t,e),{apply:a=()=>{}}=M,c=dt(M,["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 y=p-f.top-f.bottom,v=d-f.left-f.right,A=V(p-f[w],y),O=V(d-f[g],v),L=!e.middlewareData.shift,k=A,j=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(k=y),L&&!m){let X=C(f.left,0),H=C(f.right,0),q=C(f.top,0),P=C(f.bottom,0);h?j=d-2*(X!==0||H!==0?X+H:C(f.left,f.right)):k=p-2*(q!==0||P!==0?q+P:C(f.top,f.bottom))}await a(W(R({},e),{availableWidth:j,availableHeight:k}));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 Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function F(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function Yt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(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 qt(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 n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","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(;F(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 T(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||$(t);return Yt(e)?e.host:e}function Kt(t){let e=Y(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:F(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=T(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=F(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(!F(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 pe=B(0);function Zt(t){let e=T(t);return!bt()||!e.visualViewport?pe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ge(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(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=ge(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=T(s),h=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&h!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=S(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,u*=w.y,a+=v,c+=A,d=T(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($(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 we(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(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=F(i);if((u||!u&&!s)&&((tt(i)!=="body"||st(r))&&(a=ht(i)),F(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 ye(t){return Array.from(t.getClientRects())}function xe(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=C(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=C(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return S(i).direction==="rtl"&&(r+=C(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ve(t,e){let n=T(t),i=$(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 be(t,e){let n=nt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=F(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=ve(t,n);else if(e==="document")i=xe($(t));else if(z(e))i=be(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 Ae(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 Oe(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ae(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let u=Gt(e,f,o);return c.top=C(u.top,c.top),c.right=V(u.right,c.right),c.bottom=V(u.bottom,c.bottom),c.left=C(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 Ee(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Re(t,e,n){let i=F(e),o=$(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(!F(t)||S(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=T(t);if(ut(t))return n;if(!F(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&&qt(i)&&Pt(i);)i=Jt(i,e);return i&&et(i)&&Pt(i)&&!vt(i)?n:i||Ut(t)||n}var Ce=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,i=await n(t.floating);return{reference:Re(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Te(t){return S(t).direction==="rtl"}var Pe={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:$,getClippingRect:Oe,getOffsetParent:ne,getElementRects:Ce,getClientRects:ye,getDimensions:Ee,getScale:lt,isElement:z,isRTL:Te};function Le(t,e){let n=null,i,o=$(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{left:c,top:f,width:u,height:m}=t.getBoundingClientRect();if(l||e(),!u||!m)return;let h=ft(f),d=ft(o.clientWidth-(c+u)),p=ft(o.clientHeight-(f+m)),w=ft(c),y={rootMargin:-h+"px "+-d+"px "+-p+"px "+-w+"px",threshold:C(0,V(1,a))||1},v=!0;function A(O){let L=O[0].intersectionRatio;if(L!==a){if(!v)return r();L?r(!1,L):i=setTimeout(()=>{r(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(A,W(R({},y),{root:o.ownerDocument}))}catch(O){n=new IntersectionObserver(A,y)}n.observe(t)}return r(!0),s}function ie(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?Le(c,n):null,m=-1,h=null;r&&(h=new ResizeObserver(g=>{let[y]=g;y&&y.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&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(d)}}var oe=jt;var re=_t,se=Vt,St=It;var le=Wt;var ce=(t,e,n)=>{let i=new Map,o=R({platform:Pe},n),s=W(R({},o.platform),{_c:i});return Ht(t,e,W(R({},o),{platform:s}))};var x=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=ie(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=[oe({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(se({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(re({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(le({element:this.arrowEl,padding:this.arrowPadding})),ce(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>`}};x.styles=[...Rt.styles,kt`: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"]')],x.prototype,"popup",2),b([Et('[part="arrow"]')],x.prototype,"arrowEl",2),b([E()],x.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],x.prototype,"active",2),b([E({reflect:!0})],x.prototype,"placement",2),b([E({reflect:!0})],x.prototype,"strategy",2),b([E({type:Number})],x.prototype,"distance",2),b([E({type:Number})],x.prototype,"skidding",2),b([E({type:Boolean})],x.prototype,"arrow",2),b([E({attribute:"arrow-placement"})],x.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number})],x.prototype,"arrowPadding",2),b([E({type:Boolean})],x.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(" ")}})],x.prototype,"flipFallbackPlacements",2),b([E({attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),b([E({type:Object})],x.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),b([E({type:Boolean})],x.prototype,"shift",2),b([E({type:Object})],x.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),b([E({attribute:"auto-size"})],x.prototype,"autoSize",2),b([E()],x.prototype,"sync",2),b([E({type:Object})],x.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=b([Mt("sd-4-0-0-next-12-popup")],x);export{x as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.KXC4ESLY.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-0-0-next-11-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-4-0-0-next-11-icon class="text-3xl" name="pause" library="system"></sd-4-0-0-next-11-icon></slot>`:s`<slot name="play-icon"><sd-4-0-0-next-11-icon class="text-3xl" name="start" library="system"></sd-4-0-0-next-11-icon></slot>`}</sd-4-0-0-next-11-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-4-0-0-next-11-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-4-0-0-next-11-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-0-0-next-11-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-4-0-0-next-11-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-4-0-0-next-11-drawer><slot name="transcript"></slot></sd-4-0-0-next-11-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-0-0-next-11-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-0-0-next-11-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-4-0-0-next-11-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-4-0-0-next-11-audio")],t);export{t as a};
|
1
|
+
import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.3BP4JKVA.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-0-0-next-12-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-4-0-0-next-12-icon class="text-3xl" name="pause" library="system"></sd-4-0-0-next-12-icon></slot>`:s`<slot name="play-icon"><sd-4-0-0-next-12-icon class="text-3xl" name="start" library="system"></sd-4-0-0-next-12-icon></slot>`}</sd-4-0-0-next-12-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-4-0-0-next-12-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-4-0-0-next-12-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-0-0-next-12-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-4-0-0-next-12-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-4-0-0-next-12-drawer><slot name="transcript"></slot></sd-4-0-0-next-12-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-0-0-next-12-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-0-0-next-12-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-4-0-0-next-12-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-4-0-0-next-12-audio")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.
|
1
|
+
import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.3BP4JKVA.js";import{b as h,e as i}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return i`<span part="base" class="${r("sd-4-0-0-next-12-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${r("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?i`<span part="checked" class="${r("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${r("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...n.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([l()],e.prototype,"checked",2),t([l()],e.prototype,"hasFocus",2),t([s({reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([a("checked")],e.prototype,"handleCheckedChange",1),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-4-0-0-next-12-radio")],e);export{e as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{b as y,c as g}from"./chunk.65NSSTJE.js";import{a}from"./chunk.HE2LNCWW.js";import{a as d,b as m}from"./chunk.5ZILM4TA.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as v}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as i,c as p,d as f,g as u,h as l}from"./chunk.
|
1
|
+
import{b as y,c as g}from"./chunk.65NSSTJE.js";import{a}from"./chunk.HE2LNCWW.js";import{a as d,b as m}from"./chunk.5ZILM4TA.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as v}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as i,c as p,d as f,g as u,h as l}from"./chunk.3BP4JKVA.js";import{b as c}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.formControlController=new y(this,{form:e=>{if(e.hasAttribute("form")){let s=e.getRootNode(),o=e.getAttribute("form");return s.getElementById(o)}return e.closest("form")}});this.hasSlotController=new v(this,"[default]","icon-left","icon-right");this.invalid=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.loading=!1;this.type="button";this.name="";this.value="";this.href=""}get validity(){return this.isButton()?this.button.validity:g}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(e){if(this.disabled||this.loading){e.preventDefault(),e.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){let e=this.isLink(),s=e?d`a`:d`button`,o={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0};return m`<${s} part="base" class="${n(`font-md leading-[calc(var(--tw-varspacing)-2px)] no-underline
|
2
2
|
w-full h-varspacing whitespace-nowrap align-middle inline-flex items-stretch justify-center
|
3
3
|
border transition-colors duration-200 ease-in-out rounded-default
|
4
4
|
select-none cursor-[inherit]`,this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.loading&&"relative cursor-wait",this.disabled&&"cursor-not-allowed",o["icon-only"]&&"px-0 w-varspacing",{sm:"text-sm varspacing-8 px-4",md:"text-base varspacing-10 px-4",lg:"text-base varspacing-12 px-4"}[this.size],{primary:this.inverted?`text-primary bg-white border-transparent
|
@@ -22,4 +22,4 @@ import{b as y,c as g}from"./chunk.65NSSTJE.js";import{a}from"./chunk.HE2LNCWW.js
|
|
22
22
|
disabled:text-neutral-500`,cta:`text-white bg-accent-500 border-transparent
|
23
23
|
hover:bg-accent-550
|
24
24
|
active:bg-accent-700
|
25
|
-
${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(e?void 0:this.disabled)}" type="${a(e?void 0:this.type)}" title="${this.title}" name="${a(e?void 0:this.name)}" value="${a(e?void 0:this.value)}" href="${a(e?this.href:void 0)}" target="${a(e?this.target:void 0)}" download="${a(e?this.download:void 0)}" rel="${a(e&&this.target?"noreferrer noopener":void 0)}" role="${a(e?void 0:"button")}" aria-disabled="${this.disabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${n("flex flex-auto items-center pointer-events-none",o["icon-only"]&&"hidden",this.loading&&"invisible",o["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${n(o["icon-only"]?"flex flex-auto items-center pointer-events-none":"inline-block",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${n("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",o["icon-only"]&&"hidden",o["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-4-0-0-next-
|
25
|
+
${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(e?void 0:this.disabled)}" type="${a(e?void 0:this.type)}" title="${this.title}" name="${a(e?void 0:this.name)}" value="${a(e?void 0:this.value)}" href="${a(e?this.href:void 0)}" target="${a(e?this.target:void 0)}" download="${a(e?this.download:void 0)}" rel="${a(e&&this.target?"noreferrer noopener":void 0)}" role="${a(e?void 0:"button")}" aria-disabled="${this.disabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${n("flex flex-auto items-center pointer-events-none",o["icon-only"]&&"hidden",this.loading&&"invisible",o["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${n(o["icon-only"]?"flex flex-auto items-center pointer-events-none":"inline-block",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${n("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",o["icon-only"]&&"hidden",o["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-4-0-0-next-12-spinner class="${n("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-4-0-0-next-12-spinner>`:""}</${s}>`}};t.styles=[...l.styles,c`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-0-0-next-12-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-4-0-0-next-12-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-4-0-0-next-12-icon),sd-4-0-0-next-12-spinner{font-size:calc(var(--tw-varspacing)/2)}`],r([f("a, button")],t.prototype,"button",2),r([u({selector:"sd-4-0-0-next-12-icon"})],t.prototype,"_iconsInDefaultSlot",2),r([p()],t.prototype,"invalid",2),r([i()],t.prototype,"title",2),r([i({reflect:!0})],t.prototype,"variant",2),r([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),r([i({reflect:!0})],t.prototype,"size",2),r([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),r([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),r([i()],t.prototype,"type",2),r([i()],t.prototype,"name",2),r([i()],t.prototype,"value",2),r([i()],t.prototype,"href",2),r([i()],t.prototype,"target",2),r([i()],t.prototype,"download",2),r([i()],t.prototype,"form",2),r([i({attribute:"formaction"})],t.prototype,"formAction",2),r([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),r([i({attribute:"formmethod"})],t.prototype,"formMethod",2),r([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),r([i({attribute:"formtarget"})],t.prototype,"formTarget",2),r([b("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=r([h("sd-4-0-0-next-12-button")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.
|
1
|
+
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.3BP4JKVA.js";import{b as d,e as i}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.hasSlotController=new c(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(r){if(this.disabled){r.preventDefault(),r.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("[default]"),o=this.hasSlotController.test("icon"),m=`${this.size}-${r?"label":"no-label"}`;return i`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${n("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 border-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",r&&"px-4",this.hasFocus&&"focused-class",r&&"button--has-label",o&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${n(o&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!o}"></slot>${r?i`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...l.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-0-next-12-button-group__button--first:not(.sd-4-0-0-next-12-button-group__button--last)) button{border-bottom-right-radius:var(--sd-border-radius-none,0);border-top-right-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-12-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-12-button-group__button--last:not(.sd-4-0-0-next-12-button-group__button--first)) button{border-bottom-left-radius:var(--sd-border-radius-none,0);border-top-left-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-12-button-group__button:not(.sd-4-0-0-next-12-button-group__button--first)){margin-inline-start:-1px}:host(.sd-4-0-0-next-12-button-group__button--hover){z-index:10}:host(.sd-4-0-0-next-12-button-group__button--focus),:host(.sd-4-0-0-next-12-button-group__button[checked]){z-index:20}`],e([a(".button")],t.prototype,"input",2),e([a(".hidden-input")],t.prototype,"hiddenInput",2),e([b()],t.prototype,"hasFocus",2),e([s({reflect:!0})],t.prototype,"size",2),e([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s({type:Boolean,reflect:!0})],t.prototype,"checked",2),e([s()],t.prototype,"value",2),e([h("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([u("sd-4-0-0-next-12-radio-button")],t);export{t as a};
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import{a as F}from"./chunk.
|
1
|
+
import{a as F}from"./chunk.27P4XVMA.js";import{a as z}from"./chunk.INQ5A3RT.js";import{a as M}from"./chunk.D7TMPF3D.js";import{c as A}from"./chunk.3L472FD4.js";import{b as L}from"./chunk.65NSSTJE.js";import{a as x,c as O}from"./chunk.A3DKF5BY.js";import{a as E,b as k}from"./chunk.3IPN77DT.js";import{a as g,d as y}from"./chunk.RQYP7MH5.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as I}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as T,b as n,c as u,d as m,g as $,h as v}from"./chunk.3BP4JKVA.js";import{b as C,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var s=class extends v{constructor(){super(...arguments);this.formControlController=new L(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-12-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new I(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.localize.term("tagsSelected");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-4-0-0-next-12-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-4-0-0-next-
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-4-0-0-next-12-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-4-0-0-next-12-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-4-0-0-next-12-tag"),c=(h=o==null?void 0:o.nextElementSibling)==null?void 0:h.querySelector("sd-4-0-0-next-12-tag");this.handleTagRemove(new CustomEvent("sd-remove"),t),this.updateComplete.then(()=>{c?c.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-4-0-0-next-12-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-4-0-0-next-12-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-4-0-0-next-12-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-4-0-0-next-12-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-4-0-0-next-12-option")]}getFirstOption(){return this.querySelector("sd-4-0-0-next-12-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"?E(l):l}</div>`}return[d``]}):[d`<sd-4-0-0-next-12-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.maxOptionsTagLabel}</sd-4-0-0-next-
|
9
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.maxOptionsTagLabel}</sd-4-0-0-next-12-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-4-0-0-next-12-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 y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:e,options:t}=O(this,"select.show",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await y(this);let{keyframes:e,options:t}=O(this,"select.hide",{dir:this.localize.dir()});await g(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,w(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,w(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")},t=this.label?!0:!!e.label,l=this.helpText?!0:!!e.helpText,a=this.clearable&&!this.disabled,h=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",o=this.disabled?"cursor-not-allowed":"cursor-pointer",r={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${p("relative text-left",o,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" role="alert" aria-live="assertive">${this.deletedTagLabel}</span><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><slot name="tooltip"></slot></div><div part="form-control-input" class="${p("relative w-full bg-white",h==="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"}[h],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-12-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",o,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(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${p("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" 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",r,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-4-0-0-next-
|
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",o,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(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${p("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" 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",r,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-4-0-0-next-12-icon class="${p("text-icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-12-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-next-12-icon part="invalid-icon" class="${p(r,c,"text-error")}" library="system" name="risk"></sd-4-0-0-next-12-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-next-12-icon part="valid-icon" class="${p("flex-shrink-0 text-success",r,c)}" library="system" name="status-check"></sd-4-0-0-next-12-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",c)}"><sd-4-0-0-next-12-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-12-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-4-0-0-next-12-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-4-0-0-next-12-icon":k,"sd-4-0-0-next-12-popup":z,"sd-4-0-0-next-12-tag":F},s.styles=[...v.styles,C`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-12-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-12-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-4-0-0-next-12-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-next-12-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-12-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([$({selector:"sd-4-0-0-next-12-option"})],s.prototype,"_optionsInDefaultSlot",2),i([m("sd-4-0-0-next-12-popup")],s.prototype,"popup",2),i([m('[part="combobox"]')],s.prototype,"combobox",2),i([m('[part="display-input"]')],s.prototype,"displayInput",2),i([m(".value-input")],s.prototype,"valueInput",2),i([m('[part="listbox"]')],s.prototype,"listbox",2),i([m("#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([M()],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([T("sd-4-0-0-next-12-select")],s);x("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});x("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as A}from"./chunk.X2O263YD.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as T}from"./chunk.HE2LNCWW.js";import{a as o,c as l}from"./chunk.A3DKF5BY.js";import{a as n,d as p}from"./chunk.RQYP7MH5.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as C}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as E,b as r,d as h,h as w}from"./chunk.
|
1
|
+
import{a as A}from"./chunk.X2O263YD.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as T}from"./chunk.HE2LNCWW.js";import{a as o,c as l}from"./chunk.A3DKF5BY.js";import{a as n,d as p}from"./chunk.RQYP7MH5.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as C}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as E,b as r,d as h,h as w}from"./chunk.3BP4JKVA.js";import{b as x,e as v}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";function k(u){return u.charAt(0).toUpperCase()+u.slice(1)}var e=class extends w{constructor(){super(...arguments);this.hasSlotController=new C(this,"footer");this.localize=new L(this);this.modal=new A(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let t=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([p(this.drawer),p(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a&&a.setAttribute("autofocus","")});let d=l(this,`drawer.show${k(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([p(this.drawer),p(this.overlay)]);let a=l(this,`drawer.hide${k(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}render(){return v`<div id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.label}" aria-labelledby="${T(this.noHeader?void 0:"title")}" tabindex="0">${this.noHeader?"":v`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-4-0-0-next-12-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-4-0-0-next-12-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-0-0-next-12-icon></sd-4-0-0-next-12-button></div></header>`}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};e.styles=[...w.styles,x`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],i([h("[part=base]")],e.prototype,"drawer",2),i([h("[part=panel]")],e.prototype,"panel",2),i([h("[part=overlay]")],e.prototype,"overlay",2),i([h("[part=close-button]")],e.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],e.prototype,"open",2),i([r({attribute:"label",reflect:!0})],e.prototype,"label",2),i([r({reflect:!0})],e.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],e.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean})],e.prototype,"noHeader",2),i([b("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),i([b("contained",{waitUntilFirstUpdate:!0})],e.prototype,"handleNoModalChange",1),e=i([E("sd-4-0-0-next-12-drawer")],e);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.
|
1
|
+
import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.3BP4JKVA.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-4-0-0-next-12-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-4-0-0-next-12-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-0-0-next-12-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-next-12-icon></button>`:r`<sd-4-0-0-next-12-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-next-12-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-4-0-0-next-12-navigation-item")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as l}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as o,b as a,h as i}from"./chunk.
|
1
|
+
import{a as l}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as o,b as a,h as i}from"./chunk.3BP4JKVA.js";import{b as r,e as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var p=0,t=class extends i{constructor(){super(...arguments);this.attrId=++p;this.componentId=`sd-4-0-0-next-12-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return s`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...i.styles,r`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([a({reflect:!0})],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-4-0-0-next-12-tab-panel")],t);export{t as a};
|