@solid-design-system/components 5.17.1 → 5.17.3
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.QJFZKBPG.js → chunk.26UUKTU3.js} +1 -1
- package/cdn/chunks/{chunk.2YMJV2KL.js → chunk.2EALHLXK.js} +1 -1
- package/cdn/chunks/{chunk.ROIKKEJQ.js → chunk.2RB56T64.js} +1 -1
- package/cdn/chunks/{chunk.LLJ2OCGM.js → chunk.3IIXXHDU.js} +1 -1
- package/cdn/chunks/{chunk.ADTHFKFC.js → chunk.554VRD5O.js} +1 -1
- package/cdn/chunks/{chunk.HXUQZXCZ.js → chunk.5QEHHAZM.js} +1 -1
- package/cdn/chunks/{chunk.PIAYQI7K.js → chunk.5RICNJCU.js} +1 -1
- package/cdn/chunks/{chunk.RIOXBQBC.js → chunk.5U7KWI7D.js} +1 -1
- package/cdn/chunks/{chunk.CARQ25VA.js → chunk.6AAU7PWL.js} +1 -1
- package/cdn/chunks/{chunk.5GPPZUNF.js → chunk.6VP2ZCAS.js} +1 -1
- package/cdn/chunks/{chunk.TTG6Y6QJ.js → chunk.74MFKQVH.js} +1 -1
- package/cdn/chunks/{chunk.YVU7BES7.js → chunk.77ILLS4Y.js} +1 -1
- package/cdn/chunks/{chunk.QJAN6R4E.js → chunk.7VPHQARL.js} +1 -1
- package/cdn/chunks/{chunk.N4RSYGAV.js → chunk.A3JIHNSA.js} +1 -1
- package/cdn/chunks/{chunk.7SJXKLVN.js → chunk.AIKEEW3O.js} +1 -1
- package/cdn/chunks/{chunk.4HEDUSC5.js → chunk.B3KOELSU.js} +1 -1
- package/cdn/chunks/{chunk.OCIA2UJP.js → chunk.B3VZW2ML.js} +1 -1
- package/cdn/chunks/{chunk.EIGW4PKE.js → chunk.CB5UZBO7.js} +1 -1
- package/cdn/chunks/{chunk.OQSPWMNR.js → chunk.CBHHJZN6.js} +1 -1
- package/cdn/chunks/chunk.CBKOYO75.js +1 -0
- package/cdn/chunks/{chunk.AKJ7U3Y3.js → chunk.D522QBIA.js} +1 -1
- package/cdn/chunks/{chunk.2RPN4LHN.js → chunk.DQZCD222.js} +1 -1
- package/cdn/chunks/{chunk.23JJBCLW.js → chunk.EJ53UZAH.js} +1 -1
- package/cdn/chunks/{chunk.MMM4IMJD.js → chunk.F53EIQNF.js} +1 -1
- package/cdn/chunks/{chunk.4USO2EJG.js → chunk.GL6UZCPR.js} +1 -1
- package/cdn/chunks/{chunk.7NHEEBDB.js → chunk.GQDFOCWS.js} +1 -1
- package/cdn/chunks/{chunk.XAIFQKHV.js → chunk.HQ24LF7U.js} +1 -1
- package/cdn/chunks/{chunk.RCMXIAQV.js → chunk.IFFIHJ7H.js} +1 -1
- package/cdn/chunks/{chunk.6XOV6LQS.js → chunk.JBCMRE2B.js} +1 -1
- package/cdn/chunks/{chunk.37O5FAM6.js → chunk.JFW27V4M.js} +1 -1
- package/cdn/chunks/{chunk.7FMD6ZWC.js → chunk.JRAB7FGM.js} +1 -1
- package/cdn/chunks/{chunk.KVJJEMOI.js → chunk.N3DPICKQ.js} +1 -1
- package/cdn/chunks/{chunk.75UMJKQC.js → chunk.NHRDKMJ2.js} +1 -1
- package/cdn/chunks/{chunk.6QNQMWSQ.js → chunk.OALWSM3O.js} +1 -1
- package/cdn/chunks/{chunk.BV42CEWL.js → chunk.ONID6Y4B.js} +1 -1
- package/cdn/chunks/{chunk.NTP4LLF3.js → chunk.P27UO4F7.js} +1 -1
- package/cdn/chunks/{chunk.EIRHQEOO.js → chunk.P4PCDJDP.js} +1 -1
- package/cdn/chunks/{chunk.PCAKJGIV.js → chunk.PL3XERRG.js} +1 -1
- package/cdn/chunks/{chunk.H3W4J4F4.js → chunk.PUVBXT4E.js} +1 -1
- package/cdn/chunks/{chunk.ZENM3WVO.js → chunk.QA4IMHPN.js} +1 -1
- package/cdn/chunks/{chunk.CTOV3B4T.js → chunk.QHA5FHZ4.js} +1 -1
- package/cdn/chunks/{chunk.MGCXOSRH.js → chunk.QRBNZ6PN.js} +1 -1
- package/cdn/chunks/{chunk.SQ7OLI7Q.js → chunk.QY52MD43.js} +1 -1
- package/cdn/chunks/{chunk.TFKNNQ5S.js → chunk.R3MXPZLV.js} +1 -1
- package/cdn/chunks/{chunk.H7I6O5HE.js → chunk.RA443RIU.js} +1 -1
- package/cdn/chunks/{chunk.QJVPLDR4.js → chunk.RB7JD5HX.js} +1 -1
- package/cdn/chunks/{chunk.4THKQ4PC.js → chunk.TAGI2L4O.js} +1 -1
- package/cdn/chunks/{chunk.2D3B6W4C.js → chunk.U46CUDX6.js} +1 -1
- package/cdn/chunks/{chunk.FYOUHXBZ.js → chunk.UYOW77KV.js} +1 -1
- package/cdn/chunks/{chunk.OPMX2Q3A.js → chunk.VFHY6JH5.js} +1 -1
- package/cdn/chunks/{chunk.ZKBX734R.js → chunk.VFQHNBSI.js} +1 -1
- package/cdn/chunks/{chunk.W2JKI6K3.js → chunk.VT6UO2RZ.js} +1 -1
- package/cdn/chunks/chunk.WWJY5MSS.js +25 -0
- package/cdn/chunks/{chunk.OIOXSZHI.js → chunk.WXCWIGGA.js} +1 -1
- package/cdn/chunks/{chunk.ZZAPDP7V.js → chunk.XC3BXXLT.js} +1 -1
- package/cdn/chunks/{chunk.Z4V7WPTW.js → chunk.XG5NB6MH.js} +1 -1
- package/cdn/chunks/{chunk.YMTUR575.js → chunk.XSWG5G46.js} +1 -1
- package/cdn/chunks/{chunk.3PTWVC7K.js → chunk.Y2W5QWC2.js} +1 -1
- package/cdn/chunks/{chunk.72JQHJ3G.js → chunk.YVT3NH6Q.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/animation/animation.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/badge/badge.js +1 -1
- package/cdn/components/brandshape/brandshape.js +1 -1
- package/cdn/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/button-group/button-group.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/carousel-item/carousel-item.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/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.js +1 -1
- package/cdn/components/include/include.js +1 -1
- package/cdn/components/input/input.d.ts +1 -0
- 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/navigation-item/navigation-item.js +1 -1
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/optgroup/optgroup.js +1 -1
- package/cdn/components/option/option.js +1 -1
- package/cdn/components/popup/popup.js +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-button/radio-button.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/components/range/range.js +1 -1
- package/cdn/components/range-tick/range-tick.js +1 -1
- package/cdn/components/scrollable/scrollable.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/skeleton/skeleton.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 +25 -1
- package/cdn/solid-components.bundle.js +12 -12
- package/cdn/solid-components.iife.js +12 -12
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/vscode.html-custom-data.json +6 -1
- package/cdn/web-types.json +12 -2
- package/cdn-versioned/chunks/{chunk.QJFZKBPG.js → chunk.26UUKTU3.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2YMJV2KL.js → chunk.2EALHLXK.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ROIKKEJQ.js → chunk.2RB56T64.js} +1 -1
- package/cdn-versioned/chunks/{chunk.LLJ2OCGM.js → chunk.3IIXXHDU.js} +4 -4
- package/cdn-versioned/chunks/{chunk.ADTHFKFC.js → chunk.554VRD5O.js} +1 -1
- package/cdn-versioned/chunks/{chunk.HXUQZXCZ.js → chunk.5QEHHAZM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.PIAYQI7K.js → chunk.5RICNJCU.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RIOXBQBC.js → chunk.5U7KWI7D.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CARQ25VA.js → chunk.6AAU7PWL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.5GPPZUNF.js → chunk.6VP2ZCAS.js} +1 -1
- package/cdn-versioned/chunks/{chunk.TTG6Y6QJ.js → chunk.74MFKQVH.js} +1 -1
- package/cdn-versioned/chunks/{chunk.YVU7BES7.js → chunk.77ILLS4Y.js} +2 -2
- package/cdn-versioned/chunks/{chunk.QJAN6R4E.js → chunk.7VPHQARL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.N4RSYGAV.js → chunk.A3JIHNSA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7SJXKLVN.js → chunk.AIKEEW3O.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4HEDUSC5.js → chunk.B3KOELSU.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OCIA2UJP.js → chunk.B3VZW2ML.js} +1 -1
- package/cdn-versioned/chunks/{chunk.EIGW4PKE.js → chunk.CB5UZBO7.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OQSPWMNR.js → chunk.CBHHJZN6.js} +1 -1
- package/cdn-versioned/chunks/chunk.CBKOYO75.js +1 -0
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.AKJ7U3Y3.js → chunk.D522QBIA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2RPN4LHN.js → chunk.DQZCD222.js} +4 -4
- package/cdn-versioned/chunks/{chunk.23JJBCLW.js → chunk.EJ53UZAH.js} +1 -1
- package/cdn-versioned/chunks/{chunk.MMM4IMJD.js → chunk.F53EIQNF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4USO2EJG.js → chunk.GL6UZCPR.js} +2 -2
- package/cdn-versioned/chunks/{chunk.7NHEEBDB.js → chunk.GQDFOCWS.js} +1 -1
- package/cdn-versioned/chunks/chunk.HJ4O4XQA.js +1 -1
- package/cdn-versioned/chunks/{chunk.XAIFQKHV.js → chunk.HQ24LF7U.js} +1 -1
- package/cdn-versioned/chunks/{chunk.RCMXIAQV.js → chunk.IFFIHJ7H.js} +2 -2
- package/cdn-versioned/chunks/{chunk.6XOV6LQS.js → chunk.JBCMRE2B.js} +1 -1
- package/cdn-versioned/chunks/{chunk.37O5FAM6.js → chunk.JFW27V4M.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7FMD6ZWC.js → chunk.JRAB7FGM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.KVJJEMOI.js → chunk.N3DPICKQ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.75UMJKQC.js → chunk.NHRDKMJ2.js} +1 -1
- package/cdn-versioned/chunks/chunk.NRBNWX7R.js +1 -1
- package/cdn-versioned/chunks/{chunk.6QNQMWSQ.js → chunk.OALWSM3O.js} +2 -2
- package/cdn-versioned/chunks/{chunk.BV42CEWL.js → chunk.ONID6Y4B.js} +1 -1
- package/cdn-versioned/chunks/{chunk.NTP4LLF3.js → chunk.P27UO4F7.js} +1 -1
- package/cdn-versioned/chunks/{chunk.EIRHQEOO.js → chunk.P4PCDJDP.js} +1 -1
- package/cdn-versioned/chunks/{chunk.PCAKJGIV.js → chunk.PL3XERRG.js} +1 -1
- package/cdn-versioned/chunks/{chunk.H3W4J4F4.js → chunk.PUVBXT4E.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ZENM3WVO.js → chunk.QA4IMHPN.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CTOV3B4T.js → chunk.QHA5FHZ4.js} +1 -1
- package/cdn-versioned/chunks/{chunk.MGCXOSRH.js → chunk.QRBNZ6PN.js} +1 -1
- package/cdn-versioned/chunks/{chunk.SQ7OLI7Q.js → chunk.QY52MD43.js} +1 -1
- package/cdn-versioned/chunks/{chunk.TFKNNQ5S.js → chunk.R3MXPZLV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.H7I6O5HE.js → chunk.RA443RIU.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QJVPLDR4.js → chunk.RB7JD5HX.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4THKQ4PC.js → chunk.TAGI2L4O.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2D3B6W4C.js → chunk.U46CUDX6.js} +1 -1
- package/cdn-versioned/chunks/{chunk.FYOUHXBZ.js → chunk.UYOW77KV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OPMX2Q3A.js → chunk.VFHY6JH5.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ZKBX734R.js → chunk.VFQHNBSI.js} +1 -1
- package/cdn-versioned/chunks/{chunk.W2JKI6K3.js → chunk.VT6UO2RZ.js} +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WWJY5MSS.js +25 -0
- package/cdn-versioned/chunks/{chunk.OIOXSZHI.js → chunk.WXCWIGGA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ZZAPDP7V.js → chunk.XC3BXXLT.js} +1 -1
- package/cdn-versioned/chunks/{chunk.Z4V7WPTW.js → chunk.XG5NB6MH.js} +1 -1
- package/cdn-versioned/chunks/{chunk.YMTUR575.js → chunk.XSWG5G46.js} +1 -1
- package/cdn-versioned/chunks/{chunk.3PTWVC7K.js → chunk.Y2W5QWC2.js} +2 -2
- package/cdn-versioned/chunks/{chunk.72JQHJ3G.js → chunk.YVT3NH6Q.js} +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion/accordion.js +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.js +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.js +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.js +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.js +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button/button.js +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.js +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.js +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.js +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- 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 -1
- package/cdn-versioned/components/icon/icon.js +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/include/include.js +1 -1
- package/cdn-versioned/components/input/input.d.ts +2 -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/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.js +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.js +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/option/option.js +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.js +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.js +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.js +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.js +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range/range.js +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.js +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.js +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/cdn-versioned/components/skeleton/skeleton.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 +272 -248
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +15 -15
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +15 -15
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +99 -94
- package/cdn-versioned/web-types.json +173 -163
- package/dist/chunks/{chunk.ZUL25WD4.js → chunk.22JGWQHD.js} +1 -1
- package/dist/chunks/{chunk.IKDVBWFR.js → chunk.23MU4JA7.js} +1 -1
- package/dist/chunks/{chunk.TD5EDBVC.js → chunk.2SPLNABG.js} +1 -1
- package/dist/chunks/{chunk.AUMWRORX.js → chunk.2YP3NW54.js} +1 -1
- package/dist/chunks/{chunk.5L52M55A.js → chunk.35JOBQN4.js} +1 -1
- package/dist/chunks/{chunk.QPBJEOPN.js → chunk.3EBQKONT.js} +1 -1
- package/dist/chunks/{chunk.JUZY76ML.js → chunk.45D7TZY2.js} +1 -1
- package/dist/chunks/{chunk.URTB3C7J.js → chunk.4JRGV2NE.js} +1 -1
- package/dist/chunks/{chunk.J2MPIUT5.js → chunk.5ELWG4EZ.js} +1 -1
- package/dist/chunks/{chunk.P2JBJQH6.js → chunk.5XO674YZ.js} +1 -1
- package/dist/chunks/{chunk.AZ5YCFXX.js → chunk.6AKV5ZRR.js} +1 -1
- package/dist/chunks/{chunk.246LUIGB.js → chunk.6LF3BYIY.js} +1 -1
- package/dist/chunks/{chunk.OH3W4PGL.js → chunk.6RK24NSS.js} +1 -1
- package/dist/chunks/{chunk.ZBDFCFOP.js → chunk.76BN4PS7.js} +2 -2
- package/dist/chunks/{chunk.VUTMPKYK.js → chunk.7UTDD55I.js} +1 -1
- package/dist/chunks/{chunk.KMU4KABG.js → chunk.B3QSQ6K7.js} +1 -1
- package/dist/chunks/{chunk.6OGLZOU3.js → chunk.CJ7IHVFY.js} +1 -1
- package/dist/chunks/{chunk.TMJN75ST.js → chunk.CQ67F2XR.js} +1 -1
- package/dist/chunks/{chunk.ZAQS4XFO.js → chunk.CURHDJV6.js} +2 -2
- package/dist/chunks/{chunk.4VSYGWIQ.js → chunk.CVZH2VLL.js} +1 -1
- package/dist/chunks/{chunk.HTEXYS4A.js → chunk.D2O3R3AC.js} +1 -1
- package/dist/chunks/{chunk.NBHVDDUK.js → chunk.EBA2FO3J.js} +1 -1
- package/dist/chunks/{chunk.WRP3NGPP.js → chunk.EGKZTSJA.js} +1 -1
- package/dist/chunks/{chunk.WTG2WY6X.js → chunk.EX2IEIQK.js} +1 -1
- package/dist/chunks/{chunk.FPIRMH7R.js → chunk.EZZAAWNK.js} +1 -1
- package/dist/chunks/{chunk.E4O3LVAZ.js → chunk.FRJAG3MQ.js} +1 -1
- package/dist/chunks/{chunk.DOGMVREV.js → chunk.FUCATISJ.js} +32 -9
- package/dist/chunks/{chunk.QPBHKXL6.js → chunk.FWUEEHWY.js} +1 -1
- package/dist/chunks/{chunk.TJKIQ2ZR.js → chunk.H2XMCGBK.js} +1 -1
- package/dist/chunks/chunk.H7UEA2NY.js +82 -0
- package/dist/chunks/{chunk.A5GKQZGQ.js → chunk.HTE3DLUD.js} +1 -1
- package/dist/chunks/{chunk.QTQEKSJS.js → chunk.IITIHE4Z.js} +1 -1
- package/dist/chunks/{chunk.2EN4CJ2E.js → chunk.JTJV2AFL.js} +1 -1
- package/dist/chunks/{chunk.AWVURKQ3.js → chunk.K6PSDQZI.js} +1 -1
- package/dist/chunks/{chunk.U5L4ZATG.js → chunk.KFBDKQWY.js} +1 -1
- package/dist/chunks/{chunk.MCUIYSD6.js → chunk.KS2U7CKH.js} +1 -1
- package/dist/chunks/{chunk.S253T7LE.js → chunk.KUFA6W6P.js} +1 -1
- package/dist/chunks/{chunk.YBAAPYHP.js → chunk.LWQJ57CH.js} +1 -1
- package/dist/chunks/{chunk.KHS7FSFX.js → chunk.MEJBDCOK.js} +1 -1
- package/dist/chunks/{chunk.QP27BG3Y.js → chunk.OSB344JT.js} +1 -1
- package/dist/chunks/{chunk.FWDG6KMC.js → chunk.OTS2TILR.js} +1 -1
- package/dist/chunks/{chunk.AAK5STGD.js → chunk.OV64576E.js} +1 -1
- package/dist/chunks/{chunk.22DM7THN.js → chunk.PCW75LUJ.js} +1 -1
- package/dist/chunks/{chunk.63D5DO3S.js → chunk.PUZMRDRJ.js} +1 -1
- package/dist/chunks/{chunk.Q4HWX7FF.js → chunk.Q5Z4C6HX.js} +1 -1
- package/dist/chunks/{chunk.ATKLZZWE.js → chunk.SA3RNF6V.js} +1 -1
- package/dist/chunks/{chunk.SJZCQ5SU.js → chunk.SNMM5N5T.js} +2 -2
- package/dist/chunks/{chunk.XRKSJCLQ.js → chunk.TJ25B2BK.js} +2 -2
- package/dist/chunks/{chunk.YGHO5R3O.js → chunk.TJSVPPLH.js} +1 -1
- package/dist/chunks/{chunk.VDSIXERI.js → chunk.UIJDENWT.js} +1 -1
- package/dist/chunks/{chunk.NYOWE72U.js → chunk.VELQG4FG.js} +1 -1
- package/dist/chunks/{chunk.6KCL3YWT.js → chunk.VJRTQGCU.js} +1 -1
- package/dist/chunks/{chunk.PKG3F2KC.js → chunk.VVVV5UPF.js} +1 -1
- package/dist/chunks/{chunk.QVNC3EJB.js → chunk.VW5P7PCS.js} +1 -1
- package/dist/chunks/{chunk.W6RMEFFR.js → chunk.WGE2DGAT.js} +1 -1
- package/dist/chunks/{chunk.4D5SPJ27.js → chunk.X6JCFJHB.js} +1 -1
- package/dist/chunks/{chunk.WUB4VSXU.js → chunk.Y7FP242S.js} +1 -1
- package/dist/chunks/{chunk.OWYDTY46.js → chunk.YRMXXHY5.js} +1 -1
- package/dist/chunks/{chunk.3CUXBZXY.js → chunk.ZYCUZKFW.js} +1 -1
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion-group/accordion-group.js +4 -4
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/audio/audio.js +6 -6
- 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 +4 -4
- package/dist/components/carousel-item/carousel-item.js +2 -2
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/combobox/combobox.js +5 -5
- package/dist/components/datepicker/datepicker.js +5 -5
- package/dist/components/dialog/dialog.js +5 -5
- package/dist/components/divider/divider.js +2 -2
- package/dist/components/drawer/drawer.js +5 -5
- package/dist/components/dropdown/dropdown.js +3 -3
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/flipcard/flipcard.js +5 -5
- package/dist/components/header/header.js +2 -2
- package/dist/components/icon/icon.js +2 -2
- package/dist/components/include/include.js +2 -2
- package/dist/components/input/input.d.ts +1 -0
- package/dist/components/input/input.js +3 -3
- 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 +4 -4
- package/dist/components/notification/notification.js +5 -5
- package/dist/components/optgroup/optgroup.js +3 -3
- package/dist/components/option/option.js +3 -3
- package/dist/components/popup/popup.js +2 -2
- package/dist/components/quickfact/quickfact.js +4 -4
- package/dist/components/radio/radio.js +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 +3 -3
- package/dist/components/select/select.js +5 -5
- package/dist/components/skeleton/skeleton.js +2 -2
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/step/step.js +3 -3
- 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 +3 -3
- package/dist/components/tab-panel/tab-panel.js +2 -2
- package/dist/components/tag/tag.js +3 -3
- package/dist/components/teaser/teaser.js +2 -2
- package/dist/components/teaser-media/teaser-media.js +2 -2
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/components/video/video.js +3 -3
- package/dist/custom-elements.json +25 -1
- package/dist/solid-components.js +61 -61
- package/dist/utilities/autocomplete-config.js +2 -2
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +12 -2
- package/dist-versioned/chunks/{chunk.ZUL25WD4.js → chunk.22JGWQHD.js} +2 -2
- package/dist-versioned/chunks/{chunk.IKDVBWFR.js → chunk.23MU4JA7.js} +3 -3
- package/dist-versioned/chunks/{chunk.TD5EDBVC.js → chunk.2SPLNABG.js} +3 -3
- package/dist-versioned/chunks/{chunk.AUMWRORX.js → chunk.2YP3NW54.js} +7 -7
- package/dist-versioned/chunks/{chunk.5L52M55A.js → chunk.35JOBQN4.js} +4 -4
- package/dist-versioned/chunks/{chunk.QPBJEOPN.js → chunk.3EBQKONT.js} +13 -13
- package/dist-versioned/chunks/{chunk.JUZY76ML.js → chunk.45D7TZY2.js} +2 -2
- package/dist-versioned/chunks/{chunk.URTB3C7J.js → chunk.4JRGV2NE.js} +4 -4
- package/dist-versioned/chunks/{chunk.J2MPIUT5.js → chunk.5ELWG4EZ.js} +2 -2
- package/dist-versioned/chunks/{chunk.P2JBJQH6.js → chunk.5XO674YZ.js} +2 -2
- package/dist-versioned/chunks/{chunk.AZ5YCFXX.js → chunk.6AKV5ZRR.js} +3 -3
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/{chunk.246LUIGB.js → chunk.6LF3BYIY.js} +2 -2
- package/dist-versioned/chunks/{chunk.OH3W4PGL.js → chunk.6RK24NSS.js} +25 -25
- package/dist-versioned/chunks/{chunk.ZBDFCFOP.js → chunk.76BN4PS7.js} +4 -4
- package/dist-versioned/chunks/{chunk.VUTMPKYK.js → chunk.7UTDD55I.js} +4 -4
- package/dist-versioned/chunks/{chunk.KMU4KABG.js → chunk.B3QSQ6K7.js} +3 -3
- package/dist-versioned/chunks/{chunk.6OGLZOU3.js → chunk.CJ7IHVFY.js} +2 -2
- package/dist-versioned/chunks/{chunk.TMJN75ST.js → chunk.CQ67F2XR.js} +7 -7
- package/dist-versioned/chunks/{chunk.ZAQS4XFO.js → chunk.CURHDJV6.js} +4 -4
- package/dist-versioned/chunks/{chunk.4VSYGWIQ.js → chunk.CVZH2VLL.js} +3 -3
- package/dist-versioned/chunks/{chunk.HTEXYS4A.js → chunk.D2O3R3AC.js} +27 -27
- package/dist-versioned/chunks/{chunk.NBHVDDUK.js → chunk.EBA2FO3J.js} +5 -5
- package/dist-versioned/chunks/{chunk.WRP3NGPP.js → chunk.EGKZTSJA.js} +5 -5
- package/dist-versioned/chunks/{chunk.WTG2WY6X.js → chunk.EX2IEIQK.js} +6 -6
- package/dist-versioned/chunks/{chunk.FPIRMH7R.js → chunk.EZZAAWNK.js} +5 -5
- package/dist-versioned/chunks/{chunk.E4O3LVAZ.js → chunk.FRJAG3MQ.js} +2 -2
- package/dist-versioned/chunks/{chunk.DOGMVREV.js → chunk.FUCATISJ.js} +33 -10
- package/dist-versioned/chunks/{chunk.QPBHKXL6.js → chunk.FWUEEHWY.js} +4 -4
- package/dist-versioned/chunks/{chunk.TJKIQ2ZR.js → chunk.H2XMCGBK.js} +6 -6
- package/dist-versioned/chunks/chunk.H7UEA2NY.js +82 -0
- package/dist-versioned/chunks/{chunk.A5GKQZGQ.js → chunk.HTE3DLUD.js} +3 -3
- package/dist-versioned/chunks/{chunk.QTQEKSJS.js → chunk.IITIHE4Z.js} +2 -2
- package/dist-versioned/chunks/{chunk.2EN4CJ2E.js → chunk.JTJV2AFL.js} +2 -2
- package/dist-versioned/chunks/{chunk.AWVURKQ3.js → chunk.K6PSDQZI.js} +9 -9
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/{chunk.U5L4ZATG.js → chunk.KFBDKQWY.js} +6 -6
- package/dist-versioned/chunks/{chunk.MCUIYSD6.js → chunk.KS2U7CKH.js} +3 -3
- package/dist-versioned/chunks/{chunk.S253T7LE.js → chunk.KUFA6W6P.js} +12 -12
- package/dist-versioned/chunks/{chunk.YBAAPYHP.js → chunk.LWQJ57CH.js} +15 -15
- package/dist-versioned/chunks/{chunk.KHS7FSFX.js → chunk.MEJBDCOK.js} +6 -6
- package/dist-versioned/chunks/{chunk.QP27BG3Y.js → chunk.OSB344JT.js} +2 -2
- package/dist-versioned/chunks/{chunk.FWDG6KMC.js → chunk.OTS2TILR.js} +2 -2
- package/dist-versioned/chunks/{chunk.AAK5STGD.js → chunk.OV64576E.js} +3 -3
- package/dist-versioned/chunks/{chunk.22DM7THN.js → chunk.PCW75LUJ.js} +3 -3
- package/dist-versioned/chunks/{chunk.63D5DO3S.js → chunk.PUZMRDRJ.js} +3 -3
- package/dist-versioned/chunks/{chunk.Q4HWX7FF.js → chunk.Q5Z4C6HX.js} +6 -6
- package/dist-versioned/chunks/{chunk.ATKLZZWE.js → chunk.SA3RNF6V.js} +3 -3
- package/dist-versioned/chunks/{chunk.SJZCQ5SU.js → chunk.SNMM5N5T.js} +14 -14
- package/dist-versioned/chunks/{chunk.XRKSJCLQ.js → chunk.TJ25B2BK.js} +8 -8
- package/dist-versioned/chunks/{chunk.YGHO5R3O.js → chunk.TJSVPPLH.js} +4 -4
- package/dist-versioned/chunks/{chunk.VDSIXERI.js → chunk.UIJDENWT.js} +3 -3
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/{chunk.NYOWE72U.js → chunk.VELQG4FG.js} +2 -2
- package/dist-versioned/chunks/{chunk.6KCL3YWT.js → chunk.VJRTQGCU.js} +4 -4
- package/dist-versioned/chunks/{chunk.PKG3F2KC.js → chunk.VVVV5UPF.js} +2 -2
- package/dist-versioned/chunks/{chunk.QVNC3EJB.js → chunk.VW5P7PCS.js} +2 -2
- package/dist-versioned/chunks/{chunk.W6RMEFFR.js → chunk.WGE2DGAT.js} +3 -3
- package/dist-versioned/chunks/{chunk.4D5SPJ27.js → chunk.X6JCFJHB.js} +2 -2
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/{chunk.WUB4VSXU.js → chunk.Y7FP242S.js} +3 -3
- package/dist-versioned/chunks/{chunk.OWYDTY46.js → chunk.YRMXXHY5.js} +3 -3
- package/dist-versioned/chunks/{chunk.3CUXBZXY.js → chunk.ZYCUZKFW.js} +2 -2
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion/accordion.js +3 -3
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +4 -4
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/animation/animation.js +2 -2
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +6 -6
- 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 +4 -4
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.js +2 -2
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +3 -3
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.js +3 -3
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +5 -5
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.js +5 -5
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +5 -5
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/divider/divider.js +2 -2
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +5 -5
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.js +3 -3
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.js +3 -3
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.js +5 -5
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/header/header.js +2 -2
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/icon/icon.js +2 -2
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/include/include.js +2 -2
- package/dist-versioned/components/input/input.d.ts +2 -1
- package/dist-versioned/components/input/input.js +3 -3
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/link/link.js +2 -2
- package/dist-versioned/components/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 +4 -4
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +5 -5
- 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 +3 -3
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/popup/popup.js +2 -2
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +4 -4
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio/radio.js +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 +3 -3
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/select/select.js +5 -5
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/skeleton/skeleton.js +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.js +4 -4
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/components/video/video.js +3 -3
- package/dist-versioned/custom-elements.json +272 -248
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +61 -61
- package/dist-versioned/utilities/autocomplete-config.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +99 -94
- package/dist-versioned/web-types.json +173 -163
- package/package.json +2 -2
- package/cdn/chunks/chunk.M6XINJ52.js +0 -25
- package/cdn/chunks/chunk.TDRPE2QQ.js +0 -1
- package/cdn-versioned/chunks/chunk.M6XINJ52.js +0 -25
- package/cdn-versioned/chunks/chunk.TDRPE2QQ.js +0 -1
- package/dist/chunks/chunk.RZLBIMEH.js +0 -82
- package/dist-versioned/chunks/chunk.RZLBIMEH.js +0 -82
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Dt}from"./chunk.YEDQWNIV.js";import{a as kt,b as E,d as Rt,h as Ct}from"./chunk.M6XINJ52.js";import{b as Mt,e as Et}from"./chunk.RZUTJ36B.js";import{a as C,b as V,c as dt,e as v}from"./chunk.TJOCV4DC.js";var _=Math.min,S=Math.max,ct=Math.round,ft=Math.floor,F=t=>({x:t,y:t}),me={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function pt(t,e,n){return S(t,_(e,n))}function Z(t,e){return typeof t=="function"?t(e):t}function Y(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}var ge=new Set(["top","bottom"]);function j(t){return ge.has(Y(t))?"y":"x"}function wt(t){return St(j(t))}function $t(t,e,n){n===void 0&&(n=!1);let i=tt(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function Nt(t){let e=at(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>pe[e])}var Bt=["left","right"],Ft=["right","left"],we=["top","bottom"],ye=["bottom","top"];function xe(t,e,n){switch(t){case"top":case"bottom":return n?e?Ft:Bt:e?Bt:Ft;case"left":case"right":return e?we:ye;default:return[]}}function Ht(t,e,n,i){let o=tt(t),s=xe(Y(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function at(t){return t.replace(/left|right|bottom|top/g,e=>me[e])}function be(t){return C({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?be(t):{top:t,right:t,bottom:t,left:t}}function et(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Wt(t,e,n){let{reference:i,floating:o}=t,s=j(e),r=wt(e),l=gt(r),f=Y(e),a=s==="y",c=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,u;switch(f){case"top":u={x:c,y:i.y-o.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-o.width,y:h};break;default:u={x:i.x,y:i.y}}switch(tt(e)){case"start":u[r]-=m*(n&&a?-1:1);break;case"end":u[r]+=m*(n&&a?-1:1);break}return u}var Vt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e)),a=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:h}=Wt(a,i,f),m=i,u={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:b,data:A,reset:O}=await g({x:c,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:u,rects:a,platform:r,elements:{reference:t,floating:e}});c=y!=null?y:c,h=b!=null?b:h,u=V(C({},u),{[w]:C(C({},u[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(a=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:c,y:h}=Wt(a,m,f)),p=-1)}return{x:c,y:h,placement:m,strategy:o,middlewareData:u}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:m=!1,padding:u=0}=Z(e,t),d=Tt(u),w=l[m?h==="floating"?"reference":"floating":h],g=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:c,strategy:f})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},O=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:f}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:f}=e,{element:a,padding:c=0}=Z(t,e)||{};if(a==null)return{};let h=Tt(c),m={x:n,y:i},u=wt(o),d=gt(u),p=await r.getDimensions(a),w=u==="y",g=w?"top":"left",y=w?"bottom":"right",b=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[u]-m[u]-s.floating[d],O=m[u]-s.reference[u],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a)),R=k?k[b]:0;(!R||!await(r.isElement==null?void 0:r.isElement(k)))&&(R=l.floating[b]||s.floating[d]);let I=A/2-O/2,H=R/2-p[d]/2-1,L=_(h[g],H),U=_(h[y],H),W=L,K=R-p[d]-U,P=R/2-p[d]/2+I,D=pt(W,P,K),J=!f.arrow&&tt(o)!=null&&P!==D&&s.reference[d]/2-(P<W?L:U)-p[d]/2<0,X=J?P<W?P-W:P-K:0;return{[u]:m[u]+X,data:C({[u]:D,centerOffset:P-D-X},J&&{alignmentOffset:X}),reset:J}}});var jt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:f,elements:a}=e,P=Z(t,e),{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=dt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=Y(o),y=j(l),b=Y(l)===l,A=await(f.isRTL==null?void 0:f.isRTL(a.floating)),O=m||(b||!p?[at(l)]:Nt(l)),k=d!=="none";!m&&k&&O.push(...Ht(l,p,d,A));let R=[l,...O],I=await yt(e,w),H=[],L=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&H.push(I[g]),h){let D=$t(o,r,A);H.push(I[D[0]],I[D[1]])}if(L=[...L,{placement:o,overflows:H}],!H.every(D=>D<=0)){var U,W;let D=(((U=s.flip)==null?void 0:U.index)||0)+1,J=R[D];if(J&&(!(h==="alignment"?y!==j(J):!1)||L.every(B=>j(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:J}};let X=(W=L.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:W.placement;if(!X)switch(u){case"bestFit":{var K;let Q=(K=L.filter(B=>{if(k){let G=j(B.placement);return G===y||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,de)=>G+de,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:K[0];Q&&(X=Q);break}case"initialPlacement":X=l;break}if(o!==X)return{reset:{placement:X}}}return{}}}};var ve=new Set(["left","top"]);async function Ae(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Y(n),l=tt(n),f=j(n)==="y",a=ve.has(r)?-1:1,c=s&&f?-1:1,h=Z(e,t),{mainAxis:m,crossAxis:u,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof d=="number"&&(u=l==="end"?d*-1:d),f?{x:u*c,y:m*a}:{x:m*a,y:u*c}}var It=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,f=await Ae(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:V(C({},f),{placement:r})}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=Z(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}}}=w,f=dt(w,["mainAxis","crossAxis","limiter"]),a={x:n,y:i},c=await yt(e,f),h=j(Y(o)),m=St(h),u=a[m],d=a[h];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",b=u+c[g],A=u-c[y];u=pt(b,u,A)}if(r){let g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=d+c[g],A=d-c[y];d=pt(b,d,A)}let p=l.fn(V(C({},e),{[m]:u,[h]:d}));return V(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[h]:r}}})}}};var Yt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,L=Z(t,e),{apply:f=()=>{}}=L,a=dt(L,["apply"]),c=await yt(e,a),h=Y(o),m=tt(o),u=j(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-c.top-c.bottom,b=d-c.left-c.right,A=_(p-c[w],y),O=_(d-c[g],b),k=!e.middlewareData.shift,R=A,I=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(I=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=y),k&&!m){let U=S(c.left,0),W=S(c.right,0),K=S(c.top,0),P=S(c.bottom,0);u?I=d-2*(U!==0||W!==0?U+W:S(c.left,c.right)):R=p-2*(K!==0||P!==0?K+P:S(c.top,c.bottom))}await f(V(C({},e),{availableWidth:I,availableHeight:R}));let H=await r.getDimensions(l.floating);return d!==H.width||p!==H.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function nt(t){return Ut(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Ut(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ut(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function N(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function qt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(t).ShadowRoot}var Oe=new Set(["inline","contents"]);function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!Oe.has(o)}var Ee=new Set(["table","td","th"]);function Kt(t){return Ee.has(nt(t))}var Re=[":popover-open",":modal"];function ut(t){return Re.some(e=>{try{return t.matches(e)}catch(n){return!1}})}var Ce=["transform","translate","scale","rotate","perspective"],Se=["transform","translate","scale","rotate","perspective","filter"],Te=["paint","layout","strict","content"];function bt(t){let e=vt(),n=z(t)?M(t):t;return Ce.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Se.some(i=>(n.willChange||"").includes(i))||Te.some(i=>(n.contain||"").includes(i))}function Gt(t){let e=q(t);for(;N(e)&&!it(e);){if(bt(e))return e;if(ut(e))return null;e=q(e)}return null}function vt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Pe=new Set(["html","body","#document"]);function it(t){return Pe.has(nt(t))}function M(t){return T(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(nt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||$(t);return qt(e)?e.host:e}function Jt(t){let e=q(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:N(e)&&st(e)?e:Jt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Jt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=T(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=M(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=N(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=ct(n)!==s||ct(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Lt(t){return z(t)?t:t.contextElement}function lt(t){let e=Lt(t);if(!N(e))return F(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=ee(e),r=(s?ct(n.width):n.width)/i,l=(s?ct(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var Le=F(0);function ne(t){let e=T(t);return!vt()||!e.visualViewport?Le:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ze(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(t)?!1:e}function ot(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Lt(t),r=F(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ze(s,n,i)?ne(s):F(0),f=(o.left+l.x)/r.x,a=(o.top+l.y)/r.y,c=o.width/r.x,h=o.height/r.y;if(s){let m=T(s),u=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&u!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=M(p),b=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;f*=w.x,a*=w.y,c*=w.x,h*=w.y,f+=b,a+=A,d=T(p),p=At(d)}}return et({width:c,height:h,x:f,y:a})}function Ot(t,e){let n=ht(t).scrollLeft;return e?e.left+n:ot($(t)).left+n}function ie(t,e){let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Ot(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function Me(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let f={scrollLeft:0,scrollTop:0},a=F(1),c=F(0),h=N(i);if((h||!h&&!s)&&((nt(i)!=="body"||st(r))&&(f=ht(i)),N(i))){let u=ot(i);a=lt(i),c.x=u.x+i.clientLeft,c.y=u.y+i.clientTop}let m=r&&!h&&!s?ie(r,f):F(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+c.x+m.x,y:n.y*a.y-f.scrollTop*a.y+c.y+m.y}}function ke(t){return Array.from(t.getClientRects())}function De(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=S(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=S(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+Ot(t),l=-n.scrollTop;return M(i).direction==="rtl"&&(r+=S(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}var Qt=25;function Be(t,e){let n=T(t),i=$(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,f=0;if(o){s=o.width,r=o.height;let c=vt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,f=o.offsetTop)}let a=Ot(i);if(a<=0){let c=i.ownerDocument,h=c.body,m=getComputedStyle(h),u=c.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,d=Math.abs(i.clientWidth-h.clientWidth-u);d<=Qt&&(s-=d)}else a<=Qt&&(s+=a);return{width:s,height:r,x:l,y:f}}var Fe=new Set(["absolute","fixed"]);function $e(t,e){let n=ot(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=N(t)?lt(t):F(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,f=o*s.x,a=i*s.y;return{width:r,height:l,x:f,y:a}}function Zt(t,e,n){let i;if(e==="viewport")i=Be(t,n);else if(e==="document")i=De($(t));else if(z(e))i=$e(e,n);else{let o=ne(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return et(i)}function oe(t,e){let n=q(t);return n===e||!z(n)||it(n)?!1:M(n).position==="fixed"||oe(n,e)}function Ne(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&nt(l)!=="body"),o=null,s=M(t).position==="fixed",r=s?q(t):t;for(;z(r)&&!it(r);){let l=M(r),f=bt(r);!f&&l.position==="fixed"&&(o=null),(s?!f&&!o:!f&&l.position==="static"&&!!o&&Fe.has(o.position)||st(r)&&!f&&oe(t,r))?i=i.filter(c=>c!==r):o=l,r=q(r)}return e.set(t,i),i}function He(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ne(e,this._c):[].concat(n),i],l=r[0],f=r.reduce((a,c)=>{let h=Zt(e,c,o);return a.top=S(h.top,a.top),a.right=_(h.right,a.right),a.bottom=_(h.bottom,a.bottom),a.left=S(h.left,a.left),a},Zt(e,l,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function We(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Ve(t,e,n){let i=N(e),o=$(e),s=n==="fixed",r=ot(t,!0,s,e),l={scrollLeft:0,scrollTop:0},f=F(0);function a(){f.x=Ot(o)}if(i||!i&&!s)if((nt(e)!=="body"||st(o))&&(l=ht(e)),i){let u=ot(e,!0,s,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else o&&a();s&&!i&&o&&a();let c=o&&!i&&!s?ie(o,l):F(0),h=r.left+l.scrollLeft-f.x-c.x,m=r.top+l.scrollTop-f.y-c.y;return{x:h,y:m,width:r.width,height:r.height}}function Pt(t){return M(t).position==="static"}function te(t,e){if(!N(t)||M(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function re(t,e){let n=T(t);if(ut(t))return n;if(!N(t)){let o=q(t);for(;o&&!it(o);){if(z(o)&&!Pt(o))return o;o=q(o)}return n}let i=te(t,e);for(;i&&Kt(i)&&Pt(i);)i=te(i,e);return i&&it(i)&&Pt(i)&&!bt(i)?n:i||Gt(t)||n}var _e=async function(t){let e=this.getOffsetParent||re,n=this.getDimensions,i=await n(t.floating);return{reference:Ve(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function je(t){return M(t).direction==="rtl"}var Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Me,getDocumentElement:$,getClippingRect:He,getOffsetParent:re,getElementRects:_e,getClientRects:ke,getDimensions:We,getScale:lt,isElement:z,isRTL:je};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Xe(t,e){let n=null,i,o=$(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),s();let a=t.getBoundingClientRect(),{left:c,top:h,width:m,height:u}=a;if(l||e(),!m||!u)return;let d=ft(h),p=ft(o.clientWidth-(c+m)),w=ft(o.clientHeight-(h+u)),g=ft(c),b={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:S(0,_(1,f))||1},A=!0;function O(k){let R=k[0].intersectionRatio;if(R!==f){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!se(a,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,V(C({},b),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(O,b)}n.observe(t)}return r(!0),s}function le(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,a=Lt(t),c=o||s?[...a?rt(a):[],...rt(e)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=a&&l?Xe(a,n):null,m=-1,u=null;r&&(u=new ResizeObserver(g=>{let[y]=g;y&&y.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=u)==null||b.observe(e)})),n()}),a&&!f&&u.observe(a),u.observe(e));let d,p=f?ot(t):null;f&&w();function w(){let g=ot(t);p&&!se(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;c.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=u)==null||g.disconnect(),u=null,f&&cancelAnimationFrame(d)}}var ae=It;var ce=Xt,fe=jt,zt=Yt;var ue=_t;var he=(t,e,n)=>{let i=new Map,o=C({platform:Ie},n),s=V(C({},o.platform),{_c:i});return Vt(t,e,V(C({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=le(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[ae({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(zt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(fe({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(ce({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(zt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ue({element:this.arrowEl,padding:this.arrowPadding})),he(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",f={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let a=s.arrow.x,c=s.arrow.y,h="",m="",u="",d="";if(this.arrowPlacement==="start"){let p=typeof a=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof a=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",u=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof a=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof a=="number"?`${a}px`:"",h=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:u,left:d,[f]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Et`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Et`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,Mt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],v([Rt('[part="popup"]')],x.prototype,"popup",2),v([Rt('[part="arrow"]')],x.prototype,"arrowEl",2),v([E({reflect:!0})],x.prototype,"anchor",2),v([E({type:Boolean,reflect:!0})],x.prototype,"active",2),v([E({type:String,reflect:!0})],x.prototype,"placement",2),v([E({type:String,reflect:!0})],x.prototype,"strategy",2),v([E({type:Number,reflect:!0})],x.prototype,"distance",2),v([E({type:Number,reflect:!0})],x.prototype,"skidding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"arrow",2),v([E({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),v([E({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"flip",2),v([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),v([E({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),v([E({type:Object})],x.prototype,"flipBoundary",2),v([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),v([E({type:Boolean})],x.prototype,"shift",2),v([E({type:Object})],x.prototype,"shiftBoundary",2),v([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),v([E({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),v([E()],x.prototype,"sync",2),v([E({type:Object})],x.prototype,"autoSizeBoundary",2),v([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=v([kt("sd-5-17-1-popup")],x);export{x as a};
|
|
1
|
+
import{a as Dt}from"./chunk.YEDQWNIV.js";import{a as kt,b as E,d as Rt,h as Ct}from"./chunk.WWJY5MSS.js";import{b as Mt,e as Et}from"./chunk.RZUTJ36B.js";import{a as C,b as V,c as dt,e as v}from"./chunk.TJOCV4DC.js";var _=Math.min,S=Math.max,ct=Math.round,ft=Math.floor,F=t=>({x:t,y:t}),me={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function pt(t,e,n){return S(t,_(e,n))}function Z(t,e){return typeof t=="function"?t(e):t}function Y(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}var ge=new Set(["top","bottom"]);function j(t){return ge.has(Y(t))?"y":"x"}function wt(t){return St(j(t))}function $t(t,e,n){n===void 0&&(n=!1);let i=tt(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function Nt(t){let e=at(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>pe[e])}var Bt=["left","right"],Ft=["right","left"],we=["top","bottom"],ye=["bottom","top"];function xe(t,e,n){switch(t){case"top":case"bottom":return n?e?Ft:Bt:e?Bt:Ft;case"left":case"right":return e?we:ye;default:return[]}}function Ht(t,e,n,i){let o=tt(t),s=xe(Y(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function at(t){return t.replace(/left|right|bottom|top/g,e=>me[e])}function be(t){return C({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?be(t):{top:t,right:t,bottom:t,left:t}}function et(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Wt(t,e,n){let{reference:i,floating:o}=t,s=j(e),r=wt(e),l=gt(r),f=Y(e),a=s==="y",c=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,u;switch(f){case"top":u={x:c,y:i.y-o.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-o.width,y:h};break;default:u={x:i.x,y:i.y}}switch(tt(e)){case"start":u[r]-=m*(n&&a?-1:1);break;case"end":u[r]+=m*(n&&a?-1:1);break}return u}var Vt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e)),a=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:h}=Wt(a,i,f),m=i,u={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:b,data:A,reset:O}=await g({x:c,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:u,rects:a,platform:r,elements:{reference:t,floating:e}});c=y!=null?y:c,h=b!=null?b:h,u=V(C({},u),{[w]:C(C({},u[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(a=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:c,y:h}=Wt(a,m,f)),p=-1)}return{x:c,y:h,placement:m,strategy:o,middlewareData:u}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:m=!1,padding:u=0}=Z(e,t),d=Tt(u),w=l[m?h==="floating"?"reference":"floating":h],g=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:c,strategy:f})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},O=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:f}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:f}=e,{element:a,padding:c=0}=Z(t,e)||{};if(a==null)return{};let h=Tt(c),m={x:n,y:i},u=wt(o),d=gt(u),p=await r.getDimensions(a),w=u==="y",g=w?"top":"left",y=w?"bottom":"right",b=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[u]-m[u]-s.floating[d],O=m[u]-s.reference[u],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a)),R=k?k[b]:0;(!R||!await(r.isElement==null?void 0:r.isElement(k)))&&(R=l.floating[b]||s.floating[d]);let I=A/2-O/2,H=R/2-p[d]/2-1,L=_(h[g],H),U=_(h[y],H),W=L,K=R-p[d]-U,P=R/2-p[d]/2+I,D=pt(W,P,K),J=!f.arrow&&tt(o)!=null&&P!==D&&s.reference[d]/2-(P<W?L:U)-p[d]/2<0,X=J?P<W?P-W:P-K:0;return{[u]:m[u]+X,data:C({[u]:D,centerOffset:P-D-X},J&&{alignmentOffset:X}),reset:J}}});var jt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:f,elements:a}=e,P=Z(t,e),{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=dt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=Y(o),y=j(l),b=Y(l)===l,A=await(f.isRTL==null?void 0:f.isRTL(a.floating)),O=m||(b||!p?[at(l)]:Nt(l)),k=d!=="none";!m&&k&&O.push(...Ht(l,p,d,A));let R=[l,...O],I=await yt(e,w),H=[],L=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&H.push(I[g]),h){let D=$t(o,r,A);H.push(I[D[0]],I[D[1]])}if(L=[...L,{placement:o,overflows:H}],!H.every(D=>D<=0)){var U,W;let D=(((U=s.flip)==null?void 0:U.index)||0)+1,J=R[D];if(J&&(!(h==="alignment"?y!==j(J):!1)||L.every(B=>j(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:J}};let X=(W=L.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:W.placement;if(!X)switch(u){case"bestFit":{var K;let Q=(K=L.filter(B=>{if(k){let G=j(B.placement);return G===y||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,de)=>G+de,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:K[0];Q&&(X=Q);break}case"initialPlacement":X=l;break}if(o!==X)return{reset:{placement:X}}}return{}}}};var ve=new Set(["left","top"]);async function Ae(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Y(n),l=tt(n),f=j(n)==="y",a=ve.has(r)?-1:1,c=s&&f?-1:1,h=Z(e,t),{mainAxis:m,crossAxis:u,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof d=="number"&&(u=l==="end"?d*-1:d),f?{x:u*c,y:m*a}:{x:m*a,y:u*c}}var It=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,f=await Ae(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:V(C({},f),{placement:r})}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=Z(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}}}=w,f=dt(w,["mainAxis","crossAxis","limiter"]),a={x:n,y:i},c=await yt(e,f),h=j(Y(o)),m=St(h),u=a[m],d=a[h];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",b=u+c[g],A=u-c[y];u=pt(b,u,A)}if(r){let g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=d+c[g],A=d-c[y];d=pt(b,d,A)}let p=l.fn(V(C({},e),{[m]:u,[h]:d}));return V(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[h]:r}}})}}};var Yt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,L=Z(t,e),{apply:f=()=>{}}=L,a=dt(L,["apply"]),c=await yt(e,a),h=Y(o),m=tt(o),u=j(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-c.top-c.bottom,b=d-c.left-c.right,A=_(p-c[w],y),O=_(d-c[g],b),k=!e.middlewareData.shift,R=A,I=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(I=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=y),k&&!m){let U=S(c.left,0),W=S(c.right,0),K=S(c.top,0),P=S(c.bottom,0);u?I=d-2*(U!==0||W!==0?U+W:S(c.left,c.right)):R=p-2*(K!==0||P!==0?K+P:S(c.top,c.bottom))}await f(V(C({},e),{availableWidth:I,availableHeight:R}));let H=await r.getDimensions(l.floating);return d!==H.width||p!==H.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function nt(t){return Ut(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Ut(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ut(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function N(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function qt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(t).ShadowRoot}var Oe=new Set(["inline","contents"]);function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!Oe.has(o)}var Ee=new Set(["table","td","th"]);function Kt(t){return Ee.has(nt(t))}var Re=[":popover-open",":modal"];function ut(t){return Re.some(e=>{try{return t.matches(e)}catch(n){return!1}})}var Ce=["transform","translate","scale","rotate","perspective"],Se=["transform","translate","scale","rotate","perspective","filter"],Te=["paint","layout","strict","content"];function bt(t){let e=vt(),n=z(t)?M(t):t;return Ce.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Se.some(i=>(n.willChange||"").includes(i))||Te.some(i=>(n.contain||"").includes(i))}function Gt(t){let e=q(t);for(;N(e)&&!it(e);){if(bt(e))return e;if(ut(e))return null;e=q(e)}return null}function vt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Pe=new Set(["html","body","#document"]);function it(t){return Pe.has(nt(t))}function M(t){return T(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(nt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||$(t);return qt(e)?e.host:e}function Jt(t){let e=q(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:N(e)&&st(e)?e:Jt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Jt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=T(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=M(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=N(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=ct(n)!==s||ct(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Lt(t){return z(t)?t:t.contextElement}function lt(t){let e=Lt(t);if(!N(e))return F(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=ee(e),r=(s?ct(n.width):n.width)/i,l=(s?ct(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var Le=F(0);function ne(t){let e=T(t);return!vt()||!e.visualViewport?Le:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ze(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(t)?!1:e}function ot(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Lt(t),r=F(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ze(s,n,i)?ne(s):F(0),f=(o.left+l.x)/r.x,a=(o.top+l.y)/r.y,c=o.width/r.x,h=o.height/r.y;if(s){let m=T(s),u=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&u!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=M(p),b=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;f*=w.x,a*=w.y,c*=w.x,h*=w.y,f+=b,a+=A,d=T(p),p=At(d)}}return et({width:c,height:h,x:f,y:a})}function Ot(t,e){let n=ht(t).scrollLeft;return e?e.left+n:ot($(t)).left+n}function ie(t,e){let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Ot(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function Me(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let f={scrollLeft:0,scrollTop:0},a=F(1),c=F(0),h=N(i);if((h||!h&&!s)&&((nt(i)!=="body"||st(r))&&(f=ht(i)),N(i))){let u=ot(i);a=lt(i),c.x=u.x+i.clientLeft,c.y=u.y+i.clientTop}let m=r&&!h&&!s?ie(r,f):F(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+c.x+m.x,y:n.y*a.y-f.scrollTop*a.y+c.y+m.y}}function ke(t){return Array.from(t.getClientRects())}function De(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=S(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=S(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+Ot(t),l=-n.scrollTop;return M(i).direction==="rtl"&&(r+=S(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}var Qt=25;function Be(t,e){let n=T(t),i=$(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,f=0;if(o){s=o.width,r=o.height;let c=vt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,f=o.offsetTop)}let a=Ot(i);if(a<=0){let c=i.ownerDocument,h=c.body,m=getComputedStyle(h),u=c.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,d=Math.abs(i.clientWidth-h.clientWidth-u);d<=Qt&&(s-=d)}else a<=Qt&&(s+=a);return{width:s,height:r,x:l,y:f}}var Fe=new Set(["absolute","fixed"]);function $e(t,e){let n=ot(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=N(t)?lt(t):F(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,f=o*s.x,a=i*s.y;return{width:r,height:l,x:f,y:a}}function Zt(t,e,n){let i;if(e==="viewport")i=Be(t,n);else if(e==="document")i=De($(t));else if(z(e))i=$e(e,n);else{let o=ne(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return et(i)}function oe(t,e){let n=q(t);return n===e||!z(n)||it(n)?!1:M(n).position==="fixed"||oe(n,e)}function Ne(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&nt(l)!=="body"),o=null,s=M(t).position==="fixed",r=s?q(t):t;for(;z(r)&&!it(r);){let l=M(r),f=bt(r);!f&&l.position==="fixed"&&(o=null),(s?!f&&!o:!f&&l.position==="static"&&!!o&&Fe.has(o.position)||st(r)&&!f&&oe(t,r))?i=i.filter(c=>c!==r):o=l,r=q(r)}return e.set(t,i),i}function He(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ne(e,this._c):[].concat(n),i],l=r[0],f=r.reduce((a,c)=>{let h=Zt(e,c,o);return a.top=S(h.top,a.top),a.right=_(h.right,a.right),a.bottom=_(h.bottom,a.bottom),a.left=S(h.left,a.left),a},Zt(e,l,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function We(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Ve(t,e,n){let i=N(e),o=$(e),s=n==="fixed",r=ot(t,!0,s,e),l={scrollLeft:0,scrollTop:0},f=F(0);function a(){f.x=Ot(o)}if(i||!i&&!s)if((nt(e)!=="body"||st(o))&&(l=ht(e)),i){let u=ot(e,!0,s,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else o&&a();s&&!i&&o&&a();let c=o&&!i&&!s?ie(o,l):F(0),h=r.left+l.scrollLeft-f.x-c.x,m=r.top+l.scrollTop-f.y-c.y;return{x:h,y:m,width:r.width,height:r.height}}function Pt(t){return M(t).position==="static"}function te(t,e){if(!N(t)||M(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function re(t,e){let n=T(t);if(ut(t))return n;if(!N(t)){let o=q(t);for(;o&&!it(o);){if(z(o)&&!Pt(o))return o;o=q(o)}return n}let i=te(t,e);for(;i&&Kt(i)&&Pt(i);)i=te(i,e);return i&&it(i)&&Pt(i)&&!bt(i)?n:i||Gt(t)||n}var _e=async function(t){let e=this.getOffsetParent||re,n=this.getDimensions,i=await n(t.floating);return{reference:Ve(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function je(t){return M(t).direction==="rtl"}var Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Me,getDocumentElement:$,getClippingRect:He,getOffsetParent:re,getElementRects:_e,getClientRects:ke,getDimensions:We,getScale:lt,isElement:z,isRTL:je};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Xe(t,e){let n=null,i,o=$(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),s();let a=t.getBoundingClientRect(),{left:c,top:h,width:m,height:u}=a;if(l||e(),!m||!u)return;let d=ft(h),p=ft(o.clientWidth-(c+m)),w=ft(o.clientHeight-(h+u)),g=ft(c),b={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:S(0,_(1,f))||1},A=!0;function O(k){let R=k[0].intersectionRatio;if(R!==f){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!se(a,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,V(C({},b),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(O,b)}n.observe(t)}return r(!0),s}function le(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,a=Lt(t),c=o||s?[...a?rt(a):[],...rt(e)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=a&&l?Xe(a,n):null,m=-1,u=null;r&&(u=new ResizeObserver(g=>{let[y]=g;y&&y.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=u)==null||b.observe(e)})),n()}),a&&!f&&u.observe(a),u.observe(e));let d,p=f?ot(t):null;f&&w();function w(){let g=ot(t);p&&!se(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;c.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=u)==null||g.disconnect(),u=null,f&&cancelAnimationFrame(d)}}var ae=It;var ce=Xt,fe=jt,zt=Yt;var ue=_t;var he=(t,e,n)=>{let i=new Map,o=C({platform:Ie},n),s=V(C({},o.platform),{_c:i});return Vt(t,e,V(C({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=le(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[ae({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(zt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(fe({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(ce({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(zt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ue({element:this.arrowEl,padding:this.arrowPadding})),he(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",f={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let a=s.arrow.x,c=s.arrow.y,h="",m="",u="",d="";if(this.arrowPlacement==="start"){let p=typeof a=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof a=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",u=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof a=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof a=="number"?`${a}px`:"",h=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:u,left:d,[f]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Et`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Et`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,Mt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],v([Rt('[part="popup"]')],x.prototype,"popup",2),v([Rt('[part="arrow"]')],x.prototype,"arrowEl",2),v([E({reflect:!0})],x.prototype,"anchor",2),v([E({type:Boolean,reflect:!0})],x.prototype,"active",2),v([E({type:String,reflect:!0})],x.prototype,"placement",2),v([E({type:String,reflect:!0})],x.prototype,"strategy",2),v([E({type:Number,reflect:!0})],x.prototype,"distance",2),v([E({type:Number,reflect:!0})],x.prototype,"skidding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"arrow",2),v([E({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),v([E({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),v([E({type:Boolean,reflect:!0})],x.prototype,"flip",2),v([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),v([E({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),v([E({type:Object})],x.prototype,"flipBoundary",2),v([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),v([E({type:Boolean})],x.prototype,"shift",2),v([E({type:Object})],x.prototype,"shiftBoundary",2),v([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),v([E({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),v([E()],x.prototype,"sync",2),v([E({type:Object})],x.prototype,"autoSizeBoundary",2),v([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=v([kt("sd-5-17-3-popup")],x);export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk.YEDQWNIV.js";import{a}from"./chunk.L6MCOH7T.js";import{a as o,b as i,h as r}from"./chunk.
|
|
1
|
+
import{a as l}from"./chunk.YEDQWNIV.js";import{a}from"./chunk.L6MCOH7T.js";import{a as o,b as i,h as r}from"./chunk.WWJY5MSS.js";import{e as s}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.localize=new a(this);this.subtick=!1}render(){return s`<div part="base" class="${l(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${l("bg-neutral-500",this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm"><slot></slot></div></div>`}};t.styles=r.styles,e([i({type:Boolean,reflect:!0})],t.prototype,"subtick",2),t=e([o("sd-5-17-3-range-tick")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.CHU57RUD.js";import{a as h,b as a}from"./chunk.PVM2WKMA.js";import{a as e}from"./chunk.YEDQWNIV.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as m,b as r,h as d}from"./chunk.
|
|
1
|
+
import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.CHU57RUD.js";import{a as h,b as a}from"./chunk.PVM2WKMA.js";import{a as e}from"./chunk.YEDQWNIV.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as m,b as r,h as d}from"./chunk.WWJY5MSS.js";import{b}from"./chunk.RZUTJ36B.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends d{constructor(){super(...arguments);this.hasSlotController=new p(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.horizontalInline=!1;this.waiting=!1;this.disabled=!1;this.current=!1;this.noTail=!1;this.notInteractive=!1;this.label="";this.description="";this.index=1;this.href=""}connectedCallback(){super.connectedCallback()}isLink(){return!!this.href}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleCurrentChange(){this.current&&(this.disabled=!1,this.waiting=!1)}handleDisabledChange(){this.disabled&&(this.current=!1,this.waiting=!1)}handleWaitingChange(){this.waiting&&(this.current=!1,this.disabled=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1,this.waiting=!1)}render(){let f=this.isLink(),u=this.notInteractive||this.waiting?h`div`:f?h`a`:h`button`,g=this.hasSlotController.test("label"),c=this.label?!0:g,v=this.hasSlotController.test("[default]"),s=this.description?!0:v,o=this.horizontalInline&&this.orientation==="horizontal",w=e("flex shrink-0 gap-2",this.noTail&&!o&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",o&&"items-start",this.orientation==="horizontal"&&!this.horizontalInline?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3"),x=e("border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",this.disabled?"focus-visible:outline-none cursor-not-allowed":!this.notInteractive&&!this.waiting?"focus-visible:focus-outline hover:cursor-pointer":"",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-500 text-neutral-500",this.waiting&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"border-primary hover:bg-primary-100 hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white");return a`<div role="listitem" part="base" class="${e("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-full overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${w}"><${u} part="circle" href="${n(f?this.href:void 0)}" aria-disabled="${n(this.disabled||this.waiting||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${n(this.notInteractive||this.waiting||!c?void 0:"label")}" aria-describedby="${n(this.notInteractive||this.waiting||!s?void 0:"description")}" class="${x}"><slot name="circle-content" class="${e("text-lg",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-primary hover:text-primary-500 hover:fill-primary-500",this.notInteractive&&"text-primary")}">${!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?a`<sd-5-17-3-icon name="status-check" library="_internal" class="${e(this.size==="sm"&&"text-sm")}"></sd-5-17-3-icon>`:a`${this.index}`}</slot></${u}>${o?a`<div class="${e(!this.noTail&&"flex-1","flex flex-col gap-1")}"><div class="${e("flex w-full",c&&"gap-2",this.size==="sm"&&!s?"mt-1":"mt-3")}">${c&&a`<div part="label" id="label" class="${e("font-bold sd-paragraph whitespace-nowrap",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div>`} ${this.noTail?"":a`<div part="tail" class="${e("border-t flex-1 mr-2 mt-3",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-500")}"></div>`}</div>${s?a`<div part="description" id="description" class="${e("sd-paragraph sd-paragraph--size-sm break-words",s?"flex-1":"w-0 h-0 overflow-hidden",s&&!this.noTail&&"pr-4",(this.disabled||this.waiting)&&"!text-neutral-700")}">${this.description||a`<slot></slot>`}</div>`:""}</div>`:this.noTail?"":a`<div part="tail" class="${e(this.orientation==="horizontal"?"border-t w-full my-auto mr-2":"border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-400")}"></div>`}</div>${o?"":a`<div part="text-container" class="${e("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"text-left",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",this.notInteractive?"ml-2":"mr-4")}"><div part="label" id="label" class="${e("!font-bold sd-paragraph",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${e("sd-paragraph sd-paragraph--size-sm",(this.disabled||this.waiting)&&"text-neutral-700")}">${this.description||a`<slot></slot>`}</div></div>`}</div>`}};t.styles=[...d.styles,b`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}:host([horizontal-inline]):has([part=description]){flex:1 1 0%;min-width:var(--sd-spacing-0,0)}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`],i([r({type:String,reflect:!0})],t.prototype,"size",2),i([r({type:String,reflect:!0})],t.prototype,"orientation",2),i([r({type:Boolean,reflect:!0,attribute:"horizontal-inline"})],t.prototype,"horizontalInline",2),i([r({type:Boolean,reflect:!0})],t.prototype,"waiting",2),i([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([r({type:Boolean,reflect:!0})],t.prototype,"current",2),i([r({reflect:!0,type:Boolean,attribute:"no-tail"})],t.prototype,"noTail",2),i([r({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),i([r({type:String,reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"description",2),i([r({type:Number,reflect:!0,attribute:"index"})],t.prototype,"index",2),i([r({type:String,reflect:!0})],t.prototype,"href",2),i([l("current")],t.prototype,"handleCurrentChange",1),i([l("disabled")],t.prototype,"handleDisabledChange",1),i([l("waiting")],t.prototype,"handleWaitingChange",1),i([l("notInteractive")],t.prototype,"handleInteractivityChange",1),t=i([m("sd-5-17-3-step")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,b as c,c as _}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.EJI65G6N.js";import{b as E}from"./chunk.NRBNWX7R.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.CHU57RUD.js";import{a as m}from"./chunk.YEDQWNIV.js";import{a as w}from"./chunk.L6MCOH7T.js";import{a as C,b as h,d as f,e as D,h as T}from"./chunk.M6XINJ52.js";import{b as I,e as v}from"./chunk.RZUTJ36B.js";import{e as n}from"./chunk.TJOCV4DC.js";var l=class extends T{constructor(){super();this.formControlController=new E(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new w(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],c(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(e){super.willUpdate(e),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});c(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&this.moveThumb(t,this._rangeValues.get(i))}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",o=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${o}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${o}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),o=i[s-1]||this.min,r=i[s+1]||this.max,u=t<o||t>r;return{finalValue:Math.max(o,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:o}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=_(this.inputWrapper,i),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o),u=a.reduce((g,x)=>{let V=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(V-r),k=Math.abs(L-r);return $===k?V<r?x:g:$<k?x:g}),d=+u.dataset.rangeId;if(!d)return;this._rangeValues.set(d,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=_(this.inputWrapper,e.clientX),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let d=this.movementBoundariesForThumb(t,r);d.isRestricted?(r=d.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,c(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let o=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${o}`:`aria-label-hidden ${o}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-5-17-1-tooltip hoist trigger="focus" disabled="${b(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${o}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${b(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${m("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-5-17-1-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${m("w-full",t?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${m("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${b(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${m("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${b(this.noTrackBar?!0:void 0)}" class="${m("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(t)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${m("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],n([f("#input")],l.prototype,"input",2),n([f('[part="active-track"]')],l.prototype,"activeTrack",2),n([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),n([D('[part="thumb"]')],l.prototype,"thumbs",2),n([h({attribute:!1})],l.prototype,"tooltipFormatter",2),n([h({type:String,reflect:!0})],l.prototype,"name",2),n([h({type:String,reflect:!0})],l.prototype,"label",2),n([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),n([h({type:Number,reflect:!0})],l.prototype,"min",2),n([h({type:Number,reflect:!0})],l.prototype,"max",2),n([h({type:Number,reflect:!0})],l.prototype,"step",2),n([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),n([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),n([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),n([h({attribute:"no-tooltip",type:Boolean,reflect:!0})],l.prototype,"noTooltip",2),n([A()],l.prototype,"defaultValue",2),n([h({type:String})],l.prototype,"value",1),l=n([C("sd-5-17-1-range")],l);export{l as a};
|
|
1
|
+
import{a as p,b as c,c as _}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.EJI65G6N.js";import{b as E}from"./chunk.NRBNWX7R.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.CHU57RUD.js";import{a as m}from"./chunk.YEDQWNIV.js";import{a as w}from"./chunk.L6MCOH7T.js";import{a as C,b as h,d as f,e as D,h as T}from"./chunk.WWJY5MSS.js";import{b as I,e as v}from"./chunk.RZUTJ36B.js";import{e as n}from"./chunk.TJOCV4DC.js";var l=class extends T{constructor(){super();this.formControlController=new E(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new w(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],c(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(e){super.willUpdate(e),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});c(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&this.moveThumb(t,this._rangeValues.get(i))}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",o=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${o}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${o}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),o=i[s-1]||this.min,r=i[s+1]||this.max,u=t<o||t>r;return{finalValue:Math.max(o,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:o}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=_(this.inputWrapper,i),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o),u=a.reduce((g,x)=>{let V=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(V-r),k=Math.abs(L-r);return $===k?V<r?x:g:$<k?x:g}),d=+u.dataset.rangeId;if(!d)return;this._rangeValues.set(d,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=_(this.inputWrapper,e.clientX),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let d=this.movementBoundariesForThumb(t,r);d.isRestricted?(r=d.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,c(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let o=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${o}`:`aria-label-hidden ${o}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-5-17-3-tooltip hoist trigger="focus" disabled="${b(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${o}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${b(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${m("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-5-17-3-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${m("w-full",t?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${m("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${b(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${m("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${b(this.noTrackBar?!0:void 0)}" class="${m("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(t)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${m("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],n([f("#input")],l.prototype,"input",2),n([f('[part="active-track"]')],l.prototype,"activeTrack",2),n([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),n([D('[part="thumb"]')],l.prototype,"thumbs",2),n([h({attribute:!1})],l.prototype,"tooltipFormatter",2),n([h({type:String,reflect:!0})],l.prototype,"name",2),n([h({type:String,reflect:!0})],l.prototype,"label",2),n([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),n([h({type:Number,reflect:!0})],l.prototype,"min",2),n([h({type:Number,reflect:!0})],l.prototype,"max",2),n([h({type:Number,reflect:!0})],l.prototype,"step",2),n([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),n([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),n([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),n([h({attribute:"no-tooltip",type:Boolean,reflect:!0})],l.prototype,"noTooltip",2),n([A()],l.prototype,"defaultValue",2),n([h({type:String})],l.prototype,"value",1),l=n([C("sd-5-17-3-range")],l);export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk.
|
|
1
|
+
import{a as k}from"./chunk.HQ24LF7U.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.WWJY5MSS.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-5-17-3-radio, sd-5-17-3-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-5-17-3-radio, sd-5-17-3-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-5-17-3-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-5-17-3-button-group");i&&(i.disableRole=!0)}}syncRadios(){if(customElements.get("sd-5-17-3-radio")&&customElements.get("sd-5-17-3-radio-button")){this.syncRadioElements();return}customElements.get("sd-5-17-3-radio")?this.syncRadioElements():customElements.whenDefined("sd-5-17-3-radio").then(()=>this.syncRadios()),customElements.get("sd-5-17-3-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-5-17-3-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-5-17-3-button-group class="border border-primary rounded-full" part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-5-17-3-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-5-17-3-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-5-17-3-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-5-17-3-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-5-17-3-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-17-3-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-17-3-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}:host:has(sd-5-17-3-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-5-17-3-radio-group")],s);export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk.LIO6LMTQ.js";import{a as C}from"./chunk.EJI65G6N.js";import{b as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.CHU57RUD.js";import{a as s}from"./chunk.YEDQWNIV.js";import{a as d}from"./chunk.E2DRD2OX.js";import{a as y,b as i,c as h,d as p,h as m}from"./chunk.
|
|
1
|
+
import{a as $}from"./chunk.LIO6LMTQ.js";import{a as C}from"./chunk.EJI65G6N.js";import{b as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.CHU57RUD.js";import{a as s}from"./chunk.YEDQWNIV.js";import{a as d}from"./chunk.E2DRD2OX.js";import{a as y,b as i,c as h,d as p,h as m}from"./chunk.WWJY5MSS.js";import{b as v,e as n}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends m{constructor(){super(...arguments);this.formControlController=new g(this);this.hasSlotController=new x(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,a,o="none"){this.textarea.setSelectionRange(l,a,o)}setRangeText(l,a,o,u){this.textarea.setRangeText(l,a,o,u),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},a=this.label?!0:!!l.label,o=this.helpText?!0:!!l.helpText,u=!!l.tooltip,c=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",f=this.size==="sm"?"text-sm":"text-base",b={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return n`<div part="form-control" class="flex flex-col h-full text-left">${a||u?n`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(a?"inline-block":"hidden",f)}" for="input" aria-hidden="${a?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l.tooltip?n`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${s("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[c])}"></div><div part="base" class="${s("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",c==="disabled"||c==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${s("ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-5-17-3-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",f)}" title="${this.title}" name="${r(this.name)}" .value="${$(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${r(this.placeholder)}" minlength="${r(this.minlength)}" maxlength="${r(this.maxlength)}" rows="${r(this.rows)}" autocapitalize="${r(this.autocapitalize)}" autocorrect="${r(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${r(this.spellcheck)}" enterkeyhint="${r(this.enterkeyhint)}" inputmode="${r(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?n`<sd-5-17-3-icon class="${s("text-error absolute right-4 pointer-events-none",b)}" library="_internal" name="risk" part="invalid-icon"></sd-5-17-3-icon>`:""} ${this.styleOnValid&&this.showValidStyle?n`<sd-5-17-3-icon class="${s("text-success absolute right-4 pointer-events-none",b)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-17-3-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${s("text-sm text-neutral-700 mt-1",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...m.styles,v`:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([required]) #label:after{content:" *"}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],e([p("#input")],t.prototype,"textarea",2),e([p("#invalid-message")],t.prototype,"invalidMessage",2),e([h()],t.prototype,"hasFocus",2),e([h()],t.prototype,"showValidStyle",2),e([h()],t.prototype,"showInvalidStyle",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"label",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String,reflect:!0})],t.prototype,"placeholder",2),e([i({type:Number,reflect:!0})],t.prototype,"rows",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"readonly",2),e([i({type:String,reflect:!0})],t.prototype,"form",2),e([i({type:Boolean,reflect:!0})],t.prototype,"required",2),e([i({type:Number,reflect:!0})],t.prototype,"minlength",2),e([i({type:Number,reflect:!0})],t.prototype,"maxlength",2),e([i({type:String,reflect:!0})],t.prototype,"autocapitalize",2),e([i({type:String,reflect:!0})],t.prototype,"autocorrect",2),e([i({reflect:!0})],t.prototype,"autocomplete",2),e([i({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([i({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),e([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),e([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],t.prototype,"spellcheck",2),e([i({type:String,reflect:!0})],t.prototype,"inputmode",2),e([C()],t.prototype,"defaultValue",2),e([d("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),e([d("rows",{waitUntilFirstUpdate:!0})],t.prototype,"handleRowsChange",1),e([d("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=e([y("sd-5-17-3-textarea")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk.YEDQWNIV.js";import{a as l,b as e,h as o}from"./chunk.
|
|
1
|
+
import{a as n}from"./chunk.YEDQWNIV.js";import{a as l,b as e,h as o}from"./chunk.WWJY5MSS.js";import{b as a,e as i}from"./chunk.RZUTJ36B.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return i`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,a`:host{margin:var(--sd-spacing-0,0)}:host(sd-5-17-3-divider[orientation=horizontal]){display:block}:host(sd-5-17-3-divider[orientation=vertical]){display:inline-block}`],r([e({type:String,reflect:!0})],t.prototype,"orientation",2),r([e({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=r([l("sd-5-17-3-divider")],t);export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N}from"./chunk.Y3GIPFVP.js";import{a as B}from"./chunk.LIO6LMTQ.js";import{a as M}from"./chunk.EJI65G6N.js";import{b as z}from"./chunk.NRBNWX7R.js";import{a as A}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.CHU57RUD.js";import{a as T,b as L}from"./chunk.D6LAH53B.js";import{a}from"./chunk.YEDQWNIV.js";import{a as F}from"./chunk.L6MCOH7T.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as V,b as s,c as m,d as g,h as x}from"./chunk.WWJY5MSS.js";import{b as D,e as r,h as E,i as P}from"./chunk.RZUTJ36B.js";import{a as k,e as i}from"./chunk.TJOCV4DC.js";var w=class extends N{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==T.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return P}update(e,[l]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=k({},l),this.host.addEventListener("pointerdown",this.handlePointerDown)),E}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var l;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(l=this.observer)==null||l.disconnect(),this.observer=new MutationObserver(u=>{u.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},$=L(w);var H,R=(H=navigator.userAgentData)==null?void 0:H.brands.some(f=>f.brand.includes("Chromium")),J=R?!1:navigator.userAgent.includes("Firefox"),t=class extends x{constructor(){super(...arguments);this.formControlController=new z(this);this.hasSlotController=new A(this,"help-text","label","left","right","message","placeholder");this.localize=new F(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsDate)!=null?l:null}set valueAsDate(e){let l=document.createElement("input");l.type="date",l.valueAsDate=e,this.value=l.value}get valueAsNumber(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsNumber)!=null?l:parseFloat(this.value)}set valueAsNumber(e){let l=document.createElement("input");l.type="number",l.valueAsNumber=e,this.value=l.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let l=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!l&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,l,u="none"){this.input.setSelectionRange(e,l,u)}setRangeText(e,l,u,p){this.input.setRangeText(e,l,u,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},l=this.label?!0:!!e.label,u=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),S=!!e.tooltip,O=e.left,y=this.value!==null&&String(this.value).length>0,c=this.floatingLabel&&l&&(this.hasFocus||y||this.placeholder),v=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",C=this.size==="sm"?"text-sm":"text-base",_={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"}[v],d=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",h={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],K=this.size==="lg"?this.floatingLabel?c?"py-3":"py-4":"py-2":this.floatingLabel?c?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(l||S)&&!this.floatingLabel?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(l?"inline-block":"hidden",C)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",_)}"></div><div part="base" class="${a("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",v==="disabled"||v==="visuallyDisabled"?"text-neutral-500":"text-black",K)}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",d,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?c?"h-4":"h-6":c?"h-6":"h-8",C,c&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${n(this.placeholder)}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${B(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${l&&this.floatingLabel?r`<label part="form-control-floating-label" class="${a("pointer-events-none absolute",O?q:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!c||!y&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${l?"false":"true"}"><span id="floating-label" class="${a("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!c||!y&&(this.readonly||this.visuallyDisabled)?"text-base":"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",c&&!this.visuallyDisabled&&!this.disabled&&"text-neutral-700")}">${this.label}</span></label>`:null} ${p?r`<button part="clear-button" class="${a("flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-17-3-icon class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",o)}" library="_internal" name="closing-round"></sd-5-17-3-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-5-17-3-icon class="${a(d,o)}" library="_internal" name="eye"></sd-5-17-3-icon></slot>`:r`<slot name="hide-password-icon"><sd-5-17-3-icon class="${a(d,o)}" library="_internal" name="eye-crossed-out"></sd-5-17-3-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!J?r`<sd-5-17-3-icon class="${a(d,h,o)}" library="_internal" name="calendar"></sd-5-17-3-icon>`:""} ${this.type==="time"?r`<sd-5-17-3-icon class="${a(d,h,o)}" library="_internal" name="clock"></sd-5-17-3-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handleSearchClick}"><sd-5-17-3-icon class="${a(d,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-5-17-3-icon></button>`:""} ${this.showInvalidStyle?r`<sd-5-17-3-icon part="invalid-icon" class="${a("text-error",h,o)}" library="_internal" name="risk"></sd-5-17-3-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-5-17-3-icon class="${a("text-success flex-shrink-0",h,o)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-17-3-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",d,h,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${$({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-5-17-3-icon name="system/minus-circle" label="Decrease value" class="${a(d,h,o)}"></sd-5-17-3-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${$({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-5-17-3-icon name="system/plus-circle" label="Decrease value" class="${a(d,h,o)}"></sd-5-17-3-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-1",u?"block":"hidden")}" aria-hidden="${!u}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...x.styles,D`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label):after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-5-17-3-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([g("#input")],t.prototype,"input",2),i([g("#invalid-message")],t.prototype,"invalidMessage",2),i([m()],t.prototype,"hasFocus",2),i([m()],t.prototype,"showValidStyle",2),i([m()],t.prototype,"showInvalidStyle",2),i([s({type:String,reflect:!0})],t.prototype,"type",2),i([s({type:String,reflect:!0})],t.prototype,"size",2),i([s({type:String,reflect:!0})],t.prototype,"inputmode",2),i([s()],t.prototype,"value",2),i([M()],t.prototype,"defaultValue",2),i([s({type:String,reflect:!0})],t.prototype,"placeholder",2),i([s({type:String,reflect:!0})],t.prototype,"label",2),i([s({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([s({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([s({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([s({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([s({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([s({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([s({type:Number,reflect:!0})],t.prototype,"minlength",2),i([s({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([s({reflect:!0})],t.prototype,"min",2),i([s({reflect:!0})],t.prototype,"max",2),i([s({type:String,reflect:!0})],t.prototype,"form",2),i([s({type:String,reflect:!0})],t.prototype,"name",2),i([s({type:String,reflect:!0})],t.prototype,"title",2),i([s({type:Boolean,reflect:!0})],t.prototype,"required",2),i([s({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),i([s()],t.prototype,"pattern",2),i([s({reflect:!0})],t.prototype,"step",2),i([s({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([s({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([s({reflect:!0})],t.prototype,"autocomplete",2),i([s({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([s({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([s({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([s({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([b("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([b("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([b("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([V("sd-5-17-3-input")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function w(n,{setValueOnSelection:p,scrollSelectionIntoView:c}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let r=n?typeof n=="string"?document.querySelector(n):n:document.querySelector("#autoComplete"),i=r.shadowRoot.querySelector("input"),l=o=>o[0];return i.addEventListener("init",()=>{var a,s;let o=(a=r.shadowRoot)==null?void 0:a.querySelector("ul");o==null||o.setAttribute("part","listbox");let t=document.createElement("sd-5-17-
|
|
1
|
+
function w(n,{setValueOnSelection:p,scrollSelectionIntoView:c}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let r=n?typeof n=="string"?document.querySelector(n):n:document.querySelector("#autoComplete"),i=r.shadowRoot.querySelector("input"),l=o=>o[0];return i.addEventListener("init",()=>{var a,s;let o=(a=r.shadowRoot)==null?void 0:a.querySelector("ul");o==null||o.setAttribute("part","listbox");let t=document.createElement("sd-5-17-3-popup");t.appendChild(o),(s=r.shadowRoot)==null||s.appendChild(t),t==null||t.setAttribute("exportparts","popup__content"),t&&(t.active=!1,t.autoSize="vertical",t.autoSizePadding=16,t.placement="bottom-start",t.anchor=r,t.sync="width");let d=l`sd-5-17-3-popup::part(popup){border-bottom-left-radius:var(--sd-border-radius-default,.25rem);border-bottom-right-radius:var(--sd-border-radius-default,.25rem);border-width:0 2px 2px;overflow-y:scroll;z-index:var(--sd-z-index-dropdown,900);--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);--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-5-17-3-popup li{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}sd-5-17-3-popup li:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--tw-bg-opacity,1))}sd-5-17-3-popup li{list-style-type:""}sd-5-17-3-popup li mark{background-color:transparent;font-weight:700}sd-5-17-3-popup li:not(:has(sd-5-17-3-option)){cursor:pointer;font-size:var(--sd-font-size-base,1rem);padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-4,1rem);--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity,1))}sd-5-17-3-popup li:not(:has(sd-5-17-3-option)):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}sd-5-17-3-popup li[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}`,e=new CSSStyleSheet;e.replaceSync(d),r.shadowRoot.adoptedStyleSheets=[...r.shadowRoot.adoptedStyleSheets,e]}),p&&i.addEventListener("selection",o=>{var t;r.value=(t=o==null?void 0:o.detail)==null?void 0:t.selection.value}),i.addEventListener("open",()=>{var o,t,d,e,a,s;(t=(o=r.shadowRoot)==null?void 0:o.querySelector("sd-5-17-3-popup"))==null||t.setAttribute("active","true"),(e=(d=r.shadowRoot)==null?void 0:d.querySelector('[part="border"]'))==null||e.classList.add("rounded-b-none"),(s=(a=r.shadowRoot)==null?void 0:a.querySelector('[part="form-control"]'))==null||s.classList.add("z-50")}),i.addEventListener("close",()=>{var o,t,d,e,a,s;(t=(o=r.shadowRoot)==null?void 0:o.querySelector("sd-5-17-3-popup"))==null||t.removeAttribute("active"),(e=(d=r.shadowRoot)==null?void 0:d.querySelector('[part="border"]'))==null||e.classList.remove("rounded-b-none"),(s=(a=r.shadowRoot)==null?void 0:a.querySelector('[part="form-control"]'))==null||s.classList.remove("z-50")}),c&&i.addEventListener("navigate",()=>{let o=r.shadowRoot.querySelector('[aria-selected="true"]');o==null||o.scrollIntoView({block:"nearest"})}),{config:{selector:()=>i,resultsList:{tag:"ul"},wrapper:!1}}}export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.YEDQWNIV.js";import{a as v}from"./chunk.L6MCOH7T.js";import{a as g,b as l,c as o,d as u,h as c}from"./chunk.M6XINJ52.js";import{b as m,e as a}from"./chunk.RZUTJ36B.js";import{a as d}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var e=class extends c{constructor(){super();this.localize=new v(this);this.hasSlotController=new y(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let s=t.get("animated");!s&&this.animated?this.initAnimation():s&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let s=Math.floor(t/60).toString().padStart(2,"0"),h=Math.floor(t%60).toString().padStart(2,"0");return`${s}:${h}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let s=t.match(/\d+/g);if(s&&s.length===3){let h=parseInt(s[0]),r=parseInt(s[1]),b=parseInt(s[2]),p=f=>f.toString(16).padStart(2,"0");return`#${p(h)}${p(r)}${p(b)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),h=window.getComputedStyle(t).color,r;this.inverted?r="#FFFFFF33":r=this.rgbToHex(h)+"33",this.waveList=[new d({canvas:this.canvas,color:r,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=a`<div class="${n("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${n("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-5-17-1-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?a`<slot name="pause-icon"><sd-5-17-1-icon class="text-xl" name="pause" library="_internal"></sd-5-17-1-icon></slot>`:a`<slot name="play-icon"><sd-5-17-1-icon class="text-xl" name="start" library="_internal"></sd-5-17-1-icon></slot>`}</sd-5-17-1-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?a`<button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-5-17-1-icon class="w-6 h-6" name="transcript" library="_internal"></sd-5-17-1-icon></button>`:null} <button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-5-17-1-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-5-17-1-icon></button></div></div>`,s=a`<div class="${n("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return a`<div class="${n("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?a`${t}`:null} ${this.animated?a`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?s:null}<sd-5-17-1-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-5-17-1-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-5-17-1-range></div>${this.hasSlotController.test("transcript")?a`<sd-5-17-1-drawer><slot name="transcript"></slot></sd-5-17-1-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?s:null}</div>`}};e.styles=[...c.styles,m`sd-5-17-1-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-5-17-1-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-5-17-1-button::part(label){align-items:center;display:flex;flex-grow:0}sd-5-17-1-range::part(form-control-label){display:none}:host([inverted]) sd-5-17-1-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-5-17-1-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-5-17-1-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-5-17-1-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],e.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],e.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],e.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],e.prototype,"inverted",2),i([l({type:Number,reflect:!0})],e.prototype,"speed",2),i([o()],e.prototype,"currentTime",2),i([o()],e.prototype,"duration",2),i([o()],e.prototype,"isPlaying",2),i([o()],e.prototype,"isMuted",2),i([o()],e.prototype,"isTranscriptOpen",2),i([o()],e.prototype,"progress",2),i([u('[part="progress-slider"]')],e.prototype,"progressSlider",2),i([u('[part="audio-player"]')],e.prototype,"audioPlayerContainer",2),i([u("sd-5-17-1-drawer")],e.prototype,"drawer",2),i([u("canvas")],e.prototype,"canvas",2),e=i([g("sd-5-17-1-audio")],e);export{e as a};
|
|
1
|
+
import{a as y}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.YEDQWNIV.js";import{a as v}from"./chunk.L6MCOH7T.js";import{a as g,b as l,c as o,d as u,h as c}from"./chunk.WWJY5MSS.js";import{b as m,e as a}from"./chunk.RZUTJ36B.js";import{a as d}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var e=class extends c{constructor(){super();this.localize=new v(this);this.hasSlotController=new y(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let s=t.get("animated");!s&&this.animated?this.initAnimation():s&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let s=Math.floor(t/60).toString().padStart(2,"0"),h=Math.floor(t%60).toString().padStart(2,"0");return`${s}:${h}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let s=t.match(/\d+/g);if(s&&s.length===3){let h=parseInt(s[0]),r=parseInt(s[1]),b=parseInt(s[2]),p=f=>f.toString(16).padStart(2,"0");return`#${p(h)}${p(r)}${p(b)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),h=window.getComputedStyle(t).color,r;this.inverted?r="#FFFFFF33":r=this.rgbToHex(h)+"33",this.waveList=[new d({canvas:this.canvas,color:r,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=a`<div class="${n("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${n("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-5-17-3-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?a`<slot name="pause-icon"><sd-5-17-3-icon class="text-xl" name="pause" library="_internal"></sd-5-17-3-icon></slot>`:a`<slot name="play-icon"><sd-5-17-3-icon class="text-xl" name="start" library="_internal"></sd-5-17-3-icon></slot>`}</sd-5-17-3-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?a`<button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-5-17-3-icon class="w-6 h-6" name="transcript" library="_internal"></sd-5-17-3-icon></button>`:null} <button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-5-17-3-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-5-17-3-icon></button></div></div>`,s=a`<div class="${n("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return a`<div class="${n("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?a`${t}`:null} ${this.animated?a`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?s:null}<sd-5-17-3-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-5-17-3-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-5-17-3-range></div>${this.hasSlotController.test("transcript")?a`<sd-5-17-3-drawer><slot name="transcript"></slot></sd-5-17-3-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?s:null}</div>`}};e.styles=[...c.styles,m`sd-5-17-3-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-5-17-3-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-5-17-3-button::part(label){align-items:center;display:flex;flex-grow:0}sd-5-17-3-range::part(form-control-label){display:none}:host([inverted]) sd-5-17-3-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-5-17-3-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-5-17-3-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-5-17-3-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],e.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],e.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],e.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],e.prototype,"inverted",2),i([l({type:Number,reflect:!0})],e.prototype,"speed",2),i([o()],e.prototype,"currentTime",2),i([o()],e.prototype,"duration",2),i([o()],e.prototype,"isPlaying",2),i([o()],e.prototype,"isMuted",2),i([o()],e.prototype,"isTranscriptOpen",2),i([o()],e.prototype,"progress",2),i([u('[part="progress-slider"]')],e.prototype,"progressSlider",2),i([u('[part="audio-player"]')],e.prototype,"audioPlayerContainer",2),i([u("sd-5-17-3-drawer")],e.prototype,"drawer",2),i([u("canvas")],e.prototype,"canvas",2),e=i([g("sd-5-17-3-audio")],e);export{e as a};
|