@solid-design-system/components 6.27.2 → 6.28.0
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-versioned/chunks/chunk.XCUN24EM.js → cdn/chunks/chunk.NYJUQAML.js} +1 -1
- package/cdn/chunks/chunk.U7TS5SGA.js +1 -0
- package/cdn/chunks/{chunk.ZWU3HKO7.js → chunk.Z3VLKLQI.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn/components/carousel/carousel.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/drawer/drawer.js +1 -1
- package/cdn/components/expandable/expandable.js +1 -1
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/icon/icon.js +1 -1
- package/cdn/components/icon/library.js +1 -1
- package/cdn/components/icon/library.multi-theming.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/option/option.js +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/range/range.js +1 -1
- package/cdn/components/scrollable/scrollable.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/tag/tag.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 +1 -1
- package/cdn/solid-components.bundle.js +1 -1
- package/cdn/solid-components.iife.js +1 -1
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/icon-library.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2NOYGNXE.js +2 -2
- package/cdn-versioned/chunks/chunk.2SYX234H.js +2 -2
- package/cdn-versioned/chunks/chunk.2U4TAJUC.js +2 -2
- package/cdn-versioned/chunks/chunk.3JIMAV3K.js +2 -2
- package/cdn-versioned/chunks/chunk.5HUX5VFB.js +2 -2
- package/cdn-versioned/chunks/chunk.5X5JRXZK.js +2 -2
- package/cdn-versioned/chunks/chunk.7QOVVO7A.js +2 -2
- package/cdn-versioned/chunks/chunk.7SNWTFKD.js +9 -9
- package/cdn-versioned/chunks/chunk.7ZVQLLM7.js +2 -2
- package/cdn-versioned/chunks/chunk.A7OKDFGO.js +2 -2
- package/cdn-versioned/chunks/chunk.AO6SNRNL.js +2 -2
- package/cdn-versioned/chunks/chunk.AOLUHUSF.js +2 -2
- package/cdn-versioned/chunks/chunk.AVVZHYFS.js +3 -3
- package/cdn-versioned/chunks/chunk.BCJZHMRU.js +2 -2
- package/cdn-versioned/chunks/chunk.BJ6LURC2.js +2 -2
- package/cdn-versioned/chunks/chunk.BTWK37K2.js +2 -2
- package/cdn-versioned/chunks/chunk.DJ527NKP.js +2 -2
- package/cdn-versioned/chunks/chunk.DLSBHX3L.js +2 -2
- package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
- package/cdn-versioned/chunks/chunk.DUAVYRMV.js +2 -2
- package/cdn-versioned/chunks/chunk.E3RBLJOD.js +2 -2
- package/cdn-versioned/chunks/chunk.ENGQY5PQ.js +1 -1
- package/cdn-versioned/chunks/chunk.FIN34FFZ.js +2 -2
- package/cdn-versioned/chunks/chunk.FUONGVWC.js +2 -2
- package/cdn-versioned/chunks/chunk.GANINSPD.js +1 -1
- package/cdn-versioned/chunks/chunk.GAWWLECF.js +2 -2
- package/cdn-versioned/chunks/chunk.GJHFXIDQ.js +2 -2
- package/cdn-versioned/chunks/chunk.HQVTWWED.js +2 -2
- package/cdn-versioned/chunks/chunk.J7HKJOBT.js +1 -1
- package/cdn-versioned/chunks/chunk.KBNYCL2A.js +2 -2
- package/cdn-versioned/chunks/chunk.KDUC23NC.js +2 -2
- package/cdn-versioned/chunks/chunk.L7ERUBEO.js +2 -2
- package/cdn-versioned/chunks/chunk.LS7DRXQL.js +2 -2
- package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
- package/cdn-versioned/chunks/chunk.MINBYM3X.js +2 -2
- package/cdn-versioned/chunks/chunk.MRKCTLHO.js +2 -2
- package/cdn-versioned/chunks/chunk.MWPUIVNY.js +2 -2
- package/cdn-versioned/chunks/chunk.NMQWMKA4.js +2 -2
- package/cdn-versioned/chunks/chunk.NO37AAPJ.js +2 -2
- package/cdn-versioned/chunks/chunk.NVBDCLSB.js +5 -5
- package/{cdn/chunks/chunk.XCUN24EM.js → cdn-versioned/chunks/chunk.NYJUQAML.js} +1 -1
- package/cdn-versioned/chunks/chunk.OFME6DWX.js +2 -2
- package/cdn-versioned/chunks/chunk.QZ4TINX7.js +5 -5
- package/cdn-versioned/chunks/chunk.RBIHJJJH.js +1 -1
- package/cdn-versioned/chunks/chunk.RJBMCBBF.js +1 -1
- package/cdn-versioned/chunks/chunk.SP3LJOKF.js +2 -2
- package/cdn-versioned/chunks/chunk.STDRBG54.js +1 -1
- package/cdn-versioned/chunks/chunk.TFVRFH37.js +1 -1
- package/cdn-versioned/chunks/chunk.TJDPWAVB.js +2 -2
- package/cdn-versioned/chunks/chunk.TOGRTI4R.js +2 -2
- package/cdn-versioned/chunks/chunk.TPFV72LH.js +1 -1
- package/cdn-versioned/chunks/chunk.U7TS5SGA.js +1 -0
- package/cdn-versioned/chunks/chunk.UEFD3UMC.js +2 -2
- package/cdn-versioned/chunks/chunk.UMMMHVGK.js +2 -2
- package/cdn-versioned/chunks/chunk.UUT3RNXX.js +2 -2
- package/cdn-versioned/chunks/chunk.VHNBQXBQ.js +2 -2
- package/cdn-versioned/chunks/chunk.VQZJSHKG.js +3 -3
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WCUOYX2O.js +2 -2
- package/cdn-versioned/chunks/chunk.WKRUSUP5.js +2 -2
- package/cdn-versioned/chunks/chunk.WKWRMAYZ.js +2 -2
- package/cdn-versioned/chunks/chunk.WMNN34G7.js +1 -1
- package/cdn-versioned/chunks/chunk.XLOQLF7T.js +2 -2
- package/cdn-versioned/chunks/chunk.XRBLVTS7.js +3 -3
- package/cdn-versioned/chunks/chunk.YHEOMQ3U.js +2 -2
- package/cdn-versioned/chunks/{chunk.ZWU3HKO7.js → chunk.Z3VLKLQI.js} +2 -2
- package/cdn-versioned/chunks/chunk.ZB3TIOGA.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/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/brandshape/brandshape.d.ts +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/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +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/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/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/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/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.js +1 -1
- package/cdn-versioned/components/icon/library.js +1 -1
- package/cdn-versioned/components/icon/library.multi-theming.js +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/input/input.js +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +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/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/progress-bar/progress-bar.d.ts +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-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +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/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/spinner/spinner.d.ts +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/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +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/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.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/theme-listener/theme-listener.d.ts +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 +259 -259
- package/cdn-versioned/internal/form.js +2 -2
- package/cdn-versioned/solid-components.bundle.js +82 -82
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +82 -82
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/icon-library.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +114 -114
- package/cdn-versioned/web-types.json +170 -170
- package/dist/chunks/{chunk.6HICCGIO.js → chunk.54DGZ62W.js} +1 -1
- package/dist/chunks/{chunk.5FLDWYHF.js → chunk.Q4LFZ4MN.js} +1 -1
- package/dist/chunks/{chunk.FTLHBRJ7.js → chunk.TA4UQZUE.js} +1 -1
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion-group/accordion-group.js +3 -3
- package/dist/components/audio/audio.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.js +3 -3
- package/dist/components/carousel/carousel.js +3 -3
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/combobox/combobox.js +3 -3
- package/dist/components/datepicker/datepicker.js +3 -3
- package/dist/components/dialog/dialog.js +3 -3
- package/dist/components/drawer/drawer.js +3 -3
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/flipcard/flipcard.js +3 -3
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon/library.multi-theming.js +1 -1
- package/dist/components/input/input.js +3 -3
- package/dist/components/navigation-item/navigation-item.js +3 -3
- package/dist/components/notification/notification.js +3 -3
- package/dist/components/option/option.js +3 -3
- package/dist/components/quickfact/quickfact.js +3 -3
- package/dist/components/range/range.js +3 -3
- package/dist/components/scrollable/scrollable.js +3 -3
- package/dist/components/select/select.js +3 -3
- package/dist/components/step/step.js +3 -3
- package/dist/components/tab-group/tab-group.js +3 -3
- package/dist/components/tag/tag.js +3 -3
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/components/video/video.js +3 -3
- package/dist/custom-elements.json +518 -518
- package/dist/solid-components.js +3 -3
- package/dist/utilities/icon-library.js +2 -2
- package/dist/vscode.html-custom-data.json +67 -67
- package/dist/web-types.json +117 -117
- package/dist-versioned/chunks/chunk.22QJOKRT.js +2 -2
- package/dist-versioned/chunks/chunk.2GY5X74S.js +25 -25
- package/dist-versioned/chunks/chunk.2JVBNRAE.js +11 -11
- package/dist-versioned/chunks/chunk.2QLV3FGQ.js +1 -1
- package/dist-versioned/chunks/chunk.32PMIHHH.js +10 -10
- package/dist-versioned/chunks/chunk.3AZV733X.js +1 -1
- package/dist-versioned/chunks/chunk.3JGLYKUT.js +1 -1
- package/dist-versioned/chunks/chunk.3UAYIX4K.js +5 -5
- package/dist-versioned/chunks/chunk.3YRBYYHB.js +14 -14
- package/dist-versioned/chunks/chunk.43WIFSAV.js +8 -8
- package/dist-versioned/chunks/chunk.4CYE55LF.js +1 -1
- package/dist-versioned/chunks/chunk.4QQTPWQK.js +2 -2
- package/dist-versioned/chunks/{chunk.6HICCGIO.js → chunk.54DGZ62W.js} +1 -1
- package/dist-versioned/chunks/chunk.5SP53TRC.js +7 -7
- package/dist-versioned/chunks/chunk.67RQILIX.js +3 -3
- package/dist-versioned/chunks/chunk.6LUXWBVQ.js +2 -2
- package/dist-versioned/chunks/chunk.6QITMMHT.js +1 -1
- package/dist-versioned/chunks/chunk.6VONS4GH.js +5 -5
- package/dist-versioned/chunks/chunk.76H4PKGT.js +11 -11
- package/dist-versioned/chunks/chunk.7DSVL7JH.js +2 -2
- package/dist-versioned/chunks/chunk.ATPMJXDV.js +7 -7
- package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
- package/dist-versioned/chunks/chunk.DFSINDVF.js +2 -2
- package/dist-versioned/chunks/chunk.DPOFFN22.js +5 -5
- package/dist-versioned/chunks/chunk.E32D3Z6I.js +1 -1
- package/dist-versioned/chunks/chunk.EAJ3CM6N.js +4 -4
- package/dist-versioned/chunks/chunk.EQKXEQYI.js +6 -6
- package/dist-versioned/chunks/chunk.EWBPFI7O.js +3 -3
- package/dist-versioned/chunks/chunk.FDOJX6W4.js +3 -3
- package/dist-versioned/chunks/chunk.FO2XDPBY.js +1 -1
- package/dist-versioned/chunks/chunk.FZW355YU.js +4 -4
- package/dist-versioned/chunks/chunk.GIYK2K7S.js +3 -3
- package/dist-versioned/chunks/chunk.GURHKBOS.js +4 -4
- package/dist-versioned/chunks/chunk.H6AYJU2Z.js +6 -6
- package/dist-versioned/chunks/chunk.HFD4GVQH.js +6 -6
- package/dist-versioned/chunks/chunk.HFUPD442.js +2 -2
- package/dist-versioned/chunks/chunk.HSMX4JWE.js +12 -12
- package/dist-versioned/chunks/chunk.ISDCFN2T.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KNNHUZRK.js +5 -5
- package/dist-versioned/chunks/chunk.LDEYZ5WH.js +5 -5
- package/dist-versioned/chunks/chunk.LFY6FLC7.js +11 -11
- package/dist-versioned/chunks/chunk.LIHFBMY3.js +5 -5
- package/dist-versioned/chunks/chunk.LMAZLSWN.js +5 -5
- package/dist-versioned/chunks/chunk.LVUKQ7ZS.js +7 -7
- package/dist-versioned/chunks/chunk.MIDB4P4Z.js +5 -5
- package/dist-versioned/chunks/chunk.NF6TENBG.js +13 -13
- package/dist-versioned/chunks/chunk.ON7JW7DZ.js +4 -4
- package/dist-versioned/chunks/chunk.P7WF3BP4.js +12 -12
- package/dist-versioned/chunks/chunk.PAGXROMQ.js +6 -6
- package/dist-versioned/chunks/chunk.PGR6OZIM.js +1 -1
- package/dist-versioned/chunks/{chunk.5FLDWYHF.js → chunk.Q4LFZ4MN.js} +1 -1
- package/dist-versioned/chunks/chunk.QH4PJIEK.js +10 -10
- package/dist-versioned/chunks/chunk.QWPTKRZY.js +2 -2
- package/dist-versioned/chunks/chunk.RIMF3V3U.js +10 -10
- package/dist-versioned/chunks/chunk.RJD5JWEE.js +6 -6
- package/dist-versioned/chunks/{chunk.FTLHBRJ7.js → chunk.TA4UQZUE.js} +3 -3
- package/dist-versioned/chunks/chunk.TVVA3SEO.js +3 -3
- package/dist-versioned/chunks/chunk.U4ES752F.js +4 -4
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.VMOVHC54.js +2 -2
- package/dist-versioned/chunks/chunk.WALY6H2S.js +5 -5
- package/dist-versioned/chunks/chunk.WC6QJGPY.js +3 -3
- package/dist-versioned/chunks/chunk.XAFXRA3O.js +33 -33
- package/dist-versioned/chunks/chunk.YVNA2ZV6.js +2 -2
- package/dist-versioned/chunks/chunk.Z4VNO3XB.js +23 -23
- package/dist-versioned/chunks/chunk.ZCK2AJ6F.js +10 -10
- 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 +3 -3
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +3 -3
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.js +3 -3
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.js +3 -3
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/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 +3 -3
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.js +3 -3
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +3 -3
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +3 -3
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- 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 +3 -3
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/icon/icon.js +3 -3
- package/dist-versioned/components/icon/library.js +2 -2
- package/dist-versioned/components/icon/library.multi-theming.js +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/input/input.js +3 -3
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +3 -3
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +3 -3
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- 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/progress-bar/progress-bar.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +3 -3
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range/range.js +3 -3
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.js +3 -3
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/select/select.js +3 -3
- package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step/step.js +3 -3
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +3 -3
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/tag/tag.js +3 -3
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.js +3 -3
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.js +3 -3
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/components/video/video.js +3 -3
- package/dist-versioned/custom-elements.json +259 -259
- package/dist-versioned/internal/form.js +2 -2
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +3 -3
- package/dist-versioned/utilities/icon-library.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +114 -114
- package/dist-versioned/web-types.json +170 -170
- package/package.json +1 -1
- package/cdn/chunks/chunk.JTN6NSK2.js +0 -1
- package/cdn-versioned/chunks/chunk.JTN6NSK2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p}from"./chunk.OBAEIKIV.js";import{a as l,b as m}from"./chunk.6EV4YU6C.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-6-
|
|
1
|
+
import{e as p}from"./chunk.OBAEIKIV.js";import{a as l,b as m}from"./chunk.6EV4YU6C.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-6-28-0-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-6-28-0-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-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(t){let e={sm:"text-sm",md:"text-base",lg:"text-base"}[t];return p`<div id="invalid-message" class="text-error text-left ${e}" 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,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk.WWGARXPI.js";import{a as z,b as K,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as U}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.VAM5SM3O.js";import{a as S}from"./chunk.UFTAQNZB.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b as v,c as O,d as Y,h as A}from"./chunk.TFVRFH37.js";import{b as q,e as F,i as R}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new U(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-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.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!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(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,h,p,y,g;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,i=e.value,n=(p=e.selectionStart)!=null?p:i.length,s=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let d=i.replace(/\D/g,""),u=d.slice(0,8),m=d.slice(8,16),c=this.buildDmyFromDigits(u),w=this.buildDmyFromDigits(m),f;u.length===0?f="":u.length<8?f=c:m.length>0?f=`${c} - ${w}`:f=s?c:`${c} -`;let I=this.countDigitsBeforeCaret(i,n),M;if(I<=8){let b=this.digitIndexToDmyCaretPos(Math.min(I,8));M=Math.min(b,c.length)}else{let b=u.length<8?c.length:c.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);M=b+Math.min(x,w.length)}this.inputValue=f;let E=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(c)){let b=this.dmyToIso(c),D=b?a.parseLocalISO(b):null;D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==b&&(this.rangeStart=b,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),E=!0)}else this.rangeStart&&(this.rangeStart=null,E=!0),this.rangeEnd&&(this.rangeEnd=null,E=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(w)&&this.rangeStart){let b=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(w),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[$,V]=a.compareDates(b,x)<=0?[b,x]:[x,b],P=a.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=a.toLocalISODate(a.startOfDayLocal($)),k=a.toLocalISODate(a.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==k)&&(this.rangeStart=T,this.rangeEnd=k,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=a.startOfDayLocal(V),E=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,E=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),E&&(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 b=(D=this.input)!=null?D:e;b&&(b.value=this.inputValue,b.setSelectionRange(M,M))})})}else{let d=e,u=d.value,m=(g=d.selectionStart)!=null?g:u.length,c=u.replace(/\D/g,"").slice(0,8),w=c.slice(0,2),f=c.slice(2,4),I=c.slice(4,8),M="";w.length>0&&(M+=w,w.length===2&&(M+=".")),f.length>0&&w.length===2&&(M+=f,f.length===2&&(M+=".")),I.length>0&&w.length===2&&f.length===2&&(M+=I),M=M.replace(/\.\.+/g,".");let E=this.inputValue||"";this.inputValue=M;let b=m,D=L=>{let T=[];for(let k=0;k<L.length;k++)L[k]==="."&&T.push(k);return T},x=D(E),C=D(M),$=x.filter(L=>L<m).length,P=C.filter(L=>L<m).length-$;if(P>0?b+=P:!x.includes(m)&&C.includes(m)&&(b+=1),b=Math.min(Math.max(0,b),M.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:d;L&&(L.value=this.inputValue,L.setSelectionRange(b,b))}),/^\d{2}\.\d{2}\.\d{4}$/.test(M)){let L=this.parseInputText(M);this.applyParsedInput(L)}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,u=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!u?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&u&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(u)}`)}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=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,i,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){n&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var s,l;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,i=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.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:i=!1}if(i){t.preventDefault();let h=(s=this.viewMonth)!=null?s:this.ensureViewMonth();if(n.getMonth()!==h.getMonth()||n.getFullYear()!==h.getFullYear()){let d=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=d;let u=this.formatMonthYear(d);this.setNavStatus(u)}let y=a.startOfDayLocal(n);y.getTime()!==((l=this.focusedDate)==null?void 0:l.getTime())&&(this.focusedDate=y);let g=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(g),this.requestUpdate(),requestAnimationFrame(()=>{let d=this.shadowRoot,u=d==null?void 0:d.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&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&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;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,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=a.clampDateToMonth(n,s),(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()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}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()}handleViewMonthChange(){var i;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&a.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&a.parseLocalISO(this.rangeStart)||this.value&&a.parseLocalISO(this.value)||this.today;if(!t)return;let e=a.clampDateToMonth(t,this.viewMonth);e.getTime()!==((i=this.focusedDate)==null?void 0:i.getTime())&&(this.focusedDate=e)}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 i;let e=this.input;if(e){e.value=(i=this.inputValue)!=null?i:"";let n=e.value.length;e.setSelectionRange(n,n)}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,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=a.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.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)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}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=s=>{if(s==null)return null;if(s instanceof Date)return a.startOfDayLocal(s);if(typeof s=="number")return a.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?a.startOfDayLocal(l):null}return null},i=e(this.min),n=e(this.max);return!(i&&t<i||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${i}-${n}`;return this.disabledDatesSet.has(s)}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 i="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+i},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),i=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${i} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,n=e[(i-20)%10]||e[i]||e[0];return t+n}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 i=JSON.parse(e);Array.isArray(i)&&(t=i)}catch(i){t=[]}else e.length>0&&(t=e.split(",").map(i=>i.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let i=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),n=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),s=new Date(i);for(;a.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.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||(e=a.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${i}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let i=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,i);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==i)return null;let h=a.startOfDayLocal(l);return a.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let p=this.dmyToIso(h);return p?{start:p,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(n=l[0])!=null?n:"",p=(s=l[1])!=null?s:"",y=h?this.dmyToIso(h):null,g=p?this.dmyToIso(p):null;return h&&!y?{start:null,end:null,valid:!1}:p&&!g?{start:null,end:null,valid:!1}:{start:y,end:g,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let i=this.dmyToIso(e);return i?{single:i,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,p,y,g;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let u=a.parseLocalISO(d);return!(!this.inMinMax(u)||this.isDisabled(u))},i=!1;if(this.range){let d=(h=t.start)!=null?h:null,u=(p=t.end)!=null?p:null;if(!e(d)||u&&!e(u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let m=d?a.parseLocalISO(d):null,c=u?a.parseLocalISO(u):null;if(m&&c){if(a.compareDates(m,c)>0){let I=m;m=c,c=I}if(!this.allowSameDayRange&&a.isSameDay(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let w=m?a.toLocalISODate(a.startOfDayLocal(m)):null,f=c?a.toLocalISODate(a.startOfDayLocal(c)):null;if(this.rangeStart!==w||this.rangeEnd!==f){this.rangeStart=w,this.rangeEnd=f,this.previewEnd=null,i=!0;let I=(y=m!=null?m:c)!=null?y: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 n=(g=t.single)!=null?g:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?a.parseLocalISO(n):null,l=s?a.toLocalISODate(a.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,i=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),i}buildDmyFromDigits(t){let e=t.slice(0,8),i=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=i;return n.length&&(l+="."+n),s.length&&(l+="."+s),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 i,n;((n=(i=t.composedPath)==null?void 0:i.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){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||this.readonly){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.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:i}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear()+t,e.getMonth(),1);if(i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var n;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,l=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;l?t=a.startOfDayLocal(l):s&&(t=a.startOfDayLocal(s))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(h=>h.getMonth()===e.getMonth()&&a.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=a.startOfDayLocal(l);else{let h=s.flat().find(p=>p.getMonth()===e.getMonth()&&!this.isDisabled(p));t=h?a.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(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"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=a.startOfDayLocal(t),i=a.toLocalISODate(e);if(this.value===i)return;this.value=i;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=s.value.length;s.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=a.startOfDayLocal(t),i=this.rangeStart?a.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!i&&!n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))});return}if(i&&!n){if(this.isDisabled(e))return;if(a.isSameDay(i,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 m;let u=this.input;u&&(u.value=(m=this.inputValue)!=null?m:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=u.value.length;u.setSelectionRange(c,c)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let g=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${g}`,40),this.announceSelect(`${this.termEndSelected()}: ${g}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let d=this.input;d&&(d.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=d.value.length;d.setSelectionRange(m,m)})}))});return}let s=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,h]=a.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(h),this.previewEnd=null;let p=this.formatSelectionLabel(l),y=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${p}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let g=this.input;g&&(g.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=g.value.length;g.setSelectionRange(u,u)})}))});return}if(i&&n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,i=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(i),s=(i.getDay()-e+7)%7;n.setDate(i.getDate()-s);let l=[],h=n;for(let g=0;g<6;g++){let d=[];for(let u=0;u<7;u++)d.push(new Date(h)),h.setDate(h.getDate()+1);l.push(d)}let p=g=>g.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&p(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 n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),i=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{i.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){i.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return i}getTabTargetDayForCurrentView(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=t.flat().find(l=>l.getMonth()===e.getMonth()&&a.isSameDay(l,this.today)&&!this.isDisabled(l));if(i)return a.startOfDayLocal(i);let n=t.flat().find(l=>l.getMonth()===e.getMonth()&&!this.isDisabled(l));return n?a.startOfDayLocal(n):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!i){let n=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var u,m;let t=(u=this.viewMonth)!=null?u:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,p=this.previewEnd,y=c=>!this.range||!l||h||!p?!1:a.isBetweenInclusive(c,l,p),g=this.getTabTargetDayForCurrentView(e),d=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return F`<div part="datepicker" class="${S("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(m=this.currentPlacement)!=null&&m.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><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="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-6-27-2-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-27-2-icon></button> <button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-27-2-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-27-2-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${i}</div><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-6-27-2-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-27-2-icon></button> <button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-6-27-2-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-27-2-icon></button></div></div><sd-6-27-2-divider></sd-6-27-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="${i}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((c,w)=>F`<div role="columnheader" aria-colindex="${w+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-"+(w+1)}">${c}</div>`)}</div>${e.map((c,w)=>F`<div class="grid-row grid grid-cols-7 ${w===0?"mt-2":""}" role="row" aria-rowindex="${w+2}">${c.map((f,I)=>{let M=f.getMonth()===t.getMonth(),E=this.isDisabled(f)||!this.inMinMax(f),b=a.isSameDay(f,this.focusedDate),D=a.isSameDay(f,this.today),x=!this.range&&s?a.isSameDay(f,s):!1,C=this.range&&l?a.isSameDay(f,l):!1,$=this.range&&h?a.isSameDay(f,h):!1,V=this.range&&l&&h?a.isBetweenInclusive(f,l,h):!1,P=y(f)&&!E,L=-1,T=g&&a.isSameDay(f,g);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&b)&&(L=0);let k=this.isWeekend(f),j=f.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=C?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${S("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",C||$?b?"outline-none sd-6-27-2-datepicker__date-item--selected--hover-color-background sd-6-27-2-datepicker__date-item--selected--hover-color-text":"outline-none sd-6-27-2-datepicker__date-item--selected-color-background sd-6-27-2-datepicker__date-item--selected-color-text hover:sd-6-27-2-datepicker__date-item--selected--hover-color-background hover:sd-6-27-2-datepicker__date-item--selected--hover-color-text":"hover:sd-6-27-2-datepicker__date-item--hover--default-color-text",!C&&!$&&!V&&"hover:sd-6-27-2-datepicker__date-item--hover--default-color-background",x?"selected outline-none border-primary sd-6-27-2-datepicker__date-item--selected-color-background sd-6-27-2-datepicker__date-item--selected-color-text hover:sd-6-27-2-datepicker__date-item--selected--hover-color-text hover:sd-6-27-2-datepicker__date-item--selected--hover-color-background":M?this.isInDisabledDates(f)||!this.inMinMax(f)?"out-month text-neutral-500":this.disabledWeekends&&k?"weekend-day text-neutral-500":"in-month sd-6-27-2-datepicker__date-item--default-color-text":this.disabledWeekends&&k?"out-month weekend-day text-neutral-500":k?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-6-27-2-datepicker__date-item--hover--prev-next-color-text hover:sd-6-27-2-datepicker__date-item--hover--prev-next-color-background",C?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!C&&!$?"in-range selected sd-6-27-2-datepicker__date-item--range-color-background rounded-none hover:sd-6-27-2-datepicker__date-item--selected--hover-color-background hover:sd-6-27-2-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!C&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",D&&!x&&!C&&!$&&b?"today border-[1px] border-primary sd-6-27-2-datepicker__date-item--current-font-weight":"",E?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",b&&!D?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${I+1}" aria-labelledby="${"col-"+(I+1)}" .tabIndex="${L}" ?disabled="${E||this.disabled||this.readonly}" aria-disabled="${E||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${x||V||C||$?"true":"false"}" aria-current="${D?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(f)}" @mouseenter="${()=>this.onDayMouseEnter(f)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(f),this.selectDate(f)}}">${f.getDate()}</button>`})}</div>`)}</div></div>`}render(){var m,c;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,i=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],g=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",d={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:"form-control-color-border"}[g],u=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${S("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${S(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",u)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${S("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${S("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${S("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${S("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",d,this.open&&((m=this.currentPlacement)!=null&&m.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-6-27-2-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${S("inline-flex relative w-full",(c=this.currentPlacement)!=null&&c.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${S("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:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",g==="disabled"||g==="visuallyDisabled"?"text-neutral-500":"text-black",g==="invalid"&&"form-control--invalid-color-background",g==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${i?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${S("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",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],u,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?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?F`<sd-6-27-2-icon part="invalid-icon" class="${S("text-error",p,y)}" library="_internal" name="risk"></sd-6-27-2-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-6-27-2-icon class="${S("text-success shrink-0",p,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-27-2-icon>`:""}<sd-6-27-2-icon class="${S(h,p,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-27-2-icon></div>${this.renderCalendar()}</sd-6-27-2-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${S("text-sm mt-1",i?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!i}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,rgba(var(--sd-color-primary-500))))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,rgba(var(--sd-color-primary))))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],o([v({type:String,reflect:!0})],r.prototype,"locale",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"value",2),o([v({type:Boolean,reflect:!0})],r.prototype,"range",2),o([v({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),o([v({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),o([v({type:Boolean})],r.prototype,"allowSameDayRange",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"min",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"max",2),o([v({attribute:"view-month",converter:K})],r.prototype,"viewMonth",2),o([v({type:Number})],r.prototype,"firstDayOfWeek",2),o([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),o([v({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),o([v({attribute:!1})],r.prototype,"isDateDisabled",2),o([v({type:String,reflect:!0})],r.prototype,"size",2),o([v({type:String})],r.prototype,"alignment",2),o([v({type:String,reflect:!0})],r.prototype,"label",2),o([v({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),o([v({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),o([v({type:Boolean,reflect:!0})],r.prototype,"disabled",2),o([v({type:Boolean,reflect:!0})],r.prototype,"required",2),o([v({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),o([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),o([v({type:Boolean,reflect:!0})],r.prototype,"readonly",2),o([v({type:String,reflect:!0})],r.prototype,"placement",2),o([v({type:String,reflect:!0})],r.prototype,"placeholder",2),o([v({reflect:!0})],r.prototype,"name",2),o([v({type:String,reflect:!0})],r.prototype,"form",2),o([O()],r.prototype,"open",2),o([O()],r.prototype,"focusedDate",2),o([O()],r.prototype,"today",2),o([O()],r.prototype,"disabledDatesSet",2),o([O()],r.prototype,"previewEnd",2),o([O()],r.prototype,"statusNavText",2),o([O()],r.prototype,"statusSelectText",2),o([O()],r.prototype,"hasFocus",2),o([O()],r.prototype,"showValidStyle",2),o([O()],r.prototype,"showInvalidStyle",2),o([O()],r.prototype,"currentPlacement",2),o([O()],r.prototype,"inputValue",2),o([Y("sd-6-
|
|
1
|
+
import{a}from"./chunk.WWGARXPI.js";import{a as z,b as K,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as U}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.VAM5SM3O.js";import{a as S}from"./chunk.UFTAQNZB.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b as v,c as O,d as Y,h as A}from"./chunk.TFVRFH37.js";import{b as q,e as F,i as R}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new U(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-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.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!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(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,h,p,y,g;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,i=e.value,n=(p=e.selectionStart)!=null?p:i.length,s=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let d=i.replace(/\D/g,""),u=d.slice(0,8),m=d.slice(8,16),c=this.buildDmyFromDigits(u),w=this.buildDmyFromDigits(m),f;u.length===0?f="":u.length<8?f=c:m.length>0?f=`${c} - ${w}`:f=s?c:`${c} -`;let I=this.countDigitsBeforeCaret(i,n),M;if(I<=8){let b=this.digitIndexToDmyCaretPos(Math.min(I,8));M=Math.min(b,c.length)}else{let b=u.length<8?c.length:c.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);M=b+Math.min(x,w.length)}this.inputValue=f;let E=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(c)){let b=this.dmyToIso(c),D=b?a.parseLocalISO(b):null;D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==b&&(this.rangeStart=b,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),E=!0)}else this.rangeStart&&(this.rangeStart=null,E=!0),this.rangeEnd&&(this.rangeEnd=null,E=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(w)&&this.rangeStart){let b=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(w),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[$,V]=a.compareDates(b,x)<=0?[b,x]:[x,b],P=a.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=a.toLocalISODate(a.startOfDayLocal($)),k=a.toLocalISODate(a.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==k)&&(this.rangeStart=T,this.rangeEnd=k,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=a.startOfDayLocal(V),E=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,E=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),E&&(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 b=(D=this.input)!=null?D:e;b&&(b.value=this.inputValue,b.setSelectionRange(M,M))})})}else{let d=e,u=d.value,m=(g=d.selectionStart)!=null?g:u.length,c=u.replace(/\D/g,"").slice(0,8),w=c.slice(0,2),f=c.slice(2,4),I=c.slice(4,8),M="";w.length>0&&(M+=w,w.length===2&&(M+=".")),f.length>0&&w.length===2&&(M+=f,f.length===2&&(M+=".")),I.length>0&&w.length===2&&f.length===2&&(M+=I),M=M.replace(/\.\.+/g,".");let E=this.inputValue||"";this.inputValue=M;let b=m,D=L=>{let T=[];for(let k=0;k<L.length;k++)L[k]==="."&&T.push(k);return T},x=D(E),C=D(M),$=x.filter(L=>L<m).length,P=C.filter(L=>L<m).length-$;if(P>0?b+=P:!x.includes(m)&&C.includes(m)&&(b+=1),b=Math.min(Math.max(0,b),M.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:d;L&&(L.value=this.inputValue,L.setSelectionRange(b,b))}),/^\d{2}\.\d{2}\.\d{4}$/.test(M)){let L=this.parseInputText(M);this.applyParsedInput(L)}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,u=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!u?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&u&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(u)}`)}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=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,i,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){n&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var s,l;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,i=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.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:i=!1}if(i){t.preventDefault();let h=(s=this.viewMonth)!=null?s:this.ensureViewMonth();if(n.getMonth()!==h.getMonth()||n.getFullYear()!==h.getFullYear()){let d=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=d;let u=this.formatMonthYear(d);this.setNavStatus(u)}let y=a.startOfDayLocal(n);y.getTime()!==((l=this.focusedDate)==null?void 0:l.getTime())&&(this.focusedDate=y);let g=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(g),this.requestUpdate(),requestAnimationFrame(()=>{let d=this.shadowRoot,u=d==null?void 0:d.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&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&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;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,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=a.clampDateToMonth(n,s),(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()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}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()}handleViewMonthChange(){var i;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&a.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&a.parseLocalISO(this.rangeStart)||this.value&&a.parseLocalISO(this.value)||this.today;if(!t)return;let e=a.clampDateToMonth(t,this.viewMonth);e.getTime()!==((i=this.focusedDate)==null?void 0:i.getTime())&&(this.focusedDate=e)}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 i;let e=this.input;if(e){e.value=(i=this.inputValue)!=null?i:"";let n=e.value.length;e.setSelectionRange(n,n)}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,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=a.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.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)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}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=s=>{if(s==null)return null;if(s instanceof Date)return a.startOfDayLocal(s);if(typeof s=="number")return a.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?a.startOfDayLocal(l):null}return null},i=e(this.min),n=e(this.max);return!(i&&t<i||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${i}-${n}`;return this.disabledDatesSet.has(s)}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 i="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+i},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),i=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${i} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,n=e[(i-20)%10]||e[i]||e[0];return t+n}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 i=JSON.parse(e);Array.isArray(i)&&(t=i)}catch(i){t=[]}else e.length>0&&(t=e.split(",").map(i=>i.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let i=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),n=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),s=new Date(i);for(;a.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.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||(e=a.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${i}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let i=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,i);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==i)return null;let h=a.startOfDayLocal(l);return a.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let p=this.dmyToIso(h);return p?{start:p,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(n=l[0])!=null?n:"",p=(s=l[1])!=null?s:"",y=h?this.dmyToIso(h):null,g=p?this.dmyToIso(p):null;return h&&!y?{start:null,end:null,valid:!1}:p&&!g?{start:null,end:null,valid:!1}:{start:y,end:g,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let i=this.dmyToIso(e);return i?{single:i,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,p,y,g;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let u=a.parseLocalISO(d);return!(!this.inMinMax(u)||this.isDisabled(u))},i=!1;if(this.range){let d=(h=t.start)!=null?h:null,u=(p=t.end)!=null?p:null;if(!e(d)||u&&!e(u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let m=d?a.parseLocalISO(d):null,c=u?a.parseLocalISO(u):null;if(m&&c){if(a.compareDates(m,c)>0){let I=m;m=c,c=I}if(!this.allowSameDayRange&&a.isSameDay(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let w=m?a.toLocalISODate(a.startOfDayLocal(m)):null,f=c?a.toLocalISODate(a.startOfDayLocal(c)):null;if(this.rangeStart!==w||this.rangeEnd!==f){this.rangeStart=w,this.rangeEnd=f,this.previewEnd=null,i=!0;let I=(y=m!=null?m:c)!=null?y: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 n=(g=t.single)!=null?g:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?a.parseLocalISO(n):null,l=s?a.toLocalISODate(a.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,i=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),i}buildDmyFromDigits(t){let e=t.slice(0,8),i=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=i;return n.length&&(l+="."+n),s.length&&(l+="."+s),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 i,n;((n=(i=t.composedPath)==null?void 0:i.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){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||this.readonly){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.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:i}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear()+t,e.getMonth(),1);if(i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var n;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,l=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;l?t=a.startOfDayLocal(l):s&&(t=a.startOfDayLocal(s))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(h=>h.getMonth()===e.getMonth()&&a.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=a.startOfDayLocal(l);else{let h=s.flat().find(p=>p.getMonth()===e.getMonth()&&!this.isDisabled(p));t=h?a.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(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"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=a.startOfDayLocal(t),i=a.toLocalISODate(e);if(this.value===i)return;this.value=i;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=s.value.length;s.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=a.startOfDayLocal(t),i=this.rangeStart?a.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!i&&!n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))});return}if(i&&!n){if(this.isDisabled(e))return;if(a.isSameDay(i,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 m;let u=this.input;u&&(u.value=(m=this.inputValue)!=null?m:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=u.value.length;u.setSelectionRange(c,c)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let g=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${g}`,40),this.announceSelect(`${this.termEndSelected()}: ${g}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let d=this.input;d&&(d.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=d.value.length;d.setSelectionRange(m,m)})}))});return}let s=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,h]=a.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(h),this.previewEnd=null;let p=this.formatSelectionLabel(l),y=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${p}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let g=this.input;g&&(g.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=g.value.length;g.setSelectionRange(u,u)})}))});return}if(i&&n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,i=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(i),s=(i.getDay()-e+7)%7;n.setDate(i.getDate()-s);let l=[],h=n;for(let g=0;g<6;g++){let d=[];for(let u=0;u<7;u++)d.push(new Date(h)),h.setDate(h.getDate()+1);l.push(d)}let p=g=>g.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&p(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 n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),i=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{i.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){i.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return i}getTabTargetDayForCurrentView(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=t.flat().find(l=>l.getMonth()===e.getMonth()&&a.isSameDay(l,this.today)&&!this.isDisabled(l));if(i)return a.startOfDayLocal(i);let n=t.flat().find(l=>l.getMonth()===e.getMonth()&&!this.isDisabled(l));return n?a.startOfDayLocal(n):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!i){let n=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var u,m;let t=(u=this.viewMonth)!=null?u:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,p=this.previewEnd,y=c=>!this.range||!l||h||!p?!1:a.isBetweenInclusive(c,l,p),g=this.getTabTargetDayForCurrentView(e),d=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return F`<div part="datepicker" class="${S("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(m=this.currentPlacement)!=null&&m.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><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="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-6-28-0-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-28-0-icon></button> <button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-28-0-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-28-0-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${i}</div><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-6-28-0-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-28-0-icon></button> <button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-6-28-0-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-28-0-icon></button></div></div><sd-6-28-0-divider></sd-6-28-0-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="${i}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((c,w)=>F`<div role="columnheader" aria-colindex="${w+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-"+(w+1)}">${c}</div>`)}</div>${e.map((c,w)=>F`<div class="grid-row grid grid-cols-7 ${w===0?"mt-2":""}" role="row" aria-rowindex="${w+2}">${c.map((f,I)=>{let M=f.getMonth()===t.getMonth(),E=this.isDisabled(f)||!this.inMinMax(f),b=a.isSameDay(f,this.focusedDate),D=a.isSameDay(f,this.today),x=!this.range&&s?a.isSameDay(f,s):!1,C=this.range&&l?a.isSameDay(f,l):!1,$=this.range&&h?a.isSameDay(f,h):!1,V=this.range&&l&&h?a.isBetweenInclusive(f,l,h):!1,P=y(f)&&!E,L=-1,T=g&&a.isSameDay(f,g);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&b)&&(L=0);let k=this.isWeekend(f),j=f.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=C?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${S("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",C||$?b?"outline-none sd-6-28-0-datepicker__date-item--selected--hover-color-background sd-6-28-0-datepicker__date-item--selected--hover-color-text":"outline-none sd-6-28-0-datepicker__date-item--selected-color-background sd-6-28-0-datepicker__date-item--selected-color-text hover:sd-6-28-0-datepicker__date-item--selected--hover-color-background hover:sd-6-28-0-datepicker__date-item--selected--hover-color-text":"hover:sd-6-28-0-datepicker__date-item--hover--default-color-text",!C&&!$&&!V&&"hover:sd-6-28-0-datepicker__date-item--hover--default-color-background",x?"selected outline-none border-primary sd-6-28-0-datepicker__date-item--selected-color-background sd-6-28-0-datepicker__date-item--selected-color-text hover:sd-6-28-0-datepicker__date-item--selected--hover-color-text hover:sd-6-28-0-datepicker__date-item--selected--hover-color-background":M?this.isInDisabledDates(f)||!this.inMinMax(f)?"out-month text-neutral-500":this.disabledWeekends&&k?"weekend-day text-neutral-500":"in-month sd-6-28-0-datepicker__date-item--default-color-text":this.disabledWeekends&&k?"out-month weekend-day text-neutral-500":k?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-6-28-0-datepicker__date-item--hover--prev-next-color-text hover:sd-6-28-0-datepicker__date-item--hover--prev-next-color-background",C?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!C&&!$?"in-range selected sd-6-28-0-datepicker__date-item--range-color-background rounded-none hover:sd-6-28-0-datepicker__date-item--selected--hover-color-background hover:sd-6-28-0-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!C&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",D&&!x&&!C&&!$&&b?"today border-[1px] border-primary sd-6-28-0-datepicker__date-item--current-font-weight":"",E?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",b&&!D?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${I+1}" aria-labelledby="${"col-"+(I+1)}" .tabIndex="${L}" ?disabled="${E||this.disabled||this.readonly}" aria-disabled="${E||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${x||V||C||$?"true":"false"}" aria-current="${D?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(f)}" @mouseenter="${()=>this.onDayMouseEnter(f)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(f),this.selectDate(f)}}">${f.getDate()}</button>`})}</div>`)}</div></div>`}render(){var m,c;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,i=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],g=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",d={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:"form-control-color-border"}[g],u=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${S("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${S(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",u)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${S("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${S("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${S("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${S("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",d,this.open&&((m=this.currentPlacement)!=null&&m.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-6-28-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${S("inline-flex relative w-full",(c=this.currentPlacement)!=null&&c.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${S("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:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",g==="disabled"||g==="visuallyDisabled"?"text-neutral-500":"text-black",g==="invalid"&&"form-control--invalid-color-background",g==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${i?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${S("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",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],u,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?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?F`<sd-6-28-0-icon part="invalid-icon" class="${S("text-error",p,y)}" library="_internal" name="risk"></sd-6-28-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-6-28-0-icon class="${S("text-success shrink-0",p,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-28-0-icon>`:""}<sd-6-28-0-icon class="${S(h,p,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-28-0-icon></div>${this.renderCalendar()}</sd-6-28-0-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${S("text-sm mt-1",i?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!i}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,rgba(var(--sd-color-primary-500))))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,rgba(var(--sd-color-primary))))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],o([v({type:String,reflect:!0})],r.prototype,"locale",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"value",2),o([v({type:Boolean,reflect:!0})],r.prototype,"range",2),o([v({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),o([v({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),o([v({type:Boolean})],r.prototype,"allowSameDayRange",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"min",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"max",2),o([v({attribute:"view-month",converter:K})],r.prototype,"viewMonth",2),o([v({type:Number})],r.prototype,"firstDayOfWeek",2),o([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),o([v({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),o([v({attribute:!1})],r.prototype,"isDateDisabled",2),o([v({type:String,reflect:!0})],r.prototype,"size",2),o([v({type:String})],r.prototype,"alignment",2),o([v({type:String,reflect:!0})],r.prototype,"label",2),o([v({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),o([v({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),o([v({type:Boolean,reflect:!0})],r.prototype,"disabled",2),o([v({type:Boolean,reflect:!0})],r.prototype,"required",2),o([v({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),o([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),o([v({type:Boolean,reflect:!0})],r.prototype,"readonly",2),o([v({type:String,reflect:!0})],r.prototype,"placement",2),o([v({type:String,reflect:!0})],r.prototype,"placeholder",2),o([v({reflect:!0})],r.prototype,"name",2),o([v({type:String,reflect:!0})],r.prototype,"form",2),o([O()],r.prototype,"open",2),o([O()],r.prototype,"focusedDate",2),o([O()],r.prototype,"today",2),o([O()],r.prototype,"disabledDatesSet",2),o([O()],r.prototype,"previewEnd",2),o([O()],r.prototype,"statusNavText",2),o([O()],r.prototype,"statusSelectText",2),o([O()],r.prototype,"hasFocus",2),o([O()],r.prototype,"showValidStyle",2),o([O()],r.prototype,"showInvalidStyle",2),o([O()],r.prototype,"currentPlacement",2),o([O()],r.prototype,"inputValue",2),o([Y("sd-6-28-0-popup")],r.prototype,"popup",2),o([Y("#invalid-message")],r.prototype,"invalidMessage",2),o([Y("#input")],r.prototype,"input",2),o([_("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),o([_("locale")],r.prototype,"handleLocaleChange",1),o([_("viewMonth")],r.prototype,"handleViewMonthChange",1),o([_("disabledDates")],r.prototype,"handleDisabledDatesChange",1),o([_("value")],r.prototype,"handleValueChange",1),o([_("rangeStart"),_("rangeEnd")],r.prototype,"handleRangeChange",1),o([_(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),o([_(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=o([H("sd-6-28-0-datepicker")],r);export{r as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk.CGQ2BPPZ.js";import{a as y}from"./chunk.VAM5SM3O.js";import{a as s}from"./chunk.UFTAQNZB.js";import{a as c,b as o,d as u,h as l}from"./chunk.TFVRFH37.js";import{b as p,e as r}from"./chunk.OBAEIKIV.js";import{e as a}from"./chunk.6EV4YU6C.js";var e=class extends l{constructor(){super(...arguments);this.localize=new y(this);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new d(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}async hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-medium",300))),this.poster.style.display="none")}setVideoInert(t){var i,n;t?(i=this.video)==null||i.setAttribute("inert",""):(n=this.video)==null||n.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.hidePoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var i;(i=this.video)==null||i.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return r`<div part="base" class="cursor-pointer"><button part="play-button" aria-label="${this.localize.term("playVideo")}" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${s(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 sd-interactive outline-hidden focus-visible:focus-outline")}"><div part="play-button-bg" class="${s(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white/75 rounded-full play-pause-transition group-focus-visible:outline-2 group-focus-visible:outline-offset-2")}"><slot name="play-icon" part="play-icon" class="${s(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-6-
|
|
2
|
-
:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);transition-property:opacity,scale;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1))}#default-play-icon,::slotted([slot=play-icon]){position:absolute;top:calc(1 / 2 * 100%);left:calc(1 / 2 * 100%);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1)!important;--tw-translate-y:calc(calc(1 / 2 * 100%) * -1)!important;translate:var(--tw-translate-x) var(--tw-translate-y)!important;transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}:has([part=play-button]:hover) ::slotted([slot=poster]){--tw-scale-x:110%!important;--tw-scale-y:110%!important;--tw-scale-z:110%!important;scale:var(--tw-scale-x) var(--tw-scale-y)!important}[part=play-button-bg]{color:rgba(var(--sd-video--play-button-color-icon-fill));background-color:rgba(var(--sd-video--play-button-color-background))}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}`],a([u("[part=base]")],e.prototype,"hostEl",2),a([o({type:Boolean,reflect:!0})],e.prototype,"playing",2),a([o({type:Boolean})],e.prototype,"isBelowBreakpoint",2),e=a([c("sd-6-
|
|
1
|
+
import{a as d}from"./chunk.CGQ2BPPZ.js";import{a as y}from"./chunk.VAM5SM3O.js";import{a as s}from"./chunk.UFTAQNZB.js";import{a as c,b as o,d as u,h as l}from"./chunk.TFVRFH37.js";import{b as p,e as r}from"./chunk.OBAEIKIV.js";import{e as a}from"./chunk.6EV4YU6C.js";var e=class extends l{constructor(){super(...arguments);this.localize=new y(this);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new d(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}async hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("--sd-duration-medium",300))),this.poster.style.display="none")}setVideoInert(t){var i,n;t?(i=this.video)==null||i.setAttribute("inert",""):(n=this.video)==null||n.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.hidePoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var i;(i=this.video)==null||i.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return r`<div part="base" class="cursor-pointer"><button part="play-button" aria-label="${this.localize.term("playVideo")}" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${s(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 sd-interactive outline-hidden focus-visible:focus-outline")}"><div part="play-button-bg" class="${s(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white/75 rounded-full play-pause-transition group-focus-visible:outline-2 group-focus-visible:outline-offset-2")}"><slot name="play-icon" part="play-icon" class="${s(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-6-28-0-icon id="default-play-icon" library="_internal" name="start"></sd-6-28-0-icon></slot></div></button> ${this.hasSlotController.test("poster")?r`<div part="poster-wrapper" class="absolute left-0 top-0 w-full z-10 overflow-hidden"><slot name="poster" role="presentation"></slot></div>`:null}<slot></slot></div>`}};e.styles=[...l.styles,p`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);transition-property:opacity,scale;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1))}#default-play-icon,::slotted([slot=play-icon]){position:absolute;top:calc(1 / 2 * 100%);left:calc(1 / 2 * 100%);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1)!important;--tw-translate-y:calc(calc(1 / 2 * 100%) * -1)!important;translate:var(--tw-translate-x) var(--tw-translate-y)!important;transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}:has([part=play-button]:hover) ::slotted([slot=poster]){--tw-scale-x:110%!important;--tw-scale-y:110%!important;--tw-scale-z:110%!important;scale:var(--tw-scale-x) var(--tw-scale-y)!important}[part=play-button-bg]{color:rgba(var(--sd-video--play-button-color-icon-fill));background-color:rgba(var(--sd-video--play-button-color-background))}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}`],a([u("[part=base]")],e.prototype,"hostEl",2),a([o({type:Boolean,reflect:!0})],e.prototype,"playing",2),a([o({type:Boolean})],e.prototype,"isBelowBreakpoint",2),e=a([c("sd-6-28-0-video")],e);export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk.SAEYIL5V.js";import{a as $}from"./chunk.ERP45OHF.js";import{b as x}from"./chunk.LZRL7OLU.js";import{a}from"./chunk.LHSR56PH.js";import{a as C}from"./chunk.CGQ2BPPZ.js";import{a as s}from"./chunk.UFTAQNZB.js";import{a as d}from"./chunk.NYKJXI3Q.js";import{a as g,b as i,c,d as f,h as m}from"./chunk.TFVRFH37.js";import{b as y,e as o}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends m{constructor(){super(...arguments);this.formControlController=new x(this);this.hasSlotController=new C(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,r,n="none"){this.textarea.setSelectionRange(l,r,n)}setRangeText(l,r,n,p){this.textarea.setRangeText(l,r,n,p),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},r=this.label?!0:!!l.label,n=this.helpText?!0:!!l.helpText,p=!!l.tooltip,V=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&r&&(this.hasFocus&&!this.visuallyDisabled||V),u=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",b=this.size==="sm"?"text-sm":"text-base",v={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return o`<div part="form-control" class="flex flex-col h-full text-left">${r&&!this.floatingLabel||p?o`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(r?"inline-block":"hidden",b,this.visuallyDisabled||this.disabled?"text-neutral-500":" form-control-color-text")}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l.tooltip?o`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}">${r&&this.floatingLabel?o`<label id="label" part="form-control-floating-label" class="${s("absolute left-4 z-20 transition-all duration-200 cursor-text",b,h?"top-2 text-xs":"top-2.5 form-control-color-text")}" for="input"><span class="${s("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${s("absolute w-full h-full pointer-events-none border form-control-border-radius transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[u])}"></div><div part="base" class="${s("textarea h-full flex items-top form-control-border-radius group transition-colors duration-medium hover:duration-fast ease-in-out",this.floatingLabel&&"pt-6",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",u==="disabled"||u==="visuallyDisabled"?"text-neutral-500":"text-black",["invalid","activeInvalid"].includes(u)&&"form-control--invalid-color-background")}"><textarea part="textarea" id="input" class="${s("ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-
|
|
2
|
-
:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([required]) #label::after{content:' *'}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],e([f("#input")],t.prototype,"textarea",2),e([f("#invalid-message")],t.prototype,"invalidMessage",2),e([c()],t.prototype,"hasFocus",2),e([c()],t.prototype,"showValidStyle",2),e([c()],t.prototype,"showInvalidStyle",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"label",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String,reflect:!0})],t.prototype,"placeholder",2),e([i({type:Number,reflect:!0})],t.prototype,"rows",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"readonly",2),e([i({type:String,reflect:!0})],t.prototype,"form",2),e([i({type:Boolean,reflect:!0})],t.prototype,"required",2),e([i({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),e([i({type:Number,reflect:!0})],t.prototype,"minlength",2),e([i({type:Number,reflect:!0})],t.prototype,"maxlength",2),e([i({type:String,reflect:!0})],t.prototype,"autocapitalize",2),e([i({type:String,reflect:!0})],t.prototype,"autocorrect",2),e([i({reflect:!0})],t.prototype,"autocomplete",2),e([i({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([i({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),e([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),e([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],t.prototype,"spellcheck",2),e([i({type:String,reflect:!0})],t.prototype,"inputmode",2),e([$()],t.prototype,"defaultValue",2),e([d("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),e([d("rows",{waitUntilFirstUpdate:!0})],t.prototype,"handleRowsChange",1),e([d("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),e([d(["size","floatingLabel"])],t.prototype,"handleSizeChange",1),t=e([g("sd-6-
|
|
1
|
+
import{a as w}from"./chunk.SAEYIL5V.js";import{a as $}from"./chunk.ERP45OHF.js";import{b as x}from"./chunk.LZRL7OLU.js";import{a}from"./chunk.LHSR56PH.js";import{a as C}from"./chunk.CGQ2BPPZ.js";import{a as s}from"./chunk.UFTAQNZB.js";import{a as d}from"./chunk.NYKJXI3Q.js";import{a as g,b as i,c,d as f,h as m}from"./chunk.TFVRFH37.js";import{b as y,e as o}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends m{constructor(){super(...arguments);this.formControlController=new x(this);this.hasSlotController=new C(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(l){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(l),this.invalidMessage.textContent=l.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}focus(l){this.textarea.focus(l)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(l){if(l){typeof l.top=="number"&&(this.textarea.scrollTop=l.top),typeof l.left=="number"&&(this.textarea.scrollLeft=l.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(l,r,n="none"){this.textarea.setSelectionRange(l,r,n)}setRangeText(l,r,n,p){this.textarea.setRangeText(l,r,n,p),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var l;return(l=this.textarea)==null?void 0:l.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(l){this.textarea.setCustomValidity(l),this.formControlController.updateValidity()}render(){let l={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},r=this.label?!0:!!l.label,n=this.helpText?!0:!!l.helpText,p=!!l.tooltip,V=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&r&&(this.hasFocus&&!this.visuallyDisabled||V),u=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",b=this.size==="sm"?"text-sm":"text-base",v={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return o`<div part="form-control" class="flex flex-col h-full text-left">${r&&!this.floatingLabel||p?o`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${s(r?"inline-block":"hidden",b,this.visuallyDisabled||this.disabled?"text-neutral-500":" form-control-color-text")}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label> ${l.tooltip?o`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${s("relative h-full w-full",this.disabled&&"cursor-not-allowed")}">${r&&this.floatingLabel?o`<label id="label" part="form-control-floating-label" class="${s("absolute left-4 z-20 transition-all duration-200 cursor-text",b,h?"top-2 text-xs":"top-2.5 form-control-color-text")}" for="input"><span class="${s("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${s("absolute w-full h-full pointer-events-none border form-control-border-radius transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[u])}"></div><div part="base" class="${s("textarea h-full flex items-top form-control-border-radius group transition-colors duration-medium hover:duration-fast ease-in-out",this.floatingLabel&&"pt-6",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",u==="disabled"||u==="visuallyDisabled"?"text-neutral-500":"text-black",["invalid","activeInvalid"].includes(u)&&"form-control--invalid-color-background")}"><textarea part="textarea" id="input" class="${s("ps-4 flex-grow focus:outline-none bg-transparent placeholder:text-neutral-700 resize-none group-has-[sd-6-28-0-icon]:pe-8",{sm:h?"pb-1":"py-2",md:h?"pb-1":"py-2",lg:h?"pb-2":"py-2"}[this.size],this.disabled&&"cursor-not-allowed",b)}" title="${this.title}" name="${a(this.name)}" .value="${w(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${!this.floatingLabel||h?a(this.placeholder):""}" minlength="${a(this.minlength)}" maxlength="${a(this.maxlength)}" rows="${a(this.rows)}" autocapitalize="${a(this.autocapitalize)}" autocorrect="${a(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${a(this.spellcheck)}" enterkeyhint="${a(this.enterkeyhint)}" inputmode="${a(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?o`<sd-6-28-0-icon class="${s("text-error absolute right-4 pointer-events-none",v)}" library="_internal" name="risk" part="invalid-icon"></sd-6-28-0-icon>`:""} ${this.styleOnValid&&this.showValidStyle?o`<sd-6-28-0-icon class="${s("text-success absolute right-4 pointer-events-none",v)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-28-0-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${s("text-sm mt-1",n&&!this.showInvalidStyle?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!n||this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};t.styles=[...m.styles,y`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([required]) #label::after{content:' *'}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],e([f("#input")],t.prototype,"textarea",2),e([f("#invalid-message")],t.prototype,"invalidMessage",2),e([c()],t.prototype,"hasFocus",2),e([c()],t.prototype,"showValidStyle",2),e([c()],t.prototype,"showInvalidStyle",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"label",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String,reflect:!0})],t.prototype,"placeholder",2),e([i({type:Number,reflect:!0})],t.prototype,"rows",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"readonly",2),e([i({type:String,reflect:!0})],t.prototype,"form",2),e([i({type:Boolean,reflect:!0})],t.prototype,"required",2),e([i({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),e([i({type:Number,reflect:!0})],t.prototype,"minlength",2),e([i({type:Number,reflect:!0})],t.prototype,"maxlength",2),e([i({type:String,reflect:!0})],t.prototype,"autocapitalize",2),e([i({type:String,reflect:!0})],t.prototype,"autocorrect",2),e([i({reflect:!0})],t.prototype,"autocomplete",2),e([i({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),e([i({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),e([i({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),e([i({type:Boolean,converter:{fromAttribute:l=>!(!l||l==="false"),toAttribute:l=>l?"true":"false"}})],t.prototype,"spellcheck",2),e([i({type:String,reflect:!0})],t.prototype,"inputmode",2),e([$()],t.prototype,"defaultValue",2),e([d("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),e([d("rows",{waitUntilFirstUpdate:!0})],t.prototype,"handleRowsChange",1),e([d("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),e([d(["size","floatingLabel"])],t.prototype,"handleSizeChange",1),t=e([g("sd-6-28-0-textarea")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk.ICEC5PGK.js";import{a as B}from"./chunk.SAEYIL5V.js";import{a as A}from"./chunk.ERP45OHF.js";import{b as z}from"./chunk.LZRL7OLU.js";import{a as n}from"./chunk.LHSR56PH.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as P,b as V}from"./chunk.QQD62QOV.js";import{a as T}from"./chunk.VAM5SM3O.js";import{a}from"./chunk.UFTAQNZB.js";import{a as b}from"./chunk.NYKJXI3Q.js";import{a as E,b as l,c as m,d as w,h as x}from"./chunk.TFVRFH37.js";import{b as D,e as r,h as F,i as L}from"./chunk.OBAEIKIV.js";import{a as k,e as i}from"./chunk.6EV4YU6C.js";var $=class extends N{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==P.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return L}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=k({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),F}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var s;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(s=this.observer)==null||s.disconnect(),this.observer=new MutationObserver(u=>{u.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},C=V($);var _,R=(_=navigator.userAgentData)==null?void 0:_.brands.some(f=>f.brand.includes("Chromium")),J=R?!1:navigator.userAgent.includes("Firefox"),t=class extends x{constructor(){super(...arguments);this.formControlController=new z(this);this.hasSlotController=new M(this,"help-text","label","left","right","message","placeholder");this.localize=new T(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.isClickableIconFocused=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsDate)!=null?s:null}set valueAsDate(e){let s=document.createElement("input");s.type="date",s.valueAsDate=e,this.value=s.value}get valueAsNumber(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsNumber)!=null?s:parseFloat(this.value)}set valueAsNumber(e){let s=document.createElement("input");s.type="number",s.valueAsNumber=e,this.value=s.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let s=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!s&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleClickableIconFocusIn(){this.isClickableIconFocused=!0}handleClickableIconFocusOut(){this.isClickableIconFocused=!1}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,u="none"){this.input.setSelectionRange(e,s,u)}setRangeText(e,s,u,p){this.input.setRangeText(e,s,u,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},s=this.label?!0:!!e.label,u=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),O=!!e.tooltip,S=e.left,v=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&s&&(this.hasFocus||v||this.isClickableIconFocused),y=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",g=this.size==="sm"?"text-sm":"text-base",U={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[y],c=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",d={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],K=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(s||O)&&!this.floatingLabel?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(s?"inline-block":"hidden",g,this.visuallyDisabled||this.disabled?"text-neutral-500":" form-control-color-text")}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border form-control-border-radius transition-[border] ease-in-out duration-medium hover:duration-fast",U)}"></div><div part="base" class="${a("px-4 flex flex-row items-center form-control-border-radius transition-colors ease-in-out duration-medium hover:duration-fast",this.floatingLabel&&"has-floating-label",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",["disabled","visuallyDisabled"].includes(y)?"text-neutral-500":"text-black",["invalid","activeInvalid"].includes(y)&&"form-control--invalid-color-background",K)}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",c,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",g,h&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${!this.floatingLabel||h?n(this.placeholder):""}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${B(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${s&&this.floatingLabel?r`<label part="form-control-floating-label" class="${a("pointer-events-none absolute",S?q:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!h||!v&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2 form-control-color-text":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${s?"false":"true"}"><span id="floating-label" class="${a("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!h||!v&&(this.readonly||this.visuallyDisabled)?g:"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null} ${p?r`<button part="clear-button" class="${a("flex justify-center",d)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-27-2-icon class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",o)}" library="_internal" name="closing-round"></sd-6-27-2-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",d,this.floatingLabel&&!h&&"hide-password-toggle")}" type="button" @click="${this.handlePasswordToggle}" @mousedown="${this.handleClickableIconFocusIn}" @focus="${()=>this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-6-27-2-icon class="${a(c,o)}" library="_internal" name="eye"></sd-6-27-2-icon></slot>`:r`<slot name="hide-password-icon"><sd-6-27-2-icon class="${a(c,o)}" library="_internal" name="eye-crossed-out"></sd-6-27-2-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!J?r`<sd-6-27-2-icon class="${a(c,d,o)}" library="_internal" name="calendar"></sd-6-27-2-icon>`:""} ${this.type==="time"?r`<sd-6-27-2-icon class="${a(c,d,o)}" library="_internal" name="clock"></sd-6-27-2-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",d)}" type="button" @click="${this.handleSearchClick}"><sd-6-27-2-icon class="${a(c,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-27-2-icon></button>`:""} ${this.showInvalidStyle?r`<sd-6-27-2-icon part="invalid-icon" class="${a("text-error",d,o)}" library="_internal" name="risk"></sd-6-27-2-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-6-27-2-icon class="${a("text-success flex-shrink-0",d,o)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-27-2-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",c,d,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${C({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1" @mousedown="${this.handleClickableIconFocusIn}" @focus="${()=>this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}"><slot name="decrement-number-stepper"><sd-6-27-2-icon library="_internal" name="minus-circle" label="Decrease value" class="${a(c,d,o)}"></sd-6-27-2-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${C({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-6-27-2-icon library="_internal" name="plus-circle" label="Decrease value" class="${a(c,d,o)}"></sd-6-27-2-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm mt-1",u&&!this.showInvalidStyle?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!u||this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};t.styles=[...x.styles,D`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
-
:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label)::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0;display:none;-webkit-appearance:none}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-6-
|
|
1
|
+
import{a as N}from"./chunk.ICEC5PGK.js";import{a as B}from"./chunk.SAEYIL5V.js";import{a as A}from"./chunk.ERP45OHF.js";import{b as z}from"./chunk.LZRL7OLU.js";import{a as n}from"./chunk.LHSR56PH.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as P,b as V}from"./chunk.QQD62QOV.js";import{a as T}from"./chunk.VAM5SM3O.js";import{a}from"./chunk.UFTAQNZB.js";import{a as b}from"./chunk.NYKJXI3Q.js";import{a as E,b as l,c as m,d as w,h as x}from"./chunk.TFVRFH37.js";import{b as D,e as r,h as F,i as L}from"./chunk.OBAEIKIV.js";import{a as k,e as i}from"./chunk.6EV4YU6C.js";var $=class extends N{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==P.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return L}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=k({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),F}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var s;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(s=this.observer)==null||s.disconnect(),this.observer=new MutationObserver(u=>{u.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},C=V($);var _,R=(_=navigator.userAgentData)==null?void 0:_.brands.some(f=>f.brand.includes("Chromium")),J=R?!1:navigator.userAgent.includes("Firefox"),t=class extends x{constructor(){super(...arguments);this.formControlController=new z(this);this.hasSlotController=new M(this,"help-text","label","left","right","message","placeholder");this.localize=new T(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.isClickableIconFocused=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsDate)!=null?s:null}set valueAsDate(e){let s=document.createElement("input");s.type="date",s.valueAsDate=e,this.value=s.value}get valueAsNumber(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsNumber)!=null?s:parseFloat(this.value)}set valueAsNumber(e){let s=document.createElement("input");s.type="number",s.valueAsNumber=e,this.value=s.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let s=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!s&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleClickableIconFocusIn(){this.isClickableIconFocused=!0}handleClickableIconFocusOut(){this.isClickableIconFocused=!1}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,u="none"){this.input.setSelectionRange(e,s,u)}setRangeText(e,s,u,p){this.input.setRangeText(e,s,u,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},s=this.label?!0:!!e.label,u=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),O=!!e.tooltip,S=e.left,v=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&s&&(this.hasFocus||v||this.isClickableIconFocused),y=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",g=this.size==="sm"?"text-sm":"text-base",U={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[y],c=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",d={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],K=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(s||O)&&!this.floatingLabel?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(s?"inline-block":"hidden",g,this.visuallyDisabled||this.disabled?"text-neutral-500":" form-control-color-text")}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border form-control-border-radius transition-[border] ease-in-out duration-medium hover:duration-fast",U)}"></div><div part="base" class="${a("px-4 flex flex-row items-center form-control-border-radius transition-colors ease-in-out duration-medium hover:duration-fast",this.floatingLabel&&"has-floating-label",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",["disabled","visuallyDisabled"].includes(y)?"text-neutral-500":"text-black",["invalid","activeInvalid"].includes(y)&&"form-control--invalid-color-background",K)}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",c,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",g,h&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${!this.floatingLabel||h?n(this.placeholder):""}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${B(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${s&&this.floatingLabel?r`<label part="form-control-floating-label" class="${a("pointer-events-none absolute",S?q:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!h||!v&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2 form-control-color-text":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${s?"false":"true"}"><span id="floating-label" class="${a("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!h||!v&&(this.readonly||this.visuallyDisabled)?g:"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null} ${p?r`<button part="clear-button" class="${a("flex justify-center",d)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-28-0-icon class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",o)}" library="_internal" name="closing-round"></sd-6-28-0-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",d,this.floatingLabel&&!h&&"hide-password-toggle")}" type="button" @click="${this.handlePasswordToggle}" @mousedown="${this.handleClickableIconFocusIn}" @focus="${()=>this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-6-28-0-icon class="${a(c,o)}" library="_internal" name="eye"></sd-6-28-0-icon></slot>`:r`<slot name="hide-password-icon"><sd-6-28-0-icon class="${a(c,o)}" library="_internal" name="eye-crossed-out"></sd-6-28-0-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!J?r`<sd-6-28-0-icon class="${a(c,d,o)}" library="_internal" name="calendar"></sd-6-28-0-icon>`:""} ${this.type==="time"?r`<sd-6-28-0-icon class="${a(c,d,o)}" library="_internal" name="clock"></sd-6-28-0-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",d)}" type="button" @click="${this.handleSearchClick}"><sd-6-28-0-icon class="${a(c,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-28-0-icon></button>`:""} ${this.showInvalidStyle?r`<sd-6-28-0-icon part="invalid-icon" class="${a("text-error",d,o)}" library="_internal" name="risk"></sd-6-28-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-6-28-0-icon class="${a("text-success flex-shrink-0",d,o)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-28-0-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",c,d,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${C({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1" @mousedown="${this.handleClickableIconFocusIn}" @focus="${()=>this.handleClickableIconFocusIn()}" @blur="${this.handleClickableIconFocusOut}"><slot name="decrement-number-stepper"><sd-6-28-0-icon library="_internal" name="minus-circle" label="Decrease value" class="${a(c,d,o)}"></sd-6-28-0-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${C({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-6-28-0-icon library="_internal" name="plus-circle" label="Decrease value" class="${a(c,d,o)}"></sd-6-28-0-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm mt-1",u&&!this.showInvalidStyle?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!u||this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};t.styles=[...x.styles,D`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label)::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0;display:none;-webkit-appearance:none}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-6-28-0-icon{color:rgba(var(--sd-color-text-neutral-500))}.hide-password-toggle{display:none}.has-floating-label input[type=date]:not(.has-value),.has-floating-label input[type=datetime-local]:not(.has-value),.has-floating-label input[type=time]:not(.has-value){color:transparent}.has-floating-label input[type=date]:focus,.has-floating-label input[type=datetime-local]:focus,.has-floating-label input[type=time]:focus{color:inherit}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}`],i([w("#input")],t.prototype,"input",2),i([w("#invalid-message")],t.prototype,"invalidMessage",2),i([m()],t.prototype,"hasFocus",2),i([m()],t.prototype,"showValidStyle",2),i([m()],t.prototype,"showInvalidStyle",2),i([m()],t.prototype,"isClickableIconFocused",2),i([l({type:String,reflect:!0})],t.prototype,"type",2),i([l({type:String,reflect:!0})],t.prototype,"size",2),i([l({type:String,reflect:!0})],t.prototype,"inputmode",2),i([l()],t.prototype,"value",2),i([A()],t.prototype,"defaultValue",2),i([l({type:String,reflect:!0})],t.prototype,"placeholder",2),i([l({type:String,reflect:!0})],t.prototype,"label",2),i([l({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([l({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([l({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([l({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([l({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([l({type:Number,reflect:!0})],t.prototype,"minlength",2),i([l({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([l({reflect:!0})],t.prototype,"min",2),i([l({reflect:!0})],t.prototype,"max",2),i([l({type:String,reflect:!0})],t.prototype,"form",2),i([l({type:String,reflect:!0})],t.prototype,"name",2),i([l({type:String,reflect:!0})],t.prototype,"title",2),i([l({type:Boolean,reflect:!0})],t.prototype,"required",2),i([l({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),i([l()],t.prototype,"pattern",2),i([l({reflect:!0})],t.prototype,"step",2),i([l({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([l({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([l({reflect:!0})],t.prototype,"autocomplete",2),i([l({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([l({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([l({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([b("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([b("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([b("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),i([b(["size","floatingLabel"])],t.prototype,"handleSizeChange",1),t=i([E("sd-6-28-0-input")],t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m,b as g,c as b,d as h,h as u}from"./chunk.TFVRFH37.js";import{b as d,e as c}from"./chunk.OBAEIKIV.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends u{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-6-
|
|
2
|
-
:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([g({type:String,reflect:!0})],s.prototype,"label",2),s=l([m("sd-6-
|
|
1
|
+
import{a as m,b as g,c as b,d as h,h as u}from"./chunk.TFVRFH37.js";import{b as d,e as c}from"./chunk.OBAEIKIV.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends u{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-6-28-0-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-6-28-0-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-6-28-0-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-6-28-0-button-group__button--hover")}handleSlotChange(){let e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{let n=e.indexOf(t),o=a(t);o!==null&&(o.classList.add("sd-6-28-0-button-group__button"),o.classList.toggle("sd-6-28-0-button-group__button--first",n===0),o.classList.toggle("sd-6-28-0-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-6-28-0-button-group__button--last",n===e.length-1),o.classList.toggle("sd-6-28-0-button-group__button--radio",o.tagName.toLowerCase()==="sd-6-28-0-radio-button"))})}render(){return c`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};s.styles=[...u.styles,d`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([g({type:String,reflect:!0})],s.prototype,"label",2),s=l([m("sd-6-28-0-button-group")],s);function a(r){var e;let i="sd-6-28-0-button, sd-6-28-0-radio-button";return(e=r.closest(i))!=null?e:r.querySelector(i)}export{s as a};
|