@synergy-design-system/components 2.12.1 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{chunk.NGD3FJHJ.js → chunk.2TU3PMLN.js} +2 -2
- package/dist/chunks/{chunk.TCK2OZIA.js → chunk.4E3AZRVT.js} +2 -2
- package/dist/chunks/{chunk.TZC4IPT3.js → chunk.4E76ZRQI.js} +2 -2
- package/dist/chunks/{chunk.RTEKLXU3.js → chunk.4OD2H3XB.js} +2 -2
- package/dist/chunks/{chunk.6FVSBWBR.js → chunk.4QUIUWWD.js} +2 -2
- package/dist/chunks/{chunk.C6HMB33J.js → chunk.5NUBLBWE.js} +2 -2
- package/dist/chunks/{chunk.V26UKAYH.js → chunk.5WASDVJX.js} +2 -2
- package/dist/chunks/{chunk.KP2IPT7J.js → chunk.6O6CGMJA.js} +2 -2
- package/dist/chunks/{chunk.4ZAJFDDB.js → chunk.6Q3EOAQV.js} +3 -3
- package/dist/chunks/{chunk.V3UNHLRQ.js → chunk.6SDNRNEM.js} +2 -2
- package/dist/chunks/{chunk.WNOYE7FJ.js → chunk.6VAC3Z2Q.js} +2 -2
- package/dist/chunks/{chunk.QACXXGS7.js → chunk.6WKJKCWD.js} +3 -3
- package/dist/chunks/{chunk.QACXXGS7.js.map → chunk.6WKJKCWD.js.map} +2 -2
- package/dist/chunks/{chunk.IAX5P4YW.js → chunk.7HZV4MYT.js} +2 -2
- package/dist/chunks/{chunk.IOYGNDRB.js → chunk.API5O3M4.js} +7 -3
- package/dist/chunks/chunk.API5O3M4.js.map +7 -0
- package/dist/chunks/{chunk.KDMX4Q33.js → chunk.B5L6RSX7.js} +2 -2
- package/dist/chunks/{chunk.4WXSVFZF.js → chunk.BBVDCOTU.js} +2 -2
- package/dist/chunks/{chunk.CROIIGEK.js → chunk.BLUAN7RH.js} +30 -19
- package/dist/chunks/chunk.BLUAN7RH.js.map +7 -0
- package/dist/chunks/{chunk.RZI6FTCQ.js → chunk.BMMT5J3T.js} +2 -2
- package/dist/chunks/{chunk.RZI6FTCQ.js.map → chunk.BMMT5J3T.js.map} +1 -1
- package/dist/chunks/{chunk.MGX7SU3U.js → chunk.BTFRHXAP.js} +3 -3
- package/dist/chunks/{chunk.ZMHLJPJN.js → chunk.BVZMEBPT.js} +4 -4
- package/dist/chunks/{chunk.W5TWI64A.js → chunk.C7CANCSQ.js} +3 -3
- package/dist/chunks/{chunk.NNCEZT6I.js → chunk.CCQIEIL2.js} +2 -2
- package/dist/chunks/{chunk.R2B42WQK.js → chunk.CII3JTNM.js} +3 -3
- package/dist/chunks/{chunk.T66H2JXK.js → chunk.CJ357KHN.js} +2 -2
- package/dist/chunks/{chunk.3KRROCNB.js → chunk.CX6JNMXF.js} +2 -2
- package/dist/chunks/{chunk.AFGBDQAO.js → chunk.DHFLT5BI.js} +3 -3
- package/dist/chunks/{chunk.D44UFEGJ.js → chunk.DLIV66GJ.js} +3 -3
- package/dist/chunks/{chunk.KVU5RDXR.js → chunk.DLKXMQBR.js} +2 -2
- package/dist/chunks/{chunk.M5JWXYAN.js → chunk.E3JM7C7O.js} +9 -3
- package/dist/chunks/chunk.E3JM7C7O.js.map +7 -0
- package/dist/chunks/{chunk.PLRLC2PG.js → chunk.E3PAIPJR.js} +2 -2
- package/dist/chunks/{chunk.RAAMOR6I.js → chunk.EEOLCQW7.js} +2 -2
- package/dist/chunks/{chunk.6K2KYJ27.js → chunk.EG6MODIB.js} +2 -2
- package/dist/chunks/{chunk.XJ6J5MAG.js → chunk.EKZ73UET.js} +2 -2
- package/dist/chunks/{chunk.5XTRBW6I.js → chunk.ENYUQ5Q5.js} +2 -2
- package/dist/chunks/{chunk.RUJ3ANMM.js → chunk.FBSFUSLP.js} +2 -2
- package/dist/chunks/{chunk.UNKM3AR6.js → chunk.FF7XVNF3.js} +2 -2
- package/dist/chunks/{chunk.DXUNCEPL.js → chunk.FG2DGX7Z.js} +4 -4
- package/dist/chunks/{chunk.CRA5CBMD.js → chunk.FQWBH6B3.js} +13 -3
- package/dist/chunks/chunk.FQWBH6B3.js.map +7 -0
- package/dist/chunks/{chunk.BV76KPA7.js → chunk.FRDQ3NA3.js} +2 -2
- package/dist/chunks/{chunk.JNP34M27.js → chunk.FUHFSQEX.js} +3 -3
- package/dist/chunks/{chunk.JNP34M27.js.map → chunk.FUHFSQEX.js.map} +2 -2
- package/dist/chunks/{chunk.7IQ7ST4F.js → chunk.FUSBMFDB.js} +11 -7
- package/dist/chunks/chunk.FUSBMFDB.js.map +7 -0
- package/dist/chunks/{chunk.3YNFXB4T.js → chunk.GD4IVG2L.js} +2 -2
- package/dist/chunks/{chunk.PKH7RUCS.js → chunk.GKAYXY36.js} +2 -2
- package/dist/chunks/{chunk.QH3D6IHF.js → chunk.GLWGL7YS.js} +2 -2
- package/dist/chunks/{chunk.GI2NYM36.js → chunk.GQRFIMFT.js} +5 -5
- package/dist/chunks/{chunk.OL5L2SWG.js → chunk.H7SVFADO.js} +2 -2
- package/dist/chunks/{chunk.LKAZQJ5Y.js → chunk.HV53NCY4.js} +2 -2
- package/dist/chunks/{chunk.HVGL244L.js → chunk.I5BBVZWA.js} +2 -2
- package/dist/chunks/{chunk.UREJSW6U.js → chunk.IZEADTY5.js} +6 -1
- package/dist/chunks/{chunk.UREJSW6U.js.map → chunk.IZEADTY5.js.map} +2 -2
- package/dist/chunks/{chunk.EZGQE2Y4.js → chunk.J5YHFEW6.js} +7 -7
- package/dist/chunks/chunk.J5YHFEW6.js.map +7 -0
- package/dist/chunks/{chunk.WKPG4Y6A.js → chunk.JI7FGEBP.js} +2 -2
- package/dist/chunks/{chunk.3FNWITES.js → chunk.JLRQPUIG.js} +3 -3
- package/dist/chunks/{chunk.NBBH4EMX.js → chunk.K2CADE4S.js} +2 -2
- package/dist/chunks/{chunk.CN4426X7.js → chunk.MAVKVXWD.js} +2 -2
- package/dist/chunks/{chunk.N4ZA77ZV.js → chunk.MFNB75KX.js} +4 -4
- package/dist/chunks/{chunk.DFABWKX7.js → chunk.MJEJKJER.js} +3 -3
- package/dist/chunks/{chunk.DFABWKX7.js.map → chunk.MJEJKJER.js.map} +1 -1
- package/dist/chunks/{chunk.MFD4ZXHO.js → chunk.MPBNR3JJ.js} +2 -2
- package/dist/chunks/{chunk.MKHPO7MC.js → chunk.MXYJWR6C.js} +3 -3
- package/dist/chunks/{chunk.L6YDUFFT.js → chunk.NJB7SJKA.js} +2 -2
- package/dist/chunks/{chunk.HQCHFTWQ.js → chunk.NMQJGEFL.js} +3 -3
- package/dist/chunks/{chunk.RWQ7UK2Z.js → chunk.O656KF6Y.js} +2 -2
- package/dist/chunks/{chunk.7VB6V33J.js → chunk.OEFVUTI2.js} +3 -3
- package/dist/chunks/{chunk.INJM3DAJ.js → chunk.PCYVMSZ7.js} +2 -2
- package/dist/chunks/{chunk.JVIDZKUX.js → chunk.PFORJYFS.js} +6 -6
- package/dist/chunks/{chunk.ACSAJN57.js → chunk.PG3Y4WUM.js} +4 -3
- package/dist/chunks/chunk.PG3Y4WUM.js.map +7 -0
- package/dist/chunks/{chunk.TNVBUUDO.js → chunk.PNWQUWHW.js} +2 -2
- package/dist/chunks/{chunk.ETBT2YG4.js → chunk.PP6YASVT.js} +3 -3
- package/dist/chunks/{chunk.AONHNKC7.js → chunk.PVZ5GK4B.js} +2 -2
- package/dist/chunks/{chunk.LHFNBKMZ.js → chunk.PWTZX6PQ.js} +2 -2
- package/dist/chunks/{chunk.HFXDDKUQ.js → chunk.QC77ZFJI.js} +2 -2
- package/dist/chunks/{chunk.N4NBMVHY.js → chunk.QXOHNSH7.js} +3 -3
- package/dist/chunks/{chunk.AVNMFX5X.js → chunk.SFOAR5BL.js} +2 -2
- package/dist/chunks/{chunk.3LCKJNDI.js → chunk.SGWZTGID.js} +2 -2
- package/dist/chunks/{chunk.DTVX4TKW.js → chunk.SUMABPQN.js} +2 -2
- package/dist/chunks/{chunk.43EAE2QI.js → chunk.T2I3Z2JZ.js} +3 -3
- package/dist/chunks/{chunk.GFDW6BKM.js → chunk.TNNT6IDT.js} +2 -2
- package/dist/chunks/{chunk.3IFWX7E3.js → chunk.TR6K4HDS.js} +2 -2
- package/dist/chunks/{chunk.E2DM7XQK.js → chunk.U5FNJXTJ.js} +2 -2
- package/dist/chunks/{chunk.PLNTJP3L.js → chunk.UE5LOIPK.js} +2 -2
- package/dist/chunks/{chunk.VQPF22HI.js → chunk.UKJMAI4Q.js} +4 -4
- package/dist/chunks/{chunk.6IPI5YJJ.js → chunk.ULXNVBWC.js} +2 -2
- package/dist/chunks/{chunk.Z3YHPV62.js → chunk.UO45LNYQ.js} +2 -2
- package/dist/chunks/{chunk.6TR53QJH.js → chunk.V7V4YBUS.js} +3 -3
- package/dist/chunks/{chunk.QEPIKL2O.js → chunk.VJLHPHTO.js} +2 -2
- package/dist/chunks/{chunk.OMVVPU3N.js → chunk.W6QWU55E.js} +3 -3
- package/dist/chunks/{chunk.ZDLBTJKY.js → chunk.WHBCML74.js} +2 -2
- package/dist/chunks/{chunk.OMI4XYXD.js → chunk.WPCYWZX6.js} +2 -2
- package/dist/chunks/{chunk.U3FPKF7P.js → chunk.WRXAT2ZV.js} +3 -3
- package/dist/chunks/{chunk.3JB36AXI.js → chunk.WWG3H2UB.js} +2 -2
- package/dist/chunks/{chunk.LG2S5EYQ.js → chunk.WZ4MEHUQ.js} +2 -2
- package/dist/chunks/{chunk.W5FJR66T.js → chunk.YFTKZOLR.js} +3 -3
- package/dist/chunks/{chunk.YMXGU2DZ.js → chunk.YPYP3MLT.js} +2 -2
- package/dist/chunks/{chunk.V6VHMR46.js → chunk.YVMY7F6B.js} +2 -2
- package/dist/chunks/{chunk.X5BIF4J6.js → chunk.Z7GEUQ4J.js} +2 -2
- package/dist/chunks/{chunk.IA6JFXGQ.js → chunk.ZCYK7ZRI.js} +2 -2
- package/dist/chunks/{chunk.BTXTLVCD.js → chunk.ZDMWDROZ.js} +4 -4
- package/dist/chunks/{chunk.KDS34DYH.js → chunk.ZIV4KR3D.js} +2 -2
- package/dist/chunks/{chunk.QJBEBMI4.js → chunk.ZNCZ4SGA.js} +2 -2
- package/dist/chunks/{chunk.EHY5LVO7.js → chunk.ZWDNIEOP.js} +2 -2
- package/dist/components/accordion/accordion.component.js +2 -2
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/alert/alert.component.js +4 -4
- package/dist/components/alert/alert.js +5 -5
- package/dist/components/badge/badge.component.js +2 -2
- package/dist/components/badge/badge.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.component.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.js +4 -4
- package/dist/components/breadcrumb-item/breadcrumb-item.component.js +2 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -3
- package/dist/components/button/button.component.js +4 -4
- package/dist/components/button/button.js +5 -5
- package/dist/components/button-group/button-group.component.js +2 -2
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/card/card.component.js +2 -2
- package/dist/components/card/card.js +3 -3
- package/dist/components/checkbox/checkbox.component.js +3 -3
- package/dist/components/checkbox/checkbox.js +4 -4
- package/dist/components/combobox/combobox.component.js +5 -5
- package/dist/components/combobox/combobox.js +6 -6
- package/dist/components/combobox/combobox.styles.js +1 -1
- package/dist/components/details/details.component.js +3 -3
- package/dist/components/details/details.js +4 -4
- package/dist/components/dialog/dialog.component.js +4 -4
- package/dist/components/dialog/dialog.js +5 -5
- package/dist/components/divider/divider.component.js +2 -2
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/drawer/drawer.component.js +4 -4
- package/dist/components/drawer/drawer.js +5 -5
- package/dist/components/dropdown/dropdown.component.js +3 -3
- package/dist/components/dropdown/dropdown.js +4 -4
- package/dist/components/file/file.component.js +5 -5
- package/dist/components/file/file.js +6 -6
- package/dist/components/header/header.component.js +4 -4
- package/dist/components/header/header.js +5 -5
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon-button/icon-button.component.js +3 -3
- package/dist/components/icon-button/icon-button.js +4 -4
- package/dist/components/input/input.component.js +4 -4
- package/dist/components/input/input.js +5 -5
- package/dist/components/menu/menu.component.js +2 -2
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/menu-item/menu-item.component.d.ts +1 -0
- package/dist/components/menu-item/menu-item.component.js +6 -6
- package/dist/components/menu-item/menu-item.js +7 -7
- package/dist/components/menu-item/submenu-controller.js +1 -1
- package/dist/components/menu-label/menu-label.component.js +3 -3
- package/dist/components/menu-label/menu-label.js +4 -4
- package/dist/components/nav-item/nav-item.component.js +3 -3
- package/dist/components/nav-item/nav-item.js +4 -4
- package/dist/components/optgroup/optgroup.component.js +3 -3
- package/dist/components/optgroup/optgroup.js +4 -4
- package/dist/components/option/option.component.js +3 -3
- package/dist/components/option/option.js +4 -4
- package/dist/components/popup/popup.component.d.ts +1 -0
- package/dist/components/popup/popup.component.js +4 -2
- package/dist/components/popup/popup.js +5 -3
- package/dist/components/prio-nav/prio-nav.component.js +8 -8
- package/dist/components/prio-nav/prio-nav.js +9 -9
- package/dist/components/progress-bar/progress-bar.component.js +2 -2
- package/dist/components/progress-bar/progress-bar.js +3 -3
- package/dist/components/progress-ring/progress-ring.component.js +2 -2
- package/dist/components/progress-ring/progress-ring.js +3 -3
- package/dist/components/radio/radio.component.js +3 -3
- package/dist/components/radio/radio.js +4 -4
- package/dist/components/radio-button/radio-button.component.js +2 -2
- package/dist/components/radio-button/radio-button.js +3 -3
- package/dist/components/radio-group/radio-group.component.js +3 -3
- package/dist/components/radio-group/radio-group.js +4 -4
- package/dist/components/range/range.component.js +4 -4
- package/dist/components/range/range.js +5 -5
- package/dist/components/range-tick/range-tick.component.js +2 -2
- package/dist/components/range-tick/range-tick.js +3 -3
- package/dist/components/resize-observer/resize-observer.component.js +2 -2
- package/dist/components/select/select.component.d.ts +1 -0
- package/dist/components/select/select.component.js +7 -7
- package/dist/components/select/select.js +8 -8
- package/dist/components/select/select.styles.js +1 -1
- package/dist/components/side-nav/side-nav.component.js +6 -6
- package/dist/components/side-nav/side-nav.js +7 -7
- package/dist/components/spinner/spinner.component.js +2 -2
- package/dist/components/spinner/spinner.js +3 -3
- package/dist/components/switch/switch.component.js +2 -2
- package/dist/components/switch/switch.js +3 -3
- package/dist/components/tab/tab.component.js +4 -4
- package/dist/components/tab/tab.js +5 -5
- package/dist/components/tab-group/tab-group.component.d.ts +1 -1
- package/dist/components/tab-group/tab-group.component.js +5 -5
- package/dist/components/tab-group/tab-group.js +6 -6
- package/dist/components/tab-panel/tab-panel.component.js +2 -2
- package/dist/components/tab-panel/tab-panel.js +3 -3
- package/dist/components/tag/tag.component.js +4 -4
- package/dist/components/tag/tag.js +5 -5
- package/dist/components/textarea/textarea.component.d.ts +1 -0
- package/dist/components/textarea/textarea.component.js +3 -3
- package/dist/components/textarea/textarea.js +4 -4
- package/dist/components/textarea/textarea.styles.js +1 -1
- package/dist/components/tooltip/tooltip.component.js +3 -3
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/components/validate/utility.js +2 -2
- package/dist/components/validate/validate.component.js +6 -6
- package/dist/components/validate/validate.js +7 -7
- package/dist/custom-elements.json +114 -84
- package/dist/styles/index.css +1 -1
- package/dist/synergy.js +99 -99
- package/dist/vscode.html-custom-data.json +23 -23
- package/package.json +11 -11
- package/dist/chunks/chunk.7IQ7ST4F.js.map +0 -7
- package/dist/chunks/chunk.ACSAJN57.js.map +0 -7
- package/dist/chunks/chunk.CRA5CBMD.js.map +0 -7
- package/dist/chunks/chunk.CROIIGEK.js.map +0 -7
- package/dist/chunks/chunk.EZGQE2Y4.js.map +0 -7
- package/dist/chunks/chunk.IOYGNDRB.js.map +0 -7
- package/dist/chunks/chunk.M5JWXYAN.js.map +0 -7
- /package/dist/chunks/{chunk.NGD3FJHJ.js.map → chunk.2TU3PMLN.js.map} +0 -0
- /package/dist/chunks/{chunk.TCK2OZIA.js.map → chunk.4E3AZRVT.js.map} +0 -0
- /package/dist/chunks/{chunk.TZC4IPT3.js.map → chunk.4E76ZRQI.js.map} +0 -0
- /package/dist/chunks/{chunk.RTEKLXU3.js.map → chunk.4OD2H3XB.js.map} +0 -0
- /package/dist/chunks/{chunk.6FVSBWBR.js.map → chunk.4QUIUWWD.js.map} +0 -0
- /package/dist/chunks/{chunk.C6HMB33J.js.map → chunk.5NUBLBWE.js.map} +0 -0
- /package/dist/chunks/{chunk.V26UKAYH.js.map → chunk.5WASDVJX.js.map} +0 -0
- /package/dist/chunks/{chunk.KP2IPT7J.js.map → chunk.6O6CGMJA.js.map} +0 -0
- /package/dist/chunks/{chunk.4ZAJFDDB.js.map → chunk.6Q3EOAQV.js.map} +0 -0
- /package/dist/chunks/{chunk.V3UNHLRQ.js.map → chunk.6SDNRNEM.js.map} +0 -0
- /package/dist/chunks/{chunk.WNOYE7FJ.js.map → chunk.6VAC3Z2Q.js.map} +0 -0
- /package/dist/chunks/{chunk.IAX5P4YW.js.map → chunk.7HZV4MYT.js.map} +0 -0
- /package/dist/chunks/{chunk.KDMX4Q33.js.map → chunk.B5L6RSX7.js.map} +0 -0
- /package/dist/chunks/{chunk.4WXSVFZF.js.map → chunk.BBVDCOTU.js.map} +0 -0
- /package/dist/chunks/{chunk.MGX7SU3U.js.map → chunk.BTFRHXAP.js.map} +0 -0
- /package/dist/chunks/{chunk.ZMHLJPJN.js.map → chunk.BVZMEBPT.js.map} +0 -0
- /package/dist/chunks/{chunk.W5TWI64A.js.map → chunk.C7CANCSQ.js.map} +0 -0
- /package/dist/chunks/{chunk.NNCEZT6I.js.map → chunk.CCQIEIL2.js.map} +0 -0
- /package/dist/chunks/{chunk.R2B42WQK.js.map → chunk.CII3JTNM.js.map} +0 -0
- /package/dist/chunks/{chunk.T66H2JXK.js.map → chunk.CJ357KHN.js.map} +0 -0
- /package/dist/chunks/{chunk.3KRROCNB.js.map → chunk.CX6JNMXF.js.map} +0 -0
- /package/dist/chunks/{chunk.AFGBDQAO.js.map → chunk.DHFLT5BI.js.map} +0 -0
- /package/dist/chunks/{chunk.D44UFEGJ.js.map → chunk.DLIV66GJ.js.map} +0 -0
- /package/dist/chunks/{chunk.KVU5RDXR.js.map → chunk.DLKXMQBR.js.map} +0 -0
- /package/dist/chunks/{chunk.PLRLC2PG.js.map → chunk.E3PAIPJR.js.map} +0 -0
- /package/dist/chunks/{chunk.RAAMOR6I.js.map → chunk.EEOLCQW7.js.map} +0 -0
- /package/dist/chunks/{chunk.6K2KYJ27.js.map → chunk.EG6MODIB.js.map} +0 -0
- /package/dist/chunks/{chunk.XJ6J5MAG.js.map → chunk.EKZ73UET.js.map} +0 -0
- /package/dist/chunks/{chunk.5XTRBW6I.js.map → chunk.ENYUQ5Q5.js.map} +0 -0
- /package/dist/chunks/{chunk.RUJ3ANMM.js.map → chunk.FBSFUSLP.js.map} +0 -0
- /package/dist/chunks/{chunk.UNKM3AR6.js.map → chunk.FF7XVNF3.js.map} +0 -0
- /package/dist/chunks/{chunk.DXUNCEPL.js.map → chunk.FG2DGX7Z.js.map} +0 -0
- /package/dist/chunks/{chunk.BV76KPA7.js.map → chunk.FRDQ3NA3.js.map} +0 -0
- /package/dist/chunks/{chunk.3YNFXB4T.js.map → chunk.GD4IVG2L.js.map} +0 -0
- /package/dist/chunks/{chunk.PKH7RUCS.js.map → chunk.GKAYXY36.js.map} +0 -0
- /package/dist/chunks/{chunk.QH3D6IHF.js.map → chunk.GLWGL7YS.js.map} +0 -0
- /package/dist/chunks/{chunk.GI2NYM36.js.map → chunk.GQRFIMFT.js.map} +0 -0
- /package/dist/chunks/{chunk.OL5L2SWG.js.map → chunk.H7SVFADO.js.map} +0 -0
- /package/dist/chunks/{chunk.LKAZQJ5Y.js.map → chunk.HV53NCY4.js.map} +0 -0
- /package/dist/chunks/{chunk.HVGL244L.js.map → chunk.I5BBVZWA.js.map} +0 -0
- /package/dist/chunks/{chunk.WKPG4Y6A.js.map → chunk.JI7FGEBP.js.map} +0 -0
- /package/dist/chunks/{chunk.3FNWITES.js.map → chunk.JLRQPUIG.js.map} +0 -0
- /package/dist/chunks/{chunk.NBBH4EMX.js.map → chunk.K2CADE4S.js.map} +0 -0
- /package/dist/chunks/{chunk.CN4426X7.js.map → chunk.MAVKVXWD.js.map} +0 -0
- /package/dist/chunks/{chunk.N4ZA77ZV.js.map → chunk.MFNB75KX.js.map} +0 -0
- /package/dist/chunks/{chunk.MFD4ZXHO.js.map → chunk.MPBNR3JJ.js.map} +0 -0
- /package/dist/chunks/{chunk.MKHPO7MC.js.map → chunk.MXYJWR6C.js.map} +0 -0
- /package/dist/chunks/{chunk.L6YDUFFT.js.map → chunk.NJB7SJKA.js.map} +0 -0
- /package/dist/chunks/{chunk.HQCHFTWQ.js.map → chunk.NMQJGEFL.js.map} +0 -0
- /package/dist/chunks/{chunk.RWQ7UK2Z.js.map → chunk.O656KF6Y.js.map} +0 -0
- /package/dist/chunks/{chunk.7VB6V33J.js.map → chunk.OEFVUTI2.js.map} +0 -0
- /package/dist/chunks/{chunk.INJM3DAJ.js.map → chunk.PCYVMSZ7.js.map} +0 -0
- /package/dist/chunks/{chunk.JVIDZKUX.js.map → chunk.PFORJYFS.js.map} +0 -0
- /package/dist/chunks/{chunk.TNVBUUDO.js.map → chunk.PNWQUWHW.js.map} +0 -0
- /package/dist/chunks/{chunk.ETBT2YG4.js.map → chunk.PP6YASVT.js.map} +0 -0
- /package/dist/chunks/{chunk.AONHNKC7.js.map → chunk.PVZ5GK4B.js.map} +0 -0
- /package/dist/chunks/{chunk.LHFNBKMZ.js.map → chunk.PWTZX6PQ.js.map} +0 -0
- /package/dist/chunks/{chunk.HFXDDKUQ.js.map → chunk.QC77ZFJI.js.map} +0 -0
- /package/dist/chunks/{chunk.N4NBMVHY.js.map → chunk.QXOHNSH7.js.map} +0 -0
- /package/dist/chunks/{chunk.AVNMFX5X.js.map → chunk.SFOAR5BL.js.map} +0 -0
- /package/dist/chunks/{chunk.3LCKJNDI.js.map → chunk.SGWZTGID.js.map} +0 -0
- /package/dist/chunks/{chunk.DTVX4TKW.js.map → chunk.SUMABPQN.js.map} +0 -0
- /package/dist/chunks/{chunk.43EAE2QI.js.map → chunk.T2I3Z2JZ.js.map} +0 -0
- /package/dist/chunks/{chunk.GFDW6BKM.js.map → chunk.TNNT6IDT.js.map} +0 -0
- /package/dist/chunks/{chunk.3IFWX7E3.js.map → chunk.TR6K4HDS.js.map} +0 -0
- /package/dist/chunks/{chunk.E2DM7XQK.js.map → chunk.U5FNJXTJ.js.map} +0 -0
- /package/dist/chunks/{chunk.PLNTJP3L.js.map → chunk.UE5LOIPK.js.map} +0 -0
- /package/dist/chunks/{chunk.VQPF22HI.js.map → chunk.UKJMAI4Q.js.map} +0 -0
- /package/dist/chunks/{chunk.6IPI5YJJ.js.map → chunk.ULXNVBWC.js.map} +0 -0
- /package/dist/chunks/{chunk.Z3YHPV62.js.map → chunk.UO45LNYQ.js.map} +0 -0
- /package/dist/chunks/{chunk.6TR53QJH.js.map → chunk.V7V4YBUS.js.map} +0 -0
- /package/dist/chunks/{chunk.QEPIKL2O.js.map → chunk.VJLHPHTO.js.map} +0 -0
- /package/dist/chunks/{chunk.OMVVPU3N.js.map → chunk.W6QWU55E.js.map} +0 -0
- /package/dist/chunks/{chunk.ZDLBTJKY.js.map → chunk.WHBCML74.js.map} +0 -0
- /package/dist/chunks/{chunk.OMI4XYXD.js.map → chunk.WPCYWZX6.js.map} +0 -0
- /package/dist/chunks/{chunk.U3FPKF7P.js.map → chunk.WRXAT2ZV.js.map} +0 -0
- /package/dist/chunks/{chunk.3JB36AXI.js.map → chunk.WWG3H2UB.js.map} +0 -0
- /package/dist/chunks/{chunk.LG2S5EYQ.js.map → chunk.WZ4MEHUQ.js.map} +0 -0
- /package/dist/chunks/{chunk.W5FJR66T.js.map → chunk.YFTKZOLR.js.map} +0 -0
- /package/dist/chunks/{chunk.YMXGU2DZ.js.map → chunk.YPYP3MLT.js.map} +0 -0
- /package/dist/chunks/{chunk.V6VHMR46.js.map → chunk.YVMY7F6B.js.map} +0 -0
- /package/dist/chunks/{chunk.X5BIF4J6.js.map → chunk.Z7GEUQ4J.js.map} +0 -0
- /package/dist/chunks/{chunk.IA6JFXGQ.js.map → chunk.ZCYK7ZRI.js.map} +0 -0
- /package/dist/chunks/{chunk.BTXTLVCD.js.map → chunk.ZDMWDROZ.js.map} +0 -0
- /package/dist/chunks/{chunk.KDS34DYH.js.map → chunk.ZIV4KR3D.js.map} +0 -0
- /package/dist/chunks/{chunk.QJBEBMI4.js.map → chunk.ZNCZ4SGA.js.map} +0 -0
- /package/dist/chunks/{chunk.EHY5LVO7.js.map → chunk.ZWDNIEOP.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynDrawer
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.DLIV66GJ.js";
|
|
4
4
|
|
|
5
5
|
// src/components/drawer/drawer.ts
|
|
6
6
|
var drawer_default = SynDrawer;
|
|
@@ -9,4 +9,4 @@ SynDrawer.define("syn-drawer");
|
|
|
9
9
|
export {
|
|
10
10
|
drawer_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.2TU3PMLN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynAlert
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.W6QWU55E.js";
|
|
4
4
|
|
|
5
5
|
// src/components/alert/alert.ts
|
|
6
6
|
var alert_default = SynAlert;
|
|
@@ -9,4 +9,4 @@ SynAlert.define("syn-alert");
|
|
|
9
9
|
export {
|
|
10
10
|
alert_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.4E3AZRVT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynPrioNav
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.PFORJYFS.js";
|
|
4
4
|
|
|
5
5
|
// src/components/prio-nav/prio-nav.ts
|
|
6
6
|
var prio_nav_default = SynPrioNav;
|
|
@@ -9,4 +9,4 @@ SynPrioNav.define("syn-prio-nav");
|
|
|
9
9
|
export {
|
|
10
10
|
prio_nav_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.4E76ZRQI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynRadioButton
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.YVMY7F6B.js";
|
|
4
4
|
|
|
5
5
|
// src/components/radio-button/radio-button.ts
|
|
6
6
|
var radio_button_default = SynRadioButton;
|
|
@@ -9,4 +9,4 @@ SynRadioButton.define("syn-radio-button");
|
|
|
9
9
|
export {
|
|
10
10
|
radio_button_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.4OD2H3XB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynValidate
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.MFNB75KX.js";
|
|
4
4
|
|
|
5
5
|
// src/components/validate/validate.ts
|
|
6
6
|
var validate_default = SynValidate;
|
|
@@ -9,4 +9,4 @@ SynValidate.define("syn-validate");
|
|
|
9
9
|
export {
|
|
10
10
|
validate_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.4QUIUWWD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynSpinner
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.QC77ZFJI.js";
|
|
4
4
|
|
|
5
5
|
// src/components/spinner/spinner.ts
|
|
6
6
|
var spinner_default = SynSpinner;
|
|
@@ -9,4 +9,4 @@ SynSpinner.define("syn-spinner");
|
|
|
9
9
|
export {
|
|
10
10
|
spinner_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.5NUBLBWE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynTextarea
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.E3JM7C7O.js";
|
|
4
4
|
|
|
5
5
|
// src/components/textarea/textarea.ts
|
|
6
6
|
var textarea_default = SynTextarea;
|
|
@@ -9,4 +9,4 @@ SynTextarea.define("syn-textarea");
|
|
|
9
9
|
export {
|
|
10
10
|
textarea_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.5WASDVJX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynBadge
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.WWG3H2UB.js";
|
|
4
4
|
|
|
5
5
|
// src/components/badge/badge.ts
|
|
6
6
|
var badge_default = SynBadge;
|
|
@@ -9,4 +9,4 @@ SynBadge.define("syn-badge");
|
|
|
9
9
|
export {
|
|
10
10
|
badge_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.6O6CGMJA.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk.WOJ2VRZY.js";
|
|
4
4
|
import {
|
|
5
5
|
SynDivider
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.FF7XVNF3.js";
|
|
7
7
|
import {
|
|
8
8
|
HasSlotController
|
|
9
9
|
} from "./chunk.WVVQK5TE.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk.NLYVOJGK.js";
|
|
16
16
|
import {
|
|
17
17
|
SynergyElement
|
|
18
|
-
} from "./chunk.
|
|
18
|
+
} from "./chunk.BMMT5J3T.js";
|
|
19
19
|
import {
|
|
20
20
|
__decorateClass
|
|
21
21
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -331,4 +331,4 @@ __decorateClass([
|
|
|
331
331
|
export {
|
|
332
332
|
SynNavItem
|
|
333
333
|
};
|
|
334
|
-
//# sourceMappingURL=chunk.
|
|
334
|
+
//# sourceMappingURL=chunk.6Q3EOAQV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynTab
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.PP6YASVT.js";
|
|
4
4
|
|
|
5
5
|
// src/components/tab/tab.ts
|
|
6
6
|
var tab_default = SynTab;
|
|
@@ -9,4 +9,4 @@ SynTab.define("syn-tab");
|
|
|
9
9
|
export {
|
|
10
10
|
tab_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.6SDNRNEM.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk.NLYVOJGK.js";
|
|
7
7
|
import {
|
|
8
8
|
SynergyElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.BMMT5J3T.js";
|
|
10
10
|
import {
|
|
11
11
|
__decorateClass
|
|
12
12
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -89,4 +89,4 @@ function findButton(el) {
|
|
|
89
89
|
export {
|
|
90
90
|
SynButtonGroup
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk.
|
|
92
|
+
//# sourceMappingURL=chunk.6VAC3Z2Q.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk.FKKJBKYL.js";
|
|
11
11
|
import {
|
|
12
12
|
SynButtonGroup
|
|
13
|
-
} from "./chunk.
|
|
13
|
+
} from "./chunk.6VAC3Z2Q.js";
|
|
14
14
|
import {
|
|
15
15
|
FormControlController,
|
|
16
16
|
customErrorValidityState,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./chunk.NLYVOJGK.js";
|
|
29
29
|
import {
|
|
30
30
|
SynergyElement
|
|
31
|
-
} from "./chunk.
|
|
31
|
+
} from "./chunk.BMMT5J3T.js";
|
|
32
32
|
import {
|
|
33
33
|
__decorateClass
|
|
34
34
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -363,4 +363,4 @@ __decorateClass([
|
|
|
363
363
|
export {
|
|
364
364
|
SynRadioGroup
|
|
365
365
|
};
|
|
366
|
-
//# sourceMappingURL=chunk.
|
|
366
|
+
//# sourceMappingURL=chunk.6WKJKCWD.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/radio-group/radio-group.component.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * ---------------------------------------------------------------------\n * \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n * Removing this comment will prevent it from being managed by it.\n * ---------------------------------------------------------------------\n */\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport {\n customErrorValidityState,\n FormControlController,\n validValidityState,\n valueMissingValidityState\n} from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport formControlStyles from '../../styles/form-control.styles.js';\nimport formControlCustomStyles from '../../styles/form-control.custom.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynButtonGroup from '../button-group/button-group.component.js';\nimport styles from './radio-group.styles.js';\nimport customStyles from './radio-group.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\nimport type SynRadio from '../radio/radio.js';\nimport type SynRadioButton from '../radio-button/radio-button.js';\n\n/**\n * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n * @documentation https://synergy.style/components/radio-group\n * @status stable\n * @since 2.0\n *\n * @dependency syn-button-group\n *\n * @slot - The default slot where `<syn-radio>` or `<syn-radio-button>` elements are placed.\n * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`\n * attribute.\n * @slot help-text - Text that describes how to use the radio group. Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-change - Emitted when the radio group's selected value changes.\n * @event syn-input - Emitted when the radio group receives user input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart button-group - The button group that wraps radio buttons.\n * @csspart button-group__base - The button group's `base` part.\n */\nexport default class SynRadioGroup extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [componentStyles, formControlStyles, styles, formControlCustomStyles, customStyles];\n static dependencies = { 'syn-button-group': SynButtonGroup };\n\n protected readonly formControlController = new FormControlController(this);\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');\n private customValidityMessage = '';\n private validationTimeout: number;\n\n @query('slot:not([name])') defaultSlot: HTMLSlotElement;\n @query('.radio-group__validation-input') validationInput: HTMLInputElement;\n\n @state() private hasButtonGroup = false;\n @state() private errorMessage = '';\n @state() defaultValue = '';\n\n /**\n * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\n * instead.\n */\n @property() label = '';\n\n /** The radio groups's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** The name of the radio group, submitted as a name/value pair with form data. */\n @property() name = 'option';\n\n /** The current value of the radio group, submitted as a name/value pair with form data. */\n @property({ reflect: true }) value = '';\n\n /** The radio group's size. This size will be applied to all child radios and radio buttons. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Ensures a child radio is checked before allowing the containing form to submit. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Gets the validity state object */\n get validity() {\n const isRequiredAndEmpty = this.required && !this.value;\n const hasCustomValidityMessage = this.customValidityMessage !== '';\n\n if (hasCustomValidityMessage) {\n return customErrorValidityState;\n } else if (isRequiredAndEmpty) {\n return valueMissingValidityState;\n }\n\n return validValidityState;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n const isRequiredAndEmpty = this.required && !this.value;\n const hasCustomValidityMessage = this.customValidityMessage !== '';\n\n if (hasCustomValidityMessage) {\n return this.customValidityMessage;\n } else if (isRequiredAndEmpty) {\n return this.validationInput.validationMessage;\n }\n\n return '';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.defaultValue = this.value;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private getAllRadios() {\n return [...this.querySelectorAll<SynRadio | SynRadioButton>('syn-radio, syn-radio-button')];\n }\n\n private handleRadioClick(event: MouseEvent) {\n const target = (event.target as HTMLElement).closest<SynRadio | SynRadioButton>('syn-radio, syn-radio-button')!;\n const radios = this.getAllRadios();\n const oldValue = this.value;\n\n if (!target || target.disabled) {\n return;\n }\n\n this.value = target.value;\n radios.forEach(radio => (radio.checked = radio === target));\n\n if (this.value !== oldValue) {\n this.emit('syn-change');\n this.emit('syn-input');\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(event.key)) {\n return;\n }\n\n const radios = this.getAllRadios().filter(radio => !radio.disabled);\n const checkedRadio = radios.find(radio => radio.checked) ?? radios[0];\n const incr = event.key === ' ' ? 0 : ['ArrowUp', 'ArrowLeft'].includes(event.key) ? -1 : 1;\n const oldValue = this.value;\n let index = radios.indexOf(checkedRadio) + incr;\n\n if (index < 0) {\n index = radios.length - 1;\n }\n\n if (index > radios.length - 1) {\n index = 0;\n }\n\n this.getAllRadios().forEach(radio => {\n radio.checked = false;\n\n if (!this.hasButtonGroup) {\n radio.setAttribute('tabindex', '-1');\n }\n });\n\n this.value = radios[index].value;\n radios[index].checked = true;\n\n if (!this.hasButtonGroup) {\n radios[index].setAttribute('tabindex', '0');\n radios[index].focus();\n } else {\n radios[index].shadowRoot!.querySelector('button')!.focus();\n }\n\n if (this.value !== oldValue) {\n this.emit('syn-change');\n this.emit('syn-input');\n }\n\n event.preventDefault();\n }\n\n private handleLabelClick() {\n this.focus();\n }\n \nprivate handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private async syncRadioElements() {\n const radios = this.getAllRadios();\n\n await Promise.all(\n // Sync the checked state and size\n radios.map(async radio => {\n await radio.updateComplete;\n radio.checked = radio.value === this.value;\n radio.size = this.size;\n })\n );\n\n this.hasButtonGroup = radios.some(radio => radio.tagName.toLowerCase() === 'syn-radio-button');\n\n if (radios.length > 0 && !radios.some(radio => radio.checked)) {\n if (this.hasButtonGroup) {\n const buttonRadio = radios[0].shadowRoot?.querySelector('button');\n\n if (buttonRadio) {\n buttonRadio.setAttribute('tabindex', '0');\n }\n } else {\n radios[0].setAttribute('tabindex', '0');\n }\n }\n\n if (this.hasButtonGroup) {\n const buttonGroup = this.shadowRoot?.querySelector('syn-button-group');\n\n if (buttonGroup) {\n buttonGroup.disableRole = true;\n }\n }\n }\n\n private syncRadios() {\n if (customElements.get('syn-radio') && customElements.get('syn-radio-button')) {\n this.syncRadioElements();\n return;\n }\n\n if (customElements.get('syn-radio')) {\n this.syncRadioElements();\n } else {\n customElements.whenDefined('syn-radio').then(() => this.syncRadios());\n }\n\n if (customElements.get('syn-radio-button')) {\n this.syncRadioElements();\n } else {\n // Rerun this handler when <syn-radio> or <syn-radio-button> is registered\n customElements.whenDefined('syn-radio-button').then(() => this.syncRadios());\n }\n }\n\n private updateCheckedRadio() {\n const radios = this.getAllRadios();\n radios.forEach(radio => (radio.checked = radio.value === this.value));\n this.formControlController.setValidity(this.validity.valid);\n }\n\n @watch('size', { waitUntilFirstUpdate: true })\n handleSizeChange() {\n this.syncRadios();\n }\n\n @watch('value')\n handleValueChange() {\n if (this.hasUpdated) {\n this.updateCheckedRadio();\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n const isRequiredAndEmpty = this.required && !this.value;\n const hasCustomValidityMessage = this.customValidityMessage !== '';\n\n if (isRequiredAndEmpty || hasCustomValidityMessage) {\n this.formControlController.emitInvalidEvent();\n return false;\n }\n\n return true;\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity(): boolean {\n const isValid = this.validity.valid;\n\n this.errorMessage = this.customValidityMessage || isValid ? '' : this.validationInput.validationMessage;\n this.formControlController.setValidity(isValid);\n this.validationInput.hidden = true;\n clearTimeout(this.validationTimeout);\n\n if (!isValid) {\n // Show the browser's constraint validation message\n this.validationInput.hidden = false;\n this.validationInput.reportValidity();\n this.validationTimeout = setTimeout(() => (this.validationInput.hidden = true), 10000) as unknown as number;\n }\n\n return isValid;\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message = '') {\n this.customValidityMessage = message;\n this.errorMessage = message;\n this.validationInput.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the radio-group. */\n public focus(options?: FocusOptions) {\n const radios = this.getAllRadios();\n const checked = radios.find(radio => radio.checked);\n const firstEnabledRadio = radios.find(radio => !radio.disabled);\n const radioToFocus = checked || firstEnabledRadio;\n\n // Call focus for the checked radio\n // If no radio is checked, focus the first one that is not disabled\n if (radioToFocus) {\n radioToFocus.focus(options);\n }\n }\n \nrender() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const defaultSlot = html`\n <slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>\n `;\n\n return html`\n <fieldset\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--radio-group': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText\n })}\n role=\"radiogroup\"\n aria-labelledby=\"label\"\n aria-describedby=\"help-text\"\n aria-errormessage=\"error-message\"\n >\n <label\n part=\"form-control-label\"\n id=\"label\"\n class=\"form-control__label\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n @click=${this.handleLabelClick}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div class=\"visually-hidden\">\n <div id=\"error-message\" aria-live=\"assertive\">${this.errorMessage}</div>\n <label class=\"radio-group__validation\">\n <input\n type=\"text\"\n class=\"radio-group__validation-input\"\n ?required=${this.required}\n tabindex=\"-1\"\n hidden\n @invalid=${this.handleInvalid}\n />\n </label>\n </div>\n\n ${this.hasButtonGroup\n ? html`\n <syn-button-group part=\"button-group\" exportparts=\"base:button-group__base\" role=\"presentation\">\n ${defaultSlot}\n </syn-button-group>\n `\n : defaultSlot}\n </div>\n\n <div\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </fieldset>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,gBAAgB;AAQzB,SAAS,YAAY;AACrB,SAAS,UAAU,OAAO,aAAa;AAsCvC,IAAqB,gBAArB,cAA2C,eAA6C;AAAA,EAAxF;AA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MAAM;AAAA,EACb;AAAA,
|
|
4
|
+
"sourcesContent": ["/**\n * ---------------------------------------------------------------------\n * \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n * Removing this comment will prevent it from being managed by it.\n * ---------------------------------------------------------------------\n */\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport {\n customErrorValidityState,\n FormControlController,\n validValidityState,\n valueMissingValidityState\n} from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport formControlStyles from '../../styles/form-control.styles.js';\nimport formControlCustomStyles from '../../styles/form-control.custom.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynButtonGroup from '../button-group/button-group.component.js';\nimport styles from './radio-group.styles.js';\nimport customStyles from './radio-group.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\nimport type SynRadio from '../radio/radio.js';\nimport type SynRadioButton from '../radio-button/radio-button.js';\n\n/**\n * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n * @documentation https://synergy.style/components/radio-group\n * @status stable\n * @since 2.0\n *\n * @dependency syn-button-group\n *\n * @slot - The default slot where `<syn-radio>` or `<syn-radio-button>` elements are placed.\n * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`\n * attribute.\n * @slot help-text - Text that describes how to use the radio group. Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-change - Emitted when the radio group's selected value changes.\n * @event syn-input - Emitted when the radio group receives user input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart button-group - The button group that wraps radio buttons.\n * @csspart button-group__base - The button group's `base` part.\n */\nexport default class SynRadioGroup extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [componentStyles, formControlStyles, styles, formControlCustomStyles, customStyles];\n static dependencies = { 'syn-button-group': SynButtonGroup };\n\n protected readonly formControlController = new FormControlController(this);\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');\n private customValidityMessage = '';\n private validationTimeout: number;\n\n @query('slot:not([name])') defaultSlot: HTMLSlotElement;\n @query('.radio-group__validation-input') validationInput: HTMLInputElement;\n\n @state() private hasButtonGroup = false;\n @state() private errorMessage = '';\n @state() defaultValue = '';\n\n /**\n * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\n * instead.\n */\n @property() label = '';\n\n /** The radio groups's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** The name of the radio group, submitted as a name/value pair with form data. */\n @property() name = 'option';\n\n /** The current value of the radio group, submitted as a name/value pair with form data. */\n @property({ reflect: true }) value = '';\n\n /** The radio group's size. This size will be applied to all child radios and radio buttons. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Ensures a child radio is checked before allowing the containing form to submit. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Gets the validity state object */\n get validity() {\n const isRequiredAndEmpty = this.required && !this.value;\n const hasCustomValidityMessage = this.customValidityMessage !== '';\n\n if (hasCustomValidityMessage) {\n return customErrorValidityState;\n } else if (isRequiredAndEmpty) {\n return valueMissingValidityState;\n }\n\n return validValidityState;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n const isRequiredAndEmpty = this.required && !this.value;\n const hasCustomValidityMessage = this.customValidityMessage !== '';\n\n if (hasCustomValidityMessage) {\n return this.customValidityMessage;\n } else if (isRequiredAndEmpty) {\n return this.validationInput.validationMessage;\n }\n\n return '';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.defaultValue = this.value;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private getAllRadios() {\n return [...this.querySelectorAll<SynRadio | SynRadioButton>('syn-radio, syn-radio-button')];\n }\n\n private handleRadioClick(event: MouseEvent) {\n const target = (event.target as HTMLElement).closest<SynRadio | SynRadioButton>('syn-radio, syn-radio-button')!;\n const radios = this.getAllRadios();\n const oldValue = this.value;\n\n if (!target || target.disabled) {\n return;\n }\n\n this.value = target.value;\n radios.forEach(radio => (radio.checked = radio === target));\n\n if (this.value !== oldValue) {\n this.emit('syn-change');\n this.emit('syn-input');\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(event.key)) {\n return;\n }\n\n const radios = this.getAllRadios().filter(radio => !radio.disabled);\n const checkedRadio = radios.find(radio => radio.checked) ?? radios[0];\n const incr = event.key === ' ' ? 0 : ['ArrowUp', 'ArrowLeft'].includes(event.key) ? -1 : 1;\n const oldValue = this.value;\n let index = radios.indexOf(checkedRadio) + incr;\n\n if (index < 0) {\n index = radios.length - 1;\n }\n\n if (index > radios.length - 1) {\n index = 0;\n }\n\n this.getAllRadios().forEach(radio => {\n radio.checked = false;\n\n if (!this.hasButtonGroup) {\n radio.setAttribute('tabindex', '-1');\n }\n });\n\n this.value = radios[index].value;\n radios[index].checked = true;\n\n if (!this.hasButtonGroup) {\n radios[index].setAttribute('tabindex', '0');\n radios[index].focus();\n } else {\n radios[index].shadowRoot!.querySelector('button')!.focus();\n }\n\n if (this.value !== oldValue) {\n this.emit('syn-change');\n this.emit('syn-input');\n }\n\n event.preventDefault();\n }\n\n private handleLabelClick() {\n this.focus();\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private async syncRadioElements() {\n const radios = this.getAllRadios();\n\n await Promise.all(\n // Sync the checked state and size\n radios.map(async radio => {\n await radio.updateComplete;\n radio.checked = radio.value === this.value;\n radio.size = this.size;\n })\n );\n\n this.hasButtonGroup = radios.some(radio => radio.tagName.toLowerCase() === 'syn-radio-button');\n\n if (radios.length > 0 && !radios.some(radio => radio.checked)) {\n if (this.hasButtonGroup) {\n const buttonRadio = radios[0].shadowRoot?.querySelector('button');\n\n if (buttonRadio) {\n buttonRadio.setAttribute('tabindex', '0');\n }\n } else {\n radios[0].setAttribute('tabindex', '0');\n }\n }\n\n if (this.hasButtonGroup) {\n const buttonGroup = this.shadowRoot?.querySelector('syn-button-group');\n\n if (buttonGroup) {\n buttonGroup.disableRole = true;\n }\n }\n }\n\n private syncRadios() {\n if (customElements.get('syn-radio') && customElements.get('syn-radio-button')) {\n this.syncRadioElements();\n return;\n }\n\n if (customElements.get('syn-radio')) {\n this.syncRadioElements();\n } else {\n customElements.whenDefined('syn-radio').then(() => this.syncRadios());\n }\n\n if (customElements.get('syn-radio-button')) {\n this.syncRadioElements();\n } else {\n // Rerun this handler when <syn-radio> or <syn-radio-button> is registered\n customElements.whenDefined('syn-radio-button').then(() => this.syncRadios());\n }\n }\n\n private updateCheckedRadio() {\n const radios = this.getAllRadios();\n radios.forEach(radio => (radio.checked = radio.value === this.value));\n this.formControlController.setValidity(this.validity.valid);\n }\n\n @watch('size', { waitUntilFirstUpdate: true })\n handleSizeChange() {\n this.syncRadios();\n }\n\n @watch('value')\n handleValueChange() {\n if (this.hasUpdated) {\n this.updateCheckedRadio();\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n const isRequiredAndEmpty = this.required && !this.value;\n const hasCustomValidityMessage = this.customValidityMessage !== '';\n\n if (isRequiredAndEmpty || hasCustomValidityMessage) {\n this.formControlController.emitInvalidEvent();\n return false;\n }\n\n return true;\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity(): boolean {\n const isValid = this.validity.valid;\n\n this.errorMessage = this.customValidityMessage || isValid ? '' : this.validationInput.validationMessage;\n this.formControlController.setValidity(isValid);\n this.validationInput.hidden = true;\n clearTimeout(this.validationTimeout);\n\n if (!isValid) {\n // Show the browser's constraint validation message\n this.validationInput.hidden = false;\n this.validationInput.reportValidity();\n this.validationTimeout = setTimeout(() => (this.validationInput.hidden = true), 10000) as unknown as number;\n }\n\n return isValid;\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message = '') {\n this.customValidityMessage = message;\n this.errorMessage = message;\n this.validationInput.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the radio-group. */\n public focus(options?: FocusOptions) {\n const radios = this.getAllRadios();\n const checked = radios.find(radio => radio.checked);\n const firstEnabledRadio = radios.find(radio => !radio.disabled);\n const radioToFocus = checked || firstEnabledRadio;\n\n // Call focus for the checked radio\n // If no radio is checked, focus the first one that is not disabled\n if (radioToFocus) {\n radioToFocus.focus(options);\n }\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const defaultSlot = html`\n <slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>\n `;\n\n return html`\n <fieldset\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--radio-group': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText\n })}\n role=\"radiogroup\"\n aria-labelledby=\"label\"\n aria-describedby=\"help-text\"\n aria-errormessage=\"error-message\"\n >\n <label\n part=\"form-control-label\"\n id=\"label\"\n class=\"form-control__label\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n @click=${this.handleLabelClick}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div class=\"visually-hidden\">\n <div id=\"error-message\" aria-live=\"assertive\">${this.errorMessage}</div>\n <label class=\"radio-group__validation\">\n <input\n type=\"text\"\n class=\"radio-group__validation-input\"\n ?required=${this.required}\n tabindex=\"-1\"\n hidden\n @invalid=${this.handleInvalid}\n />\n </label>\n </div>\n\n ${this.hasButtonGroup\n ? html`\n <syn-button-group part=\"button-group\" exportparts=\"base:button-group__base\" role=\"presentation\">\n ${defaultSlot}\n </syn-button-group>\n `\n : defaultSlot}\n </div>\n\n <div\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </fieldset>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,gBAAgB;AAQzB,SAAS,YAAY;AACrB,SAAS,UAAU,OAAO,aAAa;AAsCvC,IAAqB,gBAArB,cAA2C,eAA6C;AAAA,EAAxF;AAAA;AAIE,SAAmB,wBAAwB,IAAI,sBAAsB,IAAI;AACzE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,OAAO;AACrF,SAAQ,wBAAwB;AAMvB,SAAQ,iBAAiB;AACzB,SAAQ,eAAe;AACvB,wBAAe;AAMZ,iBAAQ;AAGkB,oBAAW;AAGrC,gBAAO;AAGU,iBAAQ;AAGR,gBAAqC;AAOrC,gBAAO;AAGQ,oBAAW;AAAA;AAAA;AAAA,EAGvD,IAAI,WAAW;AACb,UAAM,qBAAqB,KAAK,YAAY,CAAC,KAAK;AAClD,UAAM,2BAA2B,KAAK,0BAA0B;AAEhE,QAAI,0BAA0B;AAC5B,aAAO;AAAA,IACT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AA,GApBS,cAoBP;AAG0B;AAAA,EAArC,SAAS,EAAE,WAAW,YAAY,CAAC;AAAA,GAvBjB,cAuBmB;AAG1B;AAAA,EAAX,SAAS;AAAA,GA1BS,cA0BP;AAGiB;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GA7BR,cA6BU;AAGA;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAhCR,cAgCU;AAOA;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAvCR,cAuCU;AAGe;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA1CvB,cA0CyB;AAiL5C;AAAA,EADC,MAAM,QAAQ,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA1N1B,cA2NnB;AAKA;AAAA,EADC,MAAM,OAAO;AAAA,GA/NK,cAgOnB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynCombobox
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.GQRFIMFT.js";
|
|
4
4
|
|
|
5
5
|
// src/components/combobox/combobox.ts
|
|
6
6
|
var combobox_default = SynCombobox;
|
|
@@ -9,4 +9,4 @@ SynCombobox.define("syn-combobox");
|
|
|
9
9
|
export {
|
|
10
10
|
combobox_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.7HZV4MYT.js.map
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
popup_styles_default
|
|
3
3
|
} from "./chunk.AZ3N5IOO.js";
|
|
4
|
+
import {
|
|
5
|
+
LocalizeController
|
|
6
|
+
} from "./chunk.GIU3H3J3.js";
|
|
4
7
|
import {
|
|
5
8
|
component_styles_default
|
|
6
9
|
} from "./chunk.NLYVOJGK.js";
|
|
7
10
|
import {
|
|
8
11
|
SynergyElement
|
|
9
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.BMMT5J3T.js";
|
|
10
13
|
import {
|
|
11
14
|
__decorateClass,
|
|
12
15
|
__spreadProps,
|
|
@@ -25,6 +28,7 @@ function isVirtualElement(e) {
|
|
|
25
28
|
var SynPopup = class extends SynergyElement {
|
|
26
29
|
constructor() {
|
|
27
30
|
super(...arguments);
|
|
31
|
+
this.localize = new LocalizeController(this);
|
|
28
32
|
this.active = false;
|
|
29
33
|
this.placement = "top";
|
|
30
34
|
this.strategy = "absolute";
|
|
@@ -254,7 +258,7 @@ var SynPopup = class extends SynergyElement {
|
|
|
254
258
|
getOffsetParent
|
|
255
259
|
})
|
|
256
260
|
}).then(({ x, y, middlewareData, placement }) => {
|
|
257
|
-
const isRtl = this.
|
|
261
|
+
const isRtl = this.localize.dir() === "rtl";
|
|
258
262
|
const staticSide = { top: "bottom", right: "left", bottom: "top", left: "right" }[placement.split("-")[0]];
|
|
259
263
|
this.setAttribute("data-current-placement", placement);
|
|
260
264
|
Object.assign(this.popup.style, {
|
|
@@ -411,4 +415,4 @@ __decorateClass([
|
|
|
411
415
|
export {
|
|
412
416
|
SynPopup
|
|
413
417
|
};
|
|
414
|
-
//# sourceMappingURL=chunk.
|
|
418
|
+
//# sourceMappingURL=chunk.API5O3M4.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/popup/popup.component.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * ---------------------------------------------------------------------\n * \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n * Removing this comment will prevent it from being managed by it.\n * ---------------------------------------------------------------------\n */\n\n/* eslint-disable */\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { offsetParent } from 'composed-offset-position';\nimport { property, query } from 'lit/decorators.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './popup.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\nexport interface VirtualElement {\n getBoundingClientRect: () => DOMRect;\n contextElement?: Element;\n}\n\nfunction isVirtualElement(e: unknown): e is VirtualElement {\n return (\n e !== null &&\n typeof e === 'object' &&\n 'getBoundingClientRect' in e &&\n ('contextElement' in e ? e instanceof Element : true)\n );\n}\n\n/**\n * @summary Popup is a utility that lets you declaratively anchor \"popup\" containers to another element.\n * @documentation https://synergy.style/components/popup\n * @status stable\n * @since 2.0\n *\n * @event syn-reposition - Emitted when the popup is repositioned. This event can fire a lot, so avoid putting expensive\n * operations in your listener or consider debouncing it.\n *\n * @slot - The popup's content.\n * @slot anchor - The element the popup will be anchored to. If the anchor lives outside of the popup, you can use the\n * `anchor` attribute or property instead.\n *\n * @csspart arrow - The arrow's container. Avoid setting `top|bottom|left|right` properties, as these values are\n * assigned dynamically as the popup moves. This is most useful for applying a background color to match the popup, and\n * maybe a border or box shadow.\n * @csspart popup - The popup's container. Useful for setting a background color, box shadow, etc.\n * @csspart hover-bridge - The hover bridge element. Only available when the `hover-bridge` option is enabled.\n *\n * @cssproperty [--arrow-size=6px] - The size of the arrow. Note that an arrow won't be shown unless the `arrow`\n * attribute is used.\n * @cssproperty [--arrow-color=var(--syn-color-neutral-0)] - The color of the arrow.\n * @cssproperty [--auto-size-available-width] - A read-only custom property that determines the amount of width the\n * popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only\n * available when using `auto-size`.\n * @cssproperty [--auto-size-available-height] - A read-only custom property that determines the amount of height the\n * popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only\n * available when using `auto-size`.\n */\nexport default class SynPopup extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n private anchorEl: Element | VirtualElement | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n private readonly localize = new LocalizeController(this);\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide the anchor\n * element `id`, a DOM element reference, or a `VirtualElement`. If the anchor lives inside the popup, use the\n * `anchor` slot instead.\n */\n @property() anchor: Element | string | VirtualElement;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n /**\n * When a gap exists between the anchor and the popup element, this option will add a \"hover bridge\" that fills the\n * gap using an invisible element. This makes listening for events such as `mouseenter` and `mouseleave` more sane\n * because the pointer never technically leaves the element. The hover bridge will only be drawn when the popover is\n * active.\n */\n @property({ attribute: 'hover-bridge', type: Boolean }) hoverBridge = false;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element || isVirtualElement(this.anchor)) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n // If the anchor is valid, start it up\n if (this.anchorEl && this.active) {\n this.start();\n }\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n // More info: https://github.com/synergy-design-system/synergy/issues/1135\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = this.localize.dir() === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n // Wait until the new position is drawn before updating the hover bridge, otherwise it can get out of sync\n requestAnimationFrame(() => this.updateHoverBridge());\n\n this.emit('syn-reposition');\n }\n\n private updateHoverBridge = () => {\n if (this.hoverBridge && this.anchorEl) {\n const anchorRect = this.anchorEl.getBoundingClientRect();\n const popupRect = this.popup.getBoundingClientRect();\n const isVertical = this.placement.includes('top') || this.placement.includes('bottom');\n let topLeftX = 0;\n let topLeftY = 0;\n let topRightX = 0;\n let topRightY = 0;\n let bottomLeftX = 0;\n let bottomLeftY = 0;\n let bottomRightX = 0;\n let bottomRightY = 0;\n\n if (isVertical) {\n if (anchorRect.top < popupRect.top) {\n // Anchor is above\n topLeftX = anchorRect.left;\n topLeftY = anchorRect.bottom;\n topRightX = anchorRect.right;\n topRightY = anchorRect.bottom;\n\n bottomLeftX = popupRect.left;\n bottomLeftY = popupRect.top;\n bottomRightX = popupRect.right;\n bottomRightY = popupRect.top;\n } else {\n // Anchor is below\n topLeftX = popupRect.left;\n topLeftY = popupRect.bottom;\n topRightX = popupRect.right;\n topRightY = popupRect.bottom;\n\n bottomLeftX = anchorRect.left;\n bottomLeftY = anchorRect.top;\n bottomRightX = anchorRect.right;\n bottomRightY = anchorRect.top;\n }\n } else {\n if (anchorRect.left < popupRect.left) {\n // Anchor is on the left\n topLeftX = anchorRect.right;\n topLeftY = anchorRect.top;\n topRightX = popupRect.left;\n topRightY = popupRect.top;\n\n bottomLeftX = anchorRect.right;\n bottomLeftY = anchorRect.bottom;\n bottomRightX = popupRect.left;\n bottomRightY = popupRect.bottom;\n } else {\n // Anchor is on the right\n topLeftX = popupRect.right;\n topLeftY = popupRect.top;\n topRightX = anchorRect.left;\n topRightY = anchorRect.top;\n\n bottomLeftX = popupRect.right;\n bottomLeftY = popupRect.bottom;\n bottomRightX = anchorRect.left;\n bottomRightY = anchorRect.bottom;\n }\n }\n\n this.style.setProperty('--hover-bridge-top-left-x', `${topLeftX}px`);\n this.style.setProperty('--hover-bridge-top-left-y', `${topLeftY}px`);\n this.style.setProperty('--hover-bridge-top-right-x', `${topRightX}px`);\n this.style.setProperty('--hover-bridge-top-right-y', `${topRightY}px`);\n this.style.setProperty('--hover-bridge-bottom-left-x', `${bottomLeftX}px`);\n this.style.setProperty('--hover-bridge-bottom-left-y', `${bottomLeftY}px`);\n this.style.setProperty('--hover-bridge-bottom-right-x', `${bottomRightX}px`);\n this.style.setProperty('--hover-bridge-bottom-right-y', `${bottomRightY}px`);\n }\n };\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <span\n part=\"hover-bridge\"\n class=${classMap({\n 'popup-hover-bridge': true,\n 'popup-hover-bridge--visible': this.hoverBridge && this.active\n })}\n ></span>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAQA,SAAS,OAAO,YAAY,iBAAiB,MAAM,QAAQ,UAAU,OAAO,YAAY;AACxF,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAErB,SAAS,oBAAoB;AAC7B,SAAS,UAAU,aAAa;AAWhC,SAAS,iBAAiB,GAAiC;AACzD,SACE,MAAM,QACN,OAAO,MAAM,YACb,2BAA2B,MAC1B,oBAAoB,IAAI,aAAa,UAAU;AAEpD;AA+BA,IAAqB,WAArB,cAAsC,eAAe;AAAA,EAArD;AAAA;AAKE,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAiBX,kBAAS;AAMxB,qBAYZ;AAMY,oBAAiC;AAGlC,oBAAW;AAGX,oBAAW;AAOV,iBAAQ;AAOO,0BAAwD;AAM5C,wBAAe;AAM1C,gBAAO;AAqBpC,kCAAyB;AAO0B,gCAA+C;AAU3C,uBAAc;AAGxC,iBAAQ;AAUmB,wBAAe;AAgBX,2BAAkB;AAQtB,uBAAc;AA0QtE,SAAQ,oBAAoB,MAAM;AAChC,UAAI,KAAK,eAAe,KAAK,UAAU;AACrC,cAAM,aAAa,KAAK,SAAS,sBAAsB;AACvD,cAAM,YAAY,KAAK,MAAM,sBAAsB;AACnD,cAAM,aAAa,KAAK,UAAU,SAAS,KAAK,KAAK,KAAK,UAAU,SAAS,QAAQ;AACrF,YAAI,WAAW;AACf,YAAI,WAAW;AACf,YAAI,YAAY;AAChB,YAAI,YAAY;AAChB,YAAI,cAAc;AAClB,YAAI,cAAc;AAClB,YAAI,eAAe;AACnB,YAAI,eAAe;AAEnB,YAAI,YAAY;AACd,cAAI,WAAW,MAAM,UAAU,KAAK;AAElC,uBAAW,WAAW;AACtB,uBAAW,WAAW;AAC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@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk.NLYVOJGK.js";
|
|
26
26
|
import {
|
|
27
27
|
SynergyElement
|
|
28
|
-
} from "./chunk.
|
|
28
|
+
} from "./chunk.BMMT5J3T.js";
|
|
29
29
|
import {
|
|
30
30
|
__decorateClass
|
|
31
31
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -249,4 +249,4 @@ __decorateClass([
|
|
|
249
249
|
export {
|
|
250
250
|
SynSwitch
|
|
251
251
|
};
|
|
252
|
-
//# sourceMappingURL=chunk.
|
|
252
|
+
//# sourceMappingURL=chunk.B5L6RSX7.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk.NLYVOJGK.js";
|
|
10
10
|
import {
|
|
11
11
|
SynergyElement
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.BMMT5J3T.js";
|
|
13
13
|
import {
|
|
14
14
|
__decorateClass
|
|
15
15
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -105,4 +105,4 @@ __decorateClass([
|
|
|
105
105
|
export {
|
|
106
106
|
SynAccordion
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=chunk.
|
|
108
|
+
//# sourceMappingURL=chunk.BBVDCOTU.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynTag
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.WRXAT2ZV.js";
|
|
4
4
|
import {
|
|
5
5
|
select_custom_styles_default
|
|
6
6
|
} from "./chunk.ZO4VONAT.js";
|
|
7
7
|
import {
|
|
8
8
|
select_styles_default
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.MJEJKJER.js";
|
|
10
10
|
import {
|
|
11
11
|
SynPopup
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.API5O3M4.js";
|
|
13
13
|
import {
|
|
14
14
|
scrollIntoView
|
|
15
15
|
} from "./chunk.5732DMBC.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk.WVVQK5TE.js";
|
|
40
40
|
import {
|
|
41
41
|
SynIcon
|
|
42
|
-
} from "./chunk.
|
|
42
|
+
} from "./chunk.ULXNVBWC.js";
|
|
43
43
|
import {
|
|
44
44
|
LocalizeController
|
|
45
45
|
} from "./chunk.GIU3H3J3.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from "./chunk.NLYVOJGK.js";
|
|
52
52
|
import {
|
|
53
53
|
SynergyElement
|
|
54
|
-
} from "./chunk.
|
|
54
|
+
} from "./chunk.BMMT5J3T.js";
|
|
55
55
|
import {
|
|
56
56
|
__decorateClass
|
|
57
57
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -73,6 +73,7 @@ var SynSelect = class extends SynergyElement {
|
|
|
73
73
|
this.hasFocus = false;
|
|
74
74
|
this.displayLabel = "";
|
|
75
75
|
this.selectedOptions = [];
|
|
76
|
+
this.valueHasChanged = false;
|
|
76
77
|
this.name = "";
|
|
77
78
|
this.value = "";
|
|
78
79
|
this.defaultValue = "";
|
|
@@ -134,6 +135,7 @@ var SynSelect = class extends SynergyElement {
|
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
137
|
if (this.currentOption && !this.currentOption.disabled) {
|
|
138
|
+
this.valueHasChanged = true;
|
|
137
139
|
if (this.multiple) {
|
|
138
140
|
this.toggleOptionSelection(this.currentOption);
|
|
139
141
|
} else {
|
|
@@ -174,7 +176,7 @@ var SynSelect = class extends SynergyElement {
|
|
|
174
176
|
}
|
|
175
177
|
this.setCurrentOption(allOptions[newIndex]);
|
|
176
178
|
}
|
|
177
|
-
if (event.key.length === 1 || event.key === "Backspace") {
|
|
179
|
+
if (event.key && event.key.length === 1 || event.key === "Backspace") {
|
|
178
180
|
const allOptions = this.getAllOptions();
|
|
179
181
|
if (event.metaKey || event.ctrlKey || event.altKey) {
|
|
180
182
|
return;
|
|
@@ -220,6 +222,9 @@ var SynSelect = class extends SynergyElement {
|
|
|
220
222
|
}
|
|
221
223
|
connectedCallback() {
|
|
222
224
|
super.connectedCallback();
|
|
225
|
+
setTimeout(() => {
|
|
226
|
+
this.handleDefaultSlotChange();
|
|
227
|
+
});
|
|
223
228
|
this.open = false;
|
|
224
229
|
}
|
|
225
230
|
addOpenListeners() {
|
|
@@ -301,6 +306,7 @@ var SynSelect = class extends SynergyElement {
|
|
|
301
306
|
const option = target.closest("syn-option");
|
|
302
307
|
const oldValue = this.value;
|
|
303
308
|
if (option && !option.disabled) {
|
|
309
|
+
this.valueHasChanged = true;
|
|
304
310
|
if (this.multiple) {
|
|
305
311
|
this.toggleOptionSelection(option);
|
|
306
312
|
} else {
|
|
@@ -320,15 +326,15 @@ var SynSelect = class extends SynergyElement {
|
|
|
320
326
|
}
|
|
321
327
|
}
|
|
322
328
|
handleDefaultSlotChange() {
|
|
323
|
-
|
|
324
|
-
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
325
|
-
const values = [];
|
|
326
|
-
if (customElements.get("syn-option")) {
|
|
327
|
-
allOptions.forEach((option) => values.push(option.value));
|
|
328
|
-
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
329
|
-
} else {
|
|
329
|
+
if (!customElements.get("syn-option")) {
|
|
330
330
|
customElements.whenDefined("syn-option").then(() => this.handleDefaultSlotChange());
|
|
331
331
|
}
|
|
332
|
+
const allOptions = this.getAllOptions();
|
|
333
|
+
const val = this.valueHasChanged ? this.value : this.defaultValue;
|
|
334
|
+
const value = Array.isArray(val) ? val : [val];
|
|
335
|
+
const values = [];
|
|
336
|
+
allOptions.forEach((option) => values.push(option.value));
|
|
337
|
+
this.setSelectedOptions(allOptions.filter((el) => value.includes(el.value)));
|
|
332
338
|
}
|
|
333
339
|
handleTagRemove(event, option) {
|
|
334
340
|
event.stopPropagation();
|
|
@@ -385,8 +391,9 @@ var SynSelect = class extends SynergyElement {
|
|
|
385
391
|
// This method must be called whenever the selection changes. It will update the selected options cache, the current
|
|
386
392
|
// value, and the display value
|
|
387
393
|
selectionChanged() {
|
|
388
|
-
var _a, _b, _c
|
|
389
|
-
|
|
394
|
+
var _a, _b, _c;
|
|
395
|
+
const options = this.getAllOptions();
|
|
396
|
+
this.selectedOptions = options.filter((el) => el.selected);
|
|
390
397
|
if (this.multiple) {
|
|
391
398
|
this.value = this.selectedOptions.map((el) => el.value);
|
|
392
399
|
if (this.placeholder && this.value.length === 0) {
|
|
@@ -395,8 +402,9 @@ var SynSelect = class extends SynergyElement {
|
|
|
395
402
|
this.displayLabel = this.localize.term("numOptionsSelected", this.selectedOptions.length);
|
|
396
403
|
}
|
|
397
404
|
} else {
|
|
398
|
-
|
|
399
|
-
this.
|
|
405
|
+
const selectedOption = this.selectedOptions[0];
|
|
406
|
+
this.value = (_a = selectedOption == null ? void 0 : selectedOption.value) != null ? _a : "";
|
|
407
|
+
this.displayLabel = (_c = (_b = selectedOption == null ? void 0 : selectedOption.getTextLabel) == null ? void 0 : _b.call(selectedOption)) != null ? _c : "";
|
|
400
408
|
}
|
|
401
409
|
this.updateComplete.then(() => {
|
|
402
410
|
this.formControlController.updateValidity();
|
|
@@ -507,7 +515,7 @@ var SynSelect = class extends SynergyElement {
|
|
|
507
515
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
508
516
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
509
517
|
const hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;
|
|
510
|
-
const isPlaceholderVisible = this.placeholder && this.value.length
|
|
518
|
+
const isPlaceholderVisible = this.placeholder && this.value && this.value.length <= 0;
|
|
511
519
|
return html`
|
|
512
520
|
<div
|
|
513
521
|
part="form-control"
|
|
@@ -685,6 +693,9 @@ __decorateClass([
|
|
|
685
693
|
__decorateClass([
|
|
686
694
|
state()
|
|
687
695
|
], SynSelect.prototype, "selectedOptions", 2);
|
|
696
|
+
__decorateClass([
|
|
697
|
+
state()
|
|
698
|
+
], SynSelect.prototype, "valueHasChanged", 2);
|
|
688
699
|
__decorateClass([
|
|
689
700
|
property()
|
|
690
701
|
], SynSelect.prototype, "name", 2);
|
|
@@ -768,4 +779,4 @@ setDefaultAnimation("select.hide", {
|
|
|
768
779
|
export {
|
|
769
780
|
SynSelect
|
|
770
781
|
};
|
|
771
|
-
//# sourceMappingURL=chunk.
|
|
782
|
+
//# sourceMappingURL=chunk.BLUAN7RH.js.map
|