@solid-design-system/components 5.16.1-next.0 → 5.16.1
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.3FCZSYJE.js +1 -0
- package/cdn/chunks/chunk.3SQYUPQR.js +1 -0
- package/cdn/chunks/{chunk.ZFOZJ36J.js → chunk.3ZSLSQT3.js} +1 -2
- package/cdn/chunks/{chunk.SIY4LRPB.js → chunk.4SX3FTTZ.js} +1 -1
- package/cdn/chunks/chunk.5P7RNZVM.js +1 -0
- package/cdn/chunks/chunk.5QETSQFJ.js +1 -0
- package/cdn/chunks/chunk.5UL2MFVQ.js +1 -0
- package/cdn/chunks/chunk.6AL2V3GA.js +1 -0
- package/cdn/chunks/{chunk.3VKPKJT4.js → chunk.6KIASTDN.js} +3 -4
- package/cdn/chunks/chunk.6O24TPWT.js +1 -0
- package/cdn/chunks/{chunk.W4QBFD6E.js → chunk.6OTM3PE5.js} +1 -1
- package/cdn/chunks/{chunk.UTR4DHLT.js → chunk.6WJYMU5I.js} +4 -5
- package/cdn/chunks/chunk.7BYMJ4MT.js +10 -0
- package/cdn/chunks/chunk.7LYAXCBH.js +1 -0
- package/cdn/chunks/chunk.AGOSIHIV.js +1 -0
- package/cdn/chunks/{chunk.R62WGEQY.js → chunk.AZMH6NZR.js} +2 -3
- package/cdn/chunks/chunk.B7YAWCJP.js +1 -0
- package/cdn/chunks/chunk.BDPK77SL.js +1 -0
- package/{cdn-versioned/chunks/chunk.MP6XEXRW.js → cdn/chunks/chunk.BOIDC3L5.js} +1 -1
- package/{cdn-versioned/chunks/chunk.CJNOMH3T.js → cdn/chunks/chunk.BS3WSQN5.js} +1 -2
- package/cdn/chunks/{chunk.EOXYPQZI.js → chunk.C577EOP7.js} +1 -1
- package/cdn/chunks/{chunk.2AUHDXWC.js → chunk.CBQDWY5Y.js} +1 -2
- package/cdn/chunks/chunk.CEVVDV52.js +1 -0
- package/{cdn-versioned/chunks/chunk.PV6UYBMY.js → cdn/chunks/chunk.CHU57RUD.js} +1 -1
- package/cdn/chunks/chunk.CN5K7RGY.js +1 -0
- package/cdn/chunks/chunk.CRGRHGIA.js +1 -0
- package/cdn/chunks/{chunk.LVTMZQJV.js → chunk.DAPRKASR.js} +1 -2
- package/{cdn-versioned/chunks/chunk.ENJXLYMY.js → cdn/chunks/chunk.DLQQ7NIM.js} +1 -2
- package/cdn/chunks/chunk.DTEAN466.js +1 -0
- package/cdn/chunks/{chunk.NYKJXI3Q.js → chunk.E2DRD2OX.js} +1 -1
- package/cdn/chunks/{chunk.N3WG3NAL.js → chunk.EJI65G6N.js} +1 -1
- package/{cdn-versioned/chunks/chunk.RBHJIKZL.js → cdn/chunks/chunk.EOIYFHSR.js} +1 -4
- package/cdn/chunks/chunk.ERVOG57V.js +1 -0
- package/cdn/chunks/chunk.EXK3HKK5.js +1 -0
- package/{cdn-versioned/chunks/chunk.KPGRVUWN.js → cdn/chunks/chunk.F7X5747H.js} +1 -2
- package/cdn/chunks/chunk.GCKYK2C3.js +1 -0
- package/cdn/chunks/{chunk.CDP46OS4.js → chunk.HJ4O4XQA.js} +1 -1
- package/cdn/chunks/{chunk.YMZZDCP3.js → chunk.K7HF3VBZ.js} +1 -1
- package/cdn/chunks/chunk.K7UH7J3V.js +1 -0
- package/cdn/chunks/chunk.KBESD73V.js +1 -0
- package/cdn/chunks/chunk.KKT3D6C3.js +1 -0
- package/cdn/chunks/{chunk.7BPPDSHY.js → chunk.L6MCOH7T.js} +1 -1
- package/cdn/chunks/{chunk.LV3LCBSG.js → chunk.LFJ4IYGZ.js} +1 -2
- package/{cdn-versioned/chunks/chunk.VYBQ3X2B.js → cdn/chunks/chunk.LIO6LMTQ.js} +1 -1
- package/cdn/chunks/chunk.LXHLWQH7.js +1 -0
- package/cdn/chunks/chunk.LZBHL4IV.js +1 -0
- package/cdn/chunks/chunk.MHPHKNZ5.js +83 -0
- package/cdn/chunks/{chunk.AVBQMWIA.js → chunk.NOZRJQX2.js} +2 -3
- package/cdn/chunks/{chunk.JS2HQ2N4.js → chunk.NRBNWX7R.js} +1 -1
- package/cdn/chunks/{chunk.3MVF6H4N.js → chunk.NYJKF5NP.js} +1 -2
- package/{cdn-versioned/chunks/chunk.LTQPSLZX.js → cdn/chunks/chunk.OLX6LCKD.js} +1 -2
- package/cdn/chunks/{chunk.FK5L4QA6.js → chunk.P7DGMSNP.js} +1 -2
- package/cdn/chunks/{chunk.N3UOZUQ7.js → chunk.PKBVHWYN.js} +1 -2
- package/{cdn-versioned/chunks/chunk.PJ7JCMQF.js → cdn/chunks/chunk.PVM2WKMA.js} +1 -1
- package/cdn/chunks/chunk.QP5624EY.js +1 -0
- package/cdn/chunks/chunk.QVATLNE5.js +1 -0
- package/cdn/chunks/chunk.QWAB34LZ.js +3 -0
- package/cdn/chunks/chunk.R7A64SR7.js +1 -0
- package/cdn/chunks/{chunk.763RLJEK.js → chunk.RZUTJ36B.js} +2 -2
- package/cdn/chunks/chunk.SAXLGODJ.js +1 -0
- package/cdn/chunks/chunk.SB7VJNMQ.js +1 -0
- package/cdn/chunks/chunk.SKIYV7KD.js +1 -0
- package/cdn/chunks/{chunk.B2NUKX6G.js → chunk.SKUMYG4O.js} +1 -1
- package/{cdn-versioned/chunks/chunk.IJ2YZYNV.js → cdn/chunks/chunk.THIUBNOW.js} +1 -2
- package/cdn/chunks/chunk.TIK62LTB.js +25 -0
- package/cdn/chunks/chunk.TJOCV4DC.js +1 -0
- package/cdn/chunks/chunk.TOLB3HGS.js +1 -0
- package/cdn/chunks/chunk.UKCW2W2D.js +1 -0
- package/cdn/chunks/chunk.ULAC7BZA.js +1 -0
- package/cdn/chunks/{chunk.X6ZT6MLD.js → chunk.W32I6F46.js} +1 -2
- package/cdn/chunks/chunk.W4Y456DP.js +1 -0
- package/cdn/chunks/chunk.WAAEZAT7.js +1 -0
- package/{cdn-versioned/chunks/chunk.STI5RRSU.js → cdn/chunks/chunk.WMLPJIUB.js} +1 -2
- package/cdn/chunks/chunk.X53UBPCZ.js +1 -0
- package/cdn/chunks/chunk.XGIPT7I4.js +1 -0
- package/{cdn-versioned/chunks/chunk.D4E5ZIRW.js → cdn/chunks/chunk.XR2KNB36.js} +1 -1
- package/cdn/chunks/{chunk.CSLPZKLY.js → chunk.Y3GIPFVP.js} +1 -1
- package/cdn/chunks/chunk.YJ2L67GK.js +11 -0
- package/cdn/chunks/chunk.ZSXBZK7F.js +1 -0
- 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/animation/animations.js +1 -1
- package/cdn/components/audio/audio.d.ts +0 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/audio/base64Audio.js +1 -1
- package/cdn/components/audio/wave.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/autoplay-controller.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/carousel/fade-controller.js +1 -1
- package/cdn/components/carousel/scroll-controller.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/combobox/option-renderer.js +1 -1
- package/cdn/components/combobox/utils.js +1 -1
- package/cdn/components/datepicker/datepicker.d.ts +1 -1
- package/cdn/components/datepicker/datepicker.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.d.ts +0 -1
- package/cdn/components/icon/icon.js +1 -1
- package/cdn/components/icon/library.d.ts +1 -1
- package/cdn/components/icon/library.default.js +1 -1
- package/cdn/components/icon/library.internal.d.ts +0 -2
- package/cdn/components/icon/library.internal.js +1 -1
- package/cdn/components/icon/library.js +1 -1
- package/cdn/components/icon/library.status.js +1 -1
- package/cdn/components/icon/request.js +1 -1
- package/cdn/components/include/include.js +1 -1
- package/cdn/components/include/request.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/utils.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 +6 -452
- package/cdn/internal/longpress.d.ts +1 -1
- package/cdn/internal/solid-element.d.ts +0 -5
- package/cdn/internal/solid-element.js +11 -61
- package/cdn/solid-components.bundle.js +61 -192
- package/cdn/solid-components.css +32 -118
- package/cdn/solid-components.d.ts +0 -1
- package/cdn/solid-components.iife.js +61 -192
- package/cdn/solid-components.js +1 -1
- package/cdn/translations/de.js +1 -1
- package/cdn/translations/en.js +1 -1
- package/cdn/utilities/animation-registry.js +1 -1
- package/cdn/utilities/animation.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/utilities/base-path.js +1 -1
- package/cdn/utilities/date.js +1 -1
- package/cdn/utilities/form.js +1 -1
- package/cdn/utilities/icon-library.js +1 -1
- package/cdn/utilities/localize.js +1 -1
- package/cdn/vscode.html-custom-data.json +17 -39
- package/cdn/web-types.json +19 -62
- package/cdn-versioned/chunks/chunk.3FCZSYJE.js +1 -0
- package/cdn-versioned/chunks/chunk.3SQYUPQR.js +1 -0
- package/cdn-versioned/chunks/chunk.3ZSLSQT3.js +1 -0
- package/cdn-versioned/chunks/{chunk.SIY4LRPB.js → chunk.4SX3FTTZ.js} +1 -1
- package/cdn-versioned/chunks/chunk.5P7RNZVM.js +1 -0
- package/cdn-versioned/chunks/chunk.5QETSQFJ.js +1 -0
- package/cdn-versioned/chunks/chunk.5UL2MFVQ.js +1 -0
- package/cdn-versioned/chunks/chunk.6AL2V3GA.js +1 -0
- package/cdn-versioned/chunks/chunk.6KIASTDN.js +11 -0
- package/cdn-versioned/chunks/chunk.6O24TPWT.js +1 -0
- package/cdn-versioned/chunks/{chunk.W4QBFD6E.js → chunk.6OTM3PE5.js} +1 -1
- package/cdn-versioned/chunks/chunk.6WJYMU5I.js +11 -0
- package/cdn-versioned/chunks/chunk.7BYMJ4MT.js +10 -0
- package/cdn-versioned/chunks/chunk.7LYAXCBH.js +1 -0
- package/cdn-versioned/chunks/chunk.AGOSIHIV.js +1 -0
- package/cdn-versioned/chunks/chunk.AZMH6NZR.js +4 -0
- package/cdn-versioned/chunks/chunk.B7YAWCJP.js +1 -0
- package/cdn-versioned/chunks/chunk.BDPK77SL.js +1 -0
- package/{cdn/chunks/chunk.MP6XEXRW.js → cdn-versioned/chunks/chunk.BOIDC3L5.js} +1 -1
- package/{cdn/chunks/chunk.CJNOMH3T.js → cdn-versioned/chunks/chunk.BS3WSQN5.js} +1 -2
- package/cdn-versioned/chunks/{chunk.EOXYPQZI.js → chunk.C577EOP7.js} +1 -1
- package/cdn-versioned/chunks/chunk.CBQDWY5Y.js +1 -0
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -0
- package/{cdn/chunks/chunk.PV6UYBMY.js → cdn-versioned/chunks/chunk.CHU57RUD.js} +1 -1
- package/cdn-versioned/chunks/chunk.CN5K7RGY.js +1 -0
- package/cdn-versioned/chunks/chunk.CRGRHGIA.js +1 -0
- package/cdn-versioned/chunks/chunk.DAPRKASR.js +1 -0
- package/{cdn/chunks/chunk.ENJXLYMY.js → cdn-versioned/chunks/chunk.DLQQ7NIM.js} +1 -2
- package/cdn-versioned/chunks/chunk.DTEAN466.js +1 -0
- package/cdn-versioned/chunks/{chunk.NYKJXI3Q.js → chunk.E2DRD2OX.js} +1 -1
- package/cdn-versioned/chunks/{chunk.N3WG3NAL.js → chunk.EJI65G6N.js} +1 -1
- package/{cdn/chunks/chunk.RBHJIKZL.js → cdn-versioned/chunks/chunk.EOIYFHSR.js} +1 -4
- package/cdn-versioned/chunks/chunk.ERVOG57V.js +1 -0
- package/cdn-versioned/chunks/chunk.EXK3HKK5.js +1 -0
- package/{cdn/chunks/chunk.KPGRVUWN.js → cdn-versioned/chunks/chunk.F7X5747H.js} +1 -2
- package/cdn-versioned/chunks/chunk.GCKYK2C3.js +1 -0
- package/cdn-versioned/chunks/chunk.HJ4O4XQA.js +10 -0
- package/cdn-versioned/chunks/{chunk.YMZZDCP3.js → chunk.K7HF3VBZ.js} +1 -1
- package/cdn-versioned/chunks/chunk.K7UH7J3V.js +1 -0
- package/cdn-versioned/chunks/chunk.KBESD73V.js +1 -0
- package/cdn-versioned/chunks/chunk.KKT3D6C3.js +1 -0
- package/cdn-versioned/chunks/{chunk.7BPPDSHY.js → chunk.L6MCOH7T.js} +1 -1
- package/cdn-versioned/chunks/chunk.LFJ4IYGZ.js +11 -0
- package/{cdn/chunks/chunk.VYBQ3X2B.js → cdn-versioned/chunks/chunk.LIO6LMTQ.js} +1 -1
- package/cdn-versioned/chunks/chunk.LXHLWQH7.js +1 -0
- package/cdn-versioned/chunks/chunk.LZBHL4IV.js +1 -0
- package/cdn-versioned/chunks/chunk.MHPHKNZ5.js +83 -0
- package/cdn-versioned/chunks/chunk.NOZRJQX2.js +3 -0
- package/cdn-versioned/chunks/chunk.NRBNWX7R.js +1 -0
- package/cdn-versioned/chunks/chunk.NYJKF5NP.js +1 -0
- package/{cdn/chunks/chunk.LTQPSLZX.js → cdn-versioned/chunks/chunk.OLX6LCKD.js} +1 -2
- package/cdn-versioned/chunks/chunk.P7DGMSNP.js +1 -0
- package/cdn-versioned/chunks/chunk.PKBVHWYN.js +1 -0
- package/{cdn/chunks/chunk.PJ7JCMQF.js → cdn-versioned/chunks/chunk.PVM2WKMA.js} +1 -1
- package/cdn-versioned/chunks/chunk.QP5624EY.js +1 -0
- package/cdn-versioned/chunks/chunk.QVATLNE5.js +1 -0
- package/cdn-versioned/chunks/chunk.QWAB34LZ.js +3 -0
- package/cdn-versioned/chunks/chunk.R7A64SR7.js +1 -0
- package/cdn-versioned/chunks/{chunk.763RLJEK.js → chunk.RZUTJ36B.js} +2 -2
- package/cdn-versioned/chunks/chunk.SAXLGODJ.js +1 -0
- package/cdn-versioned/chunks/chunk.SB7VJNMQ.js +1 -0
- package/cdn-versioned/chunks/chunk.SKIYV7KD.js +1 -0
- package/cdn-versioned/chunks/{chunk.B2NUKX6G.js → chunk.SKUMYG4O.js} +1 -1
- package/{cdn/chunks/chunk.IJ2YZYNV.js → cdn-versioned/chunks/chunk.THIUBNOW.js} +1 -2
- package/cdn-versioned/chunks/chunk.TIK62LTB.js +25 -0
- package/cdn-versioned/chunks/chunk.TJOCV4DC.js +1 -0
- package/cdn-versioned/chunks/chunk.TOLB3HGS.js +1 -0
- package/cdn-versioned/chunks/chunk.UKCW2W2D.js +1 -0
- package/cdn-versioned/chunks/chunk.ULAC7BZA.js +1 -0
- package/cdn-versioned/chunks/chunk.W32I6F46.js +1 -0
- package/cdn-versioned/chunks/chunk.W4Y456DP.js +1 -0
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WAAEZAT7.js +1 -0
- package/{cdn/chunks/chunk.STI5RRSU.js → cdn-versioned/chunks/chunk.WMLPJIUB.js} +1 -2
- package/cdn-versioned/chunks/chunk.X53UBPCZ.js +1 -0
- package/cdn-versioned/chunks/chunk.XGIPT7I4.js +1 -0
- package/{cdn/chunks/chunk.D4E5ZIRW.js → cdn-versioned/chunks/chunk.XR2KNB36.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CSLPZKLY.js → chunk.Y3GIPFVP.js} +1 -1
- package/cdn-versioned/chunks/chunk.YJ2L67GK.js +11 -0
- package/cdn-versioned/chunks/chunk.ZSXBZK7F.js +1 -0
- 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/animation/animations.js +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -2
- package/cdn-versioned/components/audio/audio.js +1 -1
- package/cdn-versioned/components/audio/base64Audio.js +1 -1
- package/cdn-versioned/components/audio/wave.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/autoplay-controller.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/fade-controller.js +1 -1
- package/cdn-versioned/components/carousel/scroll-controller.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/combobox/option-renderer.js +1 -1
- package/cdn-versioned/components/combobox/utils.js +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +2 -2
- package/cdn-versioned/components/datepicker/datepicker.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 -2
- package/cdn-versioned/components/icon/icon.js +1 -1
- package/cdn-versioned/components/icon/library.d.ts +1 -1
- package/cdn-versioned/components/icon/library.default.js +1 -1
- package/cdn-versioned/components/icon/library.internal.d.ts +0 -2
- package/cdn-versioned/components/icon/library.internal.js +1 -1
- package/cdn-versioned/components/icon/library.js +1 -1
- package/cdn-versioned/components/icon/library.status.js +1 -1
- package/cdn-versioned/components/icon/request.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/include/request.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/utils.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 +251 -697
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/internal/longpress.d.ts +1 -1
- package/cdn-versioned/internal/solid-element.d.ts +0 -5
- package/cdn-versioned/internal/solid-element.js +11 -61
- package/cdn-versioned/solid-components.bundle.js +61 -192
- package/cdn-versioned/solid-components.css +32 -118
- package/cdn-versioned/solid-components.d.ts +0 -1
- package/cdn-versioned/solid-components.iife.js +61 -192
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/translations/de.js +1 -1
- package/cdn-versioned/translations/en.js +1 -1
- package/cdn-versioned/utilities/animation-registry.js +1 -1
- package/cdn-versioned/utilities/animation.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/utilities/base-path.js +1 -1
- package/cdn-versioned/utilities/date.js +1 -1
- package/cdn-versioned/utilities/form.js +1 -1
- package/cdn-versioned/utilities/icon-library.js +1 -1
- package/cdn-versioned/utilities/localize.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +102 -124
- package/cdn-versioned/web-types.json +172 -215
- package/dist/chunks/{chunk.JFYEW3KW.js → chunk.2CAP3Q56.js} +2 -3
- package/dist/chunks/{chunk.XE2RRGVH.js → chunk.2SR73L2N.js} +2 -3
- package/dist/chunks/{chunk.2G4FUBDQ.js → chunk.3YQ55DEG.js} +2 -7
- package/dist/chunks/{chunk.LNHMJS3O.js → chunk.43SFOPTI.js} +3 -4
- package/dist/chunks/{chunk.TCIKEWTO.js → chunk.44BJS2SJ.js} +2 -3
- package/dist/chunks/{chunk.ZHMLJZFU.js → chunk.4DHEQEYR.js} +2 -3
- package/dist/chunks/{chunk.QXA4KBMD.js → chunk.4VTG7PRD.js} +2 -3
- package/dist/chunks/{chunk.CJDJQNJE.js → chunk.5USUIHQC.js} +2 -3
- package/dist/chunks/{chunk.AAY5JRCW.js → chunk.6DKXZWRN.js} +1 -2
- package/dist/chunks/{chunk.LQJSNWYP.js → chunk.72VNUTTV.js} +13 -6
- package/dist/chunks/{chunk.5ERDGBQ2.js → chunk.7IR6CJSO.js} +2 -3
- package/dist/chunks/{chunk.K6IPCLUI.js → chunk.7JUNYBWC.js} +4 -5
- package/dist/chunks/{chunk.JY6FHQV4.js → chunk.7MXI26GR.js} +3 -4
- package/dist/chunks/{chunk.QFCVUWPB.js → chunk.7QAWQQC2.js} +4 -8
- package/{dist-versioned/chunks/chunk.KPAQRMCC.js → dist/chunks/chunk.7VPFFNHR.js} +2 -2
- package/dist/chunks/{chunk.GY73LR3S.js → chunk.7YENJBA2.js} +2 -3
- package/dist/chunks/{chunk.ARM7CJQL.js → chunk.ABLPLQOM.js} +2 -3
- package/dist/chunks/{chunk.2EMJYE7P.js → chunk.ANLMAOKA.js} +3 -4
- package/dist/chunks/{chunk.4VWYFR7Q.js → chunk.AQI2R5GT.js} +5 -6
- package/dist/chunks/{chunk.4VCWVPDC.js → chunk.AXFVYO5L.js} +18 -25
- package/dist/chunks/{chunk.PAHCSY5I.js → chunk.BLKVBNBL.js} +2 -3
- package/dist/chunks/{chunk.FO5HZGHW.js → chunk.BWFYNOYR.js} +2 -3
- package/dist/chunks/{chunk.2LWMWEI6.js → chunk.CKLEIUJP.js} +8 -6
- package/dist/chunks/{chunk.UG7ABG7Q.js → chunk.DKBTK7VW.js} +2 -3
- package/dist/chunks/{chunk.RDTKXRB7.js → chunk.EOLLVTEE.js} +2 -3
- package/dist/chunks/{chunk.NXR5NJ4D.js → chunk.ERJOEJ54.js} +2 -3
- package/dist/chunks/{chunk.MQNVPN2V.js → chunk.FK2BNPQB.js} +3 -4
- package/dist/chunks/{chunk.MZYFWNJ2.js → chunk.G3JK5J7P.js} +2 -3
- package/dist/chunks/{chunk.B2OI7BBP.js → chunk.G4FXGRRH.js} +5 -6
- package/dist/chunks/{chunk.35CDD4AI.js → chunk.GTISTGG6.js} +34 -21
- package/dist/chunks/{chunk.TBWF2AZD.js → chunk.GUZQ4ADZ.js} +2 -3
- package/dist/chunks/{chunk.AKPL6DO2.js → chunk.JGH3YXMX.js} +3 -4
- package/dist/chunks/{chunk.7OG77Q72.js → chunk.LLUTMJ6Y.js} +5 -6
- package/dist/chunks/{chunk.X5F5FYN6.js → chunk.O7O2LFXK.js} +6 -7
- package/dist/chunks/{chunk.CSGRFVC4.js → chunk.PB672B5H.js} +2 -3
- package/dist/chunks/chunk.PJJCHCFO.js +82 -0
- package/dist/chunks/{chunk.P23KPMOU.js → chunk.PJPWXQY7.js} +5 -11
- package/dist/chunks/{chunk.KCQCBXXE.js → chunk.QFW772DW.js} +3 -4
- package/dist/chunks/{chunk.DPUEJBCS.js → chunk.QL6JHFGU.js} +3 -4
- package/dist/chunks/chunk.QSQRQKYT.js +129 -0
- package/dist/chunks/{chunk.CNC35623.js → chunk.QV5WLO4L.js} +11 -14
- package/dist/chunks/{chunk.B2V3A3FX.js → chunk.QVBR2RUV.js} +4 -11
- package/dist/chunks/{chunk.QYH72BBU.js → chunk.RCBOBERD.js} +3 -4
- package/dist/chunks/{chunk.X5DOMMVJ.js → chunk.RRDLKLEV.js} +4 -5
- package/dist/chunks/{chunk.P6IWIVAX.js → chunk.TED3AFLN.js} +2 -3
- package/dist/chunks/{chunk.J24ES3ER.js → chunk.TWLOCD6V.js} +2 -3
- package/dist/chunks/chunk.U3IJ4WDG.js +72 -0
- package/dist/chunks/{chunk.3QRVTHVA.js → chunk.UFU7P2YD.js} +5 -6
- package/dist/chunks/{chunk.N6SDJ5F4.js → chunk.UKB75H6A.js} +2 -3
- package/{dist-versioned/chunks/chunk.GYXMDYGY.js → dist/chunks/chunk.UVOGBJGP.js} +2 -2
- package/dist/chunks/{chunk.S2LPDX6A.js → chunk.V257WRGF.js} +2 -3
- package/dist/chunks/{chunk.ZDLONKYZ.js → chunk.VCV7HS44.js} +4 -5
- package/dist/chunks/{chunk.MFEFWNU4.js → chunk.VZBVZB3D.js} +5 -6
- package/dist/chunks/{chunk.66ESUTRL.js → chunk.W5ZR6XJP.js} +6 -6
- package/dist/chunks/{chunk.Y4AVD2WJ.js → chunk.WV4BVBH5.js} +2 -3
- package/dist/chunks/{chunk.ML26ETGW.js → chunk.XF7G3LFU.js} +5 -8
- package/dist/chunks/{chunk.OWPID45T.js → chunk.XR6GLQWM.js} +5 -6
- package/dist/chunks/{chunk.GXJOE2HU.js → chunk.XU2JEV5G.js} +2 -3
- package/dist/chunks/{chunk.OEQMLH45.js → chunk.YJF7I33G.js} +8 -9
- package/dist/chunks/{chunk.LRYVZCZB.js → chunk.YN47LYT7.js} +5 -6
- package/dist/chunks/{chunk.B4X6CPEB.js → chunk.ZEBYA7QQ.js} +3 -4
- package/dist/chunks/{chunk.5TXUJJY7.js → chunk.ZSD3BEVL.js} +5 -6
- package/dist/components/accordion/accordion.js +6 -6
- package/dist/components/accordion-group/accordion-group.js +7 -7
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/audio/audio.d.ts +0 -1
- package/dist/components/audio/audio.js +9 -9
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/brandshape/brandshape.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/components/button/button.js +3 -3
- package/dist/components/button-group/button-group.js +2 -2
- package/dist/components/carousel/carousel.js +7 -7
- package/dist/components/carousel-item/carousel-item.js +2 -2
- package/dist/components/checkbox/checkbox.js +6 -6
- package/dist/components/checkbox-group/checkbox-group.js +6 -6
- package/dist/components/combobox/combobox.js +8 -8
- package/dist/components/datepicker/datepicker.d.ts +1 -1
- package/dist/components/datepicker/datepicker.js +2 -2
- package/dist/components/dialog/dialog.js +8 -8
- package/dist/components/divider/divider.js +2 -2
- package/dist/components/drawer/drawer.js +8 -8
- package/dist/components/dropdown/dropdown.js +3 -3
- package/dist/components/expandable/expandable.js +6 -6
- package/dist/components/flipcard/flipcard.js +8 -8
- package/dist/components/header/header.js +2 -2
- package/dist/components/icon/icon.d.ts +0 -1
- package/dist/components/icon/icon.js +5 -5
- package/dist/components/icon/library.d.ts +1 -1
- package/dist/components/icon/library.default.js +1 -1
- package/dist/components/icon/library.internal.d.ts +0 -2
- package/dist/components/icon/library.internal.js +1 -1
- package/dist/components/icon/library.js +3 -3
- package/dist/components/include/include.js +2 -2
- package/dist/components/input/input.js +6 -6
- package/dist/components/link/link.js +2 -2
- package/dist/components/loader/loader.js +2 -2
- package/dist/components/map-marker/map-marker.js +2 -2
- package/dist/components/menu/menu.js +2 -2
- package/dist/components/menu-item/menu-item.js +2 -2
- package/dist/components/navigation-item/navigation-item.js +7 -7
- package/dist/components/notification/notification.js +8 -8
- package/dist/components/optgroup/optgroup.js +3 -3
- package/dist/components/option/option.js +6 -6
- package/dist/components/popup/popup.js +2 -2
- package/dist/components/quickfact/quickfact.js +7 -7
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/radio-button/radio-button.js +2 -2
- package/dist/components/radio-group/radio-group.js +4 -4
- package/dist/components/range/range.js +2 -2
- package/dist/components/range-tick/range-tick.js +2 -2
- package/dist/components/scrollable/scrollable.js +6 -6
- package/dist/components/select/select.js +8 -8
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/step/step.js +6 -6
- package/dist/components/step-group/step-group.js +2 -2
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/tab/tab.js +2 -2
- package/dist/components/tab-group/tab-group.js +6 -6
- package/dist/components/tab-panel/tab-panel.js +2 -2
- package/dist/components/tag/tag.js +6 -6
- package/dist/components/teaser/teaser.js +2 -2
- package/dist/components/teaser-media/teaser-media.js +2 -2
- package/dist/components/textarea/textarea.js +6 -6
- package/dist/components/tooltip/tooltip.js +7 -7
- package/dist/components/video/video.js +6 -6
- package/dist/custom-elements.json +6 -452
- package/dist/internal/longpress.d.ts +1 -1
- package/dist/internal/solid-element.d.ts +0 -5
- package/dist/internal/solid-element.js +11 -61
- package/dist/solid-components.css +32 -118
- package/dist/solid-components.d.ts +0 -1
- package/dist/solid-components.js +62 -66
- package/dist/utilities/autocomplete-config.js +3 -3
- package/dist/utilities/icon-library.js +3 -3
- package/dist/vscode.html-custom-data.json +17 -39
- package/dist/web-types.json +19 -62
- package/dist-versioned/chunks/{chunk.JFYEW3KW.js → chunk.2CAP3Q56.js} +3 -4
- package/dist-versioned/chunks/{chunk.XE2RRGVH.js → chunk.2SR73L2N.js} +3 -4
- package/dist-versioned/chunks/{chunk.2G4FUBDQ.js → chunk.3YQ55DEG.js} +4 -9
- package/dist-versioned/chunks/{chunk.LNHMJS3O.js → chunk.43SFOPTI.js} +4 -5
- package/dist-versioned/chunks/{chunk.TCIKEWTO.js → chunk.44BJS2SJ.js} +4 -5
- package/dist-versioned/chunks/{chunk.ZHMLJZFU.js → chunk.4DHEQEYR.js} +4 -5
- package/dist-versioned/chunks/{chunk.QXA4KBMD.js → chunk.4VTG7PRD.js} +3 -4
- package/dist-versioned/chunks/{chunk.CJDJQNJE.js → chunk.5USUIHQC.js} +9 -10
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +69 -0
- package/dist-versioned/chunks/{chunk.LQJSNWYP.js → chunk.72VNUTTV.js} +14 -7
- package/dist-versioned/chunks/{chunk.5ERDGBQ2.js → chunk.7IR6CJSO.js} +4 -5
- package/dist-versioned/chunks/{chunk.K6IPCLUI.js → chunk.7JUNYBWC.js} +5 -6
- package/dist-versioned/chunks/{chunk.JY6FHQV4.js → chunk.7MXI26GR.js} +8 -9
- package/dist-versioned/chunks/{chunk.QFCVUWPB.js → chunk.7QAWQQC2.js} +5 -9
- package/{dist/chunks/chunk.KPAQRMCC.js → dist-versioned/chunks/chunk.7VPFFNHR.js} +2 -2
- package/dist-versioned/chunks/{chunk.GY73LR3S.js → chunk.7YENJBA2.js} +3 -4
- package/dist-versioned/chunks/{chunk.ARM7CJQL.js → chunk.ABLPLQOM.js} +6 -7
- package/dist-versioned/chunks/{chunk.2EMJYE7P.js → chunk.ANLMAOKA.js} +4 -5
- package/dist-versioned/chunks/{chunk.4VWYFR7Q.js → chunk.AQI2R5GT.js} +7 -8
- package/dist-versioned/chunks/{chunk.4VCWVPDC.js → chunk.AXFVYO5L.js} +21 -28
- package/dist-versioned/chunks/{chunk.PAHCSY5I.js → chunk.BLKVBNBL.js} +3 -4
- package/dist-versioned/chunks/{chunk.FO5HZGHW.js → chunk.BWFYNOYR.js} +4 -5
- package/dist-versioned/chunks/{chunk.2LWMWEI6.js → chunk.CKLEIUJP.js} +10 -8
- package/dist-versioned/chunks/{chunk.UG7ABG7Q.js → chunk.DKBTK7VW.js} +13 -14
- package/dist-versioned/chunks/{chunk.RDTKXRB7.js → chunk.EOLLVTEE.js} +3 -4
- package/dist-versioned/chunks/{chunk.NXR5NJ4D.js → chunk.ERJOEJ54.js} +6 -7
- package/dist-versioned/chunks/{chunk.MQNVPN2V.js → chunk.FK2BNPQB.js} +15 -16
- package/dist-versioned/chunks/{chunk.MZYFWNJ2.js → chunk.G3JK5J7P.js} +3 -4
- package/dist-versioned/chunks/{chunk.B2OI7BBP.js → chunk.G4FXGRRH.js} +7 -8
- package/dist-versioned/chunks/{chunk.35CDD4AI.js → chunk.GTISTGG6.js} +38 -25
- package/dist-versioned/chunks/{chunk.TBWF2AZD.js → chunk.GUZQ4ADZ.js} +3 -4
- package/dist-versioned/chunks/{chunk.AKPL6DO2.js → chunk.JGH3YXMX.js} +14 -15
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/{chunk.7OG77Q72.js → chunk.LLUTMJ6Y.js} +30 -31
- package/dist-versioned/chunks/{chunk.X5F5FYN6.js → chunk.O7O2LFXK.js} +7 -8
- package/dist-versioned/chunks/{chunk.CSGRFVC4.js → chunk.PB672B5H.js} +3 -4
- package/dist-versioned/chunks/chunk.PJJCHCFO.js +82 -0
- package/dist-versioned/chunks/{chunk.P23KPMOU.js → chunk.PJPWXQY7.js} +10 -16
- package/dist-versioned/chunks/{chunk.KCQCBXXE.js → chunk.QFW772DW.js} +15 -16
- package/dist-versioned/chunks/{chunk.DPUEJBCS.js → chunk.QL6JHFGU.js} +6 -7
- package/dist-versioned/chunks/chunk.QSQRQKYT.js +129 -0
- package/dist-versioned/chunks/{chunk.CNC35623.js → chunk.QV5WLO4L.js} +14 -17
- package/dist-versioned/chunks/{chunk.B2V3A3FX.js → chunk.QVBR2RUV.js} +5 -12
- package/dist-versioned/chunks/{chunk.QYH72BBU.js → chunk.RCBOBERD.js} +5 -6
- package/dist-versioned/chunks/{chunk.X5DOMMVJ.js → chunk.RRDLKLEV.js} +6 -7
- package/dist-versioned/chunks/{chunk.P6IWIVAX.js → chunk.TED3AFLN.js} +4 -5
- package/dist-versioned/chunks/{chunk.J24ES3ER.js → chunk.TWLOCD6V.js} +6 -7
- package/dist-versioned/chunks/chunk.U3IJ4WDG.js +72 -0
- package/dist-versioned/chunks/{chunk.3QRVTHVA.js → chunk.UFU7P2YD.js} +7 -8
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/{chunk.N6SDJ5F4.js → chunk.UKB75H6A.js} +6 -7
- package/{dist/chunks/chunk.GYXMDYGY.js → dist-versioned/chunks/chunk.UVOGBJGP.js} +2 -2
- package/dist-versioned/chunks/{chunk.S2LPDX6A.js → chunk.V257WRGF.js} +3 -4
- package/dist-versioned/chunks/{chunk.ZDLONKYZ.js → chunk.VCV7HS44.js} +5 -6
- package/dist-versioned/chunks/{chunk.MFEFWNU4.js → chunk.VZBVZB3D.js} +7 -8
- package/dist-versioned/chunks/{chunk.66ESUTRL.js → chunk.W5ZR6XJP.js} +7 -7
- package/dist-versioned/chunks/{chunk.Y4AVD2WJ.js → chunk.WV4BVBH5.js} +4 -5
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/{chunk.ML26ETGW.js → chunk.XF7G3LFU.js} +7 -10
- package/dist-versioned/chunks/{chunk.OWPID45T.js → chunk.XR6GLQWM.js} +7 -8
- package/dist-versioned/chunks/{chunk.GXJOE2HU.js → chunk.XU2JEV5G.js} +7 -8
- package/dist-versioned/chunks/{chunk.OEQMLH45.js → chunk.YJF7I33G.js} +14 -15
- package/dist-versioned/chunks/{chunk.LRYVZCZB.js → chunk.YN47LYT7.js} +7 -8
- package/dist-versioned/chunks/{chunk.B4X6CPEB.js → chunk.ZEBYA7QQ.js} +5 -6
- package/dist-versioned/chunks/{chunk.5TXUJJY7.js → chunk.ZSD3BEVL.js} +28 -29
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion/accordion.js +6 -6
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +7 -7
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/animation/animation.js +2 -2
- package/dist-versioned/components/audio/audio.d.ts +1 -2
- package/dist-versioned/components/audio/audio.js +9 -9
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/badge/badge.js +2 -2
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.js +2 -2
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.js +2 -2
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button/button.js +3 -3
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.js +2 -2
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.js +7 -7
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.js +2 -2
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +6 -6
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.js +6 -6
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +8 -8
- package/dist-versioned/components/datepicker/datepicker.d.ts +2 -2
- package/dist-versioned/components/datepicker/datepicker.js +2 -2
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +8 -8
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/divider/divider.js +2 -2
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +8 -8
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.js +3 -3
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.js +6 -6
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.js +8 -8
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/header/header.js +2 -2
- package/dist-versioned/components/icon/icon.d.ts +1 -2
- package/dist-versioned/components/icon/icon.js +5 -5
- package/dist-versioned/components/icon/library.d.ts +1 -1
- package/dist-versioned/components/icon/library.default.js +1 -1
- package/dist-versioned/components/icon/library.internal.d.ts +0 -2
- package/dist-versioned/components/icon/library.internal.js +1 -1
- package/dist-versioned/components/icon/library.js +3 -3
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/include/include.js +2 -2
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/input/input.js +6 -6
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/link/link.js +2 -2
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/loader/loader.js +2 -2
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.js +2 -2
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu/menu.js +2 -2
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.js +2 -2
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +7 -7
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +8 -8
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.js +3 -3
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/option/option.js +6 -6
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/popup/popup.js +2 -2
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +7 -7
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio/radio.js +2 -2
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.js +2 -2
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.js +4 -4
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range/range.js +2 -2
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.js +2 -2
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.js +6 -6
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/select/select.js +8 -8
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.js +2 -2
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step/step.js +6 -6
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.js +2 -2
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/switch/switch.js +2 -2
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab/tab.js +2 -2
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +6 -6
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.js +2 -2
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/tag/tag.js +6 -6
- package/dist-versioned/components/teaser/teaser.js +2 -2
- package/dist-versioned/components/teaser-media/teaser-media.js +2 -2
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.js +6 -6
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.js +7 -7
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/components/video/video.js +6 -6
- package/dist-versioned/custom-elements.json +251 -697
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/internal/longpress.d.ts +1 -1
- package/dist-versioned/internal/solid-element.d.ts +0 -5
- package/dist-versioned/internal/solid-element.js +11 -61
- package/dist-versioned/solid-components.css +32 -118
- package/dist-versioned/solid-components.d.ts +0 -1
- package/dist-versioned/solid-components.js +62 -66
- package/dist-versioned/utilities/autocomplete-config.js +3 -3
- package/dist-versioned/utilities/icon-library.js +3 -3
- package/dist-versioned/vscode.html-custom-data.json +102 -124
- package/dist-versioned/web-types.json +172 -215
- package/package.json +6 -13
- package/cdn/chunks/chunk.3KWSM3HE.js +0 -131
- package/cdn/chunks/chunk.45AHR6PI.js +0 -26
- package/cdn/chunks/chunk.4I6VQFJI.js +0 -2
- package/cdn/chunks/chunk.4IHHF4BF.js +0 -2
- package/cdn/chunks/chunk.4U5HTMIG.js +0 -2
- package/cdn/chunks/chunk.4UVLYSTM.js +0 -2
- package/cdn/chunks/chunk.5BQVQUB3.js +0 -2
- package/cdn/chunks/chunk.5L4AEXM2.js +0 -2
- package/cdn/chunks/chunk.5TUC644H.js +0 -2
- package/cdn/chunks/chunk.5UBUNR4U.js +0 -2
- package/cdn/chunks/chunk.67FPAI7X.js +0 -2
- package/cdn/chunks/chunk.6EV4YU6C.js +0 -1
- package/cdn/chunks/chunk.6OEEW6XA.js +0 -2
- package/cdn/chunks/chunk.BCGI3JHC.js +0 -5
- package/cdn/chunks/chunk.BWFYOVI3.js +0 -2
- package/cdn/chunks/chunk.BZZT6LE2.js +0 -13
- package/cdn/chunks/chunk.C26QR5OE.js +0 -2
- package/cdn/chunks/chunk.CO74B4DP.js +0 -2
- package/cdn/chunks/chunk.ESKMS5I6.js +0 -1
- package/cdn/chunks/chunk.EYR25GUX.js +0 -4
- package/cdn/chunks/chunk.FBLYG7TQ.js +0 -2
- package/cdn/chunks/chunk.FJJG45JX.js +0 -2
- package/cdn/chunks/chunk.HNW7UQM6.js +0 -2
- package/cdn/chunks/chunk.I5FWEUZV.js +0 -2
- package/cdn/chunks/chunk.IDZGQPGK.js +0 -2
- package/cdn/chunks/chunk.IL6J56LC.js +0 -2
- package/cdn/chunks/chunk.KIP6ZFAM.js +0 -12
- package/cdn/chunks/chunk.LUATJXJQ.js +0 -2
- package/cdn/chunks/chunk.PTA76UAK.js +0 -2
- package/cdn/chunks/chunk.QEBCSXFE.js +0 -2
- package/cdn/chunks/chunk.QNIXOQEW.js +0 -2
- package/cdn/chunks/chunk.RLENF6CV.js +0 -2
- package/cdn/chunks/chunk.RLPQ5X67.js +0 -2
- package/cdn/chunks/chunk.RNXCNTZ7.js +0 -2
- package/cdn/chunks/chunk.SGIB3DYQ.js +0 -2
- package/cdn/chunks/chunk.SYZXP5BK.js +0 -5
- package/cdn/chunks/chunk.TKHXP6O2.js +0 -2
- package/cdn/chunks/chunk.U7FRUJCP.js +0 -11
- package/cdn/chunks/chunk.UP6S5R5Q.js +0 -2
- package/cdn/chunks/chunk.X3JCABXB.js +0 -2
- package/cdn/chunks/chunk.X7NSZVBU.js +0 -2
- package/cdn/chunks/chunk.YUOF3P5L.js +0 -6
- package/cdn/chunks/chunk.Z64LNQ5C.js +0 -2
- package/cdn/chunks/chunk.ZTFDYBBO.js +0 -2
- package/cdn/components/theme-listener/theme-listener.d.ts +0 -13
- package/cdn/components/theme-listener/theme-listener.js +0 -1
- package/cdn/internal/theme-observer.d.ts +0 -9
- package/cdn/internal/theme-observer.js +0 -19
- package/cdn-versioned/chunks/chunk.2AUHDXWC.js +0 -2
- package/cdn-versioned/chunks/chunk.3KWSM3HE.js +0 -131
- package/cdn-versioned/chunks/chunk.3MVF6H4N.js +0 -2
- package/cdn-versioned/chunks/chunk.3VKPKJT4.js +0 -12
- package/cdn-versioned/chunks/chunk.45AHR6PI.js +0 -26
- package/cdn-versioned/chunks/chunk.4I6VQFJI.js +0 -2
- package/cdn-versioned/chunks/chunk.4IHHF4BF.js +0 -2
- package/cdn-versioned/chunks/chunk.4U5HTMIG.js +0 -2
- package/cdn-versioned/chunks/chunk.4UVLYSTM.js +0 -2
- package/cdn-versioned/chunks/chunk.5BQVQUB3.js +0 -2
- package/cdn-versioned/chunks/chunk.5L4AEXM2.js +0 -2
- package/cdn-versioned/chunks/chunk.5TUC644H.js +0 -2
- package/cdn-versioned/chunks/chunk.5UBUNR4U.js +0 -2
- package/cdn-versioned/chunks/chunk.67FPAI7X.js +0 -2
- package/cdn-versioned/chunks/chunk.6EV4YU6C.js +0 -1
- package/cdn-versioned/chunks/chunk.6OEEW6XA.js +0 -2
- package/cdn-versioned/chunks/chunk.AVBQMWIA.js +0 -4
- package/cdn-versioned/chunks/chunk.BCGI3JHC.js +0 -5
- package/cdn-versioned/chunks/chunk.BWFYOVI3.js +0 -2
- package/cdn-versioned/chunks/chunk.BZZT6LE2.js +0 -13
- package/cdn-versioned/chunks/chunk.C26QR5OE.js +0 -2
- package/cdn-versioned/chunks/chunk.CDP46OS4.js +0 -10
- package/cdn-versioned/chunks/chunk.CO74B4DP.js +0 -2
- package/cdn-versioned/chunks/chunk.ESKMS5I6.js +0 -1
- package/cdn-versioned/chunks/chunk.EYR25GUX.js +0 -4
- package/cdn-versioned/chunks/chunk.FBLYG7TQ.js +0 -2
- package/cdn-versioned/chunks/chunk.FJJG45JX.js +0 -2
- package/cdn-versioned/chunks/chunk.FK5L4QA6.js +0 -2
- package/cdn-versioned/chunks/chunk.HNW7UQM6.js +0 -2
- package/cdn-versioned/chunks/chunk.I5FWEUZV.js +0 -2
- package/cdn-versioned/chunks/chunk.IDZGQPGK.js +0 -2
- package/cdn-versioned/chunks/chunk.IL6J56LC.js +0 -2
- package/cdn-versioned/chunks/chunk.JS2HQ2N4.js +0 -1
- package/cdn-versioned/chunks/chunk.KIP6ZFAM.js +0 -12
- package/cdn-versioned/chunks/chunk.LUATJXJQ.js +0 -2
- package/cdn-versioned/chunks/chunk.LV3LCBSG.js +0 -12
- package/cdn-versioned/chunks/chunk.LVTMZQJV.js +0 -2
- package/cdn-versioned/chunks/chunk.N3UOZUQ7.js +0 -2
- package/cdn-versioned/chunks/chunk.PTA76UAK.js +0 -2
- package/cdn-versioned/chunks/chunk.QEBCSXFE.js +0 -2
- package/cdn-versioned/chunks/chunk.QNIXOQEW.js +0 -2
- package/cdn-versioned/chunks/chunk.R62WGEQY.js +0 -5
- package/cdn-versioned/chunks/chunk.RLENF6CV.js +0 -2
- package/cdn-versioned/chunks/chunk.RLPQ5X67.js +0 -2
- package/cdn-versioned/chunks/chunk.RNXCNTZ7.js +0 -2
- package/cdn-versioned/chunks/chunk.SGIB3DYQ.js +0 -2
- package/cdn-versioned/chunks/chunk.SYZXP5BK.js +0 -5
- package/cdn-versioned/chunks/chunk.TKHXP6O2.js +0 -2
- package/cdn-versioned/chunks/chunk.U7FRUJCP.js +0 -11
- package/cdn-versioned/chunks/chunk.UP6S5R5Q.js +0 -2
- package/cdn-versioned/chunks/chunk.UTR4DHLT.js +0 -12
- package/cdn-versioned/chunks/chunk.X3JCABXB.js +0 -2
- package/cdn-versioned/chunks/chunk.X6ZT6MLD.js +0 -2
- package/cdn-versioned/chunks/chunk.X7NSZVBU.js +0 -2
- package/cdn-versioned/chunks/chunk.YUOF3P5L.js +0 -6
- package/cdn-versioned/chunks/chunk.Z64LNQ5C.js +0 -2
- package/cdn-versioned/chunks/chunk.ZFOZJ36J.js +0 -2
- package/cdn-versioned/chunks/chunk.ZTFDYBBO.js +0 -2
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +0 -13
- package/cdn-versioned/components/theme-listener/theme-listener.js +0 -1
- package/cdn-versioned/internal/theme-observer.d.ts +0 -9
- package/cdn-versioned/internal/theme-observer.js +0 -19
- package/dist/chunks/chunk.B267MNT3.js +0 -77
- package/dist/chunks/chunk.KPOYD3HP.js +0 -93
- package/dist/chunks/chunk.LTRLNXRR.js +0 -61
- package/dist/chunks/chunk.O6MXNSO7.js +0 -185
- package/dist/components/theme-listener/theme-listener.d.ts +0 -13
- package/dist/components/theme-listener/theme-listener.js +0 -9
- package/dist/internal/theme-observer.d.ts +0 -9
- package/dist/internal/theme-observer.js +0 -19
- package/dist-versioned/chunks/chunk.AAY5JRCW.js +0 -70
- package/dist-versioned/chunks/chunk.B267MNT3.js +0 -77
- package/dist-versioned/chunks/chunk.KPOYD3HP.js +0 -93
- package/dist-versioned/chunks/chunk.LTRLNXRR.js +0 -61
- package/dist-versioned/chunks/chunk.O6MXNSO7.js +0 -185
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +0 -13
- package/dist-versioned/components/theme-listener/theme-listener.js +0 -9
- package/dist-versioned/internal/theme-observer.d.ts +0 -9
- package/dist-versioned/internal/theme-observer.js +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g}from"./chunk.I2H6CZK5.js";import{a as A}from"./chunk.2AQOPKKH.js";import{a as z}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.SKUMYG4O.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.YEDQWNIV.js";import{a as C}from"./chunk.L6MCOH7T.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as x,b as r,d as c,h as b}from"./chunk.TIK62LTB.js";import{b as k,e as u}from"./chunk.RZUTJ36B.js";import{b as n,e as h}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new A(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=z(),this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let d=l(this,`drawer.show${g(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${g(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${p(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};t.styles=[...b.styles,k`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-drawer")],t);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.YEDQWNIV.js";import{a as b}from"./chunk.L6MCOH7T.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as c,b as r,d as s,h as n}from"./chunk.TIK62LTB.js";import{b as d,e as o}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var v=0,t=class extends n{constructor(){super(...arguments);this.attrId=++v;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new u(this,"left");this.localize=new b(this);this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let i=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",i?"true":"false")}focus(i){this.tab.focus(i)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let i={left:this.hasSlotController.test("left")};return o`<div part="base" class="${a("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative","focus-visible:focus-outline outline-2 !-outline-offset-2 transition-all duration-fast ease-in-out",this.variant==="container"&&"tab-container-border bg-white rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200",this.active&&"z-20")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${a("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${a(i.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot>${this.variant==="container"?o`<div part="active-tab-indicator" class="${a("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-full")}"></div>`:""}<div part="hover-bottom-border" class="${a(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b border-transparent group-hover:border-b-neutral-400 transition-[border] duration-fast ease-in-out")}"></div></div></div>`}};t.styles=[...n.styles,d`:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){--tw-border-opacity:1;border-bottom-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1))}.tab-container-border:after{border-color:transparent;border-width:1px;--tw-content:""}.tab--active-container-border:after,.tab-container-border:after{content:var(--tw-content);height:100%;position:absolute;width:100%}.tab--active-container-border:after{border-width:1px;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-content:"";border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);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));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);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));transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],e([s("[part=base]")],t.prototype,"tab",2),e([s("[part=active-tab-indicator]")],t.prototype,"currentIndicator",2),e([r({type:String,reflect:!0})],t.prototype,"variant",2),e([r({type:Boolean,reflect:!0})],t.prototype,"active",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([r({type:String,reflect:!0})],t.prototype,"panel",2),e([l("active")],t.prototype,"handleActiveChange",1),e([l(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([c("sd-tab")],t);export{t as a};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{a as g,b as v}from"./chunk.I2H6CZK5.js";import{a as d,c as h}from"./chunk.
|
|
2
|
-
:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([u('[part~="base"]')],t.prototype,"base",2),e([u('[part~="wrapper"]')],t.prototype,"wrapper",2),e([u('[part~="close-button"]')],t.prototype,"close",2),e([s({type:String,reflect:!0})],t.prototype,"variant",2),e([s({type:Boolean,reflect:!0})],t.prototype,"open",2),e([s({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([s({type:Number,reflect:!0})],t.prototype,"duration",2),e([s({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([s({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([f("duration")],t.prototype,"handleDurationChange",1),t=e([T("sd-notification")],t);d("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});d("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});d("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});d("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
1
|
+
import{a as g,b as v}from"./chunk.I2H6CZK5.js";import{a as d,c as h}from"./chunk.SKUMYG4O.js";import{a as y}from"./chunk.KLRPP4NQ.js";import{a as r}from"./chunk.YEDQWNIV.js";import{a as H}from"./chunk.L6MCOH7T.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as T,b as a,d as u,h as w}from"./chunk.TIK62LTB.js";import{b as k,e as p}from"./chunk.RZUTJ36B.js";import{b as n,e as l,f as b}from"./chunk.6OTM3PE5.js";import{e}from"./chunk.TJOCV4DC.js";var m={"top-right":null,"bottom-center":null},$=()=>{Object.entries(m).forEach(([s])=>{let c=document.querySelector(`#sd-toast-stack--${s}`);if(c){c.setAttribute("role","region"),m[s]=c;return}m[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};$();var t=class extends w{constructor(){super(...arguments);this.localize=new H(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return m[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(i){this.closable&&i.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([l(this.base),l(this.wrapper)]),this.wrapper.hidden=!1;let i=h(this,"notification.show",{dir:this.localize.dir()}),o=h(this,`notification.wrapper.show${g(v(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,o.keyframes,o.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([l(this.base),l(this.wrapper)]);let i=h(this,"notification.hide",{dir:this.localize.dir()}),o=h(this,`notification.wrapper.hide${g(v(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([n(this.base,b(i.keyframes,this.base.scrollHeight),i.options),n(this.wrapper,o.keyframes,o.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,y(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,y(this,"sd-after-hide")}async toast(){return new Promise(i=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),i()},{once:!0})})}render(){return p`<div part="base" class="${r("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="0" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${r("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${r("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${r("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?p`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?p`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${r("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div></div>`}};t.styles=[...w.styles,k`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],e([u('[part~="base"]')],t.prototype,"base",2),e([u('[part~="wrapper"]')],t.prototype,"wrapper",2),e([u('[part~="close-button"]')],t.prototype,"close",2),e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:Boolean,reflect:!0})],t.prototype,"open",2),e([a({type:Boolean,reflect:!0})],t.prototype,"closable",2),e([a({type:Number,reflect:!0})],t.prototype,"duration",2),e([a({type:Boolean,reflect:!0,attribute:"duration-indicator"})],t.prototype,"durationIndicator",2),e([a({type:String,reflect:!0,attribute:"toast-stack"})],t.prototype,"toastStack",2),e([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),e([f("duration")],t.prototype,"handleDurationChange",1),t=e([T("sd-notification")],t);d("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});d("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});d("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});d("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./chunk.
|
|
1
|
+
import{j as t}from"./chunk.RZUTJ36B.js";var{I:r}=t;var $=e=>e.strings===void 0;var s={},a=(e,i=s)=>e._$AH=i;export{$ as a,a as b};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
lit-html/directive-helpers.js:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v}from"./chunk.YEDQWNIV.js";import{a as g}from"./chunk.L6MCOH7T.js";import{a as b,b as f,c,d as a,h as p}from"./chunk.TIK62LTB.js";import{b as m,e as u}from"./chunk.RZUTJ36B.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.localize=new g(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:n}=t.getBoundingClientRect();t.dataset.size=`${n}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:n}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[h,i]of Array.from(this.items).reverse().entries()){let l=parseFloat(`${(o=i.dataset.size)!=null?o:i.getBoundingClientRect().width}`);if(i.hidden=!1,this.isTruncated){let d=i.cloneNode(!0);this.dropdown.prepend(d),i.hidden=!0;continue}if(h===0||h===1){r+=l;continue}if(this.isTruncated=r+l+n>t,this.isTruncated){let d=i.cloneNode(!0);this.dropdown.prepend(d),i.hidden=!0}else r+=l}}handleMobileChevron(){var n,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(n=Array.from(this.items).at(-2))==null?void 0:n.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${v(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};e.styles=[...p.styles,m`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none;font-size:var(--sd-font-size-sm,.875rem)}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],s([a('[part="base"]')],e.prototype,"base",2),s([a('[part="truncated"]')],e.prototype,"truncated",2),s([a('[part="truncated-dropdown"]')],e.prototype,"dropdown",2),s([a("slot")],e.prototype,"defaultSlot",2),s([f({type:String,reflect:!0})],e.prototype,"label",2),s([c()],e.prototype,"itemPositionsCached",2),s([c()],e.prototype,"isTruncated",2),e=s([b("sd-breadcrumb")],e);export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as T}from"./chunk.MHWW3RZB.js";import{c as b}from"./chunk.3L472FD4.js";import{a as f}from"./chunk.CHU57RUD.js";import{a as c}from"./chunk.YEDQWNIV.js";import{a as w}from"./chunk.L6MCOH7T.js";import{a as g,b as y,c as v,d as h,h as u}from"./chunk.TIK62LTB.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 u{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-tab"),customElements.whenDefined("sd-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.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)})})}updated(t){!t.get("canScroll")&&this.canScroll&&this.handleScroll()}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-tab"?e:e.querySelector("sd-tab")).filter(e=>e&&t.includeDisabled?e.tagName.toLowerCase()==="sd-tab":e.tagName.toLowerCase()==="sd-tab"&&!e.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let e=t.target.closest("sd-tab");(e==null?void 0:e.closest("sd-tab-group"))===this&&e!==null&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){let e=t.target.closest("sd-tab");if((e==null?void 0:e.closest("sd-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-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="${f(!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-icon library="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-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="${f(!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-icon library="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-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=[...u.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-tab-panel){--padding:1rem 0}::slotted(sd-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-tab-group")],a);export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h}from"./chunk.CHU57RUD.js";import{a as f}from"./chunk.L6MCOH7T.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as o,b as r,d as c,h as i}from"./chunk.TIK62LTB.js";import{b as a,e as l}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.localize=new f(this);this.href="";this.current=!1}handleCurrentChange(){var n,s;!this.base||!this.current||(s=(n=this.base.shadowRoot)==null?void 0:n.querySelector("a"))==null||s.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return l`<sd-link part="base" href="${h(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};t.styles=[...i.styles,a`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-breadcrumb-item")],t);export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk.X53UBPCZ.js";import{b,c as C,d as x,e as E}from"./chunk.NRBNWX7R.js";import{a as V}from"./chunk.CGQ2BPPZ.js";import{a as u}from"./chunk.YEDQWNIV.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as y,b as r,c,d as m,h as p}from"./chunk.TIK62LTB.js";import{b as v,e as h}from"./chunk.RZUTJ36B.js";import{e as o}from"./chunk.TJOCV4DC.js";var s=class extends p{constructor(){super(...arguments);this.formControlController=new b(this);this.hasSlotController=new V(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?E:t?x:C}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),a=this.getAllRadios(),i=this.value;e.disabled||(this.value=e.value,a.forEach(n=>n.checked=n===e),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var g;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(d=>!d.disabled),a=(g=e.find(d=>d.checked))!=null?g:e[0],i=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,l=e.indexOf(a)+i;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(d=>{d.checked=!1,this.hasButtonGroup||(d.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),a=t.find(i=>i.checked)||t[0];a&&a.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,a;let t=this.getAllRadios();if(await Promise.all(t.map(async i=>{await i.updateComplete,i.checked=i.value===this.value,i.size=this.size,i instanceof k&&(i.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(i=>i.tagName.toLowerCase()==="sd-radio-button"),!t.some(i=>i.checked))if(this.hasButtonGroup){let i=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");i&&(i.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let i=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-button-group");i&&(i.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,a=this.hasSlotController.test("help-text"),i=this.helpText?!0:!!a,n=this.hasSlotController.test("tooltip"),l=h`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return h`<fieldset part="form-control" class="${u("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?h`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${u("p-0 leading-normal text-black text-left",e?"inline-block":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?h`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${u("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?h`<sd-button-group class="border border-primary rounded-full" part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-button-group>`:l}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${u("text-sm text-neutral-700 mt-2",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};s.styles=[...p.styles,v`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}:host:has(sd-button-group){display:inline-flex}`],o([m("slot:not([name])")],s.prototype,"defaultSlot",2),o([m("#validation-input")],s.prototype,"validationInput",2),o([m("#invalid-message")],s.prototype,"invalidMessage",2),o([c()],s.prototype,"hasButtonGroup",2),o([c()],s.prototype,"defaultValue",2),o([c()],s.prototype,"showInvalidStyle",2),o([r({type:String,reflect:!0})],s.prototype,"size",2),o([r({type:Boolean,reflect:!0})],s.prototype,"required",2),o([r({type:String,reflect:!0})],s.prototype,"orientation",2),o([r({type:String,reflect:!0})],s.prototype,"label",2),o([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),o([r({type:Boolean,reflect:!0})],s.prototype,"boldLabel",2),o([r({type:String,reflect:!0})],s.prototype,"name",2),o([r()],s.prototype,"value",2),o([r({type:String,reflect:!0})],s.prototype,"form",2),o([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"handleSizeChange",1),o([f("showInvalidStyle",{waitUntilFirstUpdate:!0})],s.prototype,"handleInvalidChange",1),o([f("value")],s.prototype,"handleValueChange",1),s=o([y("sd-radio-group")],s);export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
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.L6MCOH7T.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.TIK62LTB.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-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-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
2
2
|
base:tag__base,
|
|
3
3
|
content:tag__content,
|
|
4
4
|
removable-indicator:tag__removable-indicator,
|
|
@@ -6,7 +6,6 @@ import{a as P}from"./chunk.N3WG3NAL.js";import{a as H}from"./chunk.X2GM34WQ.js";
|
|
|
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-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-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-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-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-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-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),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:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${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-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-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-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-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-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-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),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-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:text-black":"placeholder:text-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-icon class="${d("text-neutral-700",m)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${d(y,m,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${d("flex-shrink-0 text-success",y,m)}" library="_internal" name="confirm-circle"></sd-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-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-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",y)}" type="button"><sd-icon class="${d(v,m)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-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-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`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
12
|
-
:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:var(--sd-color-text-neutral-500)}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:var(--sd-color-text-neutral-500)}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:var(--sd-color-background-primary-100)}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`],l([c("sd-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-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-icon class="${d("text-neutral-700",m)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${d(y,m,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${d("flex-shrink-0 text-success",y,m)}" library="_internal" name="confirm-circle"></sd-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-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-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",y)}" type="button"><sd-icon class="${d(v,m)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-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-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-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-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-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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./chunk.CGQ2BPPZ.js";import{a as i}from"./chunk.CHU57RUD.js";import{a as r}from"./chunk.YEDQWNIV.js";import{a as h,b as s,d as u,h as o}from"./chunk.TIK62LTB.js";import{b as a,e as n}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.hasSlotController=new d(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(l){this.visuallyDisabled&&(l.preventDefault(),l.stopPropagation())}focus(l){this.button.focus(l)}blur(){this.button.blur()}render(){let l={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return n`<a part="base" class="${r("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${i(this.href||void 0)}" target="${i(this.target||void 0)}" download="${i(this.download)}" rel="${i(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${r("inline",l["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${r("inline",l["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};e.styles=[...o.styles,a`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],t([u("a")],e.prototype,"button",2),t([s({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([s({type:String,reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([s({type:String,reflect:!0})],e.prototype,"href",2),t([s({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([s({type:String,reflect:!0})],e.prototype,"target",2),t([s({reflect:!0})],e.prototype,"download",2),e=t([h("sd-link")],e);export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b as u}from"./chunk.
|
|
1
|
+
import{a,b as u}from"./chunk.TJOCV4DC.js";function s(t,n){let e=/var\((--[\w-]+)(?:,\s*([^)]+))?\)/.exec(t);if(!e)return t;let[,r,i]=e;return getComputedStyle(n).getPropertyValue(r).trim()||i||null}function l(t,n,e){return new Promise(r=>{var m;if((e==null?void 0:e.duration)===1/0)throw new Error("Promise-based animations must be finite.");let i=f(),o=typeof e.duration=="string"?d((m=s(e.duration,t))!=null?m:""):e.duration,c=t.animate(n,u(a({},e),{duration:i&&(e==null?void 0:e.reducedMotion)!=="allow"?0:o}));c.addEventListener("cancel",r,{once:!0}),c.addEventListener("finish",r,{once:!0})})}function d(t){return t=t.toString().toLowerCase(),t.indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?parseFloat(t)*1e3:parseFloat(t)}function f(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function h(t){return Promise.all(t.getAnimations().map(n=>new Promise(e=>{let r=requestAnimationFrame(e);n.addEventListener("cancel",()=>r,{once:!0}),n.addEventListener("finish",()=>r,{once:!0}),n.cancel()})))}function g(t,n){return t.map(e=>u(a({},e),{height:e.height==="auto"?`${n}px`:e.height}))}export{s as a,l as b,d as c,f as d,h as e,g as f};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import{a as M}from"./chunk.
|
|
1
|
+
import{a as M}from"./chunk.EJI65G6N.js";import{c as I}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.NRBNWX7R.js";import{a as L}from"./chunk.CGQ2BPPZ.js";import{a as w,c as O}from"./chunk.SKUMYG4O.js";import{a as C}from"./chunk.KLRPP4NQ.js";import{a as D}from"./chunk.BOIDC3L5.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as k}from"./chunk.L6MCOH7T.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as $,b as a,c as u,d as c,g as E,h as x}from"./chunk.TIK62LTB.js";import{b as T,e as p}from"./chunk.RZUTJ36B.js";import{b as g,e as y}from"./chunk.6OTM3PE5.js";import{e as s}from"./chunk.TJOCV4DC.js";var i=class extends x{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new L(this,"help-text","label");this.localize=new k(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-tag class="relative z-10" ?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-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,o=e.closest(".select__clear")!==null,l=e.closest("sd-icon-button")!==null;if(!(o||l)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let h=this.getAllOptions(),n=h.indexOf(this.currentOption),r=Math.max(0,n);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(r=n+1,r>h.length-1&&(r=0)):t.key==="ArrowUp"?(r=n-1,r<0&&(r=h.length-1)):t.key==="Home"?r=0:t.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r],t)}if(t.key.length===1||t.key==="Backspace"){let h=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let n of h)if(n.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(n);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var o,l,h;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let n=(o=t.currentTarget)==null?void 0:o.parentElement,r=(l=n==null?void 0:n.previousElementSibling)==null?void 0:l.querySelector("sd-tag"),m=(h=n==null?void 0:n.nextElementSibling)==null?void 0:h.querySelector("sd-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{m?m.focus():r?r.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll("sd-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let o=t.composedPath().some(l=>l instanceof HTMLSlotElement&&l.name==="removable-indicator");this.disabled||o||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let o=t.target.closest("sd-option"),l=this.value;o&&!o.disabled&&(this.multiple?this.toggleOptionSelection(o):this.setSelectedOptions(o),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==l&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],o=[];customElements.get("sd-option")?(t.forEach(l=>{this.multiple&&(l.checkbox=!0),o.push(l.value)}),this.setSelectedOptions(t.filter(l=>e.includes(l.value)))):customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t,e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(l.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),o=Array.isArray(t)?t:[t];e.forEach(l=>l.selected=!1),o.length&&o.forEach(l=>l.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,o;t&&this.multiple?this.selectedOptions.find(l=>l.value===t.value)?this.selectedOptions=this.selectedOptions.filter(l=>l.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(l=>l.selected),this.multiple?this.value=this.selectedOptions.map(l=>l.value):this.value=(o=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?o:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let o=this.getTag(t,e);return p`<div @sd-remove="${l=>this.handleTagRemove(l,t)}">${typeof o=="string"?
|
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,o=e.closest(".select__clear")!==null,l=e.closest("sd-icon-button")!==null;if(!(o||l)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let h=this.getAllOptions(),n=h.indexOf(this.currentOption),r=Math.max(0,n);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(r=n+1,r>h.length-1&&(r=0)):t.key==="ArrowUp"?(r=n-1,r<0&&(r=h.length-1)):t.key==="Home"?r=0:t.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r],t)}if(t.key.length===1||t.key==="Backspace"){let h=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let n of h)if(n.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(n);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var o,l,h;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let n=(o=t.currentTarget)==null?void 0:o.parentElement,r=(l=n==null?void 0:n.previousElementSibling)==null?void 0:l.querySelector("sd-tag"),m=(h=n==null?void 0:n.nextElementSibling)==null?void 0:h.querySelector("sd-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{m?m.focus():r?r.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll("sd-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let o=t.composedPath().some(l=>l instanceof HTMLSlotElement&&l.name==="removable-indicator");this.disabled||o||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let o=t.target.closest("sd-option"),l=this.value;o&&!o.disabled&&(this.multiple?this.toggleOptionSelection(o):this.setSelectedOptions(o),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==l&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],o=[];customElements.get("sd-option")?(t.forEach(l=>{this.multiple&&(l.checkbox=!0),o.push(l.value)}),this.setSelectedOptions(t.filter(l=>e.includes(l.value)))):customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t,e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(l.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),o=Array.isArray(t)?t:[t];e.forEach(l=>l.selected=!1),o.length&&o.forEach(l=>l.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,o;t&&this.multiple?this.selectedOptions.find(l=>l.value===t.value)?this.selectedOptions=this.selectedOptions.filter(l=>l.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(l=>l.selected),this.multiple?this.value=this.selectedOptions.map(l=>l.value):this.value=(o=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?o:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let o=this.getTag(t,e);return p`<div @sd-remove="${l=>this.handleTagRemove(l,t)}">${typeof o=="string"?D(o):o}</div>`}return[p``]}):[p`<sd-tag class="z-10" ?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-tag>`]}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)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=O(this,"select.show",{dir:this.localize.dir()});await g(this.popup.popup,t,e),this.currentOption&&I(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await y(this);let{keyframes:t,options:e}=O(this,"select.hide",{dir:this.localize.dir()});await g(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(o=>e.includes(o.value)))}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,C(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,C(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.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.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,o=this.helpText?!0:!!t.helpText,l=this.clearable&&!this.disabled,h=!!t.tooltip,n=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",r=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",m={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],
|
|
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-tag>`]}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)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=O(this,"select.show",{dir:this.localize.dir()});await g(this.popup.popup,t,e),this.currentOption&&I(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await y(this);let{keyframes:t,options:e}=O(this,"select.hide",{dir:this.localize.dir()});await g(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(o=>e.includes(o.value)))}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,C(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,C(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.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.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,o=this.helpText?!0:!!t.helpText,l=this.clearable&&!this.disabled,h=!!t.tooltip,n=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",r=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",m={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],f={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return p`<div part="form-control" class="${d("relative text-left",r,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e||h?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${e&&"inline-block"}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${d("relative w-full bg-white",n==="disabled"?"text-neutral-500":"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"}[n],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
10
10
|
popup:popup__content,
|
|
11
|
-
"><div class="${d("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200")}" slot="anchor"><div class="${d("input-container flex items-center w-full h-full px-4",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size])}"><input name="${this.name}" form="${this.form}" part="display-input" class="${d("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder
|
|
12
|
-
:host{position:relative;display:block;width:auto}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:var(--sd-color-text-neutral-500)}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:var(--sd-color-text-neutral-500)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:var(--sd-color-background-primary-100)}`],s([E({selector:"sd-option"})],i.prototype,"_optionsInDefaultSlot",2),s([c("sd-popup")],i.prototype,"popup",2),s([c('[part="combobox"]')],i.prototype,"combobox",2),s([c('[part="display-input"]')],i.prototype,"displayInput",2),s([c(".value-input")],i.prototype,"valueInput",2),s([c('[part="listbox"]')],i.prototype,"listbox",2),s([c("#invalid-message")],i.prototype,"invalidMessage",2),s([u()],i.prototype,"deletedTagLabel",2),s([u()],i.prototype,"hasFocus",2),s([u()],i.prototype,"currentOption",2),s([u()],i.prototype,"selectedOptions",2),s([u()],i.prototype,"showValidStyle",2),s([u()],i.prototype,"showInvalidStyle",2),s([M()],i.prototype,"defaultValue",2),s([a({type:Boolean,reflect:!0})],i.prototype,"open",2),s([a({type:String,reflect:!0})],i.prototype,"size",2),s([a({type:String,reflect:!0})],i.prototype,"placement",2),s([a({type:String,reflect:!0})],i.prototype,"label",2),s([a({type:String,reflect:!0})],i.prototype,"placeholder",2),s([a({type:String,attribute:"max-options-tag-label",reflect:!0})],i.prototype,"maxOptionsTagLabel",2),s([a({type:Boolean,reflect:!0})],i.prototype,"disabled",2),s([a({type:Boolean,reflect:!0,attribute:"visually-disabled"})],i.prototype,"visuallyDisabled",2),s([a({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),s([u()],i.prototype,"currentPlacement",2),s([a({type:Boolean,reflect:!0})],i.prototype,"clearable",2),s([a({type:Boolean,reflect:!0})],i.prototype,"multiple",2),s([a({type:Boolean,reflect:!0})],i.prototype,"useTags",2),s([a({attribute:"max-options-visible",type:Number,reflect:!0})],i.prototype,"maxOptionsVisible",2),s([a({reflect:!0})],i.prototype,"form",2),s([a({reflect:!0})],i.prototype,"name",2),s([a({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],i.prototype,"value",2),s([a({type:Boolean,reflect:!0})],i.prototype,"required",2),s([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],i.prototype,"styleOnValid",2),s([a({type:Boolean,reflect:!0})],i.prototype,"hoist",2),s([a()],i.prototype,"getTag",2),s([f("useTags",{waitUntilFirstUpdate:!0})],i.prototype,"handleUseTagsChange",1),s([f(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],i.prototype,"handleDisabledChange",1),s([f("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([f("size",{waitUntilFirstUpdate:!0})],i.prototype,"applySizeToOptions",1),s([f("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),i=s([$("sd-select")],i);w("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});w("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{i as a};
|
|
11
|
+
"><div class="${d("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200")}" slot="anchor"><div class="${d("input-container flex items-center w-full h-full px-4",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size])}"><input name="${this.name}" form="${this.form}" part="display-input" class="${d("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder-neutral-700",r,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags?p`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(v=>v==null?void 0:v.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",r)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${d("select__clear flex justify-center",m,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${d("text-neutral-700 z-10",f)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${d(m,f,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${d("flex-shrink-0 text-success",m,f)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${d("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f)}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",r,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" 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" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};i.styles=[...x.styles,T`:host{display:block;position:relative;width:var(--sd-spacing-auto,auto)}: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))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],s([E({selector:"sd-option"})],i.prototype,"_optionsInDefaultSlot",2),s([c("sd-popup")],i.prototype,"popup",2),s([c('[part="combobox"]')],i.prototype,"combobox",2),s([c('[part="display-input"]')],i.prototype,"displayInput",2),s([c(".value-input")],i.prototype,"valueInput",2),s([c('[part="listbox"]')],i.prototype,"listbox",2),s([c("#invalid-message")],i.prototype,"invalidMessage",2),s([u()],i.prototype,"deletedTagLabel",2),s([u()],i.prototype,"hasFocus",2),s([u()],i.prototype,"currentOption",2),s([u()],i.prototype,"selectedOptions",2),s([u()],i.prototype,"showValidStyle",2),s([u()],i.prototype,"showInvalidStyle",2),s([M()],i.prototype,"defaultValue",2),s([a({type:Boolean,reflect:!0})],i.prototype,"open",2),s([a({type:String,reflect:!0})],i.prototype,"size",2),s([a({type:String,reflect:!0})],i.prototype,"placement",2),s([a({type:String,reflect:!0})],i.prototype,"label",2),s([a({type:String,reflect:!0})],i.prototype,"placeholder",2),s([a({type:String,attribute:"max-options-tag-label",reflect:!0})],i.prototype,"maxOptionsTagLabel",2),s([a({type:Boolean,reflect:!0})],i.prototype,"disabled",2),s([a({type:Boolean,reflect:!0,attribute:"visually-disabled"})],i.prototype,"visuallyDisabled",2),s([a({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),s([u()],i.prototype,"currentPlacement",2),s([a({type:Boolean,reflect:!0})],i.prototype,"clearable",2),s([a({type:Boolean,reflect:!0})],i.prototype,"multiple",2),s([a({type:Boolean,reflect:!0})],i.prototype,"useTags",2),s([a({attribute:"max-options-visible",type:Number,reflect:!0})],i.prototype,"maxOptionsVisible",2),s([a({reflect:!0})],i.prototype,"form",2),s([a({reflect:!0})],i.prototype,"name",2),s([a({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],i.prototype,"value",2),s([a({type:Boolean,reflect:!0})],i.prototype,"required",2),s([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],i.prototype,"styleOnValid",2),s([a({type:Boolean,reflect:!0})],i.prototype,"hoist",2),s([a()],i.prototype,"getTag",2),s([b("useTags",{waitUntilFirstUpdate:!0})],i.prototype,"handleUseTagsChange",1),s([b(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],i.prototype,"handleDisabledChange",1),s([b("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([b("size",{waitUntilFirstUpdate:!0})],i.prototype,"applySizeToOptions",1),s([b("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),i=s([$("sd-select")],i);w("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});w("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{i as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
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.TIK62LTB.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
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
|
3
|
+
<circle cx="25" cy="25" opacity="1" r="20" />
|
|
4
|
+
</svg>`,main:`
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
|
|
6
|
+
<path d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z"/>
|
|
7
|
+
</svg> `,place:`
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
|
|
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-map-marker")],t);export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk.YEDQWNIV.js";import{a as o,b as r,h as i}from"./chunk.TIK62LTB.js";import{b as n,e as a}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends i{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return a`<span part="base" aria-labelledby="content" class="${s("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${s(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...i.styles,n`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([o("sd-badge")],e);export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g}from"./chunk.L6MCOH7T.js";import{a as p,d as f,h as u}from"./chunk.TIK62LTB.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-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-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-menu")],i);export{i as a};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.
|
|
1
|
+
import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as x}from"./chunk.L6MCOH7T.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.TIK62LTB.js";import{b as g,e as r}from"./chunk.RZUTJ36B.js";import{b as p,c as l,e as u}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.localize=new x(this);this.hasSlotController=new k(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(e){if(!e)return;e.assignedNodes({flatten:!0}).forEach(s=>{var w,y;s.nodeType===Node.TEXT_NODE&&!((w=s==null?void 0:s.textContent)!=null&&w.trim())&&((y=s==null?void 0:s.parentNode)==null||y.removeChild(s))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await u(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:e,options:a}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:e,options:a}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,v(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),v(this,"sd-after-hide")}render(){let e=this.placement.endsWith("-start"),a=this.placement.endsWith("-end");return r`<sd-popup part="base" exportparts="
|
|
2
2
|
popup:base__popup,
|
|
3
3
|
arrow:base__arrow
|
|
4
|
-
" class="${
|
|
5
|
-
:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-popup{--arrow-color:var(--sd-color-primary);--arrow-size:10px}sd-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup[placement^=top]::part(popup){transform-origin:bottom}sd-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-tooltip")],t);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
4
|
+
" class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-icon library="_internal" name="info-circle" label="Tooltip" class="${d(this.disabled&&"sd-interactive--disabled")}"></sd-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-popup>`}};t.styles=[...c.styles,g`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup[placement^=top]::part(popup){transform-origin:bottom}sd-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-tooltip")],t);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b}from"./chunk.CGQ2BPPZ.js";import{a as p}from"./chunk.CHU57RUD.js";import{a as o}from"./chunk.YEDQWNIV.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c,b as i,c as u,d as r,h as n}from"./chunk.TIK62LTB.js";import{b as d,e as a}from"./chunk.RZUTJ36B.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.hasSlotController=new b(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(e){if(this.disabled||this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let e=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",e?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){let e=this.hasSlotController.test("[default]"),l=this.hasSlotController.test("icon"),m=`${this.size}-${e?"label":"no-label"}`;return a`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${o("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",e&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",e&&"button--has-label",l&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${o(l&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!l}"></slot>${e?a`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...n.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:10}`],s([r(".button")],t.prototype,"input",2),s([r(".hidden-input")],t.prototype,"hiddenInput",2),s([u()],t.prototype,"hasFocus",2),s([i({type:String,reflect:!0})],t.prototype,"size",2),s([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),s([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),s([i({type:Boolean,reflect:!0})],t.prototype,"checked",2),s([i()],t.prototype,"value",2),s([h(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=s([c("sd-radio-button")],t);export{t as a};
|