@solid-design-system/components 5.17.2 → 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.UVN2WVI6.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.UVN2WVI6.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.CA5LQ5RH.js → chunk.76BN4PS7.js} +1 -1
- 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 +59 -59
- 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.CA5LQ5RH.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 +59 -59
- 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}from"./chunk.635MGLIZ.js";import{b as N}from"./chunk.NRBNWX7R.js";import{a as W}from"./chunk.CGQ2BPPZ.js";import{a as $}from"./chunk.YEDQWNIV.js";import{a as q}from"./chunk.L6MCOH7T.js";import{a as P}from"./chunk.E2DRD2OX.js";import{a as H,b as v,c as E,d as B,h as R}from"./chunk.M6XINJ52.js";import{b as A,e as C,i as z}from"./chunk.RZUTJ36B.js";import{e as h}from"./chunk.TJOCV4DC.js";var o=class extends R{constructor(){super();this.localize=new q(this);this.hasSlotController=new W(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-5-17-2-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.disabled=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,b,c;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(b=t.inputType)==null?void 0:b.startsWith("delete");if(this.range){let d=s.replace(/\D/g,""),r=d.slice(0,8),g=d.slice(8,16),m=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(g),M;r.length===0?M="":r.length<8?M=m:g.length>0?M=`${m} - ${S}`:M=n?m:`${m} -`;let I=this.countDigitsBeforeCaret(s,i),y;if(I<=8){let p=this.digitIndexToDmyCaretPos(Math.min(I,8));y=Math.min(p,m.length)}else{let p=r.length<8?m.length:m.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);y=p+Math.min(x,S.length)}this.inputValue=M;let L=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(m)){let p=this.dmyToIso(m),D=p?a.parseLocalISO(p):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==p&&(this.rangeStart=p,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),L=!0)}else this.rangeStart&&(this.rangeStart=null,L=!0),this.rangeEnd&&(this.rangeEnd=null,L=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let p=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[T,O]=a.compareDates(p,x)<=0?[p,x]:[x,p],Y=a.isSameDay(T,O);if((this.allowSameDayRange||!Y)&&!this.wouldRangeContainDisabled(T,O)){let V=a.toLocalISODate(a.startOfDayLocal(T)),k=a.toLocalISODate(a.startOfDayLocal(O));(this.rangeStart!==V||this.rangeEnd!==k)&&(this.rangeStart=V,this.rangeEnd=k,this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=a.startOfDayLocal(O),L=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,L=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),L&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let p=(D=this.input)!=null?D:e;p&&(p.value=this.inputValue,p.setSelectionRange(y,y))})})}else{let d=e,r=d.value,g=(c=d.selectionStart)!=null?c:r.length,m=r.replace(/\D/g,"").slice(0,8),S=m.slice(0,2),M=m.slice(2,4),I=m.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),I.length>0&&S.length===2&&M.length===2&&(y+=I),y=y.replace(/\.\.+/g,".");let L=this.inputValue||"";this.inputValue=y;let p=g,D=w=>{let V=[];for(let k=0;k<w.length;k++)w[k]==="."&&V.push(k);return V},x=D(L),F=D(y),T=x.filter(w=>w<g).length,Y=F.filter(w=>w<g).length-T;if(Y>0?p+=Y:!x.includes(g)&&F.includes(g)&&(p+=1),p=Math.min(Math.max(0,p),y.length),requestAnimationFrame(()=>{var V;let w=(V=this.input)!=null?V:d;w&&(w.value=this.inputValue,w.setSelectionRange(p,p))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let d=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let d=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(d)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,b=f==null?void 0:f.querySelector("button.day.focused");b==null||b.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=this.parseISO(this.min!==null?String(this.min):null),s=this.parseISO(this.max!==null?String(this.max):null);return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=a.toLocalISODate(a.startOfDayLocal(t));return this.disabledDatesSet.has(e)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(!e)return"";let s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",b=u?this.dmyToIso(u):null,c=f?this.dmyToIso(f):null;return u&&!b?{start:null,end:null,valid:!1}:f&&!c?{start:null,end:null,valid:!1}:{start:b,end:c,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,b,c;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let r=a.parseLocalISO(d);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let d=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(d)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let g=d?a.parseLocalISO(d):null,m=r?a.parseLocalISO(r):null;if(g&&m){if(a.compareDates(g,m)>0){let I=g;g=m,m=I}if(!this.allowSameDayRange&&a.isSameDay(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=g?a.toLocalISODate(a.startOfDayLocal(g)):null,M=m?a.toLocalISODate(a.startOfDayLocal(m)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let I=(b=g!=null?g:m)!=null?b:this.today;this.viewMonth=new Date(I.getFullYear(),I.getMonth(),1),this.focusedDate=a.startOfDayLocal(I),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let i=(c=t.single)!=null?c:null;if(!e(i))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var g;let r=this.input;r&&(r.value=(g=this.inputValue)!=null?g:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=r.value.length;r.setSelectionRange(m,m)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.announceSelect(`${this.termEndSelected()}: ${c}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let d=this.input;d&&(d.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let g=d.value.length;d.setSelectionRange(g,g)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),b=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${b}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let c=this.input;c&&(c.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=c.value.length;c.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var b;let e=(b=this.firstDayOfWeek)!=null?b:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let c=0;c<6;c++){let d=[];for(let r=0;r<7;r++)d.push(new Date(u)),u.setDate(u.getDate()+1);l.push(d)}let f=c=>c.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&f(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=c=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(c,n,u),b=this.getTabTargetDayForCurrentView(t);return C`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-5-17-2-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-5-17-2-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-5-17-2-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-5-17-2-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-5-17-2-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-5-17-2-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-5-17-2-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-5-17-2-icon></button></div></div><sd-5-17-2-divider></sd-5-17-2-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((c,d)=>C`<div role="columnheader" aria-colindex="${d+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${c}" title="${c}" id="${"col-"+(d+1)}">${c}</div>`)}</div>${t.map((c,d)=>C`<div class="grid-row grid grid-cols-7 ${d===0?"mt-2":""}" role="row" aria-rowindex="${d+2}">${c.map((r,g)=>{let m=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r),M=a.isSameDay(r,this.focusedDate),I=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,L=this.range&&n?a.isSameDay(r,n):!1,p=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,F=-1,T=b&&a.isSameDay(r,b);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&M)&&(F=0);let O=this.isWeekend(r),Y=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=L?this.localize.term("startDateSelected"):p?this.localize.term("endDateSelected"):void 0;return C`<button type="button" part="day" class="${$("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",L||p?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",m?this.isInDisabledDates(r)?"out-month text-neutral-500":this.disabledWeekends&&O?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&O?"out-month weekend-day text-neutral-500":O?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",L?"bg-primary text-white rounded-l-md rounded-r-none":"",p?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!L&&!p?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!L&&!p?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",I&&!y&&!L&&!p&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"",M&&!I?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${g+1}" aria-labelledby="${"col-"+(g+1)}" .tabIndex="${F}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||L||p?"true":"false"}" aria-current="${I?"date":z}" aria-label="${Y}" aria-roledescription="${w!=null?w:z}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",l={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],f=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||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",b={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],c=this.size==="sm"?"text-sm":"text-base";return C`<div part="form-control" class="${$("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||i?C`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${$(e?"inline-block":"hidden",c)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?C`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${$("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${$("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",b,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}"></div><sd-5-17-2-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${$("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${$("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",f==="disabled"||f==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${$("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],c)}" autocomplete="off" spellcheck="false" placeholder="${this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder")}" ?disabled="${this.disabled}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?C`<sd-5-17-2-icon part="invalid-icon" class="${$("text-error",l,u)}" library="_internal" name="risk"></sd-5-17-2-icon>`:""} ${this.showValidStyle&&this.styleOnValid?C`<sd-5-17-2-icon class="${$("text-success flex-shrink-0",l,u)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-17-2-icon>`:""}<sd-5-17-2-icon class="${$(n,l,u,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-5-17-2-icon>${this.renderCalendar()}</div></sd-5-17-2-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${$("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};o.styles=[...R.styles,A`:host{display:inline-block;outline:2px solid transparent;outline-offset:2px;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({type:String})],o.prototype,"rangeStart",2),h([v({type:String})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String})],o.prototype,"min",2),h([v({type:String})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates"})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([B("#invalid-message")],o.prototype,"invalidMessage",2),h([B("#input")],o.prototype,"input",2),h([P("locale")],o.prototype,"handleLocaleChange",1),h([P("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([P("value")],o.prototype,"handleValueChange",1),h([P("rangeStart"),P("rangeEnd")],o.prototype,"handleRangeChange",1),h([P(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([H("sd-5-17-2-datepicker")],o);export{o as a};
|
|
1
|
+
import{a}from"./chunk.635MGLIZ.js";import{b as N}from"./chunk.NRBNWX7R.js";import{a as W}from"./chunk.CGQ2BPPZ.js";import{a as $}from"./chunk.YEDQWNIV.js";import{a as q}from"./chunk.L6MCOH7T.js";import{a as P}from"./chunk.E2DRD2OX.js";import{a as H,b as v,c as E,d as B,h as R}from"./chunk.WWJY5MSS.js";import{b as A,e as C,i as z}from"./chunk.RZUTJ36B.js";import{e as h}from"./chunk.TJOCV4DC.js";var o=class extends R{constructor(){super();this.localize=new q(this);this.hasSlotController=new W(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-5-17-3-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.disabled=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,b,c;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(b=t.inputType)==null?void 0:b.startsWith("delete");if(this.range){let d=s.replace(/\D/g,""),r=d.slice(0,8),g=d.slice(8,16),m=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(g),M;r.length===0?M="":r.length<8?M=m:g.length>0?M=`${m} - ${S}`:M=n?m:`${m} -`;let I=this.countDigitsBeforeCaret(s,i),y;if(I<=8){let p=this.digitIndexToDmyCaretPos(Math.min(I,8));y=Math.min(p,m.length)}else{let p=r.length<8?m.length:m.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);y=p+Math.min(x,S.length)}this.inputValue=M;let L=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(m)){let p=this.dmyToIso(m),D=p?a.parseLocalISO(p):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==p&&(this.rangeStart=p,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),L=!0)}else this.rangeStart&&(this.rangeStart=null,L=!0),this.rangeEnd&&(this.rangeEnd=null,L=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let p=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[T,O]=a.compareDates(p,x)<=0?[p,x]:[x,p],Y=a.isSameDay(T,O);if((this.allowSameDayRange||!Y)&&!this.wouldRangeContainDisabled(T,O)){let V=a.toLocalISODate(a.startOfDayLocal(T)),k=a.toLocalISODate(a.startOfDayLocal(O));(this.rangeStart!==V||this.rangeEnd!==k)&&(this.rangeStart=V,this.rangeEnd=k,this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=a.startOfDayLocal(O),L=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,L=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),L&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let p=(D=this.input)!=null?D:e;p&&(p.value=this.inputValue,p.setSelectionRange(y,y))})})}else{let d=e,r=d.value,g=(c=d.selectionStart)!=null?c:r.length,m=r.replace(/\D/g,"").slice(0,8),S=m.slice(0,2),M=m.slice(2,4),I=m.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),I.length>0&&S.length===2&&M.length===2&&(y+=I),y=y.replace(/\.\.+/g,".");let L=this.inputValue||"";this.inputValue=y;let p=g,D=w=>{let V=[];for(let k=0;k<w.length;k++)w[k]==="."&&V.push(k);return V},x=D(L),F=D(y),T=x.filter(w=>w<g).length,Y=F.filter(w=>w<g).length-T;if(Y>0?p+=Y:!x.includes(g)&&F.includes(g)&&(p+=1),p=Math.min(Math.max(0,p),y.length),requestAnimationFrame(()=>{var V;let w=(V=this.input)!=null?V:d;w&&(w.value=this.inputValue,w.setSelectionRange(p,p))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let d=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let d=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(d)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,b=f==null?void 0:f.querySelector("button.day.focused");b==null||b.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=this.parseISO(this.min!==null?String(this.min):null),s=this.parseISO(this.max!==null?String(this.max):null);return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=a.toLocalISODate(a.startOfDayLocal(t));return this.disabledDatesSet.has(e)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(!e)return"";let s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",b=u?this.dmyToIso(u):null,c=f?this.dmyToIso(f):null;return u&&!b?{start:null,end:null,valid:!1}:f&&!c?{start:null,end:null,valid:!1}:{start:b,end:c,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,b,c;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let r=a.parseLocalISO(d);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let d=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(d)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let g=d?a.parseLocalISO(d):null,m=r?a.parseLocalISO(r):null;if(g&&m){if(a.compareDates(g,m)>0){let I=g;g=m,m=I}if(!this.allowSameDayRange&&a.isSameDay(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=g?a.toLocalISODate(a.startOfDayLocal(g)):null,M=m?a.toLocalISODate(a.startOfDayLocal(m)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let I=(b=g!=null?g:m)!=null?b:this.today;this.viewMonth=new Date(I.getFullYear(),I.getMonth(),1),this.focusedDate=a.startOfDayLocal(I),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let i=(c=t.single)!=null?c:null;if(!e(i))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var g;let r=this.input;r&&(r.value=(g=this.inputValue)!=null?g:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=r.value.length;r.setSelectionRange(m,m)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.announceSelect(`${this.termEndSelected()}: ${c}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let d=this.input;d&&(d.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let g=d.value.length;d.setSelectionRange(g,g)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),b=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${b}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let c=this.input;c&&(c.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=c.value.length;c.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var b;let e=(b=this.firstDayOfWeek)!=null?b:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let c=0;c<6;c++){let d=[];for(let r=0;r<7;r++)d.push(new Date(u)),u.setDate(u.getDate()+1);l.push(d)}let f=c=>c.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&f(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=c=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(c,n,u),b=this.getTabTargetDayForCurrentView(t);return C`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-5-17-3-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-5-17-3-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-5-17-3-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-5-17-3-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-5-17-3-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-5-17-3-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-5-17-3-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-5-17-3-icon></button></div></div><sd-5-17-3-divider></sd-5-17-3-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((c,d)=>C`<div role="columnheader" aria-colindex="${d+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${c}" title="${c}" id="${"col-"+(d+1)}">${c}</div>`)}</div>${t.map((c,d)=>C`<div class="grid-row grid grid-cols-7 ${d===0?"mt-2":""}" role="row" aria-rowindex="${d+2}">${c.map((r,g)=>{let m=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r),M=a.isSameDay(r,this.focusedDate),I=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,L=this.range&&n?a.isSameDay(r,n):!1,p=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,F=-1,T=b&&a.isSameDay(r,b);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&M)&&(F=0);let O=this.isWeekend(r),Y=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=L?this.localize.term("startDateSelected"):p?this.localize.term("endDateSelected"):void 0;return C`<button type="button" part="day" class="${$("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",L||p?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",m?this.isInDisabledDates(r)?"out-month text-neutral-500":this.disabledWeekends&&O?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&O?"out-month weekend-day text-neutral-500":O?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",L?"bg-primary text-white rounded-l-md rounded-r-none":"",p?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!L&&!p?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!L&&!p?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",I&&!y&&!L&&!p&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"",M&&!I?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${g+1}" aria-labelledby="${"col-"+(g+1)}" .tabIndex="${F}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||L||p?"true":"false"}" aria-current="${I?"date":z}" aria-label="${Y}" aria-roledescription="${w!=null?w:z}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",l={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],f=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||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",b={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],c=this.size==="sm"?"text-sm":"text-base";return C`<div part="form-control" class="${$("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||i?C`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${$(e?"inline-block":"hidden",c)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?C`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${$("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${$("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",b,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}"></div><sd-5-17-3-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${$("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${$("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",f==="disabled"||f==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${$("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],c)}" autocomplete="off" spellcheck="false" placeholder="${this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder")}" ?disabled="${this.disabled}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?C`<sd-5-17-3-icon part="invalid-icon" class="${$("text-error",l,u)}" library="_internal" name="risk"></sd-5-17-3-icon>`:""} ${this.showValidStyle&&this.styleOnValid?C`<sd-5-17-3-icon class="${$("text-success flex-shrink-0",l,u)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-17-3-icon>`:""}<sd-5-17-3-icon class="${$(n,l,u,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-5-17-3-icon>${this.renderCalendar()}</div></sd-5-17-3-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${$("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};o.styles=[...R.styles,A`:host{display:inline-block;outline:2px solid transparent;outline-offset:2px;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({type:String})],o.prototype,"rangeStart",2),h([v({type:String})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String})],o.prototype,"min",2),h([v({type:String})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates"})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([B("#invalid-message")],o.prototype,"invalidMessage",2),h([B("#input")],o.prototype,"input",2),h([P("locale")],o.prototype,"handleLocaleChange",1),h([P("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([P("value")],o.prototype,"handleValueChange",1),h([P("rangeStart"),P("rangeEnd")],o.prototype,"handleRangeChange",1),h([P(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([H("sd-5-17-3-datepicker")],o);export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.
|
|
1
|
+
import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.WWJY5MSS.js";import{b as l,e as c}from"./chunk.RZUTJ36B.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await n(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return c`<slot></slot>`}};t.styles=[...a.styles,l`:host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-5-17-3-include")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"./chunk.LIO6LMTQ.js";import{a as b}from"./chunk.EJI65G6N.js";import{b as m}from"./chunk.NRBNWX7R.js";import{a as p}from"./chunk.CHU57RUD.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as h,b as r,c,d as s,h as o}from"./chunk.
|
|
1
|
+
import{a as d}from"./chunk.LIO6LMTQ.js";import{a as b}from"./chunk.EJI65G6N.js";import{b as m}from"./chunk.NRBNWX7R.js";import{a as p}from"./chunk.CHU57RUD.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as h,b as r,c,d as s,h as o}from"./chunk.WWJY5MSS.js";import{b as u,e as a}from"./chunk.RZUTJ36B.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.formControlController=new m(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,f)=>e.checked=f});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(e){if(this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let e=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",e?"true":"false"),this.formControlController.setValidity(e)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return a`<label part="base" class="${l("sd-5-17-3-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${p(this.value)}" .indeterminate="${d(this.indeterminate)}" .checked="${d(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${l("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[e])}"><div class="${l("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${l("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[e])}"></div></div>${this.checked?a`<sd-5-17-3-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-5-17-3-icon>`:""} ${!this.checked&&this.indeterminate?a`<sd-5-17-3-icon part="indeterminate-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-minus"></sd-5-17-3-icon>`:""} </span><span part="label" id="label" class="${l("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};t.styles=[...o.styles,u`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],i([s('input[type="checkbox"]')],t.prototype,"input",2),i([s("#invalid-message")],t.prototype,"invalidMessage",2),i([r({type:String,reflect:!0})],t.prototype,"title",2),i([r({type:String,reflect:!0})],t.prototype,"name",2),i([r()],t.prototype,"value",2),i([r({type:String,reflect:!0})],t.prototype,"size",2),i([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([r({type:Boolean,reflect:!0})],t.prototype,"checked",2),i([r({type:Boolean,reflect:!0})],t.prototype,"indeterminate",2),i([b("checked")],t.prototype,"defaultChecked",2),i([r({type:String,reflect:!0})],t.prototype,"form",2),i([r({type:Boolean,reflect:!0})],t.prototype,"required",2),i([c()],t.prototype,"showInvalidStyle",2),i([n(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([n(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],t.prototype,"handleStateChange",1),t=i([h("sd-5-17-3-checkbox")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.YEDQWNIV.js";import{a as b}from"./chunk.L6MCOH7T.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as c,b as r,d as s,h as n}from"./chunk.
|
|
1
|
+
import{a as u}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.YEDQWNIV.js";import{a as b}from"./chunk.L6MCOH7T.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as c,b as r,d as s,h as n}from"./chunk.WWJY5MSS.js";import{b as d,e as o}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var v=0,t=class extends n{constructor(){super(...arguments);this.attrId=++v;this.componentId=`sd-5-17-3-tab-${this.attrId}`;this.hasSlotController=new u(this,"left");this.localize=new b(this);this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let i=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",i?"true":"false")}focus(i){this.tab.focus(i)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let i={left:this.hasSlotController.test("left")};return o`<div part="base" class="${a("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative","focus-visible:focus-outline outline-2 !-outline-offset-2 transition-all duration-fast ease-in-out",this.variant==="container"&&"tab-container-border bg-white rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200",this.active&&"z-20")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${a("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${a(i.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot>${this.variant==="container"?o`<div part="active-tab-indicator" class="${a("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-full")}"></div>`:""}<div part="hover-bottom-border" class="${a(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b border-transparent group-hover:border-b-neutral-400 transition-[border] duration-fast ease-in-out")}"></div></div></div>`}};t.styles=[...n.styles,d`:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){--tw-border-opacity:1;border-bottom-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1))}.tab-container-border:after{border-color:transparent;border-width:1px;--tw-content:""}.tab--active-container-border:after,.tab-container-border:after{content:var(--tw-content);height:100%;position:absolute;width:100%}.tab--active-container-border:after{border-width:1px;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-content:"";border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],e([s("[part=base]")],t.prototype,"tab",2),e([s("[part=active-tab-indicator]")],t.prototype,"currentIndicator",2),e([r({type:String,reflect:!0})],t.prototype,"variant",2),e([r({type:Boolean,reflect:!0})],t.prototype,"active",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([r({type:String,reflect:!0})],t.prototype,"panel",2),e([l("active")],t.prototype,"handleActiveChange",1),e([l(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([c("sd-5-17-3-tab")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p}from"./chunk.RZUTJ36B.js";import{a as l,b as m}from"./chunk.TJOCV4DC.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-5-17-
|
|
1
|
+
import{e as p}from"./chunk.RZUTJ36B.js";import{a as l,b as m}from"./chunk.TJOCV4DC.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-5-17-3-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-5-17-3-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-5-17-3-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(){return p`<div id="invalid-message" class="text-error text-sm mt-1 text-left" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as x}from"./chunk.L6MCOH7T.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.
|
|
1
|
+
import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as x}from"./chunk.L6MCOH7T.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.WWJY5MSS.js";import{b as g,e as r}from"./chunk.RZUTJ36B.js";import{b as p,c as l,e as u}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.localize=new x(this);this.hasSlotController=new k(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(e){if(!e)return;e.assignedNodes({flatten:!0}).forEach(s=>{var w,y;s.nodeType===Node.TEXT_NODE&&!((w=s==null?void 0:s.textContent)!=null&&w.trim())&&((y=s==null?void 0:s.parentNode)==null||y.removeChild(s))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await u(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:e,options:a}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:e,options:a}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,v(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),v(this,"sd-after-hide")}render(){let e=this.placement.endsWith("-start"),a=this.placement.endsWith("-end");return r`<sd-5-17-3-popup part="base" exportparts="
|
|
2
2
|
popup:base__popup,
|
|
3
3
|
arrow:base__arrow
|
|
4
|
-
" class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-5-17-
|
|
4
|
+
" class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-5-17-3-icon library="_internal" name="info-circle" label="Tooltip" class="${d(this.disabled&&"sd-interactive--disabled")}"></sd-5-17-3-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-5-17-3-popup>`}};t.styles=[...c.styles,g`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-5-17-3-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-5-17-3-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-17-3-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-17-3-popup[placement^=top]::part(popup){transform-origin:bottom}sd-5-17-3-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-5-17-3-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-5-17-3-tooltip")],t);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk.CHU57RUD.js";import{a as h,c as p}from"./chunk.SKUMYG4O.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as o}from"./chunk.YEDQWNIV.js";import{a as y}from"./chunk.L6MCOH7T.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as f,b as a,d as n,h as c}from"./chunk.
|
|
1
|
+
import{a as b}from"./chunk.CHU57RUD.js";import{a as h,c as p}from"./chunk.SKUMYG4O.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as o}from"./chunk.YEDQWNIV.js";import{a as y}from"./chunk.L6MCOH7T.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as f,b as a,d as n,h as c}from"./chunk.WWJY5MSS.js";import{b as g,e as u}from"./chunk.RZUTJ36B.js";import{b as r,e as l,f as d}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new y(this)}updateMaxHeight(){var s;let e=(s=this.contentPreview)==null?void 0:s.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${e}px`),this.style.setProperty("--max-height",e)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await l(this.body);let{keyframes:e,options:s}=p(this,"expandable.show",{dir:this.localize.dir()});await r(this.body,d(e,this.body.scrollHeight),s),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await l(this.body);let{keyframes:e,options:s}=p(this,"expandable.hide",{dir:this.localize.dir()});await r(this.body,d(e,this.body.scrollHeight),s),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),m(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),m(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${o("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${o("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${o("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${o(this.open&&"hidden")}"><sd-5-17-3-icon library="_internal" name="chevron-down" class="text-xl"></sd-5-17-3-icon></slot><slot name="collapse-icon" class="${o(!this.open&&"hidden")}"><sd-5-17-3-icon library="_internal" name="chevron-down" class="text-xl"></sd-5-17-3-icon></slot></span><slot name="toggle-closed" class="${o(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${o(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${b(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let e=document.createElement("div");e.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(x=>{let w=x.cloneNode(!0);e.appendChild(w)}),this.appendChild(e)}};t.styles=[...c.styles,g`:host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start,hsla(0,0%,100%,0)) 0%,var(--gradient-color-end,#fff) 80%,var(--gradient-color-end,#fff) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);position:absolute;transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb),0);--gradient-color-end:rgba(var(--color-primary-rgb),1)}:host([inverted]) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content:after{opacity:var(--sd-opacity-100,1)}`],i([n(".content-preview")],t.prototype,"contentPreview",2),i([n("details")],t.prototype,"details",2),i([n('[part="content"]')],t.prototype,"body",2),i([a({type:Boolean,reflect:!0})],t.prototype,"open",2),i([a({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"onOpenChange",1),t=i([f("sd-5-17-3-expandable")],t);h("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});h("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunk.BJBQEPZV.js";import{a as T}from"./chunk.C577EOP7.js";import{a as _}from"./chunk.2D3B6W4C.js";import{a as C}from"./chunk.CBQWVOOS.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as M}from"./chunk.L6MCOH7T.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as E,b as p,c as b,d as f,e as $,h as S}from"./chunk.M6XINJ52.js";import{b as x,e as m}from"./chunk.RZUTJ36B.js";import{d as A}from"./chunk.6OTM3PE5.js";import{e as o}from"./chunk.TJOCV4DC.js";function I(u,d,e){let i=t=>Object.is(t,-0)?0:t;return u<d?i(d):u>e?i(e):i(u)}function*B(u,d){if(u!==void 0){let e=0;for(let i of u)yield d(i,e++)}}function*L(u,d,e=1){let i=d===void 0?0:u;d!=null||(d=u);for(let t=i;e>0?t<d:d<t;t+=e)yield t}var r=class extends S{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new C(this,()=>this.next());this.scrollController=new T(this);this.slides=this.getElementsByTagName("sd-5-17-2-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new M(this);this.userInteracted=!1;this.fadeController=new k(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>_.isCarouselItem(s)&&!s.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(e,i)=>{e.detail&&i.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(i=>this.addEventListener(i,this.handleUserInteraction));let e=new IntersectionObserver(i=>{i.forEach(t=>{this.intersectionObserverEntries.set(t.target,t);let s=t.target;s.toggleAttribute("inert",!t.isIntersecting),s.classList.toggle("--in-view",t.isIntersecting),s.setAttribute("aria-hidden",t.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=e,e.takeRecords().forEach(i=>{this.intersectionObserverEntries.set(i.target,i)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(e=>this.removeEventListener(e,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let i=this.getSlides({excludeClones:!1});return i.length>0&&i[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let i=new IntersectionObserver(t=>{t.forEach(s=>{s.isIntersecting&&s.target.getBoundingClientRect().width>0&&(this.initializeSlides(),i.disconnect())})});i.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(e,i,t){return Math.ceil((e-i)/t)+1>0?Math.ceil((e-i)/t)+1:1}getCurrentPage(e,i,t,s){return Math.ceil((e-t)/s)-Math.ceil((e-t-i)/s)+1}getSlides({excludeClones:e=!0}={}){return[...this.slides].filter(i=>!e||!i.hasAttribute("data-clone"))}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){let i=e.target,t=this.localize.dir()==="rtl",s=i.closest('[part~="pagination-item"]')!==null,n=e.key==="ArrowDown"||!t&&e.key==="ArrowRight"||t&&e.key==="ArrowLeft",h=e.key==="ArrowUp"||!t&&e.key==="ArrowLeft"||t&&e.key==="ArrowRight";e.preventDefault(),h&&this.previous(),n&&this.next(),e.key==="Home"&&this.goToSlide(0),e.key==="End"&&this.goToSlide(this.getSlides().length-1),s&&this.updateComplete.then(()=>{var a;let c=(a=this.shadowRoot)==null?void 0:a.querySelector('[part~="pagination-item--active"]');c&&c.focus()})}}handleScrollEnd(){if(this.fade)return;let e=this.getSlides(),t=[...this.intersectionObserverEntries.values()].find(s=>s.isIntersecting);if(this.loop&&(t!=null&&t.target.hasAttribute("data-clone"))){let s=Number(t.target.getAttribute("data-clone"));this.goToSlide(s,"auto");return}t&&(this.activeSlide=e.indexOf(t.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var e,i;this.pausedAutoplay?(this.autoplayController.stop(),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(i=this.autoplayControls)==null||i.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let e=this.getSlides(),i=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((t,s)=>{i.unobserve(t),t.classList.remove("--in-view"),t.classList.remove("--is-active"),t.setAttribute("aria-label",this.localize.term("slideNum",s+1,e.length)),t.hasAttribute("data-clone")&&t.remove()}),this.loop&&!this.fade){let t=this.slidesPerPage,s=e.slice(-t),n=e.slice(0,t);s.reverse().forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(e.length-c-1)),this.prepend(a)}),n.forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(c)),this.append(a)})}this.getSlides({excludeClones:!1}).forEach(t=>{i.observe(t)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let e=this.getSlides();e.forEach((s,n)=>{s.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let i=this.getCurrentPage(e.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==i&&(this.currentPage=i),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}});let t=this.getPageCount(e.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>t&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let e=this.getSlides({excludeClones:!1}),i=this.slidesPerMove;e.forEach((t,s)=>{Math.abs(s-i)%i===0?t.style.removeProperty("scroll-snap-align"):t.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(e="smooth"){if(this.fade){let s=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(s);return}let i=this.activeSlide||this.activeSlide-this.slidesPerMove,t=!1;for(;!t&&i>0;)i-=1,t=Math.abs(i-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,e):this.goToSlide(i,e)}next(e="smooth"){if(this.fade){let i=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(i);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,e):this.loop&&this.nextTillFirst(e)}nextTillFirst(e="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,e);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(e,i="smooth"){let{slidesPerPage:t,loop:s,scrollContainer:n,fade:h}=this,c=this.getSlides(),a=this.getSlides({excludeClones:!1}),v=(e+c.length)%c.length;if(this.activeSlide=v,h)return;let y=I(e+(s?t:0),0,a.length+1),O=a[y],w=n.getBoundingClientRect(),P=O.getBoundingClientRect();if(n.scrollTo({left:P.left-w.left+n.scrollLeft,top:P.top-w.top+n.scrollTop,behavior:A()?"auto":i}),this.userInteracted&&!this.loop){let z=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,H=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):H&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:e,slidesPerMove:i}=this,t=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),s=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||s>1,h=this.loop||s<t,c=this.localize.dir()==="ltr";return m`<div part="base" class="${l("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${l("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(a=>!a.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${l("w-full flex items-center justify-center relative")}"><div part="navigation" class="${l("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${l("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-5-17-2-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-down":"chevron-up"}"></sd-5-17-2-icon></slot></button> ${this.variant==="dot"?m`<div part="pagination-dot" role="tablist" class="${l("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${B(L(t),a=>{let v=a+1===s;return m`<button part="pagination-item ${v?"pagination-item--active":""}" class="${l("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",v?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${v?"true":"false"}" aria-label="${this.localize.term("goToSlide",a+1,t)}" @click="${y=>{this.goToSlide(a*i),this.unblockAutoplay(y,this.paginationItems[a])}}" @keydown="${this.handleKeyDown}"><span class="${l("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",v&&"bg-accent border-none",v?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:m`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${l("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${s}</span> <span part="pagination-divider" class="${l("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${l("w-5 text-center",this.inverted?"text-white":"text-black")}">${t}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!h}" class="${l("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!h&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${h?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${h?a=>{this.next(),this.unblockAutoplay(a,this.nextButton)}:null}"><slot name="next-icon"><sd-5-17-2-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-up":"chevron-down"}"></sd-5-17-2-icon></slot></button></div><button class="${l("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${a=>{this.pausedAutoplay=!this.pausedAutoplay,a.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${l(this.pausedAutoplay?"":"hidden")}"><sd-5-17-2-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-5-17-2-icon></slot><slot name="autoplay-pause" class="${l(this.pausedAutoplay?"hidden":"")}"><sd-5-17-2-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-5-17-2-icon></slot></button></div></div>`}};r.styles=[...S.styles,x`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-5-17-2-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],o([f('[part~="autoplay-controls"]')],r.prototype,"autoplayControls",2),o([f('[part~="navigation-button--previous"]')],r.prototype,"previousButton",2),o([f('[part~="navigation-button--next"]')],r.prototype,"nextButton",2),o([$('[part~="pagination-item"]')],r.prototype,"paginationItems",2),o([p({type:String,reflect:!0})],r.prototype,"variant",2),o([p({type:Boolean,reflect:!0})],r.prototype,"inverted",2),o([p({type:Boolean,reflect:!0})],r.prototype,"loop",2),o([p({type:Boolean,reflect:!0})],r.prototype,"autoplay",2),o([p({type:Boolean,reflect:!0})],r.prototype,"fade",2),o([p({type:Number,attribute:"slides-per-page",reflect:!0})],r.prototype,"slidesPerPage",2),o([p({type:Number,attribute:"slides-per-move",reflect:!0})],r.prototype,"slidesPerMove",2),o([f("slot:not([name])")],r.prototype,"defaultSlot",2),o([f(".carousel__slides")],r.prototype,"scrollContainer",2),o([f(".carousel__pagination")],r.prototype,"paginationContainer",2),o([b()],r.prototype,"activeSlide",2),o([b()],r.prototype,"currentPage",2),o([b()],r.prototype,"pausedAutoplay",2),o([g("pausedAutoplay")],r.prototype,"handlePausedAutoplay",1),o([g("fade",{waitUntilFirstUpdate:!0})],r.prototype,"handleFadeChange",1),o([g("loop",{waitUntilFirstUpdate:!0}),g("slidesPerPage",{waitUntilFirstUpdate:!0})],r.prototype,"initializeSlides",1),o([g("activeSlide")],r.prototype,"handleSlideChange",1),o([g("slidesPerMove")],r.prototype,"handleSlidesPerMoveChange",1),o([g("autoplay")],r.prototype,"handleAutoplayChange",1),r=o([E("sd-5-17-2-carousel")],r);export{r as a};
|
|
1
|
+
import{a as k}from"./chunk.BJBQEPZV.js";import{a as T}from"./chunk.C577EOP7.js";import{a as _}from"./chunk.U46CUDX6.js";import{a as C}from"./chunk.CBQWVOOS.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as M}from"./chunk.L6MCOH7T.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as E,b as p,c as b,d as f,e as $,h as S}from"./chunk.WWJY5MSS.js";import{b as x,e as m}from"./chunk.RZUTJ36B.js";import{d as A}from"./chunk.6OTM3PE5.js";import{e as o}from"./chunk.TJOCV4DC.js";function I(u,d,e){let i=t=>Object.is(t,-0)?0:t;return u<d?i(d):u>e?i(e):i(u)}function*B(u,d){if(u!==void 0){let e=0;for(let i of u)yield d(i,e++)}}function*L(u,d,e=1){let i=d===void 0?0:u;d!=null||(d=u);for(let t=i;e>0?t<d:d<t;t+=e)yield t}var r=class extends S{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new C(this,()=>this.next());this.scrollController=new T(this);this.slides=this.getElementsByTagName("sd-5-17-3-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new M(this);this.userInteracted=!1;this.fadeController=new k(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>_.isCarouselItem(s)&&!s.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(e,i)=>{e.detail&&i.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(i=>this.addEventListener(i,this.handleUserInteraction));let e=new IntersectionObserver(i=>{i.forEach(t=>{this.intersectionObserverEntries.set(t.target,t);let s=t.target;s.toggleAttribute("inert",!t.isIntersecting),s.classList.toggle("--in-view",t.isIntersecting),s.setAttribute("aria-hidden",t.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=e,e.takeRecords().forEach(i=>{this.intersectionObserverEntries.set(i.target,i)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(e=>this.removeEventListener(e,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let i=this.getSlides({excludeClones:!1});return i.length>0&&i[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let i=new IntersectionObserver(t=>{t.forEach(s=>{s.isIntersecting&&s.target.getBoundingClientRect().width>0&&(this.initializeSlides(),i.disconnect())})});i.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(e,i,t){return Math.ceil((e-i)/t)+1>0?Math.ceil((e-i)/t)+1:1}getCurrentPage(e,i,t,s){return Math.ceil((e-t)/s)-Math.ceil((e-t-i)/s)+1}getSlides({excludeClones:e=!0}={}){return[...this.slides].filter(i=>!e||!i.hasAttribute("data-clone"))}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){let i=e.target,t=this.localize.dir()==="rtl",s=i.closest('[part~="pagination-item"]')!==null,n=e.key==="ArrowDown"||!t&&e.key==="ArrowRight"||t&&e.key==="ArrowLeft",h=e.key==="ArrowUp"||!t&&e.key==="ArrowLeft"||t&&e.key==="ArrowRight";e.preventDefault(),h&&this.previous(),n&&this.next(),e.key==="Home"&&this.goToSlide(0),e.key==="End"&&this.goToSlide(this.getSlides().length-1),s&&this.updateComplete.then(()=>{var a;let c=(a=this.shadowRoot)==null?void 0:a.querySelector('[part~="pagination-item--active"]');c&&c.focus()})}}handleScrollEnd(){if(this.fade)return;let e=this.getSlides(),t=[...this.intersectionObserverEntries.values()].find(s=>s.isIntersecting);if(this.loop&&(t!=null&&t.target.hasAttribute("data-clone"))){let s=Number(t.target.getAttribute("data-clone"));this.goToSlide(s,"auto");return}t&&(this.activeSlide=e.indexOf(t.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var e,i;this.pausedAutoplay?(this.autoplayController.stop(),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(i=this.autoplayControls)==null||i.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let e=this.getSlides(),i=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((t,s)=>{i.unobserve(t),t.classList.remove("--in-view"),t.classList.remove("--is-active"),t.setAttribute("aria-label",this.localize.term("slideNum",s+1,e.length)),t.hasAttribute("data-clone")&&t.remove()}),this.loop&&!this.fade){let t=this.slidesPerPage,s=e.slice(-t),n=e.slice(0,t);s.reverse().forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(e.length-c-1)),this.prepend(a)}),n.forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(c)),this.append(a)})}this.getSlides({excludeClones:!1}).forEach(t=>{i.observe(t)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let e=this.getSlides();e.forEach((s,n)=>{s.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let i=this.getCurrentPage(e.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==i&&(this.currentPage=i),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}});let t=this.getPageCount(e.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>t&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let e=this.getSlides({excludeClones:!1}),i=this.slidesPerMove;e.forEach((t,s)=>{Math.abs(s-i)%i===0?t.style.removeProperty("scroll-snap-align"):t.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(e="smooth"){if(this.fade){let s=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(s);return}let i=this.activeSlide||this.activeSlide-this.slidesPerMove,t=!1;for(;!t&&i>0;)i-=1,t=Math.abs(i-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,e):this.goToSlide(i,e)}next(e="smooth"){if(this.fade){let i=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(i);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,e):this.loop&&this.nextTillFirst(e)}nextTillFirst(e="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,e);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(e,i="smooth"){let{slidesPerPage:t,loop:s,scrollContainer:n,fade:h}=this,c=this.getSlides(),a=this.getSlides({excludeClones:!1}),v=(e+c.length)%c.length;if(this.activeSlide=v,h)return;let y=I(e+(s?t:0),0,a.length+1),O=a[y],w=n.getBoundingClientRect(),P=O.getBoundingClientRect();if(n.scrollTo({left:P.left-w.left+n.scrollLeft,top:P.top-w.top+n.scrollTop,behavior:A()?"auto":i}),this.userInteracted&&!this.loop){let z=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,H=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):H&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:e,slidesPerMove:i}=this,t=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),s=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||s>1,h=this.loop||s<t,c=this.localize.dir()==="ltr";return m`<div part="base" class="${l("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${l("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(a=>!a.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${l("w-full flex items-center justify-center relative")}"><div part="navigation" class="${l("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${l("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-5-17-3-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-down":"chevron-up"}"></sd-5-17-3-icon></slot></button> ${this.variant==="dot"?m`<div part="pagination-dot" role="tablist" class="${l("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${B(L(t),a=>{let v=a+1===s;return m`<button part="pagination-item ${v?"pagination-item--active":""}" class="${l("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",v?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${v?"true":"false"}" aria-label="${this.localize.term("goToSlide",a+1,t)}" @click="${y=>{this.goToSlide(a*i),this.unblockAutoplay(y,this.paginationItems[a])}}" @keydown="${this.handleKeyDown}"><span class="${l("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",v&&"bg-accent border-none",v?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:m`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${l("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${s}</span> <span part="pagination-divider" class="${l("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${l("w-5 text-center",this.inverted?"text-white":"text-black")}">${t}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!h}" class="${l("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!h&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${h?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${h?a=>{this.next(),this.unblockAutoplay(a,this.nextButton)}:null}"><slot name="next-icon"><sd-5-17-3-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-up":"chevron-down"}"></sd-5-17-3-icon></slot></button></div><button class="${l("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${a=>{this.pausedAutoplay=!this.pausedAutoplay,a.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${l(this.pausedAutoplay?"":"hidden")}"><sd-5-17-3-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-5-17-3-icon></slot><slot name="autoplay-pause" class="${l(this.pausedAutoplay?"hidden":"")}"><sd-5-17-3-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-5-17-3-icon></slot></button></div></div>`}};r.styles=[...S.styles,x`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-5-17-3-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],o([f('[part~="autoplay-controls"]')],r.prototype,"autoplayControls",2),o([f('[part~="navigation-button--previous"]')],r.prototype,"previousButton",2),o([f('[part~="navigation-button--next"]')],r.prototype,"nextButton",2),o([$('[part~="pagination-item"]')],r.prototype,"paginationItems",2),o([p({type:String,reflect:!0})],r.prototype,"variant",2),o([p({type:Boolean,reflect:!0})],r.prototype,"inverted",2),o([p({type:Boolean,reflect:!0})],r.prototype,"loop",2),o([p({type:Boolean,reflect:!0})],r.prototype,"autoplay",2),o([p({type:Boolean,reflect:!0})],r.prototype,"fade",2),o([p({type:Number,attribute:"slides-per-page",reflect:!0})],r.prototype,"slidesPerPage",2),o([p({type:Number,attribute:"slides-per-move",reflect:!0})],r.prototype,"slidesPerMove",2),o([f("slot:not([name])")],r.prototype,"defaultSlot",2),o([f(".carousel__slides")],r.prototype,"scrollContainer",2),o([f(".carousel__pagination")],r.prototype,"paginationContainer",2),o([b()],r.prototype,"activeSlide",2),o([b()],r.prototype,"currentPage",2),o([b()],r.prototype,"pausedAutoplay",2),o([g("pausedAutoplay")],r.prototype,"handlePausedAutoplay",1),o([g("fade",{waitUntilFirstUpdate:!0})],r.prototype,"handleFadeChange",1),o([g("loop",{waitUntilFirstUpdate:!0}),g("slidesPerPage",{waitUntilFirstUpdate:!0})],r.prototype,"initializeSlides",1),o([g("activeSlide")],r.prototype,"handleSlideChange",1),o([g("slidesPerMove")],r.prototype,"handleSlidesPerMoveChange",1),o([g("autoplay")],r.prototype,"handleAutoplayChange",1),r=o([E("sd-5-17-3-carousel")],r);export{r as a};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
lit-html/directives/map.js:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk.MHWW3RZB.js";import{a as s,b as n,d as o,h as a}from"./chunk.
|
|
1
|
+
import{a as l}from"./chunk.MHWW3RZB.js";import{a as s,b as n,d as o,h as a}from"./chunk.WWJY5MSS.js";import{b as r,e as d}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return d`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};e.styles=[...a.styles,r`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],t([n({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([o("header")],e.prototype,"header",2),t([l(100)],e.prototype,"updateCalculatedHeight",1),e=t([s("sd-5-17-3-header")],e);export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk.YEDQWNIV.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as o,b as a,h as i}from"./chunk.
|
|
1
|
+
import{a as p}from"./chunk.YEDQWNIV.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as o,b as a,h as i}from"./chunk.WWJY5MSS.js";import{b as r,e as s}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var c=0,t=class extends i{constructor(){super(...arguments);this.attrId=++c;this.componentId=`sd-5-17-3-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return s`<slot part="base" class="${p("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...i.styles,r`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([a({type:String,reflect:!0})],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-5-17-3-tab-panel")],t);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk.I2H6CZK5.js";import{a as A}from"./chunk.2AQOPKKH.js";import{a as z}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.SKUMYG4O.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.YEDQWNIV.js";import{a as C}from"./chunk.L6MCOH7T.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as x,b as r,d as c,h as b}from"./chunk.
|
|
1
|
+
import{a as g}from"./chunk.I2H6CZK5.js";import{a as A}from"./chunk.2AQOPKKH.js";import{a as z}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.SKUMYG4O.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.YEDQWNIV.js";import{a as C}from"./chunk.L6MCOH7T.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as x,b as r,d as c,h as b}from"./chunk.WWJY5MSS.js";import{b as k,e as u}from"./chunk.RZUTJ36B.js";import{b as n,e as h}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new A(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=z(),this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let d=l(this,`drawer.show${g(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${g(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-5-17-3-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-5-17-3-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-17-3-icon></sd-5-17-3-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-5-17-3-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-5-17-3-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-17-3-icon></sd-5-17-3-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${p(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};t.styles=[...b.styles,k`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-5-17-3-drawer")],t);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});export{t as a};
|