@solid-design-system/components 4.0.0-next.10 → 4.0.0-next.12
Sign up to get free protection for your applications and to get access to all the features.
- package/cdn/chunks/{chunk.4ZLT6KBW.js → chunk.27P4XVMA.js} +1 -1
- package/cdn/chunks/{chunk.6AEKVM4D.js → chunk.2CYKFWL2.js} +1 -1
- package/cdn/chunks/chunk.3BP4JKVA.js +73 -0
- package/cdn/chunks/{chunk.GCWTBB43.js → chunk.3IPN77DT.js} +1 -1
- package/cdn/chunks/{chunk.W2M3ITZ6.js → chunk.3SSIAAEU.js} +1 -1
- package/cdn/chunks/{chunk.BQQVLPY4.js → chunk.5BMT34AY.js} +1 -1
- package/cdn/chunks/{chunk.ZH5YOK2R.js → chunk.647JLNTI.js} +1 -1
- package/cdn/chunks/{chunk.MHHHE75F.js → chunk.6BDCEAVF.js} +1 -1
- package/cdn/chunks/{chunk.KPAW7QL2.js → chunk.7VSDQRWQ.js} +1 -1
- package/cdn/chunks/{chunk.HRXA5JN2.js → chunk.A4G6Y76O.js} +1 -1
- package/cdn/chunks/{chunk.V7RWAM4R.js → chunk.ADINOF7M.js} +1 -1
- package/cdn/chunks/{chunk.JCTIIJ44.js → chunk.AET67HPL.js} +1 -1
- package/cdn/chunks/{chunk.TZMBVR24.js → chunk.BKAM7ZYV.js} +1 -1
- package/cdn/chunks/{chunk.CRQ75A7K.js → chunk.BURIKJWK.js} +1 -1
- package/cdn/chunks/{chunk.P4LMRQ2W.js → chunk.DLTYLPXF.js} +1 -1
- package/cdn/chunks/{chunk.SLELMW5W.js → chunk.EH4OGY33.js} +1 -1
- package/cdn/chunks/{chunk.3QCHB7C4.js → chunk.EY7SRDP7.js} +1 -1
- package/cdn/chunks/{chunk.IH7PPWKS.js → chunk.FZOGKJ6K.js} +1 -1
- package/cdn/chunks/{chunk.4R3BUYI6.js → chunk.GCJNU5BB.js} +1 -1
- package/cdn/chunks/chunk.GU6YYER3.js +1 -0
- package/cdn/chunks/{chunk.JOBV6UKJ.js → chunk.HWHDT555.js} +1 -1
- package/cdn/chunks/{chunk.E4STSELW.js → chunk.HZ4OPRVF.js} +1 -1
- package/cdn/chunks/{chunk.H7UHODBE.js → chunk.IDCOAEYV.js} +1 -1
- package/cdn/chunks/{chunk.S3ZRXV3P.js → chunk.INQ5A3RT.js} +1 -1
- package/cdn/chunks/{chunk.CSF7IJSV.js → chunk.JMR5LRM4.js} +1 -1
- package/cdn/chunks/{chunk.BNXXO5KU.js → chunk.M4RFSHFF.js} +1 -1
- package/cdn/chunks/{chunk.INTAVJVZ.js → chunk.MNUMMNDI.js} +1 -1
- package/cdn/chunks/{chunk.SWKERNOK.js → chunk.NHZ6UIWO.js} +1 -1
- package/cdn/chunks/{chunk.FK3QAIHB.js → chunk.NLBGFAEL.js} +2 -2
- package/cdn/chunks/{chunk.VMFHBPHG.js → chunk.NSYOAWT4.js} +1 -1
- package/cdn/chunks/{chunk.JCLTUYPT.js → chunk.NZ5V2VSI.js} +1 -1
- package/cdn/chunks/{chunk.WOJCTG6E.js → chunk.OYCPNRQV.js} +1 -1
- package/cdn/chunks/{chunk.2O6P42TG.js → chunk.PCWU4TKS.js} +1 -1
- package/cdn/chunks/{chunk.N3BUJHMA.js → chunk.PDS5EJLY.js} +1 -1
- package/cdn/chunks/{chunk.63QMXQSQ.js → chunk.PY4OL3TM.js} +1 -1
- package/cdn/chunks/{chunk.BIGM6NEW.js → chunk.QKDYT7VV.js} +1 -1
- package/cdn/chunks/{chunk.JVLAULKU.js → chunk.ROPE253M.js} +1 -1
- package/cdn/chunks/{chunk.YLM4CPSP.js → chunk.TNLTS4Y3.js} +1 -1
- package/cdn/chunks/{chunk.OUQ5JFZE.js → chunk.TU2SAF4G.js} +1 -1
- package/cdn/chunks/{chunk.D6WAP655.js → chunk.U34WY52I.js} +1 -1
- package/cdn/chunks/chunk.U7AQLAX6.js +1 -0
- package/cdn/chunks/{chunk.CV34FMRZ.js → chunk.U7T4LLPE.js} +1 -1
- package/cdn/chunks/{chunk.QDZ6IRX3.js → chunk.V2TDTGPP.js} +1 -1
- package/cdn/chunks/{chunk.G45M3PVK.js → chunk.WEAE6ZBM.js} +1 -1
- package/cdn/chunks/{chunk.HIWT2ZT2.js → chunk.WZC3XCIR.js} +1 -1
- package/cdn/chunks/{chunk.CY3FENGS.js → chunk.XHNPUCSF.js} +1 -1
- package/cdn/chunks/{chunk.6ODGFNBK.js → chunk.XODZQ2XV.js} +1 -1
- package/cdn/chunks/{chunk.AOCTDOCG.js → chunk.XYADX7DL.js} +1 -1
- package/cdn/chunks/{chunk.AKCSI5N6.js → chunk.YMD2XYIC.js} +1 -1
- package/cdn/chunks/{chunk.7VCG3G4V.js → chunk.Z5YG3CRT.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/animation/animation.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/badge/badge.js +1 -1
- package/cdn/components/brandshape/brandshape.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/button-group/button-group.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/carousel-item/carousel-item.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/dialog/dialog.js +1 -1
- package/cdn/components/divider/divider.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/expandable/expandable.js +1 -1
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/header/header.js +1 -1
- package/cdn/components/icon/icon.js +1 -1
- package/cdn/components/include/include.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/link/link.js +1 -1
- package/cdn/components/map-marker/map-marker.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/optgroup/optgroup.js +1 -1
- package/cdn/components/option/option.js +1 -1
- package/cdn/components/popup/popup.js +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-button/radio-button.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/components/scrollable/scrollable.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/spinner/spinner.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/step-group/step-group.js +1 -1
- package/cdn/components/switch/switch.js +1 -1
- package/cdn/components/tab/tab.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/tab-panel/tab-panel.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/components/teaser/teaser.js +1 -1
- package/cdn/components/teaser-media/teaser-media.js +1 -1
- package/cdn/components/textarea/textarea.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/components/video/video.js +1 -1
- package/cdn/custom-elements.json +5 -1
- package/cdn/solid-components.bundle.js +3 -3
- package/cdn/solid-components.iife.js +3 -3
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/vscode.html-custom-data.json +1 -1
- package/cdn/web-types.json +2 -2
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/{chunk.4ZLT6KBW.js → chunk.27P4XVMA.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6AEKVM4D.js → chunk.2CYKFWL2.js} +1 -1
- package/cdn-versioned/chunks/chunk.3BP4JKVA.js +73 -0
- package/cdn-versioned/chunks/{chunk.GCWTBB43.js → chunk.3IPN77DT.js} +1 -1
- package/cdn-versioned/chunks/{chunk.W2M3ITZ6.js → chunk.3SSIAAEU.js} +1 -1
- package/cdn-versioned/chunks/{chunk.BQQVLPY4.js → chunk.5BMT34AY.js} +1 -1
- package/cdn-versioned/chunks/{chunk.ZH5YOK2R.js → chunk.647JLNTI.js} +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/{chunk.MHHHE75F.js → chunk.6BDCEAVF.js} +4 -4
- package/cdn-versioned/chunks/{chunk.KPAW7QL2.js → chunk.7VSDQRWQ.js} +1 -1
- package/cdn-versioned/chunks/{chunk.HRXA5JN2.js → chunk.A4G6Y76O.js} +1 -1
- package/cdn-versioned/chunks/{chunk.V7RWAM4R.js → chunk.ADINOF7M.js} +1 -1
- package/cdn-versioned/chunks/{chunk.JCTIIJ44.js → chunk.AET67HPL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.TZMBVR24.js → chunk.BKAM7ZYV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CRQ75A7K.js → chunk.BURIKJWK.js} +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.P4LMRQ2W.js → chunk.DLTYLPXF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.SLELMW5W.js → chunk.EH4OGY33.js} +2 -2
- package/cdn-versioned/chunks/{chunk.3QCHB7C4.js → chunk.EY7SRDP7.js} +2 -2
- package/cdn-versioned/chunks/{chunk.IH7PPWKS.js → chunk.FZOGKJ6K.js} +1 -1
- package/cdn-versioned/chunks/{chunk.4R3BUYI6.js → chunk.GCJNU5BB.js} +1 -1
- package/cdn-versioned/chunks/chunk.GU6YYER3.js +1 -0
- package/cdn-versioned/chunks/{chunk.JOBV6UKJ.js → chunk.HWHDT555.js} +1 -1
- package/cdn-versioned/chunks/{chunk.E4STSELW.js → chunk.HZ4OPRVF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.H7UHODBE.js → chunk.IDCOAEYV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.S3ZRXV3P.js → chunk.INQ5A3RT.js} +1 -1
- package/cdn-versioned/chunks/{chunk.CSF7IJSV.js → chunk.JMR5LRM4.js} +1 -1
- package/cdn-versioned/chunks/{chunk.BNXXO5KU.js → chunk.M4RFSHFF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.INTAVJVZ.js → chunk.MNUMMNDI.js} +2 -2
- package/cdn-versioned/chunks/{chunk.SWKERNOK.js → chunk.NHZ6UIWO.js} +1 -1
- package/cdn-versioned/chunks/{chunk.FK3QAIHB.js → chunk.NLBGFAEL.js} +4 -4
- package/cdn-versioned/chunks/{chunk.VMFHBPHG.js → chunk.NSYOAWT4.js} +1 -1
- package/cdn-versioned/chunks/{chunk.JCLTUYPT.js → chunk.NZ5V2VSI.js} +1 -1
- package/cdn-versioned/chunks/{chunk.WOJCTG6E.js → chunk.OYCPNRQV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.2O6P42TG.js → chunk.PCWU4TKS.js} +1 -1
- package/cdn-versioned/chunks/{chunk.N3BUJHMA.js → chunk.PDS5EJLY.js} +1 -1
- package/cdn-versioned/chunks/{chunk.63QMXQSQ.js → chunk.PY4OL3TM.js} +2 -2
- package/cdn-versioned/chunks/{chunk.BIGM6NEW.js → chunk.QKDYT7VV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.JVLAULKU.js → chunk.ROPE253M.js} +1 -1
- package/cdn-versioned/chunks/{chunk.YLM4CPSP.js → chunk.TNLTS4Y3.js} +1 -1
- package/cdn-versioned/chunks/{chunk.OUQ5JFZE.js → chunk.TU2SAF4G.js} +4 -4
- package/cdn-versioned/chunks/{chunk.D6WAP655.js → chunk.U34WY52I.js} +1 -1
- package/cdn-versioned/chunks/chunk.U7AQLAX6.js +1 -0
- package/cdn-versioned/chunks/{chunk.CV34FMRZ.js → chunk.U7T4LLPE.js} +1 -1
- package/cdn-versioned/chunks/{chunk.QDZ6IRX3.js → chunk.V2TDTGPP.js} +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/{chunk.G45M3PVK.js → chunk.WEAE6ZBM.js} +1 -1
- package/cdn-versioned/chunks/{chunk.HIWT2ZT2.js → chunk.WZC3XCIR.js} +2 -2
- package/cdn-versioned/chunks/{chunk.CY3FENGS.js → chunk.XHNPUCSF.js} +1 -1
- package/cdn-versioned/chunks/{chunk.6ODGFNBK.js → chunk.XODZQ2XV.js} +1 -1
- package/cdn-versioned/chunks/{chunk.AOCTDOCG.js → chunk.XYADX7DL.js} +1 -1
- package/cdn-versioned/chunks/{chunk.AKCSI5N6.js → chunk.YMD2XYIC.js} +1 -1
- package/cdn-versioned/chunks/{chunk.7VCG3G4V.js → chunk.Z5YG3CRT.js} +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion/accordion.js +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.js +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.js +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.js +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.js +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button/button.js +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.js +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.js +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.js +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.js +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.js +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.js +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.js +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.js +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.js +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/header/header.js +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.js +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/include/include.js +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/input/input.js +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/link/link.js +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.js +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.js +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/cdn-versioned/components/optgroup/optgroup.js +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/option/option.js +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.js +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.js +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.js +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.js +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/cdn-versioned/components/radio-group/radio-group.js +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.js +1 -1
- package/cdn-versioned/components/select/select.d.ts +4 -4
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.js +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step/step.js +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.js +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.js +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.js +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.js +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.js +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.js +1 -1
- package/cdn-versioned/components/teaser/teaser.js +1 -1
- package/cdn-versioned/components/teaser-media/teaser-media.js +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.js +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.js +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/components/video/video.js +1 -1
- package/cdn-versioned/custom-elements.json +206 -202
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +17 -17
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +17 -17
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +81 -81
- package/cdn-versioned/web-types.json +138 -138
- package/dist/chunks/{chunk.OZBWEFM7.js → chunk.3MB5BULP.js} +1 -1
- package/dist/chunks/{chunk.4WC43I2G.js → chunk.72RQXFUJ.js} +1 -1
- package/dist/chunks/{chunk.NTKMCOLR.js → chunk.7A4PCELQ.js} +1 -1
- package/dist/chunks/{chunk.W6Z5BPA5.js → chunk.7TH6VN75.js} +2 -2
- package/dist/chunks/{chunk.YQJ2FRJY.js → chunk.AFNKNM3P.js} +5 -5
- package/dist/chunks/{chunk.STNLNYKE.js → chunk.ASAXVCVJ.js} +1 -1
- package/dist/chunks/{chunk.UO7UGXMA.js → chunk.BAKEFAQ3.js} +1 -1
- package/dist/chunks/{chunk.FYPZKHQ2.js → chunk.C3IVTPFT.js} +1 -1
- package/dist/chunks/{chunk.T7U45C76.js → chunk.CWZMGP22.js} +1 -1
- package/dist/chunks/{chunk.MEGJ7CBG.js → chunk.DWIJB4FE.js} +4 -4
- package/dist/chunks/{chunk.K6B7NG4F.js → chunk.E5RK2KNC.js} +1 -1
- package/dist/chunks/{chunk.TYDRZQYV.js → chunk.EOK7GTLB.js} +1 -1
- package/dist/chunks/{chunk.3SACKHZW.js → chunk.EROZOZSD.js} +1 -1
- package/dist/chunks/{chunk.4WWL72HB.js → chunk.EZZY6RYW.js} +1 -1
- package/dist/chunks/{chunk.YGC3JJ2C.js → chunk.FTPI46H7.js} +1 -1
- package/dist/chunks/{chunk.DVSGWCY2.js → chunk.FXAD3J2G.js} +1 -1
- package/dist/chunks/{chunk.ISNWRY34.js → chunk.G4S2CHVG.js} +4 -4
- package/dist/chunks/chunk.GC3PXZ6M.js +65 -0
- package/dist/chunks/{chunk.4NEMGQ57.js → chunk.GLFF67DA.js} +7 -7
- package/dist/chunks/{chunk.X55CH4SC.js → chunk.I4JQIHL5.js} +1 -1
- package/dist/chunks/{chunk.FJRTIKOG.js → chunk.IJKJEQKZ.js} +1 -1
- package/dist/chunks/{chunk.XFF2H3JK.js → chunk.JN6UBBKL.js} +1 -1
- package/dist/chunks/{chunk.TLVJDDZL.js → chunk.JWJRZKES.js} +1 -1
- package/dist/chunks/{chunk.JCLUIZEF.js → chunk.KARKPO6D.js} +1 -1
- package/dist/chunks/{chunk.6XP4L2GR.js → chunk.KCHA5X3N.js} +1 -1
- package/dist/chunks/{chunk.MF3CL2AP.js → chunk.KXWPB4EA.js} +1 -1
- package/dist/chunks/{chunk.O5W5RLTG.js → chunk.LIHVJG34.js} +1 -1
- package/dist/chunks/{chunk.4XJBD3PS.js → chunk.LOHV3SQ7.js} +1 -1
- package/dist/chunks/{chunk.WBTUVFBA.js → chunk.MEYIIQQC.js} +1 -1
- package/dist/chunks/{chunk.C7ITLHV2.js → chunk.MSBRGBZ3.js} +2 -2
- package/dist/chunks/{chunk.AYZRRY6G.js → chunk.N443KN6M.js} +1 -1
- package/dist/chunks/{chunk.SFM7ZSKY.js → chunk.RJG7FDQN.js} +1 -1
- package/dist/chunks/{chunk.FPZWHLNC.js → chunk.S4MVT4ZE.js} +2 -2
- package/dist/chunks/{chunk.AZWDFCND.js → chunk.S5ODUYDD.js} +1 -1
- package/dist/chunks/{chunk.SI6BILWU.js → chunk.SAHCI5Y5.js} +1 -1
- package/dist/chunks/{chunk.O3MWFP7G.js → chunk.SNEFSXVE.js} +1 -1
- package/dist/chunks/{chunk.II5QKXKB.js → chunk.SWWBX77U.js} +1 -1
- package/dist/chunks/{chunk.BUN3ON73.js → chunk.SX66NTJS.js} +1 -1
- package/dist/chunks/{chunk.7245PZD4.js → chunk.V542QHOM.js} +1 -1
- package/dist/chunks/{chunk.O4QXE2LJ.js → chunk.VA4H4TO6.js} +1 -1
- package/dist/chunks/{chunk.23UMRH3O.js → chunk.VDF7KHYO.js} +1 -1
- package/dist/chunks/{chunk.ALGO2EYV.js → chunk.VYFAJUCN.js} +1 -1
- package/dist/chunks/{chunk.LEOC6FW6.js → chunk.WSGE4KVS.js} +3 -3
- package/dist/chunks/{chunk.4XYZAEKQ.js → chunk.XW5FWVSL.js} +1 -1
- package/dist/chunks/{chunk.6TKVFZLG.js → chunk.YMMZA3LC.js} +1 -1
- package/dist/chunks/{chunk.JYRKP32Z.js → chunk.YQ6ZGCYS.js} +1 -1
- package/dist/chunks/{chunk.YYRZLQAY.js → chunk.ZDM4363V.js} +1 -1
- package/dist/chunks/{chunk.QQ4M35EE.js → chunk.ZXUJNQSP.js} +1 -1
- package/dist/chunks/{chunk.L6MU3DLL.js → chunk.ZY536C6C.js} +1 -1
- package/dist/chunks/{chunk.RKAIYDTU.js → chunk.ZYCCX6R7.js} +1 -1
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion-group/accordion-group.js +4 -4
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/audio/audio.js +2 -2
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/brandshape/brandshape.js +2 -2
- package/dist/components/button/button.js +3 -3
- package/dist/components/button-group/button-group.js +2 -2
- package/dist/components/carousel/carousel.js +4 -4
- package/dist/components/carousel-item/carousel-item.js +2 -2
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/combobox/combobox.js +5 -5
- package/dist/components/dialog/dialog.js +5 -5
- package/dist/components/divider/divider.js +2 -2
- package/dist/components/drawer/drawer.js +5 -5
- package/dist/components/dropdown/dropdown.js +3 -3
- package/dist/components/expandable/expandable.js +2 -2
- package/dist/components/flipcard/flipcard.js +5 -5
- package/dist/components/header/header.js +2 -2
- package/dist/components/icon/icon.js +2 -2
- package/dist/components/include/include.js +2 -2
- package/dist/components/input/input.js +3 -3
- package/dist/components/link/link.js +2 -2
- package/dist/components/map-marker/map-marker.js +2 -2
- package/dist/components/navigation-item/navigation-item.js +2 -2
- package/dist/components/notification/notification.js +2 -2
- package/dist/components/optgroup/optgroup.js +3 -3
- package/dist/components/option/option.js +3 -3
- package/dist/components/popup/popup.js +2 -2
- package/dist/components/quickfact/quickfact.js +4 -4
- package/dist/components/radio/radio.js +3 -3
- package/dist/components/radio-button/radio-button.js +2 -2
- package/dist/components/radio-group/radio-group.js +5 -5
- package/dist/components/scrollable/scrollable.js +2 -2
- package/dist/components/select/select.js +5 -5
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/step/step.js +2 -2
- package/dist/components/step-group/step-group.js +2 -2
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/tab/tab.js +2 -2
- package/dist/components/tab-group/tab-group.js +2 -2
- package/dist/components/tab-panel/tab-panel.js +2 -2
- package/dist/components/tag/tag.js +2 -2
- package/dist/components/teaser/teaser.js +2 -2
- package/dist/components/teaser-media/teaser-media.js +2 -2
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/components/video/video.js +2 -2
- package/dist/custom-elements.json +5 -1
- package/dist/solid-components.js +50 -50
- package/dist/utilities/autocomplete-config.js +2 -2
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +2 -2
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/{chunk.OZBWEFM7.js → chunk.3MB5BULP.js} +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/{chunk.4WC43I2G.js → chunk.72RQXFUJ.js} +3 -3
- package/dist-versioned/chunks/{chunk.NTKMCOLR.js → chunk.7A4PCELQ.js} +2 -2
- package/dist-versioned/chunks/{chunk.W6Z5BPA5.js → chunk.7TH6VN75.js} +5 -5
- package/dist-versioned/chunks/{chunk.YQJ2FRJY.js → chunk.AFNKNM3P.js} +34 -34
- package/dist-versioned/chunks/{chunk.STNLNYKE.js → chunk.ASAXVCVJ.js} +4 -4
- package/dist-versioned/chunks/{chunk.UO7UGXMA.js → chunk.BAKEFAQ3.js} +2 -2
- package/dist-versioned/chunks/{chunk.FYPZKHQ2.js → chunk.C3IVTPFT.js} +3 -3
- package/dist-versioned/chunks/{chunk.T7U45C76.js → chunk.CWZMGP22.js} +3 -3
- package/dist-versioned/chunks/{chunk.MEGJ7CBG.js → chunk.DWIJB4FE.js} +5 -5
- package/dist-versioned/chunks/{chunk.K6B7NG4F.js → chunk.E5RK2KNC.js} +3 -3
- package/dist-versioned/chunks/{chunk.TYDRZQYV.js → chunk.EOK7GTLB.js} +2 -2
- package/dist-versioned/chunks/{chunk.3SACKHZW.js → chunk.EROZOZSD.js} +2 -2
- package/dist-versioned/chunks/{chunk.4WWL72HB.js → chunk.EZZY6RYW.js} +4 -4
- package/dist-versioned/chunks/{chunk.YGC3JJ2C.js → chunk.FTPI46H7.js} +3 -3
- package/dist-versioned/chunks/{chunk.DVSGWCY2.js → chunk.FXAD3J2G.js} +3 -3
- package/dist-versioned/chunks/{chunk.ISNWRY34.js → chunk.G4S2CHVG.js} +30 -30
- package/dist-versioned/chunks/chunk.GC3PXZ6M.js +65 -0
- package/dist-versioned/chunks/{chunk.4NEMGQ57.js → chunk.GLFF67DA.js} +12 -12
- package/dist-versioned/chunks/{chunk.X55CH4SC.js → chunk.I4JQIHL5.js} +7 -7
- package/dist-versioned/chunks/{chunk.FJRTIKOG.js → chunk.IJKJEQKZ.js} +3 -3
- package/dist-versioned/chunks/{chunk.XFF2H3JK.js → chunk.JN6UBBKL.js} +3 -3
- package/dist-versioned/chunks/{chunk.TLVJDDZL.js → chunk.JWJRZKES.js} +12 -12
- package/dist-versioned/chunks/{chunk.JCLUIZEF.js → chunk.KARKPO6D.js} +3 -3
- package/dist-versioned/chunks/{chunk.6XP4L2GR.js → chunk.KCHA5X3N.js} +6 -6
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/{chunk.MF3CL2AP.js → chunk.KXWPB4EA.js} +10 -10
- package/dist-versioned/chunks/{chunk.O5W5RLTG.js → chunk.LIHVJG34.js} +2 -2
- package/dist-versioned/chunks/{chunk.4XJBD3PS.js → chunk.LOHV3SQ7.js} +2 -2
- package/dist-versioned/chunks/{chunk.WBTUVFBA.js → chunk.MEYIIQQC.js} +14 -14
- package/dist-versioned/chunks/{chunk.C7ITLHV2.js → chunk.MSBRGBZ3.js} +8 -8
- package/dist-versioned/chunks/{chunk.AYZRRY6G.js → chunk.N443KN6M.js} +2 -2
- package/dist-versioned/chunks/{chunk.SFM7ZSKY.js → chunk.RJG7FDQN.js} +3 -3
- package/dist-versioned/chunks/{chunk.FPZWHLNC.js → chunk.S4MVT4ZE.js} +7 -7
- package/dist-versioned/chunks/{chunk.AZWDFCND.js → chunk.S5ODUYDD.js} +6 -6
- package/dist-versioned/chunks/{chunk.SI6BILWU.js → chunk.SAHCI5Y5.js} +2 -2
- package/dist-versioned/chunks/{chunk.O3MWFP7G.js → chunk.SNEFSXVE.js} +6 -6
- package/dist-versioned/chunks/{chunk.II5QKXKB.js → chunk.SWWBX77U.js} +3 -3
- package/dist-versioned/chunks/{chunk.BUN3ON73.js → chunk.SX66NTJS.js} +6 -6
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/{chunk.7245PZD4.js → chunk.V542QHOM.js} +3 -3
- package/dist-versioned/chunks/{chunk.O4QXE2LJ.js → chunk.VA4H4TO6.js} +3 -3
- package/dist-versioned/chunks/{chunk.23UMRH3O.js → chunk.VDF7KHYO.js} +2 -2
- package/dist-versioned/chunks/{chunk.ALGO2EYV.js → chunk.VYFAJUCN.js} +3 -3
- package/dist-versioned/chunks/{chunk.LEOC6FW6.js → chunk.WSGE4KVS.js} +16 -16
- package/dist-versioned/chunks/{chunk.4XYZAEKQ.js → chunk.XW5FWVSL.js} +2 -2
- package/dist-versioned/chunks/{chunk.6TKVFZLG.js → chunk.YMMZA3LC.js} +4 -4
- package/dist-versioned/chunks/{chunk.JYRKP32Z.js → chunk.YQ6ZGCYS.js} +3 -3
- package/dist-versioned/chunks/{chunk.YYRZLQAY.js → chunk.ZDM4363V.js} +5 -5
- package/dist-versioned/chunks/{chunk.QQ4M35EE.js → chunk.ZXUJNQSP.js} +2 -2
- package/dist-versioned/chunks/{chunk.L6MU3DLL.js → chunk.ZY536C6C.js} +2 -2
- package/dist-versioned/chunks/{chunk.RKAIYDTU.js → chunk.ZYCCX6R7.js} +4 -4
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion/accordion.js +3 -3
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +4 -4
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/animation/animation.js +2 -2
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +2 -2
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/badge/badge.js +2 -2
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.js +2 -2
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button/button.js +3 -3
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.js +2 -2
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.js +4 -4
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.js +2 -2
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +3 -3
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.js +3 -3
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/combobox/combobox.js +5 -5
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +5 -5
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/divider/divider.js +2 -2
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +5 -5
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.js +3 -3
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.js +2 -2
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.js +5 -5
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/header/header.js +2 -2
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/icon/icon.js +2 -2
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/include/include.js +2 -2
- package/dist-versioned/components/input/input.d.ts +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/link/link.js +2 -2
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.js +2 -2
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +2 -2
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +2 -2
- package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/dist-versioned/components/optgroup/optgroup.js +3 -3
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/option/option.js +3 -3
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/popup/popup.js +2 -2
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +4 -4
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio/radio.js +3 -3
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.js +2 -2
- package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/dist-versioned/components/radio-group/radio-group.js +5 -5
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.js +2 -2
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/select/select.js +5 -5
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.js +2 -2
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step/step.js +2 -2
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.js +2 -2
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/switch/switch.js +2 -2
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab/tab.js +2 -2
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +2 -2
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.js +2 -2
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/tag/tag.js +2 -2
- package/dist-versioned/components/teaser/teaser.js +2 -2
- package/dist-versioned/components/teaser-media/teaser-media.js +2 -2
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.js +2 -2
- 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 +2 -2
- package/dist-versioned/custom-elements.json +206 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +50 -50
- package/dist-versioned/utilities/autocomplete-config.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +81 -81
- package/dist-versioned/web-types.json +138 -138
- package/package.json +1 -1
- package/cdn/chunks/chunk.KXVP2SWS.js +0 -1
- package/cdn/chunks/chunk.P7EPSHEQ.js +0 -73
- package/cdn/chunks/chunk.XSWKLIM6.js +0 -1
- package/cdn-versioned/chunks/chunk.KXVP2SWS.js +0 -1
- package/cdn-versioned/chunks/chunk.P7EPSHEQ.js +0 -73
- package/cdn-versioned/chunks/chunk.XSWKLIM6.js +0 -1
- package/dist/chunks/chunk.DNCLRX5Q.js +0 -65
- package/dist-versioned/chunks/chunk.DNCLRX5Q.js +0 -65
@@ -1 +1 @@
|
|
1
|
-
import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.P7EPSHEQ.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-0-0-next-10-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-4-0-0-next-10-icon class="text-3xl" name="pause" library="system"></sd-4-0-0-next-10-icon></slot>`:s`<slot name="play-icon"><sd-4-0-0-next-10-icon class="text-3xl" name="start" library="system"></sd-4-0-0-next-10-icon></slot>`}</sd-4-0-0-next-10-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-4-0-0-next-10-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-4-0-0-next-10-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-0-0-next-10-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-4-0-0-next-10-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-4-0-0-next-10-drawer><slot name="transcript"></slot></sd-4-0-0-next-10-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-0-0-next-10-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-0-0-next-10-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-4-0-0-next-10-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-4-0-0-next-10-audio")],t);export{t as a};
|
1
|
+
import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.3BP4JKVA.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-0-0-next-12-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-4-0-0-next-12-icon class="text-3xl" name="pause" library="system"></sd-4-0-0-next-12-icon></slot>`:s`<slot name="play-icon"><sd-4-0-0-next-12-icon class="text-3xl" name="start" library="system"></sd-4-0-0-next-12-icon></slot>`}</sd-4-0-0-next-12-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-4-0-0-next-12-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-4-0-0-next-12-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-0-0-next-12-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-4-0-0-next-12-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-4-0-0-next-12-drawer><slot name="transcript"></slot></sd-4-0-0-next-12-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-0-0-next-12-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-0-0-next-12-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-4-0-0-next-12-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-4-0-0-next-12-audio")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.
|
1
|
+
import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.3BP4JKVA.js";import{b as h,e as i}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return i`<span part="base" class="${r("sd-4-0-0-next-12-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${r("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?i`<span part="checked" class="${r("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${r("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...n.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([l()],e.prototype,"checked",2),t([l()],e.prototype,"hasFocus",2),t([s({reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([a("checked")],e.prototype,"handleCheckedChange",1),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-4-0-0-next-12-radio")],e);export{e as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{b as y,c as g}from"./chunk.65NSSTJE.js";import{a}from"./chunk.HE2LNCWW.js";import{a as d,b as m}from"./chunk.5ZILM4TA.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as v}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as i,c as p,d as f,g as u,h as l}from"./chunk.
|
1
|
+
import{b as y,c as g}from"./chunk.65NSSTJE.js";import{a}from"./chunk.HE2LNCWW.js";import{a as d,b as m}from"./chunk.5ZILM4TA.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as v}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as h,b as i,c as p,d as f,g as u,h as l}from"./chunk.3BP4JKVA.js";import{b as c}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.formControlController=new y(this,{form:e=>{if(e.hasAttribute("form")){let s=e.getRootNode(),o=e.getAttribute("form");return s.getElementById(o)}return e.closest("form")}});this.hasSlotController=new v(this,"[default]","icon-left","icon-right");this.invalid=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.loading=!1;this.type="button";this.name="";this.value="";this.href=""}get validity(){return this.isButton()?this.button.validity:g}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(e){if(this.disabled||this.loading){e.preventDefault(),e.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){let e=this.isLink(),s=e?d`a`:d`button`,o={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0};return m`<${s} part="base" class="${n(`font-md leading-[calc(var(--tw-varspacing)-2px)] no-underline
|
2
2
|
w-full h-varspacing whitespace-nowrap align-middle inline-flex items-stretch justify-center
|
3
3
|
border transition-colors duration-200 ease-in-out rounded-default
|
4
4
|
select-none cursor-[inherit]`,this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.loading&&"relative cursor-wait",this.disabled&&"cursor-not-allowed",o["icon-only"]&&"px-0 w-varspacing",{sm:"text-sm varspacing-8 px-4",md:"text-base varspacing-10 px-4",lg:"text-base varspacing-12 px-4"}[this.size],{primary:this.inverted?`text-primary bg-white border-transparent
|
@@ -22,4 +22,4 @@ import{b as y,c as g}from"./chunk.65NSSTJE.js";import{a}from"./chunk.HE2LNCWW.js
|
|
22
22
|
disabled:text-neutral-500`,cta:`text-white bg-accent-500 border-transparent
|
23
23
|
hover:bg-accent-550
|
24
24
|
active:bg-accent-700
|
25
|
-
${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(e?void 0:this.disabled)}" type="${a(e?void 0:this.type)}" title="${this.title}" name="${a(e?void 0:this.name)}" value="${a(e?void 0:this.value)}" href="${a(e?this.href:void 0)}" target="${a(e?this.target:void 0)}" download="${a(e?this.download:void 0)}" rel="${a(e&&this.target?"noreferrer noopener":void 0)}" role="${a(e?void 0:"button")}" aria-disabled="${this.disabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${n("flex flex-auto items-center pointer-events-none",o["icon-only"]&&"hidden",this.loading&&"invisible",o["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${n(o["icon-only"]?"flex flex-auto items-center pointer-events-none":"inline-block",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${n("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",o["icon-only"]&&"hidden",o["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-4-0-0-next-
|
25
|
+
${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(e?void 0:this.disabled)}" type="${a(e?void 0:this.type)}" title="${this.title}" name="${a(e?void 0:this.name)}" value="${a(e?void 0:this.value)}" href="${a(e?this.href:void 0)}" target="${a(e?this.target:void 0)}" download="${a(e?this.download:void 0)}" rel="${a(e&&this.target?"noreferrer noopener":void 0)}" role="${a(e?void 0:"button")}" aria-disabled="${this.disabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${n("flex flex-auto items-center pointer-events-none",o["icon-only"]&&"hidden",this.loading&&"invisible",o["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${n(o["icon-only"]?"flex flex-auto items-center pointer-events-none":"inline-block",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${n("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",o["icon-only"]&&"hidden",o["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-4-0-0-next-12-spinner class="${n("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-4-0-0-next-12-spinner>`:""}</${s}>`}};t.styles=[...l.styles,c`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-0-0-next-12-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-4-0-0-next-12-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-4-0-0-next-12-icon),sd-4-0-0-next-12-spinner{font-size:calc(var(--tw-varspacing)/2)}`],r([f("a, button")],t.prototype,"button",2),r([u({selector:"sd-4-0-0-next-12-icon"})],t.prototype,"_iconsInDefaultSlot",2),r([p()],t.prototype,"invalid",2),r([i()],t.prototype,"title",2),r([i({reflect:!0})],t.prototype,"variant",2),r([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),r([i({reflect:!0})],t.prototype,"size",2),r([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),r([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),r([i()],t.prototype,"type",2),r([i()],t.prototype,"name",2),r([i()],t.prototype,"value",2),r([i()],t.prototype,"href",2),r([i()],t.prototype,"target",2),r([i()],t.prototype,"download",2),r([i()],t.prototype,"form",2),r([i({attribute:"formaction"})],t.prototype,"formAction",2),r([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),r([i({attribute:"formmethod"})],t.prototype,"formMethod",2),r([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),r([i({attribute:"formtarget"})],t.prototype,"formTarget",2),r([b("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=r([h("sd-4-0-0-next-12-button")],t);export{t as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.
|
1
|
+
import{a as p}from"./chunk.HE2LNCWW.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.6HO6CE4A.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as u,b as s,c as b,d as a,h as l}from"./chunk.3BP4JKVA.js";import{b as d,e as i}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends l{constructor(){super(...arguments);this.hasSlotController=new c(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(r){if(this.disabled){r.preventDefault(),r.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("[default]"),o=this.hasSlotController.test("icon"),m=`${this.size}-${r?"label":"no-label"}`;return i`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${n("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 border-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",r&&"px-4",this.hasFocus&&"focused-class",r&&"button--has-label",o&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled}" type="button" value="${p(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${n(o&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!o}"></slot>${r?i`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...l.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{width:var(--sd-spacing-12,3rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{width:var(--sd-spacing-10,2.5rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{width:var(--sd-spacing-8,2rem)}:host(.sd-4-0-0-next-12-button-group__button--first:not(.sd-4-0-0-next-12-button-group__button--last)) button{border-bottom-right-radius:var(--sd-border-radius-none,0);border-top-right-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-12-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-12-button-group__button--last:not(.sd-4-0-0-next-12-button-group__button--first)) button{border-bottom-left-radius:var(--sd-border-radius-none,0);border-top-left-radius:var(--sd-border-radius-none,0)}:host(.sd-4-0-0-next-12-button-group__button:not(.sd-4-0-0-next-12-button-group__button--first)){margin-inline-start:-1px}:host(.sd-4-0-0-next-12-button-group__button--hover){z-index:10}:host(.sd-4-0-0-next-12-button-group__button--focus),:host(.sd-4-0-0-next-12-button-group__button[checked]){z-index:20}`],e([a(".button")],t.prototype,"input",2),e([a(".hidden-input")],t.prototype,"hiddenInput",2),e([b()],t.prototype,"hasFocus",2),e([s({reflect:!0})],t.prototype,"size",2),e([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s({type:Boolean,reflect:!0})],t.prototype,"checked",2),e([s()],t.prototype,"value",2),e([h("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([u("sd-4-0-0-next-12-radio-button")],t);export{t as a};
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import{a as F}from"./chunk.
|
1
|
+
import{a as F}from"./chunk.27P4XVMA.js";import{a as z}from"./chunk.INQ5A3RT.js";import{a as M}from"./chunk.D7TMPF3D.js";import{c as A}from"./chunk.3L472FD4.js";import{b as L}from"./chunk.65NSSTJE.js";import{a as x,c as O}from"./chunk.A3DKF5BY.js";import{a as E,b as k}from"./chunk.3IPN77DT.js";import{a as g,d as y}from"./chunk.RQYP7MH5.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as I}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as T,b as n,c as u,d as m,g as $,h as v}from"./chunk.3BP4JKVA.js";import{b as C,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var s=class extends v{constructor(){super(...arguments);this.formControlController=new L(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-12-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new I(this);this.typeToSelectString="";this.hasHover=!1;this.displayLabel="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel=this.localize.term("tagsSelected");this.disabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=e=>d`<sd-4-0-0-next-12-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
2
2
|
base:tag__base,
|
3
3
|
content:tag__content,
|
4
4
|
removable-indicator:tag__removable-indicator,
|
5
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-4-0-0-next-
|
5
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-4-0-0-next-12-tag>`;this.handleDocumentFocusIn=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()};this.handleDocumentKeyDown=e=>{let t=e.target,l=t.closest(".select__clear")!==null,a=t.closest("sd-4-0-0-next-12-icon-button")!==null;if(!(l||a)){if(e.key==="Escape"&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let h=this.getAllOptions(),o=h.indexOf(this.currentOption),r=Math.max(0,o);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(r=o+1,r>h.length-1&&(r=0)):e.key==="ArrowUp"?(r=o-1,r<0&&(r=h.length-1)):e.key==="Home"?r=0:e.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r])}if(e.key.length===1||e.key==="Backspace"){let h=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(let o of h)if(o.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(o);break}}}};this.handleDocumentMouseDown=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(e,t){var l,a,h;if(e.key==="Backspace"&&this.multiple){e.preventDefault(),e.stopPropagation();let o=(l=e.currentTarget)==null?void 0:l.parentElement,r=(a=o==null?void 0:o.previousElementSibling)==null?void 0:a.querySelector("sd-4-0-0-next-12-tag"),c=(h=o==null?void 0:o.nextElementSibling)==null?void 0:h.querySelector("sd-4-0-0-next-12-tag");this.handleTagRemove(new CustomEvent("sd-remove"),t),this.updateComplete.then(()=>{c?c.focus():r?r.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(e){e.key==="Backspace"&&this.multiple&&(e.preventDefault(),e.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var l;let t=(l=this.shadowRoot)==null?void 0:l.querySelectorAll("sd-4-0-0-next-12-tag");t&&t.length>0?t==null||t[(t==null?void 0:t.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){let l=e.composedPath().some(a=>a instanceof HTMLSlotElement&&a.name==="removable-indicator");this.disabled||l||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){let l=e.target.closest("sd-4-0-0-next-12-option"),a=this.value;l&&!l.disabled&&(this.multiple?this.toggleOptionSelection(l):this.setSelectedOptions(l),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],l=[];customElements.get("sd-4-0-0-next-12-option")?(e.forEach(a=>{this.multiple&&(a.checkbox=!0),l.push(a.value)}),this.setSelectedOptions(e.filter(a=>t.includes(a.value)))):customElements.whenDefined("sd-4-0-0-next-12-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(e,t){e.stopPropagation(),t||this.clearSelect(),t&&!this.disabled&&(this.toggleOptionSelection(t,!1),this.deletedTagLabel=this.localize.term("removed",t.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-4-0-0-next-12-option")]}getFirstOption(){return this.querySelector("sd-4-0-0-next-12-option")}setCurrentOption(e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){let t=this.getAllOptions(),l=Array.isArray(e)?e:[e];t.forEach(a=>a.selected=!1),l.length&&l.forEach(a=>a.selected=!0),Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}toggleOptionSelection(e,t){t===!0||t===!1?e.selected=t:e.selected=!e.selected,Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}selectionChanged(e){var t,l,a,h;e&&this.multiple?this.selectedOptions.find(o=>o.value===e.value)?this.selectedOptions=this.selectedOptions.filter(o=>o.value!==e.value):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=this.getAllOptions().filter(o=>o.selected),this.multiple?(this.value=this.selectedOptions.map(o=>o.value),this.useTags||this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(l=(t=this.selectedOptions[0])==null?void 0:t.value)!=null?l:"",this.displayLabel=(h=(a=this.selectedOptions[0])==null?void 0:a.getTextLabel())!=null?h:""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((e,t)=>{if(t<this.maxOptionsVisible||this.maxOptionsVisible<=0){let l=this.getTag(e,t);return d`<div @sd-remove="${a=>this.handleTagRemove(a,e)}">${typeof l=="string"?E(l):l}</div>`}return[d``]}):[d`<sd-4-0-0-next-12-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
6
6
|
base:tag__base,
|
7
7
|
content:tag__content,
|
8
8
|
removable-indicator:tag__removable-indicator,
|
9
|
-
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.maxOptionsTagLabel}</sd-4-0-0-next-
|
9
|
+
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.maxOptionsTagLabel}</sd-4-0-0-next-12-tag>`]}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(e){let t=e.detail;t&&(this.currentPlacement=t)}handleUseTagsChange(){let e=this.getAllOptions();customElements.get("sd-4-0-0-next-12-option")&&e.forEach(t=>{t.checkbox=this.multiple})}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.multiple||this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:e,options:t}=O(this,"select.show",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await y(this);let{keyframes:e,options:t}=O(this,"select.hide",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(e=>{e.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(l=>t.includes(l.value)))}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,w(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,w(this,"sd-after-hide")}checkValidity(){var e;return(e=this.valueInput)==null?void 0:e.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){let e={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text")},t=this.label?!0:!!e.label,l=this.helpText?!0:!!e.helpText,a=this.clearable&&!this.disabled,h=this.disabled?"disabled":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",o=this.disabled?"cursor-not-allowed":"cursor-pointer",r={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${p("relative text-left",o,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" role="alert" aria-live="assertive">${this.deletedTagLabel}</span><div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${t&&"inline-block"}" aria-hidden="${t?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="${p("relative w-full bg-white",h==="disabled"?"text-neutral-500":"text-black")}"><div part="border" class="${p("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[h],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-12-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${p("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
10
10
|
popup:popup__content,
|
11
|
-
"><div part="combobox" class="${p("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${p("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",o,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?d`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${p("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${a?d`<button part="clear-button" class="${p("select__clear flex justify-center",r,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-
|
11
|
+
"><div part="combobox" class="${p("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${p("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",o,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?d`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${p("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${a?d`<button part="clear-button" class="${p("select__clear flex justify-center",r,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-12-icon class="${p("text-icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-12-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-next-12-icon part="invalid-icon" class="${p(r,c,"text-error")}" library="system" name="risk"></sd-4-0-0-next-12-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-next-12-icon part="valid-icon" class="${p("flex-shrink-0 text-success",r,c)}" library="system" name="status-check"></sd-4-0-0-next-12-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${p("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",this.disabled?"text-neutral-500":"text-primary",c)}"><sd-4-0-0-next-12-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-12-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${p("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-4-0-0-next-12-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${l?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-next-12-icon":k,"sd-4-0-0-next-12-popup":z,"sd-4-0-0-next-12-tag":F},s.styles=[...v.styles,C`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-12-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-12-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-next-12-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-next-12-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-12-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],i([$({selector:"sd-4-0-0-next-12-option"})],s.prototype,"_optionsInDefaultSlot",2),i([m("sd-4-0-0-next-12-popup")],s.prototype,"popup",2),i([m('[part="combobox"]')],s.prototype,"combobox",2),i([m('[part="display-input"]')],s.prototype,"displayInput",2),i([m(".value-input")],s.prototype,"valueInput",2),i([m('[part="listbox"]')],s.prototype,"listbox",2),i([m("#invalid-message")],s.prototype,"invalidMessage",2),i([u()],s.prototype,"hasHover",2),i([u()],s.prototype,"displayLabel",2),i([u()],s.prototype,"deletedTagLabel",2),i([u()],s.prototype,"hasFocus",2),i([u()],s.prototype,"currentOption",2),i([u()],s.prototype,"selectedOptions",2),i([u()],s.prototype,"showValidStyle",2),i([u()],s.prototype,"showInvalidStyle",2),i([M()],s.prototype,"defaultValue",2),i([n({type:Boolean,reflect:!0})],s.prototype,"open",2),i([n({reflect:!0})],s.prototype,"size",2),i([n({reflect:!0})],s.prototype,"placement",2),i([n()],s.prototype,"label",2),i([n()],s.prototype,"placeholder",2),i([n({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),i([n({type:Boolean,reflect:!0})],s.prototype,"disabled",2),i([n({attribute:"help-text"})],s.prototype,"helpText",2),i([u()],s.prototype,"currentPlacement",2),i([n({type:Boolean})],s.prototype,"clearable",2),i([n({type:Boolean,reflect:!0})],s.prototype,"multiple",2),i([n({type:Boolean,reflect:!0})],s.prototype,"useTags",2),i([n({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),i([n({reflect:!0})],s.prototype,"form",2),i([n()],s.prototype,"name",2),i([n({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],s.prototype,"value",2),i([n({type:Boolean,reflect:!0})],s.prototype,"required",2),i([n({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),i([n({type:Boolean})],s.prototype,"hoist",2),i([n()],s.prototype,"getTag",2),i([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),i([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),i([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),i([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),i([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),s=i([T("sd-4-0-0-next-12-select")],s);x("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});x("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as A}from"./chunk.X2O263YD.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as T}from"./chunk.HE2LNCWW.js";import{a as o,c as l}from"./chunk.A3DKF5BY.js";import{a as n,d as p}from"./chunk.RQYP7MH5.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as C}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as E,b as r,d as h,h as w}from"./chunk.
|
1
|
+
import{a as A}from"./chunk.X2O263YD.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as T}from"./chunk.HE2LNCWW.js";import{a as o,c as l}from"./chunk.A3DKF5BY.js";import{a as n,d as p}from"./chunk.RQYP7MH5.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as C}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as E,b as r,d as h,h as w}from"./chunk.3BP4JKVA.js";import{b as x,e as v}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";function k(u){return u.charAt(0).toUpperCase()+u.slice(1)}var e=class extends w{constructor(){super(...arguments);this.hasSlotController=new C(this,"footer");this.localize=new L(this);this.modal=new A(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var y;let t=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([p(this.drawer),p(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a&&a.setAttribute("autofocus","")});let d=l(this,`drawer.show${k(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([p(this.drawer),p(this.overlay)]);let a=l(this,`drawer.hide${k(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}render(){return v`<div id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.label}" aria-labelledby="${T(this.noHeader?void 0:"title")}" tabindex="0">${this.noHeader?"":v`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-4-0-0-next-12-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-4-0-0-next-12-icon label="${this.localize.term("close")}" name="close" library="system"></sd-4-0-0-next-12-icon></sd-4-0-0-next-12-button></div></header>`}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};e.styles=[...w.styles,x`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],i([h("[part=base]")],e.prototype,"drawer",2),i([h("[part=panel]")],e.prototype,"panel",2),i([h("[part=overlay]")],e.prototype,"overlay",2),i([h("[part=close-button]")],e.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],e.prototype,"open",2),i([r({attribute:"label",reflect:!0})],e.prototype,"label",2),i([r({reflect:!0})],e.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],e.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean})],e.prototype,"noHeader",2),i([b("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),i([b("contained",{waitUntilFirstUpdate:!0})],e.prototype,"handleNoModalChange",1),e=i([E("sd-4-0-0-next-12-drawer")],e);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.
|
1
|
+
import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.3BP4JKVA.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-4-0-0-next-12-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-4-0-0-next-12-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-0-0-next-12-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-next-12-icon></button>`:r`<sd-4-0-0-next-12-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-next-12-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-4-0-0-next-12-navigation-item")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as l}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as o,b as a,h as i}from"./chunk.
|
1
|
+
import{a as l}from"./chunk.E2DRD2OX.js";import{a as c}from"./chunk.DCOFYPWX.js";import{a as o,b as a,h as i}from"./chunk.3BP4JKVA.js";import{b as r,e as s}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var p=0,t=class extends i{constructor(){super(...arguments);this.attrId=++p;this.componentId=`sd-4-0-0-next-12-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return s`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...i.styles,r`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([a({reflect:!0})],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-4-0-0-next-12-tab-panel")],t);export{t as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{a as H,b as U}from"./chunk.5CK64GWQ.js";import{a as B}from"./chunk.D7TMPF3D.js";import{b as N}from"./chunk.65NSSTJE.js";import{a as d}from"./chunk.HE2LNCWW.js";import{a as v,b as x,c as F}from"./chunk.SPDB3L7V.js";import{a as y}from"./chunk.E2DRD2OX.js";import{a as z}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as M,b as a,c as f,d as w,h as C}from"./chunk.P7EPSHEQ.js";import{b as T,e as h,h as V,i as _}from"./chunk.IRWHG2Q4.js";import{a as E,e as i}from"./chunk.TJOCV4DC.js";var b=(l,r)=>{var s;let e=l._$AN;if(e===void 0)return!1;for(let o of e)(s=o._$AO)==null||s.call(o,r,!1),b(o,r);return!0},g=l=>{let r,e;do{if((r=l._$AM)===void 0)break;e=r._$AN,e.delete(l),l=r}while((e==null?void 0:e.size)===0)},O=l=>{for(let r;r=l._$AM;l=r){let e=r._$AN;if(e===void 0)r._$AN=e=new Set;else if(e.has(l))break;e.add(l),j(r)}};function R(l){this._$AN!==void 0?(g(this),this._$AM=l,O(this)):this._$AM=l}function J(l,r=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(r)if(Array.isArray(s))for(let p=e;p<s.length;p++)b(s[p],!1),g(s[p]);else s!=null&&(b(s,!1),g(s));else b(this,l)}var j=l=>{var r,e;l.type==v.CHILD&&((r=l._$AP)!=null||(l._$AP=J),(e=l._$AQ)!=null||(l._$AQ=R))},$=class extends F{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,e,s){super._$AT(r,e,s),O(this),this.isConnected=r._$AU}_$AO(r,e=!0){var s,o;r!==this.isConnected&&(this.isConnected=r,r?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),e&&(b(this,r),g(this))}setValue(r){if(H(this._$Ct))this._$Ct._$AI(r,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=r,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var k=class extends ${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!==v.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return _}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=E({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),V}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(o=>{o.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()}},A=x(k);var K,Q=(K=navigator.userAgentData)==null?void 0:K.brands.some(l=>l.brand.includes("Chromium")),G=Q?!1:navigator.userAgent.includes("Firefox"),t=class extends C{constructor(){super(...arguments);this.formControlController=new N(this);this.hasSlotController=new z(this,"help-text","label","left","right","message","placeholder");this.localize=new L(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!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()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){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}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,o="none"){this.input.setSelectionRange(e,s,o)}setRangeText(e,s,o,p){this.input.setRangeText(e,s,o,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")},s=this.label?!0:!!e.label,o=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),D=this.disabled?"disabled":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",P=this.size==="sm"?"text-sm":"text-base",q={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[D],m=this.disabled?"text-neutral-500":"text-primary",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return h`<div part="form-control" class="${n(this.disabled&&"pointer-events-none")}"><div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${n(s?"inline-block":"hidden",P)}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="relative w-full"><div part="border" class="${n("absolute w-full h-full pointer-events-none border rounded-default",q)}"></div><div part="base" class="${n("px-4 flex flex-row items-center rounded-default transition-all",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",D==="disabled"?"text-neutral-500":"text-black")}">${e.left?h`<slot name="left" part="left" class="${n("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,c)}"></slot>`:""} <input part="input" id="input" class="${n("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",P)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${d(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${d(this.placeholder)}" minlength="${d(this.minlength)}" maxlength="${d(this.maxlength)}" min="${d(this.min)}" max="${d(this.max)}" step="${d(this.step)}" .value="${U(this.value)}" autocapitalize="${d(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${d(this.type==="password"?"off":this.autocomplete)}" autocorrect="${d(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${d(this.pattern)}" enterkeyhint="${d(this.enterkeyhint)}" inputmode="${d(this.inputmode)}" aria-describedby="help-text invalid-message" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${p?h`<button part="clear-button" class="${n("flex justify-center ",u)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-10-icon class="${n("icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-10-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?h`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?h`<slot name="show-password-icon"><sd-4-0-0-next-10-icon class="${n(m,u,c)}" library="system" name="eye"></sd-4-0-0-next-10-icon></slot>`:h`<slot name="hide-password-icon"><sd-4-0-0-next-10-icon class="${n(m,u,c)}" library="system" name="eye-crossed-out"></sd-4-0-0-next-10-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!G?h`<sd-4-0-0-next-10-icon class="${n(m,u,c)}" library="system" name="calendar"></sd-4-0-0-next-10-icon>`:""} ${this.type==="time"?h`<sd-4-0-0-next-10-icon class="${n(m,u,c)}" library="system" name="clock"></sd-4-0-0-next-10-icon>`:""} ${this.type==="search"?h`<button class="flex items-center" type="button" tabindex="-1"><sd-4-0-0-next-10-icon class="${n(m,u,c)}" library="system" name="magnifying-glass"></sd-4-0-0-next-10-icon></button>`:""} ${this.showInvalidStyle?h`<sd-4-0-0-next-10-icon part="invalid-icon" class="${n("text-error",u,c)}" library="system" name="risk"></sd-4-0-0-next-10-icon>`:""} ${this.showValidStyle&&this.styleOnValid?h`<sd-4-0-0-next-10-icon class="${n("text-success flex-shrink-0",u,c)}" library="system" name="status-check" part="valid-icon"></sd-4-0-0-next-10-icon>`:""} ${e.right?h`<slot name="right" part="right" class="${n("inline-flex",m,u,c)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?h`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-4-0-0-next-10-icon name="system/minus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-10-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-4-0-0-next-10-icon name="system/plus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-10-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${n("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...C.styles,T`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-0-0-next-10-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([w("#input")],t.prototype,"input",2),i([w("#invalid-message")],t.prototype,"invalidMessage",2),i([f()],t.prototype,"hasFocus",2),i([f()],t.prototype,"showValidStyle",2),i([f()],t.prototype,"showInvalidStyle",2),i([a({reflect:!0})],t.prototype,"type",2),i([a({reflect:!0})],t.prototype,"size",2),i([a()],t.prototype,"inputmode",2),i([a()],t.prototype,"value",2),i([B()],t.prototype,"defaultValue",2),i([a()],t.prototype,"placeholder",2),i([a()],t.prototype,"label",2),i([a({attribute:"help-text"})],t.prototype,"helpText",2),i([a({type:Boolean})],t.prototype,"clearable",2),i([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([a({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([a({attribute:"password-toggle",type:Boolean})],t.prototype,"passwordToggle",2),i([a({attribute:"password-visible",type:Boolean})],t.prototype,"passwordVisible",2),i([a({attribute:"spin-buttons",type:Boolean})],t.prototype,"spinButtons",2),i([a({type:Number})],t.prototype,"minlength",2),i([a({type:Number})],t.prototype,"maxlength",2),i([a()],t.prototype,"min",2),i([a()],t.prototype,"max",2),i([a({reflect:!0})],t.prototype,"form",2),i([a()],t.prototype,"name",2),i([a()],t.prototype,"title",2),i([a({type:Boolean,reflect:!0})],t.prototype,"required",2),i([a()],t.prototype,"pattern",2),i([a()],t.prototype,"step",2),i([a()],t.prototype,"autocapitalize",2),i([a()],t.prototype,"autocorrect",2),i([a()],t.prototype,"autocomplete",2),i([a({type:Boolean})],t.prototype,"autofocus",2),i([a()],t.prototype,"enterkeyhint",2),i([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([a({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([y("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([y("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([y("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([M("sd-4-0-0-next-10-input")],t);export{t as a};
|
1
|
+
import{a as H,b as U}from"./chunk.5CK64GWQ.js";import{a as B}from"./chunk.D7TMPF3D.js";import{b as N}from"./chunk.65NSSTJE.js";import{a as d}from"./chunk.HE2LNCWW.js";import{a as v,b as x,c as F}from"./chunk.SPDB3L7V.js";import{a as y}from"./chunk.E2DRD2OX.js";import{a as z}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as M,b as a,c as f,d as w,h as C}from"./chunk.3BP4JKVA.js";import{b as T,e as h,h as V,i as _}from"./chunk.IRWHG2Q4.js";import{a as E,e as i}from"./chunk.TJOCV4DC.js";var b=(l,r)=>{var s;let e=l._$AN;if(e===void 0)return!1;for(let o of e)(s=o._$AO)==null||s.call(o,r,!1),b(o,r);return!0},g=l=>{let r,e;do{if((r=l._$AM)===void 0)break;e=r._$AN,e.delete(l),l=r}while((e==null?void 0:e.size)===0)},O=l=>{for(let r;r=l._$AM;l=r){let e=r._$AN;if(e===void 0)r._$AN=e=new Set;else if(e.has(l))break;e.add(l),j(r)}};function R(l){this._$AN!==void 0?(g(this),this._$AM=l,O(this)):this._$AM=l}function J(l,r=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(r)if(Array.isArray(s))for(let p=e;p<s.length;p++)b(s[p],!1),g(s[p]);else s!=null&&(b(s,!1),g(s));else b(this,l)}var j=l=>{var r,e;l.type==v.CHILD&&((r=l._$AP)!=null||(l._$AP=J),(e=l._$AQ)!=null||(l._$AQ=R))},$=class extends F{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,e,s){super._$AT(r,e,s),O(this),this.isConnected=r._$AU}_$AO(r,e=!0){var s,o;r!==this.isConnected&&(this.isConnected=r,r?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),e&&(b(this,r),g(this))}setValue(r){if(H(this._$Ct))this._$Ct._$AI(r,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=r,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var k=class extends ${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!==v.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return _}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=E({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),V}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(o=>{o.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()}},A=x(k);var K,Q=(K=navigator.userAgentData)==null?void 0:K.brands.some(l=>l.brand.includes("Chromium")),G=Q?!1:navigator.userAgent.includes("Firefox"),t=class extends C{constructor(){super(...arguments);this.formControlController=new N(this);this.hasSlotController=new z(this,"help-text","label","left","right","message","placeholder");this.localize=new L(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!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()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){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}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,o="none"){this.input.setSelectionRange(e,s,o)}setRangeText(e,s,o,p){this.input.setRangeText(e,s,o,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")},s=this.label?!0:!!e.label,o=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),D=this.disabled?"disabled":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",P=this.size==="sm"?"text-sm":"text-base",q={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[D],m=this.disabled?"text-neutral-500":"text-primary",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return h`<div part="form-control" class="${n(this.disabled&&"pointer-events-none")}"><div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${n(s?"inline-block":"hidden",P)}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="relative w-full"><div part="border" class="${n("absolute w-full h-full pointer-events-none border rounded-default",q)}"></div><div part="base" class="${n("px-4 flex flex-row items-center rounded-default transition-all",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",D==="disabled"?"text-neutral-500":"text-black")}">${e.left?h`<slot name="left" part="left" class="${n("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,c)}"></slot>`:""} <input part="input" id="input" class="${n("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",P)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${d(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${d(this.placeholder)}" minlength="${d(this.minlength)}" maxlength="${d(this.maxlength)}" min="${d(this.min)}" max="${d(this.max)}" step="${d(this.step)}" .value="${U(this.value)}" autocapitalize="${d(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${d(this.type==="password"?"off":this.autocomplete)}" autocorrect="${d(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${d(this.pattern)}" enterkeyhint="${d(this.enterkeyhint)}" inputmode="${d(this.inputmode)}" aria-describedby="help-text invalid-message" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${p?h`<button part="clear-button" class="${n("flex justify-center ",u)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-12-icon class="${n("icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-12-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?h`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?h`<slot name="show-password-icon"><sd-4-0-0-next-12-icon class="${n(m,u,c)}" library="system" name="eye"></sd-4-0-0-next-12-icon></slot>`:h`<slot name="hide-password-icon"><sd-4-0-0-next-12-icon class="${n(m,u,c)}" library="system" name="eye-crossed-out"></sd-4-0-0-next-12-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!G?h`<sd-4-0-0-next-12-icon class="${n(m,u,c)}" library="system" name="calendar"></sd-4-0-0-next-12-icon>`:""} ${this.type==="time"?h`<sd-4-0-0-next-12-icon class="${n(m,u,c)}" library="system" name="clock"></sd-4-0-0-next-12-icon>`:""} ${this.type==="search"?h`<button class="flex items-center" type="button" tabindex="-1"><sd-4-0-0-next-12-icon class="${n(m,u,c)}" library="system" name="magnifying-glass"></sd-4-0-0-next-12-icon></button>`:""} ${this.showInvalidStyle?h`<sd-4-0-0-next-12-icon part="invalid-icon" class="${n("text-error",u,c)}" library="system" name="risk"></sd-4-0-0-next-12-icon>`:""} ${this.showValidStyle&&this.styleOnValid?h`<sd-4-0-0-next-12-icon class="${n("text-success flex-shrink-0",u,c)}" library="system" name="status-check" part="valid-icon"></sd-4-0-0-next-12-icon>`:""} ${e.right?h`<slot name="right" part="right" class="${n("inline-flex",m,u,c)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?h`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-4-0-0-next-12-icon name="system/minus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-12-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-4-0-0-next-12-icon name="system/plus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-12-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${n("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...C.styles,T`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-0-0-next-12-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([w("#input")],t.prototype,"input",2),i([w("#invalid-message")],t.prototype,"invalidMessage",2),i([f()],t.prototype,"hasFocus",2),i([f()],t.prototype,"showValidStyle",2),i([f()],t.prototype,"showInvalidStyle",2),i([a({reflect:!0})],t.prototype,"type",2),i([a({reflect:!0})],t.prototype,"size",2),i([a()],t.prototype,"inputmode",2),i([a()],t.prototype,"value",2),i([B()],t.prototype,"defaultValue",2),i([a()],t.prototype,"placeholder",2),i([a()],t.prototype,"label",2),i([a({attribute:"help-text"})],t.prototype,"helpText",2),i([a({type:Boolean})],t.prototype,"clearable",2),i([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([a({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([a({attribute:"password-toggle",type:Boolean})],t.prototype,"passwordToggle",2),i([a({attribute:"password-visible",type:Boolean})],t.prototype,"passwordVisible",2),i([a({attribute:"spin-buttons",type:Boolean})],t.prototype,"spinButtons",2),i([a({type:Number})],t.prototype,"minlength",2),i([a({type:Number})],t.prototype,"maxlength",2),i([a()],t.prototype,"min",2),i([a()],t.prototype,"max",2),i([a({reflect:!0})],t.prototype,"form",2),i([a()],t.prototype,"name",2),i([a()],t.prototype,"title",2),i([a({type:Boolean,reflect:!0})],t.prototype,"required",2),i([a()],t.prototype,"pattern",2),i([a()],t.prototype,"step",2),i([a()],t.prototype,"autocapitalize",2),i([a()],t.prototype,"autocorrect",2),i([a()],t.prototype,"autocomplete",2),i([a({type:Boolean})],t.prototype,"autofocus",2),i([a()],t.prototype,"enterkeyhint",2),i([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([a({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([y("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([y("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([y("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([M("sd-4-0-0-next-12-input")],t);export{t as a};
|
2
2
|
/*! Bundled license information:
|
3
3
|
|
4
4
|
lit-html/async-directive.js:
|
@@ -1 +1 @@
|
|
1
|
-
import{a as l}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.DCOFYPWX.js";import{a as h,b as a,d as f,h as n}from"./chunk.
|
1
|
+
import{a as l}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.DCOFYPWX.js";import{a as h,b as a,d as f,h as n}from"./chunk.3BP4JKVA.js";import{b as o,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((i,r)=>{i.index=r+1,i.size=this.size,i.orientation=this.orientation,this.notInteractive?(i.current=!1,i.disabled=!1,i.notInteractive=!0):i.current&&(t=r)}),this.setActiveStep(t||this.activeStep)})}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-4-0-0-next-12-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((i,r)=>{r===t?i.current=!0:r>t?i.disabled=!0:i.current=!1}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return c`<div role="${this.notInteractive?"group":"navigation"}" class="h-full"><div role="list" part="base" class="${m("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};e.styles=[...n.styles,o`:host{width:-moz-max-content;width:max-content}`],s([f("[part=body]")],e.prototype,"body",2),s([a({reflect:!0})],e.prototype,"size",2),s([a({reflect:!0})],e.prototype,"orientation",2),s([a({type:Number,reflect:!0,attribute:"active-step"})],e.prototype,"activeStep",2),s([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],e.prototype,"notInteractive",2),s([l("size",{waitUntilFirstUpdate:!0})],e.prototype,"updateSize",1),s([l("orientation",{waitUntilFirstUpdate:!0})],e.prototype,"updateOrientation",1),s([l("notInteractive")],e.prototype,"handleInteractivityChange",1),e=s([h("sd-4-0-0-next-12-step-group")],e);export{e as a};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import{b as d}from"./chunk.5CK64GWQ.js";import{a as f}from"./chunk.D7TMPF3D.js";import{b as m}from"./chunk.65NSSTJE.js";import{a as p}from"./chunk.HE2LNCWW.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as s}from"./chunk.DCOFYPWX.js";import{a as c,b as r,c as u,d as a,h as o}from"./chunk.
|
1
|
+
import{b as d}from"./chunk.5CK64GWQ.js";import{a as f}from"./chunk.D7TMPF3D.js";import{b as m}from"./chunk.65NSSTJE.js";import{a as p}from"./chunk.HE2LNCWW.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as s}from"./chunk.DCOFYPWX.js";import{a as c,b as r,c as u,d as a,h as o}from"./chunk.3BP4JKVA.js";import{b as h,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.formControlController=new m(this,{value:i=>i.checked?i.value||"on":void 0,defaultValue:i=>i.defaultChecked,setValue:(i,b)=>i.checked=b});this.title="";this.name="";this.size="lg";this.disabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i),this.invalidMessage.textContent=i.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(i){this.input.focus(i)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(i){this.input.setCustomValidity(i),this.formControlController.updateValidity()}render(){let i=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return l`<label part="base" class="${s("sd-4-0-0-next-12-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${p(this.value)}" .indeterminate="${d(this.indeterminate)}" .checked="${d(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${s(`relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4
|
2
2
|
peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
|
3
|
-
peer-focus-visible:outline-primary`,{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[i])}">${this.checked?l`<sd-4-0-0-next-
|
3
|
+
peer-focus-visible:outline-primary`,{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[i])}">${this.checked?l`<sd-4-0-0-next-12-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-4-0-0-next-12-icon>`:""} ${!this.checked&&this.indeterminate?l`<sd-4-0-0-next-12-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-4-0-0-next-12-icon>`:""} </span><span part="label" id="label" class="${s("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...o.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],t([a('input[type="checkbox"]')],e.prototype,"input",2),t([a("#invalid-message")],e.prototype,"invalidMessage",2),t([r()],e.prototype,"title",2),t([r()],e.prototype,"name",2),t([r()],e.prototype,"value",2),t([r({reflect:!0})],e.prototype,"size",2),t([r({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([r({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([r({type:Boolean,reflect:!0})],e.prototype,"indeterminate",2),t([f("checked")],e.prototype,"defaultChecked",2),t([r({reflect:!0})],e.prototype,"form",2),t([r({type:Boolean,reflect:!0})],e.prototype,"required",2),t([u()],e.prototype,"showInvalidStyle",2),t([n("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([n(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([c("sd-4-0-0-next-12-checkbox")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as b}from"./chunk.
|
1
|
+
import{a as b}from"./chunk.HZ4OPRVF.js";import{b as m}from"./chunk.5ZILM4TA.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as r,b as a,d as n,h as s}from"./chunk.3BP4JKVA.js";import{b as d}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends s{constructor(){super(...arguments);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:i}=this;this.defaultSlot.assignedElements().filter(l=>l.tagName.toLowerCase()==="sd-4-0-0-next-12-option").forEach(l=>{l.disabled=i})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:i}=this;return m`<div role="${i?"presentation":"group"}" class="${o(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-4-0-0-next-12-divider id="divider" class="pt-2 pb-4" part="divider"></sd-4-0-0-next-12-divider><div part="label-container" class="${o(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="group" part="options"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};e.dependencies={"sd-4-0-0-next-12-divider":b},e.styles=[...s.styles,d`:host{--display-divider:block}#divider{display:var(--display-divider)}`],t([n("slot:not([name])")],e.prototype,"defaultSlot",2),t([a({reflect:!0,type:Boolean})],e.prototype,"disabled",2),t([a()],e.prototype,"label",2),t([p("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([r("sd-4-0-0-next-12-optgroup")],e);export{e as a};
|
@@ -1 +1 @@
|
|
1
|
-
import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.
|
1
|
+
import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.3BP4JKVA.js";import{b as l,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await n(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return c`<slot></slot>`}};t.styles=[...a.styles,l`:host{display:block}`],s([o()],t.prototype,"src",2),s([o()],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-4-0-0-next-12-include")],t);export{t as a};
|