@solid-design-system/components 5.15.7 → 5.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/chunks/{chunk.4OSXAE67.js → chunk.2ISKXAGO.js} +1 -1
- package/cdn/chunks/{chunk.LZDITSGD.js → chunk.2SZLINMB.js} +1 -1
- package/cdn/chunks/{chunk.GVD7DPUX.js → chunk.32O6YP3U.js} +1 -1
- package/cdn/chunks/{chunk.RBVN4ZNT.js → chunk.4IWOUE76.js} +1 -1
- package/cdn/chunks/{chunk.HUOC3LAU.js → chunk.4SX3FTTZ.js} +1 -1
- package/cdn/chunks/{chunk.EBQAL4SG.js → chunk.5OMBHQPA.js} +1 -1
- package/cdn/chunks/{chunk.KD3QQ6GF.js → chunk.5W24KDFU.js} +1 -1
- package/cdn/chunks/{chunk.5UU57WGX.js → chunk.7QEBGL6Y.js} +1 -1
- package/cdn/chunks/{chunk.O6KTLPCX.js → chunk.AJGWUW4E.js} +1 -1
- package/cdn/chunks/{chunk.XF6C6IZ7.js → chunk.ARAGTLEC.js} +1 -1
- package/cdn/chunks/{chunk.EC63I62M.js → chunk.B3AC72EW.js} +1 -1
- package/cdn/chunks/{chunk.4VGPLUHG.js → chunk.BANM4N77.js} +1 -1
- package/{cdn-versioned/chunks/chunk.FODPSMJF.js → cdn/chunks/chunk.BOIDC3L5.js} +1 -1
- package/cdn/chunks/{chunk.N4VPOI2K.js → chunk.CCMQCEZJ.js} +1 -1
- package/cdn/chunks/{chunk.GLVMB2MH.js → chunk.CHU57RUD.js} +1 -1
- package/cdn/chunks/{chunk.C2K5FJG6.js → chunk.CYW6I536.js} +1 -1
- package/cdn/chunks/{chunk.ENG4CGOQ.js → chunk.D6FN3FNE.js} +1 -1
- package/cdn/chunks/{chunk.6NSE3DZZ.js → chunk.D6IMYH3Q.js} +1 -1
- package/cdn/chunks/{chunk.WZDZQ6LB.js → chunk.DVKNQUHU.js} +1 -1
- package/{cdn-versioned/chunks/chunk.RTXVVB2O.js → cdn/chunks/chunk.EJI65G6N.js} +1 -1
- package/cdn/chunks/{chunk.LUHUBO4Y.js → chunk.F3XAK7C4.js} +1 -1
- package/cdn/chunks/{chunk.GB43ZI2M.js → chunk.F7QW7F4F.js} +1 -1
- package/cdn/chunks/{chunk.LFTOGDCS.js → chunk.FG6UWYSJ.js} +1 -1
- package/cdn/chunks/{chunk.WG74SLXL.js → chunk.FPJ2N37J.js} +1 -1
- package/cdn/chunks/{chunk.BGKGDPBP.js → chunk.FQOZZTCK.js} +1 -1
- package/cdn/chunks/chunk.FXVHSWNW.js +25 -0
- package/cdn/chunks/{chunk.DKTLAKVD.js → chunk.GFZEUCMA.js} +1 -1
- package/cdn/chunks/{chunk.OZ4RSXMQ.js → chunk.GLIPGQCF.js} +1 -1
- package/cdn/chunks/{chunk.JGGJ7DHB.js → chunk.GSFHXYDA.js} +1 -1
- package/cdn/chunks/{chunk.X3PHFNB7.js → chunk.GXH7FRMG.js} +1 -1
- package/cdn/chunks/{chunk.IHKACSKZ.js → chunk.HJ4O4XQA.js} +1 -1
- package/cdn/chunks/{chunk.JRJ6FNRH.js → chunk.HSKVFAA5.js} +1 -1
- package/cdn/chunks/{chunk.35XMPPY5.js → chunk.HXTZNME5.js} +1 -1
- package/cdn/chunks/chunk.I4X3XZE2.js +1 -0
- package/cdn/chunks/{chunk.M4XF4HY6.js → chunk.IDXOB3U5.js} +1 -1
- package/cdn/chunks/{chunk.OLYZZSH7.js → chunk.IHOP5ZUO.js} +1 -1
- package/cdn/chunks/{chunk.7ZT7XD7H.js → chunk.IIZCWUXI.js} +1 -1
- package/cdn/chunks/{chunk.GJAPEOYB.js → chunk.IKBD3TT3.js} +1 -1
- package/cdn/chunks/{chunk.5YR2BW6Z.js → chunk.J743YNA7.js} +1 -1
- package/cdn/chunks/{chunk.RCDKFEMZ.js → chunk.JZ6GZDIK.js} +1 -1
- package/{cdn-versioned/chunks/chunk.WM6VARGR.js → cdn/chunks/chunk.LIO6LMTQ.js} +1 -1
- package/cdn/chunks/{chunk.RW5KPI4Z.js → chunk.LMVYIGIS.js} +1 -1
- package/cdn/chunks/{chunk.UQR7JBGF.js → chunk.MFRJXQSH.js} +1 -1
- package/cdn/chunks/{chunk.7JV32P5Q.js → chunk.NRBNWX7R.js} +1 -1
- package/cdn/chunks/{chunk.2HR2JHBL.js → chunk.OHV3OX65.js} +1 -1
- package/cdn/chunks/{chunk.IG2VTTYZ.js → chunk.OK6GNIXB.js} +1 -1
- package/cdn/chunks/{chunk.VPFGICJP.js → chunk.OXF3IL27.js} +1 -1
- package/cdn/chunks/{chunk.6DD53IIK.js → chunk.OYMGCYXV.js} +1 -1
- package/cdn/chunks/{chunk.R5CCLEF5.js → chunk.P3DUIX2R.js} +1 -1
- package/cdn/chunks/{chunk.6LY4CQS5.js → chunk.PO4DA6NA.js} +1 -1
- package/cdn/chunks/chunk.PVM2WKMA.js +11 -0
- package/cdn/chunks/{chunk.SOCURUDK.js → chunk.QMJRCW7Z.js} +1 -1
- package/cdn/chunks/{chunk.7GJAULJA.js → chunk.R2ZX4H4Z.js} +1 -1
- package/cdn/chunks/{chunk.ZR5P6TQI.js → chunk.RZUTJ36B.js} +1 -1
- package/cdn/chunks/{chunk.3OGPT34F.js → chunk.S62UDDDG.js} +1 -1
- package/cdn/chunks/{chunk.77KBPY6M.js → chunk.SAJJMXVB.js} +1 -1
- package/cdn/chunks/{chunk.6DJJYTKZ.js → chunk.SGYMVI3W.js} +1 -1
- package/cdn/chunks/{chunk.6DEKOOVF.js → chunk.TLYSUPQV.js} +1 -1
- package/cdn/chunks/{chunk.RYTJY7J3.js → chunk.TSB6QTAP.js} +1 -1
- package/cdn/chunks/chunk.U5CISCXW.js +1 -0
- package/cdn/chunks/{chunk.ZRK4JWRJ.js → chunk.UDYXLKAX.js} +1 -1
- package/cdn/chunks/{chunk.QVM2KJMY.js → chunk.VWL6GB47.js} +1 -1
- package/cdn/chunks/{chunk.B6DU5WQZ.js → chunk.WUM7JPR3.js} +1 -1
- package/cdn/chunks/{chunk.EWX245UT.js → chunk.X2ABKMOB.js} +1 -1
- package/cdn/chunks/{chunk.63JDND76.js → chunk.Y3GIPFVP.js} +1 -1
- package/cdn/chunks/{chunk.RPGHXS3H.js → chunk.YC4SBZ7I.js} +1 -1
- package/cdn/chunks/{chunk.5FGVDYO4.js → chunk.YS5EGGO5.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/breadcrumb/breadcrumb.js +1 -1
- package/cdn/components/breadcrumb-item/breadcrumb-item.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/loader/loader.js +1 -1
- package/cdn/components/map-marker/map-marker.js +1 -1
- package/cdn/components/menu/menu.js +1 -1
- package/cdn/components/menu-item/menu-item.js +1 -1
- package/cdn/components/menu-item/submenu-controller.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/range/range.js +1 -1
- package/cdn/components/range-tick/range-tick.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 +953 -955
- package/cdn/solid-components.bundle.js +15 -15
- package/cdn/solid-components.iife.js +15 -15
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/utilities/form.js +1 -1
- package/cdn/vscode.html-custom-data.json +0 -1
- package/cdn/web-types.json +3 -11
- package/cdn-versioned/chunks/{chunk.4OSXAE67.js → chunk.2ISKXAGO.js} +1 -1
- package/cdn-versioned/chunks/{chunk.LZDITSGD.js → chunk.2SZLINMB.js} +1 -1
- package/cdn-versioned/chunks/{chunk.GVD7DPUX.js → chunk.32O6YP3U.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RBVN4ZNT.js → chunk.4IWOUE76.js} +1 -1
- package/cdn-versioned/chunks/{chunk.HUOC3LAU.js → chunk.4SX3FTTZ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.EBQAL4SG.js → chunk.5OMBHQPA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.KD3QQ6GF.js → chunk.5W24KDFU.js} +1 -1
- package/cdn-versioned/chunks/{chunk.5UU57WGX.js → chunk.7QEBGL6Y.js} +1 -1
- package/cdn-versioned/chunks/{chunk.O6KTLPCX.js → chunk.AJGWUW4E.js} +1 -1
- package/cdn-versioned/chunks/{chunk.XF6C6IZ7.js → chunk.ARAGTLEC.js} +1 -1
- package/cdn-versioned/chunks/{chunk.EC63I62M.js → chunk.B3AC72EW.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4VGPLUHG.js → chunk.BANM4N77.js} +1 -1
- package/{cdn/chunks/chunk.FODPSMJF.js → cdn-versioned/chunks/chunk.BOIDC3L5.js} +1 -1
- package/cdn-versioned/chunks/{chunk.N4VPOI2K.js → chunk.CCMQCEZJ.js} +2 -2
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.GLVMB2MH.js → chunk.CHU57RUD.js} +1 -1
- package/cdn-versioned/chunks/{chunk.C2K5FJG6.js → chunk.CYW6I536.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ENG4CGOQ.js → chunk.D6FN3FNE.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6NSE3DZZ.js → chunk.D6IMYH3Q.js} +1 -1
- package/cdn-versioned/chunks/{chunk.WZDZQ6LB.js → chunk.DVKNQUHU.js} +1 -1
- package/{cdn/chunks/chunk.RTXVVB2O.js → cdn-versioned/chunks/chunk.EJI65G6N.js} +1 -1
- package/cdn-versioned/chunks/{chunk.LUHUBO4Y.js → chunk.F3XAK7C4.js} +1 -1
- package/cdn-versioned/chunks/{chunk.GB43ZI2M.js → chunk.F7QW7F4F.js} +1 -1
- package/cdn-versioned/chunks/{chunk.LFTOGDCS.js → chunk.FG6UWYSJ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.WG74SLXL.js → chunk.FPJ2N37J.js} +1 -1
- package/cdn-versioned/chunks/{chunk.BGKGDPBP.js → chunk.FQOZZTCK.js} +1 -1
- package/cdn-versioned/chunks/chunk.FXVHSWNW.js +25 -0
- package/cdn-versioned/chunks/{chunk.DKTLAKVD.js → chunk.GFZEUCMA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OZ4RSXMQ.js → chunk.GLIPGQCF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.JGGJ7DHB.js → chunk.GSFHXYDA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.X3PHFNB7.js → chunk.GXH7FRMG.js} +1 -1
- package/cdn-versioned/chunks/{chunk.IHKACSKZ.js → chunk.HJ4O4XQA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.JRJ6FNRH.js → chunk.HSKVFAA5.js} +1 -1
- package/cdn-versioned/chunks/{chunk.35XMPPY5.js → chunk.HXTZNME5.js} +1 -1
- package/cdn-versioned/chunks/chunk.I4X3XZE2.js +1 -0
- package/cdn-versioned/chunks/{chunk.M4XF4HY6.js → chunk.IDXOB3U5.js} +2 -2
- package/cdn-versioned/chunks/{chunk.OLYZZSH7.js → chunk.IHOP5ZUO.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7ZT7XD7H.js → chunk.IIZCWUXI.js} +1 -1
- package/cdn-versioned/chunks/{chunk.GJAPEOYB.js → chunk.IKBD3TT3.js} +1 -1
- package/cdn-versioned/chunks/{chunk.5YR2BW6Z.js → chunk.J743YNA7.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RCDKFEMZ.js → chunk.JZ6GZDIK.js} +1 -1
- package/{cdn/chunks/chunk.WM6VARGR.js → cdn-versioned/chunks/chunk.LIO6LMTQ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RW5KPI4Z.js → chunk.LMVYIGIS.js} +1 -1
- package/cdn-versioned/chunks/{chunk.UQR7JBGF.js → chunk.MFRJXQSH.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7JV32P5Q.js → chunk.NRBNWX7R.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2HR2JHBL.js → chunk.OHV3OX65.js} +1 -1
- package/cdn-versioned/chunks/{chunk.IG2VTTYZ.js → chunk.OK6GNIXB.js} +4 -4
- package/cdn-versioned/chunks/{chunk.VPFGICJP.js → chunk.OXF3IL27.js} +2 -2
- package/cdn-versioned/chunks/{chunk.6DD53IIK.js → chunk.OYMGCYXV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.R5CCLEF5.js → chunk.P3DUIX2R.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6LY4CQS5.js → chunk.PO4DA6NA.js} +1 -1
- package/cdn-versioned/chunks/chunk.PVM2WKMA.js +11 -0
- package/cdn-versioned/chunks/{chunk.SOCURUDK.js → chunk.QMJRCW7Z.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7GJAULJA.js → chunk.R2ZX4H4Z.js} +2 -2
- package/cdn-versioned/chunks/{chunk.ZR5P6TQI.js → chunk.RZUTJ36B.js} +1 -1
- package/cdn-versioned/chunks/{chunk.3OGPT34F.js → chunk.S62UDDDG.js} +1 -1
- package/cdn-versioned/chunks/{chunk.77KBPY6M.js → chunk.SAJJMXVB.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6DJJYTKZ.js → chunk.SGYMVI3W.js} +2 -2
- package/cdn-versioned/chunks/{chunk.6DEKOOVF.js → chunk.TLYSUPQV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RYTJY7J3.js → chunk.TSB6QTAP.js} +1 -1
- package/cdn-versioned/chunks/chunk.U5CISCXW.js +1 -0
- package/cdn-versioned/chunks/{chunk.ZRK4JWRJ.js → chunk.UDYXLKAX.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QVM2KJMY.js → chunk.VWL6GB47.js} +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/{chunk.B6DU5WQZ.js → chunk.WUM7JPR3.js} +4 -4
- package/cdn-versioned/chunks/{chunk.EWX245UT.js → chunk.X2ABKMOB.js} +1 -1
- package/cdn-versioned/chunks/{chunk.63JDND76.js → chunk.Y3GIPFVP.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RPGHXS3H.js → chunk.YC4SBZ7I.js} +1 -1
- package/cdn-versioned/chunks/{chunk.5FGVDYO4.js → chunk.YS5EGGO5.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/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.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 +1 -1
- 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/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.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/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.js +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.js +1 -1
- package/cdn-versioned/components/menu-item/submenu-controller.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 +1 -1
- 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 +1 -1
- package/cdn-versioned/components/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range/range.js +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.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 +1 -1
- 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 +1061 -1063
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +18 -18
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +18 -18
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/utilities/form.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +91 -92
- package/cdn-versioned/web-types.json +156 -164
- package/dist/chunks/{chunk.WDWZFQ4X.js → chunk.YEYB4POY.js} +1 -1
- package/dist/components/radio-button/radio-button.js +1 -1
- package/dist/custom-elements.json +953 -955
- package/dist/solid-components.js +1 -1
- package/dist/vscode.html-custom-data.json +0 -1
- package/dist/web-types.json +3 -11
- package/dist-versioned/chunks/chunk.257BQ5G3.js +2 -2
- package/dist-versioned/chunks/chunk.2TPMKDGR.js +1 -1
- package/dist-versioned/chunks/chunk.2Z23SMCT.js +2 -2
- package/dist-versioned/chunks/chunk.34JZVZG6.js +2 -2
- package/dist-versioned/chunks/chunk.4CMRVAWO.js +6 -6
- package/dist-versioned/chunks/chunk.4PS5R3HQ.js +24 -24
- package/dist-versioned/chunks/chunk.55YNHA4Y.js +3 -3
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6S62Y3SN.js +2 -2
- package/dist-versioned/chunks/chunk.A6F5UBS5.js +1 -1
- package/dist-versioned/chunks/chunk.AO5E3XWU.js +2 -2
- package/dist-versioned/chunks/chunk.AZRZJLYB.js +26 -26
- package/dist-versioned/chunks/chunk.C7HV6GLS.js +1 -1
- package/dist-versioned/chunks/chunk.CWOPJ6AE.js +2 -2
- package/dist-versioned/chunks/chunk.CYAZC6LN.js +3 -3
- package/dist-versioned/chunks/chunk.CZ5NVXDL.js +2 -2
- package/dist-versioned/chunks/chunk.DC7DGLHJ.js +1 -1
- package/dist-versioned/chunks/chunk.DT3ZL7JI.js +12 -12
- package/dist-versioned/chunks/chunk.ELPOH7TW.js +11 -11
- package/dist-versioned/chunks/chunk.F2UZ5T7G.js +5 -5
- package/dist-versioned/chunks/chunk.HBX6PDXK.js +4 -4
- package/dist-versioned/chunks/chunk.IJ2YK4AW.js +4 -4
- package/dist-versioned/chunks/chunk.IJIJ7YVU.js +1 -1
- package/dist-versioned/chunks/chunk.ILB62SSN.js +3 -3
- package/dist-versioned/chunks/chunk.IYSGB2DQ.js +5 -5
- package/dist-versioned/chunks/chunk.J3K6PVKE.js +2 -2
- package/dist-versioned/chunks/chunk.JSVTNGBN.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KENPSAUU.js +1 -1
- package/dist-versioned/chunks/chunk.KZLAI4DK.js +1 -1
- package/dist-versioned/chunks/chunk.LNGJFVKN.js +2 -2
- package/dist-versioned/chunks/chunk.M55G2PHP.js +2 -2
- package/dist-versioned/chunks/chunk.MDZHXHUH.js +3 -3
- package/dist-versioned/chunks/chunk.MML77VKL.js +2 -2
- package/dist-versioned/chunks/chunk.NR3OWI4Y.js +1 -1
- package/dist-versioned/chunks/chunk.NSCG7U5D.js +14 -14
- package/dist-versioned/chunks/chunk.NZFEW5QU.js +1 -1
- package/dist-versioned/chunks/chunk.PAGQREWS.js +4 -4
- package/dist-versioned/chunks/chunk.PUT4BQ4M.js +5 -5
- package/dist-versioned/chunks/chunk.PVFVGCKE.js +1 -1
- package/dist-versioned/chunks/chunk.QGSAYCDJ.js +5 -5
- package/dist-versioned/chunks/chunk.QIWHR4XZ.js +1 -1
- package/dist-versioned/chunks/chunk.QW32IQ37.js +6 -6
- package/dist-versioned/chunks/chunk.RVZPI7LZ.js +8 -8
- package/dist-versioned/chunks/chunk.THYGJ3F3.js +2 -2
- package/dist-versioned/chunks/chunk.TLVK4R6I.js +3 -3
- package/dist-versioned/chunks/chunk.TUOYTASX.js +3 -3
- package/dist-versioned/chunks/chunk.U6LFASA7.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.X4WBXLQO.js +1 -1
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/chunk.XIRK4KQ5.js +3 -3
- package/dist-versioned/chunks/chunk.XVNT7HIE.js +1 -1
- package/dist-versioned/chunks/chunk.XX3EFOOF.js +3 -3
- package/dist-versioned/chunks/chunk.XZDQNDB2.js +12 -12
- package/dist-versioned/chunks/chunk.Y62XG7YE.js +6 -6
- package/dist-versioned/chunks/chunk.Y7TQJEA7.js +2 -2
- package/dist-versioned/chunks/{chunk.WDWZFQ4X.js → chunk.YEYB4POY.js} +3 -3
- package/dist-versioned/chunks/chunk.YFRXAKBQ.js +1 -1
- package/dist-versioned/chunks/chunk.YXP3Q4D5.js +2 -2
- package/dist-versioned/chunks/chunk.ZNPGMZAM.js +1 -1
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.js +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +1061 -1063
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +91 -92
- package/dist-versioned/web-types.json +156 -164
- package/package.json +12 -12
- package/cdn/chunks/chunk.CE5ZCTLG.js +0 -1
- package/cdn/chunks/chunk.HVSHE3SX.js +0 -25
- package/cdn/chunks/chunk.IQ4XSBN6.js +0 -1
- package/cdn/chunks/chunk.JMGRPC2F.js +0 -11
- package/cdn-versioned/chunks/chunk.CE5ZCTLG.js +0 -1
- package/cdn-versioned/chunks/chunk.HVSHE3SX.js +0 -25
- package/cdn-versioned/chunks/chunk.IQ4XSBN6.js +0 -1
- package/cdn-versioned/chunks/chunk.JMGRPC2F.js +0 -11
- /package/cdn/chunks/{chunk.26V4EXHB.js → chunk.YEDQWNIV.js} +0 -0
- /package/cdn-versioned/chunks/{chunk.26V4EXHB.js → chunk.YEDQWNIV.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{a as P}from"./chunk.
|
|
1
|
+
import{a as P}from"./chunk.EJI65G6N.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as R,e as K,f as w}from"./chunk.W7A3TU2Z.js";import{c as A}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.NRBNWX7R.js";import{a as F}from"./chunk.CGQ2BPPZ.js";import{a as M}from"./chunk.CHU57RUD.js";import{a as E,c as C}from"./chunk.SKUMYG4O.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as $}from"./chunk.BOIDC3L5.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as V}from"./chunk.Y7NVH75J.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as k,b as r,c as u,d as c,h as T}from"./chunk.FXVHSWNW.js";import{b as D,e as p}from"./chunk.RZUTJ36B.js";import{b as S,e as I}from"./chunk.6OTM3PE5.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends T{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-5-15-9-input"]});this.hasSlotController=new F(this,"help-text","label");this.localize=new V(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),a=w(t.getTextLabel()),n=w(e);return i.includes(n)||a.includes(n)};this.getTag=t=>p`<sd-5-15-9-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="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-5-15-
|
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-5-15-9-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let i=t.composedPath().some(o=>o instanceof HTMLButtonElement&&o.classList.contains("combobox-button"));if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}if(!(i||t.target.closest(".combobox__clear")!==null)){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let o=this.getCurrentOption(),f=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!f){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||o!=null&&o.disabled)return;if(o&&!o.disabled){let h=this.value;this.multiple?(this.toggleOptionSelection(o),this.lastOption=o,this.setOrderedSelectedOptions(o),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(o),this.setSelectedOptions(o)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==h&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return e.tabIndex=0,p`${typeof a=="string"?$(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-5-15-9-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-5-15-9-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return p`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?$(i):i}</div>`}return[p``]}):[p`<sd-5-15-9-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="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-5-15-7-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-5-15-7-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),A(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-5-15-7-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,b,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((b=i.parentElement)==null?void 0:b.tagName.toLowerCase())==="sd-5-15-7-optgroup"))return a;let o=i.parentElement,f=(m=o.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),h=e.find(O=>O.id===o.id);if(h){h==null||h.appendChild(a),f&&(h==null||h.appendChild(f));return}let v=o.cloneNode();return v.appendChild(a),f&&v.appendChild(f),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-5-15-7-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await I(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=C(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await I(this);let{keyframes:t,options:e}=C(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return R(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return K(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-5-15-7-option")){customElements.whenDefined("sd-5-15-7-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-5-15-7-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-5-15-7-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],b={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return p`<div part="form-control" class="${d("relative text-left",h,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-5-15-7-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("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="
|
|
9
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-5-15-9-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-5-15-9-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==a&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),A(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-5-15-9-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,b,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((b=i.parentElement)==null?void 0:b.tagName.toLowerCase())==="sd-5-15-9-optgroup"))return a;let o=i.parentElement,f=(m=o.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),h=e.find(O=>O.id===o.id);if(h){h==null||h.appendChild(a),f&&(h==null||h.appendChild(f));return}let v=o.cloneNode();return v.appendChild(a),f&&v.appendChild(f),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-5-15-9-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await I(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=C(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await I(this);let{keyframes:t,options:e}=C(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return R(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return K(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-5-15-9-option")){customElements.whenDefined("sd-5-15-9-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-5-15-9-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-5-15-9-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],b={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return p`<div part="form-control" class="${d("relative text-left",h,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-5-15-9-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("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="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{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}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",b,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",b)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",h,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(O=>O==null?void 0:O.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" 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}"> ${o?p`<button part="clear-button" class="${d("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-15-7-icon class="${d("text-neutral-700",m)}" name="closing-round" library="_internal"></sd-5-15-7-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-5-15-7-icon part="invalid-icon" class="${d(y,m,"text-error")}" library="_internal" name="risk"></sd-5-15-7-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-5-15-7-icon part="valid-icon" class="${d("flex-shrink-0 text-success",y,m)}" library="_internal" name="confirm-circle"></sd-5-15-7-icon>`:""}<slot name="right" part="right" class="${d("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",m)}">${this.type!=="search"?p`<sd-5-15-7-icon class="${d("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-5-15-7-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",y)}" type="button"><sd-5-15-7-icon class="${d(v,m)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-5-15-7-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${M(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${d("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",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" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-5-15-7-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.styles=[...T.styles,D`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{height:var(--sd-spacing-4,1rem);right:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{height:var(--sd-spacing-6,1.5rem);right:.85rem;width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{height:var(--sd-spacing-8,2rem);right:var(--sd-spacing-3,.75rem);width:var(--sd-spacing-8,2rem)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-5-15-7-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-5-15-7-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-5-15-7-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-5-15-7-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-5-15-7-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))}[part=filtered-listbox] sd-5-15-7-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-5-15-7-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([u()],s.prototype,"hasFocus",2),l([u()],s.prototype,"displayInputValue",2),l([u()],s.prototype,"selectedTextLabel",2),l([u()],s.prototype,"selectedOptions",2),l([u()],s.prototype,"filteredOptions",2),l([u()],s.prototype,"allOptions",2),l([u()],s.prototype,"lastOption",2),l([u()],s.prototype,"showValidStyle",2),l([u()],s.prototype,"showInvalidStyle",2),l([u()],s.prototype,"deletedTagLabel",2),l([r({reflect:!0})],s.prototype,"name",2),l([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([P()],s.prototype,"defaultValue",2),l([r({type:String,reflect:!0})],s.prototype,"size",2),l([r({type:String,reflect:!0})],s.prototype,"placeholder",2),l([r({type:String,attribute:"max-options-tag-label",reflect:!0})],s.prototype,"maxOptionsTagLabel",2),l([r({type:Boolean,reflect:!0})],s.prototype,"disabled",2),l([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],s.prototype,"visuallyDisabled",2),l([r({type:Boolean,reflect:!0})],s.prototype,"clearable",2),l([r({type:Boolean,reflect:!0})],s.prototype,"open",2),l([r({type:Boolean,reflect:!0})],s.prototype,"hoist",2),l([r({type:String,reflect:!0})],s.prototype,"label",2),l([r({type:String,reflect:!0})],s.prototype,"placement",2),l([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),l([r({type:String,reflect:!0})],s.prototype,"form",2),l([r({type:Boolean,reflect:!0})],s.prototype,"required",2),l([r({type:String,reflect:!0})],s.prototype,"type",2),l([u()],s.prototype,"currentPlacement",2),l([r()],s.prototype,"getOption",2),l([r({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([r({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([r({type:Number,reflect:!0,attribute:"max-options-visible"})],s.prototype,"maxOptionsVisible",2),l([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([r()],s.prototype,"filter",2),l([r()],s.prototype,"getTag",2),l([g("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([g("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([g("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([g(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([g("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([g("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([g("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-5-15-7-combobox")],s);E("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});E("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{s as a};
|
|
11
|
+
"><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{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}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",b,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",b)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",h,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(O=>O==null?void 0:O.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" 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}"> ${o?p`<button part="clear-button" class="${d("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-15-9-icon class="${d("text-neutral-700",m)}" name="closing-round" library="_internal"></sd-5-15-9-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-5-15-9-icon part="invalid-icon" class="${d(y,m,"text-error")}" library="_internal" name="risk"></sd-5-15-9-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-5-15-9-icon part="valid-icon" class="${d("flex-shrink-0 text-success",y,m)}" library="_internal" name="confirm-circle"></sd-5-15-9-icon>`:""}<slot name="right" part="right" class="${d("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",m)}">${this.type!=="search"?p`<sd-5-15-9-icon class="${d("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-5-15-9-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",y)}" type="button"><sd-5-15-9-icon class="${d(v,m)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-5-15-9-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${M(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${d("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",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" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?p`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-5-15-9-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.styles=[...T.styles,D`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{height:var(--sd-spacing-4,1rem);right:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{height:var(--sd-spacing-6,1.5rem);right:.85rem;width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{height:var(--sd-spacing-8,2rem);right:var(--sd-spacing-3,.75rem);width:var(--sd-spacing-8,2rem)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-5-15-9-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-5-15-9-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-5-15-9-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-5-15-9-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-5-15-9-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))}[part=filtered-listbox] sd-5-15-9-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-5-15-9-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([u()],s.prototype,"hasFocus",2),l([u()],s.prototype,"displayInputValue",2),l([u()],s.prototype,"selectedTextLabel",2),l([u()],s.prototype,"selectedOptions",2),l([u()],s.prototype,"filteredOptions",2),l([u()],s.prototype,"allOptions",2),l([u()],s.prototype,"lastOption",2),l([u()],s.prototype,"showValidStyle",2),l([u()],s.prototype,"showInvalidStyle",2),l([u()],s.prototype,"deletedTagLabel",2),l([r({reflect:!0})],s.prototype,"name",2),l([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([P()],s.prototype,"defaultValue",2),l([r({type:String,reflect:!0})],s.prototype,"size",2),l([r({type:String,reflect:!0})],s.prototype,"placeholder",2),l([r({type:String,attribute:"max-options-tag-label",reflect:!0})],s.prototype,"maxOptionsTagLabel",2),l([r({type:Boolean,reflect:!0})],s.prototype,"disabled",2),l([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],s.prototype,"visuallyDisabled",2),l([r({type:Boolean,reflect:!0})],s.prototype,"clearable",2),l([r({type:Boolean,reflect:!0})],s.prototype,"open",2),l([r({type:Boolean,reflect:!0})],s.prototype,"hoist",2),l([r({type:String,reflect:!0})],s.prototype,"label",2),l([r({type:String,reflect:!0})],s.prototype,"placement",2),l([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),l([r({type:String,reflect:!0})],s.prototype,"form",2),l([r({type:Boolean,reflect:!0})],s.prototype,"required",2),l([r({type:String,reflect:!0})],s.prototype,"type",2),l([u()],s.prototype,"currentPlacement",2),l([r()],s.prototype,"getOption",2),l([r({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([r({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([r({type:Number,reflect:!0,attribute:"max-options-visible"})],s.prototype,"maxOptionsVisible",2),l([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([r()],s.prototype,"filter",2),l([r()],s.prototype,"getTag",2),l([g("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([g("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([g("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([g(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([g("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([g("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([g("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-5-15-9-combobox")],s);E("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});E("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as i}from"./chunk.
|
|
1
|
+
import{a as i}from"./chunk.CHU57RUD.js";import{a as n,b as l}from"./chunk.PVM2WKMA.js";import{b as h}from"./chunk.BOIDC3L5.js";import{a as r}from"./chunk.YEDQWNIV.js";import{a as p,b as a,h as c}from"./chunk.FXVHSWNW.js";import{b as v}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:`
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
|
3
3
|
<circle cx="25" cy="25" opacity="1" r="20" />
|
|
4
4
|
</svg>`,main:`
|
|
@@ -7,4 +7,4 @@ import{a as i}from"./chunk.GLVMB2MH.js";import{a as n,b as l}from"./chunk.JMGRPC
|
|
|
7
7
|
</svg> `,place:`
|
|
8
8
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
|
|
9
9
|
<path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
|
|
10
|
-
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let s=this.isLink(),o=this.notInteractive?n`div`:s?n`a`:n`button`,d=h(this.marker[this.variant]),m=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${o} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${i(s?this.href:void 0)}" target="${i(s?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||s?void 0:"button")}" aria-label="${i(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${i(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${m};-webkit-mask-image:${m}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([p("sd-5-15-
|
|
10
|
+
</svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let s=this.isLink(),o=this.notInteractive?n`div`:s?n`a`:n`button`,d=h(this.marker[this.variant]),m=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${o} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${i(s?this.href:void 0)}" target="${i(s?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||s?void 0:"button")}" aria-label="${i(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${i(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${m};-webkit-mask-image:${m}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([p("sd-5-15-9-map-marker")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk.XR2KNB36.js";import{a as s}from"./chunk.E2DRD2OX.js";import{a as y,b as a,f,h as r}from"./chunk.
|
|
1
|
+
import{a as l}from"./chunk.XR2KNB36.js";import{a as s}from"./chunk.E2DRD2OX.js";import{a as y,b as a,f,h as r}from"./chunk.FXVHSWNW.js";import{b as c,e as d}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.hasStarted=!1;this.name="none";this.play=!1;this.delay=0;this.direction="normal";this.duration=1e3;this.easing="linear";this.endDelay=0;this.fill="auto";this.iterations=1/0;this.iterationStart=0;this.playbackRate=1}get currentTime(){var i,n;return(n=(i=this.animation)==null?void 0:i.currentTime)!=null?n:0}set currentTime(i){this.animation&&(this.animation.currentTime=i)}connectedCallback(){super.connectedCallback(),this.createAnimation(),this.handleAnimationCancel=this.handleAnimationCancel.bind(this),this.handleAnimationFinish=this.handleAnimationFinish.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}handleAnimationFinish(){this.play=!1,this.hasStarted=!1,this.emit("sd-finish")}handleAnimationCancel(){this.play=!1,this.hasStarted=!1,this.emit("sd-cancel")}handleSlotChange(){this.destroyAnimation(),this.createAnimation()}async createAnimation(){var o,m;let i=(o=l.easings[this.easing])!=null?o:this.easing,n=(m=this.keyframes)!=null?m:l[this.name],h=(await this.defaultSlot).assignedElements()[0];return!h||!n?!1:(this.destroyAnimation(),this.animation=h.animate(n,{delay:this.delay,direction:this.direction,duration:this.duration,easing:i,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.emit("sd-start")):this.animation.pause(),!0)}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.hasUpdated&&this.createAnimation()}handlePlayChange(){return this.animation?(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.emit("sd-start")),this.play?this.animation.play():this.animation.pause(),!0):!1}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}cancel(){var i;(i=this.animation)==null||i.cancel()}finish(){var i;(i=this.animation)==null||i.finish()}render(){return d`<slot @slotchange="${this.handleSlotChange}"></slot>`}};t.styles=[...r.styles,c`:host{display:contents}`],e([f("slot")],t.prototype,"defaultSlot",2),e([a()],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"play",2),e([a({type:Number})],t.prototype,"delay",2),e([a()],t.prototype,"direction",2),e([a({type:Number})],t.prototype,"duration",2),e([a()],t.prototype,"easing",2),e([a({attribute:"end-delay",type:Number})],t.prototype,"endDelay",2),e([a()],t.prototype,"fill",2),e([a({type:Number})],t.prototype,"iterations",2),e([a({attribute:"iteration-start",type:Number})],t.prototype,"iterationStart",2),e([a({attribute:!1})],t.prototype,"keyframes",2),e([a({attribute:"playback-rate",type:Number})],t.prototype,"playbackRate",2),e([s(["name","delay","direction","duration","easing","endDelay","fill","iterations","iterationsStart","keyframes"])],t.prototype,"handleAnimationChange",1),e([s("play")],t.prototype,"handlePlayChange",1),e([s("playbackRate")],t.prototype,"handlePlaybackRateChange",1),t=e([y("sd-5-15-9-animation")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk.
|
|
1
|
+
import{a as $}from"./chunk.LIO6LMTQ.js";import{a as C}from"./chunk.EJI65G6N.js";import{b as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.CHU57RUD.js";import{a as s}from"./chunk.YEDQWNIV.js";import{a as d}from"./chunk.E2DRD2OX.js";import{a as y,b as i,c as h,d as p,h as m}from"./chunk.FXVHSWNW.js";import{b as v,e as n}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends m{constructor(){super(...arguments);this.formControlController=new g(this);this.hasSlotController=new x(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,a,o="none"){this.textarea.setSelectionRange(l,a,o)}setRangeText(l,a,o,u){this.textarea.setRangeText(l,a,o,u),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},a=this.label?!0:!!l.label,o=this.helpText?!0:!!l.helpText,u=!!l.tooltip,c=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",f=this.size==="sm"?"text-sm":"text-base",b={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return n`<div part="form-control" class="flex flex-col h-full text-left">${a||u?n`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(a?"inline-block":"hidden",f)}" for="input" aria-hidden="${a?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l.tooltip?n`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${s("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[c])}"></div><div part="base" class="${s("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",c==="disabled"||c==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${s("ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-5-15-9-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",f)}" title="${this.title}" name="${r(this.name)}" .value="${$(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${r(this.placeholder)}" minlength="${r(this.minlength)}" maxlength="${r(this.maxlength)}" rows="${r(this.rows)}" autocapitalize="${r(this.autocapitalize)}" autocorrect="${r(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${r(this.spellcheck)}" enterkeyhint="${r(this.enterkeyhint)}" inputmode="${r(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?n`<sd-5-15-9-icon class="${s("text-error absolute right-4 pointer-events-none",b)}" library="_internal" name="risk" part="invalid-icon"></sd-5-15-9-icon>`:""} ${this.styleOnValid&&this.showValidStyle?n`<sd-5-15-9-icon class="${s("text-success absolute right-4 pointer-events-none",b)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-15-9-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${s("text-sm text-neutral-700 mt-1",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...m.styles,v`:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([required]) #label:after{content:" *"}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],e([p("#input")],t.prototype,"textarea",2),e([p("#invalid-message")],t.prototype,"invalidMessage",2),e([h()],t.prototype,"hasFocus",2),e([h()],t.prototype,"showValidStyle",2),e([h()],t.prototype,"showInvalidStyle",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"label",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String,reflect:!0})],t.prototype,"placeholder",2),e([i({type:Number,reflect:!0})],t.prototype,"rows",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"readonly",2),e([i({type:String,reflect:!0})],t.prototype,"form",2),e([i({type:Boolean,reflect:!0})],t.prototype,"required",2),e([i({type:Number,reflect:!0})],t.prototype,"minlength",2),e([i({type:Number,reflect:!0})],t.prototype,"maxlength",2),e([i({type:String,reflect:!0})],t.prototype,"autocapitalize",2),e([i({type:String,reflect:!0})],t.prototype,"autocorrect",2),e([i({reflect:!0})],t.prototype,"autocomplete",2),e([i({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([i({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),e([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),e([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],t.prototype,"spellcheck",2),e([i({type:String,reflect:!0})],t.prototype,"inputmode",2),e([C()],t.prototype,"defaultValue",2),e([d("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),e([d("rows",{waitUntilFirstUpdate:!0})],t.prototype,"handleRowsChange",1),e([d("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=e([y("sd-5-15-9-textarea")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk.
|
|
1
|
+
import{a as p}from"./chunk.HJ4O4XQA.js";import{a as d,b as u}from"./chunk.CGQ2BPPZ.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as h,b as a,d as o,h as n}from"./chunk.FXVHSWNW.js";import{b as c,e as i}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new d(this,"submenu");this.submenuController=new p(this,this.hasSlotController);this.handleHostClick=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())};this.handleMouseOver=s=>{this.focus(),s.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let s=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=s;return}s!==this.cachedTextLabel&&(this.cachedTextLabel=s,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return u(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let s=this.submenuController.isExpanded(),b={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return i`<div id="anchor" part="base" class="${l("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&s&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!s}">${this.type==="checkbox"?i`<span part="checked-icon" class="${l("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-5-15-9-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-5-15-9-icon></span>`:""} ${b.iconIndent?i`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?i`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-5-15-9-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-5-15-9-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};e.styles=[...n.styles,c`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-5-15-9-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-5-15-9-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-5-15-9-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],t([o("slot:not([name])")],e.prototype,"defaultSlot",2),t([o('part="base"')],e.prototype,"menuItem",2),t([a()],e.prototype,"type",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a()],e.prototype,"value",2),t([a({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([r("checked")],e.prototype,"handleCheckedChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),t([r("type")],e.prototype,"handleTypeChange",1),e=t([h("sd-5-15-9-menu-item")],e);export{e as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{e as m,f as h,g as p}from"./chunk.RZUTJ36B.js";var v=Symbol.for(""),d=t=>{if((t==null?void 0:t.r)===v)return t==null?void 0:t._$litStatic$};var _=(t,...a)=>({_$litStatic$:a.reduce(((r,i,o)=>r+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but
|
|
2
|
+
take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:v}),S=new Map,u=t=>(a,...r)=>{let i=r.length,o,e,l=[],c=[],n,s=0,$=!1;for(;s<i;){for(n=a[s];s<i&&(e=r[s],(o=d(e))!==void 0);)n+=o+a[++s],$=!0;s!==i&&c.push(e),l.push(n),s++}if(s===i&&l.push(a[i]),$){let f=l.join("$$lit$$");(a=S.get(f))===void 0&&(l.raw=l,S.set(f,a=l)),r=c}return t(a,...r)},w=u(m),b=u(h),x=u(p);export{_ as a,w as b};
|
|
3
|
+
/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
lit-html/static.js:
|
|
6
|
+
(**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2020 Google LLC
|
|
9
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
+
*)
|
|
11
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk.MHWW3RZB.js";import{c as b}from"./chunk.3L472FD4.js";import{a as u}from"./chunk.
|
|
1
|
+
import{a as T}from"./chunk.MHWW3RZB.js";import{c as b}from"./chunk.3L472FD4.js";import{a as u}from"./chunk.CHU57RUD.js";import{a as c}from"./chunk.YEDQWNIV.js";import{a as w}from"./chunk.Y7NVH75J.js";import{a as g,b as y,c as v,d as h,h as f}from"./chunk.FXVHSWNW.js";import{b as m,e as d}from"./chunk.RZUTJ36B.js";import{a as p,e as l}from"./chunk.TJOCV4DC.js";var a=class extends f{constructor(){super(...arguments);this.localize=new w(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-5-15-9-tab"),customElements.whenDefined("sd-5-15-9-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls(),this.repositionIndicator()}),this.mutationObserver=new MutationObserver(s=>{s.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this.setAriaLabels()),s.some(e=>e.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),this.handleScroll(),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((e,o)=>{var i;e[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((i=this.activeTab)!=null?i:this.tabs[0],{emitEvents:!1}),o.unobserve(e[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let s=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(s.assignedElements()).map(e=>e.tagName.toLocaleLowerCase()==="sd-5-15-9-tab"?e:e.querySelector("sd-5-15-9-tab")).filter(e=>e&&t.includeDisabled?e.tagName.toLowerCase()==="sd-5-15-9-tab":e.tagName.toLowerCase()==="sd-5-15-9-tab"&&!e.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-5-15-9-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let e=t.target.closest("sd-5-15-9-tab");(e==null?void 0:e.closest("sd-5-15-9-tab-group"))===this&&e!==null&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){let e=t.target.closest("sd-5-15-9-tab");if((e==null?void 0:e.closest("sd-5-15-9-tab-group"))===this){if(["Enter"," "].includes(t.key)&&e!==null&&(this.setActiveTab(e,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let i=this.tabs.indexOf(this.getActiveTab()),n=this.tabs[i+1];e!==null&&n&&b(n,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let i=this.tabs.indexOf(this.getActiveTab()),n=this.tabs[i-1];e!==null&&n&&b(n,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let i=this.tabs.find(r=>r.matches(":focus")),n=this.localize.dir()==="rtl";if((i==null?void 0:i.tagName.toLowerCase())==="sd-5-15-9-tab"){let r=this.tabs.indexOf(i);t.key==="Home"?r=0:t.key==="End"?r=this.tabs.length-1:t.key===(n?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?r--:(t.key===(n?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&r++,r<0&&(r=this.tabs.length-1),r>this.tabs.length-1&&(r=0),this.tabs[r].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[r],{scrollBehavior:"smooth"}),b(this.tabs[r],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,s){if(s=p({emitEvents:!0,scrollBehavior:"auto"},s),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let e=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var i;return o.active=o.name===((i=this.activeTab)==null?void 0:i.panel)}),this.repositionIndicator(),b(this.activeTab,this.nav,"horizontal",s.scrollBehavior),s.emitEvents&&(e&&this.emit("sd-tab-hide",{detail:{name:e.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let s=this.panels.find(e=>e.name===t.panel);s&&t.setAttribute("aria-controls",s.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.repositionIndicator(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,s=this.indicator,e=this.tabsContainer;if(!t||!s||!e||t.variant==="container")return;let o=t.getBoundingClientRect(),i=e.getBoundingClientRect(),n=getComputedStyle(e).justifyContent==="center",r=i.left+i.width/2,A=o.left+o.width/2,x=t.offsetWidth,C=n?A-r:o.left-i.left;s.style.width=`${x}px`,s.style.transform=`translateX(${C}px)`}show(t){let s=this.tabs.find(e=>e.panel===t);s&&this.setActiveTab(s,{scrollBehavior:"smooth"})}render(){var s;let t=this.localize.dir()==="rtl";return d`<div part="base" class="${c("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${c(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?d`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${u(!this.canScroll.left||void 0)}" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-5-15-9-icon library="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-5-15-9-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${c("flex flex-auto relative flex-row")}" role="tablist">${((s=this.activeTab)==null?void 0:s.variant)!=="container"?d`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?d`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${u(!this.canScroll.right||void 0)}" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-5-15-9-icon library="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-5-15-9-icon></button>`:""}</div><slot part="body" class="${c("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};a.styles=[...f.styles,m`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}::slotted(sd-5-15-9-tab-panel){--padding:1rem 0}::slotted(sd-5-15-9-tab-panel:focus-visible){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],l([h("[part=base]")],a.prototype,"tabGroup",2),l([h("[part=body]")],a.prototype,"body",2),l([h("[part=scroll-container]")],a.prototype,"nav",2),l([h("[part=active-tab-indicator]")],a.prototype,"indicator",2),l([h('[part="tabs"]')],a.prototype,"tabsContainer",2),l([v()],a.prototype,"hasScrollControls",2),l([v()],a.prototype,"variant",2),l([v()],a.prototype,"canScroll",2),l([y({type:String,reflect:!0})],a.prototype,"activation",2),l([T(20)],a.prototype,"handleScroll",1),a=l([g("sd-5-15-9-tab-group")],a);export{a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as y,c as g}from"./chunk.
|
|
1
|
+
import{b as y,c as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.CHU57RUD.js";import{a as u,b as m}from"./chunk.PVM2WKMA.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as h,b as i,c,d as b,g as v,h as d}from"./chunk.FXVHSWNW.js";import{b as p}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends d{constructor(){super(...arguments);this.formControlController=new y(this,{form:r=>{if(r.hasAttribute("form")){let o=r.getRootNode(),s=r.getAttribute("form");return o.getElementById(s)}return r.closest("form")}});this.hasSlotController=new x(this,"[default]","icon-left","icon-right");this.invalid=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!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(r){if(this.disabled||this.loading||this.visuallyDisabled){r.preventDefault(),r.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(r){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(r)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(r){this.button.focus(r)}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(r){this.isButton()&&(this.button.setCustomValidity(r),this.formControlController.updateValidity())}render(){let r=this.isLink(),o=r?u`a`:u`button`,s={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},n=this.variant==="secondary";return m`<${o} part="base" class="${l(`group relative z-10 font-md no-underline
|
|
2
2
|
w-full align-middle inline-flex items-stretch justify-center
|
|
3
3
|
transition-colors duration-fast 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||this.visuallyDisabled)&&"cursor-not-allowed",s["icon-only"]&&"px-0 min-h-varspacing w-varspacing",{sm:`text-sm varspacing-8 ${n?"py-[0.281rem] px-[0.938rem]":"py-[0.344rem] px-4"}`,md:`text-base varspacing-10 ${n?"py-[0.438rem] px-[0.938rem]":"py-2 px-4"}`,lg:`text-base varspacing-12 ${n?"py-[0.688rem] px-[0.938rem]":"py-3 px-4"}`}[this.size],{primary:this.inverted?`${this.visuallyDisabled?"bg-neutral-500 text-white border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"text-primary bg-white border-white hover:text-primary-500 active:text-primary-800"}
|
|
@@ -8,4 +8,4 @@ import{b as y,c as g}from"./chunk.7JV32P5Q.js";import{a as x}from"./chunk.CGQ2BP
|
|
|
8
8
|
disabled:text-neutral-500 disabled:border-neutral-500`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600 hover:text-neutral-600 active:text-neutral-600":"text-white hover:text-primary-100 active:text-primary-200"}
|
|
9
9
|
disabled:text-neutral-600`:`border-transparent ${this.visuallyDisabled?"text-neutral-500 hover:text-neutral-500 active:text-neutral-500":"text-primary hover:text-primary-500 active:text-primary-800"}
|
|
10
10
|
disabled:text-neutral-500`,cta:`text-white ${this.visuallyDisabled?"bg-neutral-500 border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"bg-accent-500 border-transparent"}
|
|
11
|
-
${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(r?void 0:this.disabled)}" type="${a(r?void 0:this.type)}" title="${this.title}" name="${a(r?void 0:this.name)}" value="${a(r?void 0:this.value)}" href="${a(r?this.href:void 0)}" target="${a(r?this.target:void 0)}" download="${a(r?this.download:void 0)}" rel="${a(r&&this.target?"noreferrer noopener":void 0)}" role="${a(r?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"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}"><div part="motion-wrapper" class="${l("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${l("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${l("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${l("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${l("inline-flex items-center justify-center",s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${l("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-5-15-
|
|
11
|
+
${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(r?void 0:this.disabled)}" type="${a(r?void 0:this.type)}" title="${this.title}" name="${a(r?void 0:this.name)}" value="${a(r?void 0:this.value)}" href="${a(r?this.href:void 0)}" target="${a(r?this.target:void 0)}" download="${a(r?this.download:void 0)}" rel="${a(r&&this.target?"noreferrer noopener":void 0)}" role="${a(r?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"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}"><div part="motion-wrapper" class="${l("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${l("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${l("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${l("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${l("inline-flex items-center justify-center",s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${l("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-5-15-9-loader class="${l("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-5-15-9-loader>`:""}</${o}>`}};t.styles=[...d.styles,p`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-5-15-9-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-5-15-9-icon),sd-5-15-9-loader{font-size:calc(var(--tw-varspacing)/2)}`],e([b("a, button")],t.prototype,"button",2),e([v({selector:"sd-5-15-9-icon"})],t.prototype,"_iconsInDefaultSlot",2),e([c()],t.prototype,"invalid",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),e([i({type:String,reflect:!0})],t.prototype,"type",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"href",2),e([i({type:String,reflect:!0})],t.prototype,"target",2),e([i({reflect:!0})],t.prototype,"download",2),e([i({reflect:!0})],t.prototype,"form",2),e([i({attribute:"formaction"})],t.prototype,"formAction",2),e([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),e([i({attribute:"formmethod"})],t.prototype,"formMethod",2),e([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),e([i({attribute:"formtarget"})],t.prototype,"formTarget",2),e([f("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([h("sd-5-15-9-button")],t);export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var N=globalThis,L=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,V=Symbol(),tt=new WeakMap,x=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==V)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(L&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=tt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&tt.set(e,t))}return t}toString(){return this.cssText}},et=o=>new x(typeof o=="string"?o:o+"",void 0,V),Et=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new x(e,o,V)},st=(o,t)=>{if(L)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=N.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},W=L?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return et(e)})(o):o;var{is:bt,defineProperty:Ct,getOwnPropertyDescriptor:wt,getOwnPropertyNames:xt,getOwnPropertySymbols:Pt,getPrototypeOf:Ut}=Object,A=globalThis,it=A.trustedTypes,Ot=it?it.emptyScript:"",q=A.reactiveElementPolyfillSupport,P=(o,t)=>o,K={toAttribute(o,t){switch(t){case Boolean:o=o?Ot:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(s){e=null}}return e}},at=(o,t)=>!bt(o,t),ot={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:at},rt,nt;(rt=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(nt=A.litPropertyMetadata)!=null||(A.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ot){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ct(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var r;let{get:i,set:n}=(r=wt(this.prototype,t))!=null?r:{get(){return this[e]},set(a){this[e]=a}};return{get:i,set(a){let h=i==null?void 0:i.call(this);n==null||n.call(this,a),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:ot}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let t=Ut(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let e=this.properties,s=[...xt(e),...Pt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(W(i))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return st(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:K).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r,a,h;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let l=s.getPropertyOptions(i),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:K;this._$Em=i,this[i]=(h=(a=d.fromAttribute(e,l.type))!=null?a:(r=this._$Ej)==null?void 0:r.get(i))!=null?h:null,this._$Em=null}}requestUpdate(t,e,s){var i,n;if(t!==void 0){let r=this.constructor,a=this[t];if(s!=null||(s=r.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:at)(a,e)||s.useDefault&&s.reflect&&a===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){var a,h,l;s&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(h=r!=null?r:e)!=null?h:this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,a]of n){let{wrapped:h}=a,l=this[r];h!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,a,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}},ht;$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[P("elementProperties")]=new Map,$[P("finalized")]=new Map,q==null||q({ReactiveElement:$}),((ht=A.reactiveElementVersions)!=null?ht:A.reactiveElementVersions=[]).push("2.1.0");var O=globalThis,k=O.trustedTypes,lt=k?k.createPolicy("lit-html",{createHTML:o=>o}):void 0,J="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+_,Ht=`<${G}>`,y=document,H=()=>y.createComment(""),R=o=>o===null||typeof o!="object"&&typeof o!="function",Q=Array.isArray,ft=o=>Q(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Z=`[
|
|
1
|
+
var N=globalThis,L=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,V=Symbol(),tt=new WeakMap,x=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==V)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(L&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=tt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&tt.set(e,t))}return t}toString(){return this.cssText}},et=o=>new x(typeof o=="string"?o:o+"",void 0,V),Et=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new x(e,o,V)},st=(o,t)=>{if(L)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=N.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},W=L?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return et(e)})(o):o;var{is:bt,defineProperty:Ct,getOwnPropertyDescriptor:wt,getOwnPropertyNames:xt,getOwnPropertySymbols:Pt,getPrototypeOf:Ut}=Object,A=globalThis,it=A.trustedTypes,Ot=it?it.emptyScript:"",q=A.reactiveElementPolyfillSupport,P=(o,t)=>o,K={toAttribute(o,t){switch(t){case Boolean:o=o?Ot:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(s){e=null}}return e}},at=(o,t)=>!bt(o,t),ot={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:at},rt,nt;(rt=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(nt=A.litPropertyMetadata)!=null||(A.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ot){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ct(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var r;let{get:i,set:n}=(r=wt(this.prototype,t))!=null?r:{get(){return this[e]},set(a){this[e]=a}};return{get:i,set(a){let h=i==null?void 0:i.call(this);n==null||n.call(this,a),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:ot}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let t=Ut(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let e=this.properties,s=[...xt(e),...Pt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(W(i))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return st(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:K).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r,a,h;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let l=s.getPropertyOptions(i),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:K;this._$Em=i,this[i]=(h=(a=d.fromAttribute(e,l.type))!=null?a:(r=this._$Ej)==null?void 0:r.get(i))!=null?h:null,this._$Em=null}}requestUpdate(t,e,s){var i,n;if(t!==void 0){let r=this.constructor,a=this[t];if(s!=null||(s=r.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:at)(a,e)||s.useDefault&&s.reflect&&a===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){var a,h,l;s&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(h=r!=null?r:e)!=null?h:this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,a]of n){let{wrapped:h}=a,l=this[r];h!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,a,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach((n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)})),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}},ht;$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[P("elementProperties")]=new Map,$[P("finalized")]=new Map,q==null||q({ReactiveElement:$}),((ht=A.reactiveElementVersions)!=null?ht:A.reactiveElementVersions=[]).push("2.1.0");var O=globalThis,k=O.trustedTypes,lt=k?k.createPolicy("lit-html",{createHTML:o=>o}):void 0,J="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+_,Ht=`<${G}>`,y=document,H=()=>y.createComment(""),R=o=>o===null||typeof o!="object"&&typeof o!="function",Q=Array.isArray,ft=o=>Q(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Z=`[
|
|
2
2
|
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,dt=/>/g,m=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
|
|
3
3
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,At=/^(?:script|style|textarea|title)$/i,X=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),Lt=X(1),kt=X(2),Dt=X(3),v=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),$t=new WeakMap,g=y.createTreeWalker(y,129);function mt(o,t){if(!Q(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return lt!==void 0?lt.createHTML(t):t}var gt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=U;for(let a=0;a<e;a++){let h=o[a],l,d,c=-1,u=0;for(;u<h.length&&(r.lastIndex=u,d=r.exec(h),d!==null);)u=r.lastIndex,r===U?d[1]==="!--"?r=ct:d[1]!==void 0?r=dt:d[2]!==void 0?(At.test(d[2])&&(i=RegExp("</"+d[2],"g")),r=m):d[3]!==void 0&&(r=m):r===m?d[0]===">"?(r=i!=null?i:U,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,l=d[1],r=d[3]===void 0?m:d[3]==='"'?ut:pt):r===ut||r===pt?r=m:r===ct||r===dt?r=U:(r=m,i=void 0);let f=r===m&&o[a+1].startsWith("/>")?" ":"";n+=r===U?h+Ht:c>=0?(s.push(l),h.slice(0,c)+J+h.slice(c)+_+f):h+_+(c===-2?a:f)}return[mt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},T=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,h=this.parts,[l,d]=gt(t,e);if(this.el=o.createElement(l,s),g.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(J)){let u=d[r++],f=i.getAttribute(c).split(_),M=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:M[2],strings:f,ctor:M[1]==="."?B:M[1]==="?"?j:M[1]==="@"?z:E}),i.removeAttribute(c)}else c.startsWith(_)&&(h.push({type:6,index:n}),i.removeAttribute(c));if(At.test(i.tagName)){let c=i.textContent.split(_),u=c.length-1;if(u>0){i.textContent=k?k.emptyScript:"";for(let f=0;f<u;f++)i.append(c[f],H()),g.nextNode(),h.push({type:2,index:++n});i.append(c[u],H())}}}else if(i.nodeType===8)if(i.data===G)h.push({type:2,index:n});else{let c=-1;for(;(c=i.data.indexOf(_,c+1))!==-1;)h.push({type:7,index:n}),c+=_.length-1}n++}}static createElement(t,e){let s=y.createElement("template");return s.innerHTML=t,s}};function S(o,t,e=o,s){var r,a,h;if(t===v)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl,n=R(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?((h=e._$Co)!=null?h:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=S(o,i._$AS(o,t.values),i,s)),t}var D=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:y).importNode(e,!0);g.currentNode=i;let n=g.nextNode(),r=0,a=0,h=s[0];for(;h!==void 0;){if(r===h.index){let d;h.type===2?d=new C(n,n.nextSibling,this,t):h.type===1?d=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(d=new I(n,this,t)),this._$AV.push(d),h=s[++a]}r!==(h==null?void 0:h.index)&&(n=g.nextNode(),r++)}return g.currentNode=y,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},C=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),R(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ft(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=T.createElement(mt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let r=new D(i,this),a=r.u(this.options);r.p(e),this.T(a),this._$AH=r}}_$AC(t){let e=$t.get(t.strings);return e===void 0&&$t.set(t.strings,e=new T(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(H()),this.O(H()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},E=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=S(this,t,e,0),r=!R(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{let a=t,h,l;for(t=n[0],h=0;h<n.length-1;h++)l=S(this,a[s+h],e,h),l===v&&(l=this._$AH[h]),r||(r=!R(l)||l!==this._$AH[h]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+n[h+1]),this._$AH[h]=l}r&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},B=class extends E{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},j=class extends E{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},z=class extends E{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var r;if((t=(r=S(this,t,e,0))!=null?r:p)===v)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},I=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Bt={M:J,P:_,A:G,C:1,L:gt,R:D,D:ft,V:S,I:C,H:E,N:j,U:z,B,F:I},F=O.litHtmlPolyfillSupport,_t;F==null||F(T,C),((_t=O.litHtmlVersions)!=null?_t:O.litHtmlVersions=[]).push("3.3.1");var yt=(o,t,e)=>{var n,r;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let a=(r=e==null?void 0:e.renderBefore)!=null?r:null;s._$litPart$=i=new C(t.insertBefore(H(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var b=globalThis,w=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=yt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}},vt;w._$litElement$=!0,w.finalized=!0,(vt=b.litElementHydrateSupport)==null||vt.call(b,{LitElement:w});var Y=b.litElementPolyfillSupport;Y==null||Y({LitElement:w});var St;((St=b.litElementVersions)!=null?St:b.litElementVersions=[]).push("4.2.0");export{et as a,Et as b,K as c,at as d,Lt as e,kt as f,Dt as g,v as h,p as i,Bt as j,w as k};
|
|
4
4
|
/*! Bundled license information:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk.Y7NVH75J.js";import{a as p,d as f,h as u}from"./chunk.
|
|
1
|
+
import{a as g}from"./chunk.Y7NVH75J.js";import{a as p,d as f,h as u}from"./chunk.FXVHSWNW.js";import{b as c,e as h}from"./chunk.RZUTJ36B.js";import{e as d}from"./chunk.TJOCV4DC.js";var i=class extends u{constructor(){super(...arguments);this.localize=new g(this)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(e){let t=["menuitem","menuitemcheckbox"],n=e.composedPath(),r=n.find(s=>{var m;return t.includes(((m=s==null?void 0:s.getAttribute)==null?void 0:m.call(s,"role"))||"")});if(!r||n.find(s=>{var m;return((m=s==null?void 0:s.getAttribute)==null?void 0:m.call(s,"role"))==="menu"})!==this)return;let a=r;a.type==="checkbox"&&(a.checked=!a.checked),this.emit("sd-select",{detail:{item:a}})}handleKeyDown(e){if(e.key==="Enter"||e.key===" "){let t=this.getCurrentItem();e.preventDefault(),e.stopPropagation(),t==null||t.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)){let t=this.getAllItems(),n=this.getCurrentItem(),r=n?t.indexOf(n):0;if(t.length>0){e.preventDefault(),e.stopPropagation();let l=(o,a)=>{let s=o;for(let m of t)if(s=(s+a+t.length)%t.length,!t[s].disabled)return s;return o};if(e.key==="ArrowDown")r=l(r,1);else if(e.key==="ArrowUp")r=l(r,-1);else if(e.key==="Home")r=t.findIndex(o=>!o.disabled),r===-1&&(r=0);else if(e.key==="End"){r=t.length-1;for(let o=t.length-1;o>=0;o--)if(!t[o].disabled){r=o;break}}this.setCurrentItem(t[r]),t[r].focus()}}}handleMouseDown(e){let t=e.target;this.isMenuItem(t)&&this.setCurrentItem(t)}handleSlotChange(){let e=this.getAllItems();e.length>0&&this.setCurrentItem(e[0])}isMenuItem(e){var t;return e.tagName.toLowerCase()==="sd-5-15-9-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((t=e.getAttribute("role"))!=null?t:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(e=>!!this.isMenuItem(e))}getCurrentItem(){return this.getAllItems().find(e=>e.getAttribute("tabindex")==="0")}setCurrentItem(e){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===e?"0":"-1")})}render(){return h`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};i.styles=[...u.styles,c`:host{border-radius:var(--sd-border-radius-md,.375rem);display:block;overflow:auto;overscroll-behavior:auto;padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);position:relative;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75))!important;--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}::slotted(sd-5-15-9-divider){padding-bottom:var(--sd-spacing-3,.75rem);padding-top:var(--sd-spacing-3,.75rem)}`],d([f("slot")],i.prototype,"defaultSlot",2),i=d([p("sd-5-15-9-menu")],i);export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk.2AQOPKKH.js";import{a as C}from"./chunk.G7HKVXLR.js";import{a as y,b as v}from"./chunk.3L472FD4.js";import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as f}from"./chunk.
|
|
1
|
+
import{a as M}from"./chunk.2AQOPKKH.js";import{a as C}from"./chunk.G7HKVXLR.js";import{a as y,b as v}from"./chunk.3L472FD4.js";import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as f}from"./chunk.CHU57RUD.js";import{a,c as s}from"./chunk.SKUMYG4O.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.YEDQWNIV.js";import{a as x}from"./chunk.Y7NVH75J.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as w,b as h,d as c,h as u}from"./chunk.FXVHSWNW.js";import{b as g,e as l}from"./chunk.RZUTJ36B.js";import{b as n,e as d}from"./chunk.6OTM3PE5.js";import{e as o}from"./chunk.TJOCV4DC.js";var t=class extends u{constructor(){super(...arguments);this.hasSlotController=new k(this,"footer");this.localize=new x(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new M(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),y(this))}disconnectedCallback(){super.disconnectedCallback(),v(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let i=s(this,"dialog.denyClose",{dir:this.localize.dir()});n(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=C(),this.modal.activate(),y(this);let e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([d(this.dialog),d(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});let r=this.prefersReducedMotion?s(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):s(this,"dialog.show",{dir:this.localize.dir()}),i=s(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,r.keyframes,r.options),n(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([d(this.dialog),d(this.overlay)]);let e=this.prefersReducedMotion?s(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):s(this,"dialog.hide",{dir:this.localize.dir()}),r=s(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,r.keyframes,r.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,v(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&i.isConnected&&setTimeout(()=>{try{i.focus({preventScroll:!0})}catch(E){i.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}render(){return l`<div part="base" class="${p("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${p("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${f(this.headline?this.headline:void 0)}" aria-labelledby="${f(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?l`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:l`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":l`<sd-5-15-9-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${p("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-5-15-9-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-5-15-9-icon></sd-5-15-9-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};t.styles=[...u.styles,g`:host{--width:662px}[part=panel]{max-height:80vh;width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=body]{min-height:50px}[part=footer]{width:100%}}`],o([c('[part="base"]')],t.prototype,"dialog",2),o([c('[part="panel"]')],t.prototype,"panel",2),o([c('[part="overlay"]')],t.prototype,"overlay",2),o([h({type:Boolean,reflect:!0})],t.prototype,"open",2),o([h({type:String,reflect:!0})],t.prototype,"headline",2),o([h({attribute:"no-close-button",type:Boolean,reflect:!0})],t.prototype,"noCloseButton",2),o([b("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),t=o([w("sd-5-15-9-dialog")],t);a("dialog.show",{keyframes:[{opacity:0,transform:"translate(-50%, 100%)"},{opacity:1,transform:"translate(0, 0)"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});a("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});a("dialog.hide",{keyframes:[{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(50%, -100%)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});a("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});a("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});a("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});a("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});export{t as a};
|