@synergy-design-system/components 2.31.0-numeric.1 → 2.31.0-numeric.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{chunk.QWO6FDBH.js → chunk.2USZJC3L.js} +2 -2
- package/dist/chunks/{chunk.W42P6ZZU.js → chunk.36B3LAIV.js} +9 -9
- package/dist/chunks/{chunk.7YATRHZN.js → chunk.3BM4IYC5.js} +2 -2
- package/dist/chunks/{chunk.RPIHGLAB.js → chunk.3MKDEHUA.js} +2 -2
- package/dist/chunks/{chunk.B6HFSIU2.js → chunk.4DW7CR6A.js} +28 -1
- package/dist/chunks/{chunk.B6HFSIU2.js.map → chunk.4DW7CR6A.js.map} +2 -2
- package/dist/chunks/{chunk.YJJGWT72.js → chunk.4J2NV5SS.js} +8 -8
- package/dist/chunks/{chunk.ZIDEDWYN.js → chunk.52P5J77M.js} +3 -3
- package/dist/chunks/chunk.52P5J77M.js.map +7 -0
- package/dist/chunks/{chunk.KXU56SNB.js → chunk.5BUU5BCH.js} +2 -2
- package/dist/chunks/{chunk.TB7FVSDL.js → chunk.5LC3JCV4.js} +3 -3
- package/dist/chunks/chunk.5LC3JCV4.js.map +7 -0
- package/dist/chunks/{chunk.RCZVZKH3.js → chunk.5QUFKOPO.js} +2 -2
- package/dist/chunks/{chunk.N42HYZ3J.js → chunk.5T4FMEG4.js} +8 -8
- package/dist/chunks/chunk.5T4FMEG4.js.map +7 -0
- package/dist/chunks/{chunk.DSW34EOY.js → chunk.5UKAMFXK.js} +2 -2
- package/dist/chunks/{chunk.7BMEQKZX.js → chunk.5Y44IODU.js} +95 -32
- package/dist/chunks/chunk.5Y44IODU.js.map +7 -0
- package/dist/chunks/{chunk.5F6A2J5X.js → chunk.6KVCQIPW.js} +2 -2
- package/dist/chunks/{chunk.63XQMHFQ.js → chunk.7227JLJF.js} +2 -2
- package/dist/chunks/{chunk.57AK7CVM.js → chunk.7DGBHZU2.js} +2 -2
- package/dist/chunks/{chunk.CEVNM6DM.js → chunk.7JCTL47Z.js} +5 -5
- package/dist/chunks/chunk.7JCTL47Z.js.map +7 -0
- package/dist/chunks/{chunk.HQ6QUSK7.js → chunk.7JGKUB4A.js} +2 -2
- package/dist/chunks/{chunk.EDVAO5KD.js → chunk.7US7QSZB.js} +2 -2
- package/dist/chunks/{chunk.EDVAO5KD.js.map → chunk.7US7QSZB.js.map} +1 -1
- package/dist/chunks/{chunk.XZFEDMD4.js → chunk.7Z4PGOTU.js} +11 -11
- package/dist/chunks/chunk.7Z4PGOTU.js.map +7 -0
- package/dist/chunks/{chunk.UZFE4ZK6.js → chunk.7ZFDGJ4L.js} +2 -2
- package/dist/chunks/{chunk.E257OZYA.js → chunk.AJ73FM3N.js} +2 -2
- package/dist/chunks/{chunk.FEKYKC4C.js → chunk.AVJHCISC.js} +2 -2
- package/dist/chunks/{chunk.2LYOMDFO.js → chunk.AYAX7BG7.js} +2 -2
- package/dist/chunks/{chunk.MRQZD5TX.js → chunk.BQORIQ74.js} +2 -2
- package/dist/chunks/{chunk.74IOULXM.js → chunk.BVZQ6QSY.js} +2 -2
- package/dist/chunks/{chunk.GRA6PMZZ.js → chunk.BX4XJHF6.js} +4 -4
- package/dist/chunks/{chunk.GRA6PMZZ.js.map → chunk.BX4XJHF6.js.map} +1 -1
- package/dist/chunks/{chunk.7RHGZPLP.js → chunk.C3B4XHOF.js} +2 -2
- package/dist/chunks/{chunk.CSBK2UIN.js → chunk.C64MJQAT.js} +7 -7
- package/dist/chunks/chunk.C64MJQAT.js.map +7 -0
- package/dist/chunks/{chunk.IO36YFGG.js → chunk.CFBIOFE3.js} +2 -2
- package/dist/chunks/{chunk.RFWHBKPI.js → chunk.D7UHBX3B.js} +2 -2
- package/dist/chunks/{chunk.UKCQF4MT.js → chunk.DRKA3RET.js} +2 -2
- package/dist/chunks/{chunk.2IWVCAEF.js → chunk.DY3RUP6T.js} +2 -2
- package/dist/chunks/{chunk.QVS5TYTR.js → chunk.EGNDSUID.js} +5 -5
- package/dist/chunks/chunk.EGNDSUID.js.map +7 -0
- package/dist/chunks/{chunk.IJ7VHZFK.js → chunk.F4HR34MV.js} +2 -2
- package/dist/chunks/{chunk.WBSH7WXZ.js → chunk.F4YZ6CNS.js} +2 -2
- package/dist/chunks/{chunk.B6TTKFK2.js → chunk.FASIIYDO.js} +4 -4
- package/dist/chunks/chunk.FASIIYDO.js.map +7 -0
- package/dist/chunks/{chunk.PGRPK5CM.js → chunk.FRI6SBLL.js} +2 -2
- package/dist/chunks/{chunk.A67AAALJ.js → chunk.G4QCVDAA.js} +2 -2
- package/dist/chunks/{chunk.A3OYJILJ.js → chunk.G6ITZTTW.js} +2 -2
- package/dist/chunks/{chunk.JCIM6NE3.js → chunk.G76BKD7B.js} +2 -2
- package/dist/chunks/{chunk.PJSCG4YE.js → chunk.GMMFGZP6.js} +9 -9
- package/dist/chunks/chunk.GMMFGZP6.js.map +7 -0
- package/dist/chunks/{chunk.U3WTJD4D.js → chunk.GOMKPLJA.js} +4 -4
- package/dist/chunks/chunk.GOMKPLJA.js.map +7 -0
- package/dist/chunks/{chunk.6EJPCDSL.js → chunk.HA7BLR63.js} +9 -9
- package/dist/chunks/chunk.HA7BLR63.js.map +7 -0
- package/dist/chunks/{chunk.TLCX6C3Y.js → chunk.HBEIGBOH.js} +2 -2
- package/dist/chunks/{chunk.5OYRCRNV.js → chunk.HDXDWES2.js} +2 -2
- package/dist/chunks/{chunk.M25XYM73.js → chunk.HNMO7OGI.js} +2 -2
- package/dist/chunks/{chunk.AMIQC3O7.js → chunk.HP2LEQRU.js} +2 -2
- package/dist/chunks/{chunk.AMIQC3O7.js.map → chunk.HP2LEQRU.js.map} +1 -1
- package/dist/chunks/{chunk.OLPCSVVL.js → chunk.INZSW7NE.js} +2 -2
- package/dist/chunks/{chunk.BWZMY7HG.js → chunk.IQPPSHKW.js} +3 -3
- package/dist/chunks/{chunk.BWZMY7HG.js.map → chunk.IQPPSHKW.js.map} +1 -1
- package/dist/chunks/{chunk.6ETN74WB.js → chunk.IVZ3CJUE.js} +2 -2
- package/dist/chunks/{chunk.THIOHUU2.js → chunk.IW6X3LFW.js} +3 -3
- package/dist/chunks/chunk.IW6X3LFW.js.map +7 -0
- package/dist/chunks/{chunk.2YBP4WEH.js → chunk.JKSJEW72.js} +3 -3
- package/dist/chunks/chunk.JKSJEW72.js.map +7 -0
- package/dist/chunks/{chunk.NYCKYU42.js → chunk.JN7MXTVN.js} +2 -2
- package/dist/chunks/{chunk.BTS57O4V.js → chunk.JOX4HOS3.js} +7 -7
- package/dist/chunks/chunk.JOX4HOS3.js.map +7 -0
- package/dist/chunks/{chunk.WFR4RMWT.js → chunk.JWND2GFN.js} +8 -8
- package/dist/chunks/chunk.JWND2GFN.js.map +7 -0
- package/dist/chunks/{chunk.N7EVNHYR.js → chunk.JXLTDOJR.js} +2 -2
- package/dist/chunks/{chunk.S5LABDRE.js → chunk.JYM2KBX2.js} +3 -3
- package/dist/chunks/chunk.JYM2KBX2.js.map +7 -0
- package/dist/chunks/{chunk.33EV4VCU.js → chunk.KFUASL6I.js} +3 -3
- package/dist/chunks/{chunk.SFECHRNT.js → chunk.KM35YPU6.js} +4 -4
- package/dist/chunks/{chunk.J75DWM6J.js → chunk.L3QIFBZN.js} +4 -4
- package/dist/chunks/chunk.L3QIFBZN.js.map +7 -0
- package/dist/chunks/{chunk.Z63ESAY4.js → chunk.L5DDQZJL.js} +2 -2
- package/dist/chunks/{chunk.A4RVOFFP.js → chunk.LKAB6SQ7.js} +10 -10
- package/dist/chunks/{chunk.FAVMXFQL.js → chunk.LMT5B3HR.js} +5 -5
- package/dist/chunks/chunk.LMT5B3HR.js.map +7 -0
- package/dist/chunks/{chunk.PK3IARAB.js → chunk.LYH5JTYU.js} +2 -2
- package/dist/chunks/{chunk.AQWT2EI4.js → chunk.MA4RY7ZA.js} +5 -5
- package/dist/chunks/chunk.MA4RY7ZA.js.map +7 -0
- package/dist/chunks/{chunk.D7ZU5UFL.js → chunk.MHPQA44T.js} +2 -2
- package/dist/chunks/{chunk.RZ4YAAAL.js → chunk.MNODNPKF.js} +2 -2
- package/dist/chunks/{chunk.JJI5CPOB.js → chunk.MRUEYMZJ.js} +6 -6
- package/dist/chunks/chunk.MRUEYMZJ.js.map +7 -0
- package/dist/chunks/{chunk.UTJJJQMA.js → chunk.MTN5NM4A.js} +2 -2
- package/dist/chunks/{chunk.VE2GLMIO.js → chunk.MV27WLAS.js} +2 -2
- package/dist/chunks/{chunk.HIF4ZQ35.js → chunk.NGWCUJL3.js} +14 -14
- package/dist/chunks/chunk.NGWCUJL3.js.map +7 -0
- package/dist/chunks/{chunk.FO5F6LKG.js → chunk.NOBEUBIX.js} +2 -2
- package/dist/chunks/{chunk.AKBNSAMF.js → chunk.NQQYAAJ5.js} +31 -30
- package/dist/chunks/chunk.NQQYAAJ5.js.map +7 -0
- package/dist/chunks/{chunk.UT46BUBN.js → chunk.NZFBQFBJ.js} +2 -2
- package/dist/chunks/{chunk.CACKIXTX.js → chunk.ODUSEMOT.js} +2 -2
- package/dist/chunks/{chunk.SEMT32CO.js → chunk.ONXI25VD.js} +4 -4
- package/dist/chunks/{chunk.SEMT32CO.js.map → chunk.ONXI25VD.js.map} +1 -1
- package/dist/chunks/{chunk.KMAFFDJZ.js → chunk.OQF62MOH.js} +8 -8
- package/dist/chunks/chunk.OQF62MOH.js.map +7 -0
- package/dist/chunks/{chunk.5CAP3G3X.js → chunk.PCYVMZQM.js} +2 -2
- package/dist/chunks/{chunk.ZKHYDNLC.js → chunk.PJ77QULT.js} +4 -4
- package/dist/chunks/{chunk.ZKHYDNLC.js.map → chunk.PJ77QULT.js.map} +1 -1
- package/dist/chunks/{chunk.DNNV6VLW.js → chunk.PMU62FIY.js} +2 -2
- package/dist/chunks/{chunk.U23YWMIX.js → chunk.PRN3I42I.js} +10 -10
- package/dist/chunks/chunk.PRN3I42I.js.map +7 -0
- package/dist/chunks/{chunk.V4SIKF4X.js → chunk.PY4VOF4Y.js} +28 -1
- package/dist/chunks/{chunk.V4SIKF4X.js.map → chunk.PY4VOF4Y.js.map} +2 -2
- package/dist/chunks/{chunk.OM47S5WL.js → chunk.Q7OBEUJP.js} +7 -7
- package/dist/chunks/{chunk.K3XDXZW2.js → chunk.QW75RDVZ.js} +3 -3
- package/dist/chunks/{chunk.K3XDXZW2.js.map → chunk.QW75RDVZ.js.map} +1 -1
- package/dist/chunks/{chunk.UBAW2LID.js → chunk.RB2JR2ND.js} +2 -2
- package/dist/chunks/{chunk.UBAW2LID.js.map → chunk.RB2JR2ND.js.map} +1 -1
- package/dist/chunks/{chunk.POR4YXBM.js → chunk.RDUNTOLI.js} +2 -2
- package/dist/chunks/{chunk.IB6CAJFE.js → chunk.S3NLAHQN.js} +2 -2
- package/dist/chunks/{chunk.HZHIIS2I.js → chunk.SOOOSOI2.js} +6 -6
- package/dist/chunks/chunk.SOOOSOI2.js.map +7 -0
- package/dist/chunks/{chunk.Q3DVGFDB.js → chunk.SUC6BMB5.js} +2 -2
- package/dist/chunks/{chunk.5NGEDTDD.js → chunk.SXYORVJ4.js} +12 -12
- package/dist/chunks/chunk.SXYORVJ4.js.map +7 -0
- package/dist/chunks/chunk.T4QJUSQQ.js +52 -0
- package/dist/chunks/chunk.T4QJUSQQ.js.map +7 -0
- package/dist/chunks/{chunk.GCQLCTYL.js → chunk.TFJD4QKG.js} +2 -2
- package/dist/chunks/{chunk.LW362SOH.js → chunk.TIZSO7FR.js} +11 -11
- package/dist/chunks/chunk.TIZSO7FR.js.map +7 -0
- package/dist/chunks/{chunk.JJ3OBG7Q.js → chunk.TOVTZIPZ.js} +2 -2
- package/dist/chunks/{chunk.ILHF3ABL.js → chunk.TR2YSRMW.js} +2 -2
- package/dist/chunks/{chunk.ZK7XTPJN.js → chunk.UAGQQMKI.js} +49 -20
- package/dist/chunks/chunk.UAGQQMKI.js.map +7 -0
- package/dist/chunks/{chunk.Q7BW6KKX.js → chunk.VBXOOYJE.js} +2 -2
- package/dist/chunks/{chunk.B6R3IVGO.js → chunk.VN2PSQ4U.js} +17 -1
- package/dist/chunks/chunk.VN2PSQ4U.js.map +7 -0
- package/dist/chunks/{chunk.EZDB5RU7.js → chunk.VUZDQVIA.js} +9 -9
- package/dist/chunks/chunk.VUZDQVIA.js.map +7 -0
- package/dist/chunks/{chunk.GD33VPEE.js → chunk.WHD6U3UX.js} +2 -2
- package/dist/chunks/{chunk.IDS32BVD.js → chunk.WVN7TE6P.js} +13 -13
- package/dist/chunks/chunk.WVN7TE6P.js.map +7 -0
- package/dist/chunks/{chunk.EC3AIWPK.js → chunk.XCRIYHZ6.js} +6 -6
- package/dist/chunks/{chunk.EC3AIWPK.js.map → chunk.XCRIYHZ6.js.map} +1 -1
- package/dist/chunks/{chunk.WIVZPX4Q.js → chunk.YCDB7TVS.js} +11 -11
- package/dist/chunks/chunk.YCDB7TVS.js.map +7 -0
- package/dist/chunks/{chunk.32CPGKWW.js → chunk.YMPDZZMX.js} +14 -14
- package/dist/chunks/chunk.YMPDZZMX.js.map +7 -0
- package/dist/chunks/{chunk.4X3HY2V5.js → chunk.YT5SHGUK.js} +6 -1
- package/dist/chunks/{chunk.4X3HY2V5.js.map → chunk.YT5SHGUK.js.map} +2 -2
- package/dist/chunks/{chunk.2GFK6XTO.js → chunk.Z4XV3SMG.js} +14 -1
- package/dist/chunks/{chunk.KITRO6XO.js → chunk.Z67XVHET.js} +4 -4
- package/dist/chunks/{chunk.KITRO6XO.js.map → chunk.Z67XVHET.js.map} +1 -1
- package/dist/chunks/{chunk.KTCGXZQ4.js → chunk.ZBRWKI2I.js} +11 -11
- package/dist/chunks/chunk.ZBRWKI2I.js.map +7 -0
- package/dist/chunks/{chunk.PQFT5ON4.js → chunk.ZGQ4FVQW.js} +2 -2
- package/dist/chunks/{chunk.OQHYWXRI.js → chunk.ZIKZWHEJ.js} +2 -2
- package/dist/chunks/{chunk.CVSFD3LB.js → chunk.ZO2YPPQX.js} +3 -3
- package/dist/chunks/chunk.ZO2YPPQX.js.map +7 -0
- package/dist/components/accordion/accordion.component.js +8 -8
- package/dist/components/accordion/accordion.js +9 -9
- package/dist/components/accordion/accordion.styles.js +1 -1
- package/dist/components/alert/alert.component.d.ts +1 -1
- package/dist/components/alert/alert.component.js +13 -13
- package/dist/components/alert/alert.custom.styles.js +1 -1
- package/dist/components/alert/alert.js +14 -14
- package/dist/components/alert/alert.styles.js +1 -1
- package/dist/components/badge/badge.component.d.ts +1 -1
- package/dist/components/badge/badge.component.js +7 -7
- package/dist/components/badge/badge.custom.styles.js +1 -1
- package/dist/components/badge/badge.js +8 -8
- package/dist/components/badge/badge.styles.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.js +5 -5
- package/dist/components/breadcrumb/breadcrumb.custom.styles.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +6 -6
- package/dist/components/breadcrumb/breadcrumb.styles.js +1 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.component.d.ts +1 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.component.js +4 -4
- package/dist/components/breadcrumb-item/breadcrumb-item.custom.styles.js +1 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.js +5 -5
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.js +1 -1
- package/dist/components/button/button.component.d.ts +1 -1
- package/dist/components/button/button.component.js +12 -12
- package/dist/components/button/button.custom.styles.js +1 -1
- package/dist/components/button/button.js +13 -13
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/button-group/button-group.component.d.ts +1 -1
- package/dist/components/button-group/button-group.component.js +3 -3
- package/dist/components/button-group/button-group.js +4 -4
- package/dist/components/button-group/button-group.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +3 -3
- package/dist/components/card/card.custom.styles.js +1 -1
- package/dist/components/card/card.js +4 -4
- package/dist/components/card/card.styles.js +1 -1
- package/dist/components/checkbox/checkbox.component.d.ts +1 -1
- package/dist/components/checkbox/checkbox.component.js +11 -11
- package/dist/components/checkbox/checkbox.custom.styles.js +1 -1
- package/dist/components/checkbox/checkbox.js +12 -12
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/combobox/combobox.component.d.ts +2 -0
- package/dist/components/combobox/combobox.component.js +19 -19
- package/dist/components/combobox/combobox.custom.styles.js +1 -1
- package/dist/components/combobox/combobox.js +20 -20
- package/dist/components/combobox/combobox.styles.js +2 -2
- package/dist/components/combobox/option-renderer.js +1 -1
- package/dist/components/combobox/utils.js +1 -1
- package/dist/components/details/details.component.d.ts +1 -1
- package/dist/components/details/details.component.js +12 -12
- package/dist/components/details/details.custom.styles.js +1 -1
- package/dist/components/details/details.js +13 -13
- package/dist/components/details/details.styles.js +1 -1
- package/dist/components/dialog/dialog.component.d.ts +1 -1
- package/dist/components/dialog/dialog.component.js +15 -15
- package/dist/components/dialog/dialog.custom.styles.js +1 -1
- package/dist/components/dialog/dialog.js +16 -16
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/divider/divider.component.d.ts +1 -1
- package/dist/components/divider/divider.component.js +4 -4
- package/dist/components/divider/divider.custom.styles.js +1 -1
- package/dist/components/divider/divider.js +5 -5
- package/dist/components/divider/divider.styles.js +1 -1
- package/dist/components/drawer/drawer.component.d.ts +1 -1
- package/dist/components/drawer/drawer.component.js +15 -15
- package/dist/components/drawer/drawer.custom.styles.js +1 -1
- package/dist/components/drawer/drawer.js +16 -16
- package/dist/components/drawer/drawer.styles.js +1 -1
- package/dist/components/dropdown/dropdown.component.d.ts +1 -1
- package/dist/components/dropdown/dropdown.component.js +8 -8
- package/dist/components/dropdown/dropdown.custom.styles.js +1 -1
- package/dist/components/dropdown/dropdown.js +9 -9
- package/dist/components/dropdown/dropdown.styles.js +1 -1
- package/dist/components/file/file.component.d.ts +1 -0
- package/dist/components/file/file.component.js +15 -15
- package/dist/components/file/file.js +16 -16
- package/dist/components/file/file.styles.js +1 -1
- package/dist/components/header/header.component.js +7 -7
- package/dist/components/header/header.js +8 -8
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/icon/icon.component.d.ts +1 -1
- package/dist/components/icon/icon.component.js +4 -4
- package/dist/components/icon/icon.custom.styles.js +1 -1
- package/dist/components/icon/icon.js +5 -5
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/icon/library.default.js +1 -1
- package/dist/components/icon/library.js +1 -1
- package/dist/components/icon/library.system.js +1 -1
- package/dist/components/icon-button/icon-button.component.d.ts +1 -1
- package/dist/components/icon-button/icon-button.component.js +9 -9
- package/dist/components/icon-button/icon-button.custom.styles.js +1 -1
- package/dist/components/icon-button/icon-button.js +10 -10
- package/dist/components/icon-button/icon-button.styles.js +1 -1
- package/dist/components/input/formatter.d.ts +8 -0
- package/dist/components/input/formatter.js +8 -0
- package/dist/components/input/formatter.js.map +7 -0
- package/dist/components/input/input.component.d.ts +18 -1
- package/dist/components/input/input.component.js +13 -12
- package/dist/components/input/input.custom.styles.js +1 -1
- package/dist/components/input/input.js +14 -13
- package/dist/components/input/input.styles.js +1 -1
- package/dist/components/input/strategies.d.ts +1 -1
- package/dist/components/input/strategies.js +2 -2
- package/dist/components/menu/menu.component.d.ts +1 -1
- package/dist/components/menu/menu.component.js +3 -3
- package/dist/components/menu/menu.custom.styles.js +1 -1
- package/dist/components/menu/menu.js +4 -4
- package/dist/components/menu/menu.styles.js +1 -1
- package/dist/components/menu-item/menu-item.component.d.ts +1 -1
- package/dist/components/menu-item/menu-item.component.js +8 -8
- package/dist/components/menu-item/menu-item.custom.styles.js +1 -1
- package/dist/components/menu-item/menu-item.js +9 -9
- package/dist/components/menu-item/menu-item.styles.js +1 -1
- package/dist/components/menu-item/submenu-controller.js +1 -1
- package/dist/components/menu-label/menu-label.component.d.ts +1 -1
- package/dist/components/menu-label/menu-label.component.js +6 -6
- package/dist/components/menu-label/menu-label.custom.styles.js +1 -1
- package/dist/components/menu-label/menu-label.js +7 -7
- package/dist/components/menu-label/menu-label.styles.js +1 -1
- package/dist/components/nav-item/nav-item.component.d.ts +1 -0
- package/dist/components/nav-item/nav-item.component.js +5 -5
- package/dist/components/nav-item/nav-item.js +6 -6
- package/dist/components/nav-item/nav-item.styles.js +1 -1
- package/dist/components/optgroup/optgroup.component.js +5 -5
- package/dist/components/optgroup/optgroup.js +6 -6
- package/dist/components/optgroup/optgroup.styles.js +1 -1
- package/dist/components/option/option-size.styles.js +1 -1
- package/dist/components/option/option.component.d.ts +1 -1
- package/dist/components/option/option.component.js +5 -5
- package/dist/components/option/option.custom.styles.js +1 -1
- package/dist/components/option/option.js +6 -6
- package/dist/components/option/option.styles.js +1 -1
- package/dist/components/option/utility.js +1 -1
- package/dist/components/popup/popup.component.d.ts +1 -1
- package/dist/components/popup/popup.component.js +3 -3
- package/dist/components/popup/popup.js +4 -4
- package/dist/components/popup/popup.styles.js +1 -1
- package/dist/components/prio-nav/prio-nav.component.d.ts +1 -0
- package/dist/components/prio-nav/prio-nav.component.js +14 -14
- package/dist/components/prio-nav/prio-nav.js +15 -15
- package/dist/components/prio-nav/prio-nav.styles.js +1 -1
- package/dist/components/prio-nav/utils.js +1 -1
- package/dist/components/progress-bar/progress-bar.component.d.ts +1 -1
- package/dist/components/progress-bar/progress-bar.component.js +3 -3
- package/dist/components/progress-bar/progress-bar.custom.styles.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +4 -4
- package/dist/components/progress-bar/progress-bar.styles.js +1 -1
- package/dist/components/progress-ring/progress-ring.component.d.ts +1 -1
- package/dist/components/progress-ring/progress-ring.component.js +3 -3
- package/dist/components/progress-ring/progress-ring.custom.styles.js +1 -1
- package/dist/components/progress-ring/progress-ring.js +4 -4
- package/dist/components/progress-ring/progress-ring.styles.js +1 -1
- package/dist/components/radio/radio.component.d.ts +1 -1
- package/dist/components/radio/radio.component.js +9 -9
- package/dist/components/radio/radio.custom.styles.js +1 -1
- package/dist/components/radio/radio.js +10 -10
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/radio-button/radio-button.component.d.ts +1 -1
- package/dist/components/radio-button/radio-button.component.js +8 -8
- package/dist/components/radio-button/radio-button.js +9 -9
- package/dist/components/radio-button/radio-button.styles.js +1 -1
- package/dist/components/radio-group/radio-group.component.d.ts +1 -1
- package/dist/components/radio-group/radio-group.component.js +10 -10
- package/dist/components/radio-group/radio-group.custom.styles.js +1 -1
- package/dist/components/radio-group/radio-group.js +11 -11
- package/dist/components/radio-group/radio-group.styles.js +1 -1
- package/dist/components/range/range.component.js +15 -15
- package/dist/components/range/range.js +16 -16
- package/dist/components/range/range.styles.js +1 -1
- package/dist/components/range/utility.js +1 -1
- package/dist/components/range-tick/range-tick.component.d.ts +1 -1
- package/dist/components/range-tick/range-tick.component.js +3 -3
- package/dist/components/range-tick/range-tick.js +4 -4
- package/dist/components/range-tick/range-tick.styles.js +1 -1
- package/dist/components/resize-observer/resize-observer.component.d.ts +1 -1
- package/dist/components/resize-observer/resize-observer.component.js +4 -4
- package/dist/components/resize-observer/resize-observer.styles.js +1 -1
- package/dist/components/select/select.component.d.ts +7 -1
- package/dist/components/select/select.component.js +19 -19
- package/dist/components/select/select.custom.styles.js +2 -2
- package/dist/components/select/select.js +20 -20
- package/dist/components/select/select.styles.js +1 -1
- package/dist/components/select/utility.js +1 -1
- package/dist/components/side-nav/side-nav.component.js +17 -17
- package/dist/components/side-nav/side-nav.js +18 -18
- package/dist/components/side-nav/side-nav.styles.js +1 -1
- package/dist/components/spinner/spinner.component.d.ts +1 -1
- package/dist/components/spinner/spinner.component.js +3 -3
- package/dist/components/spinner/spinner.custom.styles.js +1 -1
- package/dist/components/spinner/spinner.js +4 -4
- package/dist/components/spinner/spinner.styles.js +1 -1
- package/dist/components/switch/switch.component.d.ts +1 -1
- package/dist/components/switch/switch.component.js +9 -9
- package/dist/components/switch/switch.custom.styles.js +1 -1
- package/dist/components/switch/switch.js +10 -10
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tab/tab.component.d.ts +1 -1
- package/dist/components/tab/tab.component.js +10 -10
- package/dist/components/tab/tab.custom.styles.js +1 -1
- package/dist/components/tab/tab.js +11 -11
- package/dist/components/tab/tab.styles.js +1 -1
- package/dist/components/tab-group/tab-group.component.d.ts +1 -1
- package/dist/components/tab-group/tab-group.component.js +11 -11
- package/dist/components/tab-group/tab-group.custom.styles.js +1 -1
- package/dist/components/tab-group/tab-group.js +12 -12
- package/dist/components/tab-group/tab-group.styles.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.d.ts +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +4 -4
- package/dist/components/tab-panel/tab-panel.custom.styles.js +1 -1
- package/dist/components/tab-panel/tab-panel.js +5 -5
- package/dist/components/tab-panel/tab-panel.styles.js +1 -1
- package/dist/components/tag/tag.component.d.ts +1 -1
- package/dist/components/tag/tag.component.js +11 -11
- package/dist/components/tag/tag.custom.styles.js +2 -2
- package/dist/components/tag/tag.js +12 -12
- package/dist/components/tag/tag.styles.js +1 -1
- package/dist/components/textarea/textarea.component.d.ts +1 -1
- package/dist/components/textarea/textarea.component.js +9 -9
- package/dist/components/textarea/textarea.custom.styles.js +1 -1
- package/dist/components/textarea/textarea.js +10 -10
- package/dist/components/textarea/textarea.styles.js +1 -1
- package/dist/components/tooltip/tooltip.component.d.ts +1 -1
- package/dist/components/tooltip/tooltip.component.js +8 -8
- package/dist/components/tooltip/tooltip.custom.styles.js +2 -2
- package/dist/components/tooltip/tooltip.js +9 -9
- package/dist/components/tooltip/tooltip.styles.js +1 -1
- package/dist/components/validate/utility.js +3 -3
- package/dist/components/validate/validate.component.d.ts +1 -1
- package/dist/components/validate/validate.component.js +15 -15
- package/dist/components/validate/validate.js +16 -16
- package/dist/components/validate/validate.styles.js +1 -1
- package/dist/custom-elements.json +720 -623
- package/dist/events/syn-clamp.d.ts +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/synergy-autoloader.js +1 -1
- package/dist/synergy.js +155 -154
- package/dist/translations/de.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/utilities/animation-registry.js +2 -2
- package/dist/utilities/base-path.js +1 -1
- package/dist/utilities/defaultSettings/base.js +3 -3
- package/dist/utilities/defaultSettings/decorator.js +5 -5
- package/dist/utilities/defaultSettings/functions.js +4 -4
- package/dist/utilities/defaultSettings/index.js +5 -5
- package/dist/utilities/form.js +3 -3
- package/dist/utilities/icon-library.js +1 -1
- package/dist/utilities/localize.js +1 -1
- package/dist/vscode.html-custom-data.json +133 -123
- package/package.json +1 -1
- package/dist/chunks/chunk.2YBP4WEH.js.map +0 -7
- package/dist/chunks/chunk.32CPGKWW.js.map +0 -7
- package/dist/chunks/chunk.5NGEDTDD.js.map +0 -7
- package/dist/chunks/chunk.6EJPCDSL.js.map +0 -7
- package/dist/chunks/chunk.7BMEQKZX.js.map +0 -7
- package/dist/chunks/chunk.AKBNSAMF.js.map +0 -7
- package/dist/chunks/chunk.AQWT2EI4.js.map +0 -7
- package/dist/chunks/chunk.B6R3IVGO.js.map +0 -7
- package/dist/chunks/chunk.B6TTKFK2.js.map +0 -7
- package/dist/chunks/chunk.BTS57O4V.js.map +0 -7
- package/dist/chunks/chunk.CEVNM6DM.js.map +0 -7
- package/dist/chunks/chunk.CSBK2UIN.js.map +0 -7
- package/dist/chunks/chunk.CVSFD3LB.js.map +0 -7
- package/dist/chunks/chunk.EZDB5RU7.js.map +0 -7
- package/dist/chunks/chunk.FAVMXFQL.js.map +0 -7
- package/dist/chunks/chunk.HIF4ZQ35.js.map +0 -7
- package/dist/chunks/chunk.HZHIIS2I.js.map +0 -7
- package/dist/chunks/chunk.IDS32BVD.js.map +0 -7
- package/dist/chunks/chunk.J75DWM6J.js.map +0 -7
- package/dist/chunks/chunk.JJI5CPOB.js.map +0 -7
- package/dist/chunks/chunk.KMAFFDJZ.js.map +0 -7
- package/dist/chunks/chunk.KTCGXZQ4.js.map +0 -7
- package/dist/chunks/chunk.LW362SOH.js.map +0 -7
- package/dist/chunks/chunk.N42HYZ3J.js.map +0 -7
- package/dist/chunks/chunk.PJSCG4YE.js.map +0 -7
- package/dist/chunks/chunk.QVS5TYTR.js.map +0 -7
- package/dist/chunks/chunk.S5LABDRE.js.map +0 -7
- package/dist/chunks/chunk.TB7FVSDL.js.map +0 -7
- package/dist/chunks/chunk.THIOHUU2.js.map +0 -7
- package/dist/chunks/chunk.U23YWMIX.js.map +0 -7
- package/dist/chunks/chunk.U3WTJD4D.js.map +0 -7
- package/dist/chunks/chunk.WFR4RMWT.js.map +0 -7
- package/dist/chunks/chunk.WIVZPX4Q.js.map +0 -7
- package/dist/chunks/chunk.XZFEDMD4.js.map +0 -7
- package/dist/chunks/chunk.ZIDEDWYN.js.map +0 -7
- package/dist/chunks/chunk.ZK7XTPJN.js.map +0 -7
- /package/dist/chunks/{chunk.QWO6FDBH.js.map → chunk.2USZJC3L.js.map} +0 -0
- /package/dist/chunks/{chunk.W42P6ZZU.js.map → chunk.36B3LAIV.js.map} +0 -0
- /package/dist/chunks/{chunk.7YATRHZN.js.map → chunk.3BM4IYC5.js.map} +0 -0
- /package/dist/chunks/{chunk.RPIHGLAB.js.map → chunk.3MKDEHUA.js.map} +0 -0
- /package/dist/chunks/{chunk.YJJGWT72.js.map → chunk.4J2NV5SS.js.map} +0 -0
- /package/dist/chunks/{chunk.KXU56SNB.js.map → chunk.5BUU5BCH.js.map} +0 -0
- /package/dist/chunks/{chunk.RCZVZKH3.js.map → chunk.5QUFKOPO.js.map} +0 -0
- /package/dist/chunks/{chunk.DSW34EOY.js.map → chunk.5UKAMFXK.js.map} +0 -0
- /package/dist/chunks/{chunk.5F6A2J5X.js.map → chunk.6KVCQIPW.js.map} +0 -0
- /package/dist/chunks/{chunk.63XQMHFQ.js.map → chunk.7227JLJF.js.map} +0 -0
- /package/dist/chunks/{chunk.57AK7CVM.js.map → chunk.7DGBHZU2.js.map} +0 -0
- /package/dist/chunks/{chunk.HQ6QUSK7.js.map → chunk.7JGKUB4A.js.map} +0 -0
- /package/dist/chunks/{chunk.UZFE4ZK6.js.map → chunk.7ZFDGJ4L.js.map} +0 -0
- /package/dist/chunks/{chunk.E257OZYA.js.map → chunk.AJ73FM3N.js.map} +0 -0
- /package/dist/chunks/{chunk.FEKYKC4C.js.map → chunk.AVJHCISC.js.map} +0 -0
- /package/dist/chunks/{chunk.2LYOMDFO.js.map → chunk.AYAX7BG7.js.map} +0 -0
- /package/dist/chunks/{chunk.MRQZD5TX.js.map → chunk.BQORIQ74.js.map} +0 -0
- /package/dist/chunks/{chunk.74IOULXM.js.map → chunk.BVZQ6QSY.js.map} +0 -0
- /package/dist/chunks/{chunk.7RHGZPLP.js.map → chunk.C3B4XHOF.js.map} +0 -0
- /package/dist/chunks/{chunk.IO36YFGG.js.map → chunk.CFBIOFE3.js.map} +0 -0
- /package/dist/chunks/{chunk.RFWHBKPI.js.map → chunk.D7UHBX3B.js.map} +0 -0
- /package/dist/chunks/{chunk.UKCQF4MT.js.map → chunk.DRKA3RET.js.map} +0 -0
- /package/dist/chunks/{chunk.2IWVCAEF.js.map → chunk.DY3RUP6T.js.map} +0 -0
- /package/dist/chunks/{chunk.IJ7VHZFK.js.map → chunk.F4HR34MV.js.map} +0 -0
- /package/dist/chunks/{chunk.WBSH7WXZ.js.map → chunk.F4YZ6CNS.js.map} +0 -0
- /package/dist/chunks/{chunk.PGRPK5CM.js.map → chunk.FRI6SBLL.js.map} +0 -0
- /package/dist/chunks/{chunk.A67AAALJ.js.map → chunk.G4QCVDAA.js.map} +0 -0
- /package/dist/chunks/{chunk.A3OYJILJ.js.map → chunk.G6ITZTTW.js.map} +0 -0
- /package/dist/chunks/{chunk.JCIM6NE3.js.map → chunk.G76BKD7B.js.map} +0 -0
- /package/dist/chunks/{chunk.TLCX6C3Y.js.map → chunk.HBEIGBOH.js.map} +0 -0
- /package/dist/chunks/{chunk.5OYRCRNV.js.map → chunk.HDXDWES2.js.map} +0 -0
- /package/dist/chunks/{chunk.M25XYM73.js.map → chunk.HNMO7OGI.js.map} +0 -0
- /package/dist/chunks/{chunk.OLPCSVVL.js.map → chunk.INZSW7NE.js.map} +0 -0
- /package/dist/chunks/{chunk.6ETN74WB.js.map → chunk.IVZ3CJUE.js.map} +0 -0
- /package/dist/chunks/{chunk.NYCKYU42.js.map → chunk.JN7MXTVN.js.map} +0 -0
- /package/dist/chunks/{chunk.N7EVNHYR.js.map → chunk.JXLTDOJR.js.map} +0 -0
- /package/dist/chunks/{chunk.33EV4VCU.js.map → chunk.KFUASL6I.js.map} +0 -0
- /package/dist/chunks/{chunk.SFECHRNT.js.map → chunk.KM35YPU6.js.map} +0 -0
- /package/dist/chunks/{chunk.Z63ESAY4.js.map → chunk.L5DDQZJL.js.map} +0 -0
- /package/dist/chunks/{chunk.A4RVOFFP.js.map → chunk.LKAB6SQ7.js.map} +0 -0
- /package/dist/chunks/{chunk.PK3IARAB.js.map → chunk.LYH5JTYU.js.map} +0 -0
- /package/dist/chunks/{chunk.D7ZU5UFL.js.map → chunk.MHPQA44T.js.map} +0 -0
- /package/dist/chunks/{chunk.RZ4YAAAL.js.map → chunk.MNODNPKF.js.map} +0 -0
- /package/dist/chunks/{chunk.UTJJJQMA.js.map → chunk.MTN5NM4A.js.map} +0 -0
- /package/dist/chunks/{chunk.VE2GLMIO.js.map → chunk.MV27WLAS.js.map} +0 -0
- /package/dist/chunks/{chunk.FO5F6LKG.js.map → chunk.NOBEUBIX.js.map} +0 -0
- /package/dist/chunks/{chunk.UT46BUBN.js.map → chunk.NZFBQFBJ.js.map} +0 -0
- /package/dist/chunks/{chunk.CACKIXTX.js.map → chunk.ODUSEMOT.js.map} +0 -0
- /package/dist/chunks/{chunk.5CAP3G3X.js.map → chunk.PCYVMZQM.js.map} +0 -0
- /package/dist/chunks/{chunk.DNNV6VLW.js.map → chunk.PMU62FIY.js.map} +0 -0
- /package/dist/chunks/{chunk.OM47S5WL.js.map → chunk.Q7OBEUJP.js.map} +0 -0
- /package/dist/chunks/{chunk.POR4YXBM.js.map → chunk.RDUNTOLI.js.map} +0 -0
- /package/dist/chunks/{chunk.IB6CAJFE.js.map → chunk.S3NLAHQN.js.map} +0 -0
- /package/dist/chunks/{chunk.Q3DVGFDB.js.map → chunk.SUC6BMB5.js.map} +0 -0
- /package/dist/chunks/{chunk.GCQLCTYL.js.map → chunk.TFJD4QKG.js.map} +0 -0
- /package/dist/chunks/{chunk.JJ3OBG7Q.js.map → chunk.TOVTZIPZ.js.map} +0 -0
- /package/dist/chunks/{chunk.ILHF3ABL.js.map → chunk.TR2YSRMW.js.map} +0 -0
- /package/dist/chunks/{chunk.Q7BW6KKX.js.map → chunk.VBXOOYJE.js.map} +0 -0
- /package/dist/chunks/{chunk.GD33VPEE.js.map → chunk.WHD6U3UX.js.map} +0 -0
- /package/dist/chunks/{chunk.2GFK6XTO.js.map → chunk.Z4XV3SMG.js.map} +0 -0
- /package/dist/chunks/{chunk.PQFT5ON4.js.map → chunk.ZGQ4FVQW.js.map} +0 -0
- /package/dist/chunks/{chunk.OQHYWXRI.js.map → chunk.ZIKZWHEJ.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/button/button.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 { FormControlController, validValidityState } from '../../internal/form.js';\nimport { HasSlotController, getTextContent } from '../../internal/slot.js';\nimport { html, literal } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport SynSpinner from '../spinner/spinner.component.js';\nimport styles from './button.styles.js';\nimport customStyles from './button.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Buttons represent actions that are available to the user.\n * @documentation https://synergy.style/components/button\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n * @dependency syn-spinner\n *\n * @event syn-blur - Emitted when the button loses focus.\n * @event syn-focus - Emitted when the button gains focus.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @slot - The button's label.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @csspart base - The component's base wrapper.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart label - The button's label.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart caret - The button's caret icon, an `<syn-icon>` element.\n * @csspart spinner - The spinner that shows when the button is in the loading state.\n */\n@enableDefaultSettings('SynButton')\nexport default class SynButton extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = {\n 'syn-icon': SynIcon,\n 'syn-spinner': SynSpinner\n };\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['click']\n });\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.button') button: HTMLButtonElement | HTMLLinkElement;\n @query('slot:not([name])') defaultSlot: HTMLSlotElement;\n\n @state() private iconOnly = false;\n\n @state() private hasFocus = false;\n @state() invalid = false;\n @property() title = ''; // make reactive to pass through\n\n /** The button's theme variant. */\n @property({ reflect: true }) variant: 'filled' | 'outline' | 'text' = 'outline';\n\n /** The button's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior. */\n @property({ type: Boolean, reflect: true }) caret = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the button in a loading state. */\n @property({ type: Boolean, reflect: true }) loading = false;\n\n /**\n * The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n * `<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.\n */\n @property() type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\n * This attribute is ignored when `href` is present.\n */\n @property() name = '';\n\n /**\n * The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\n * button is the submitter. This attribute is ignored when `href` is present.\n */\n @property() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href = '';\n\n /** Tells the browser where to open the link. Only used when `href` is present. */\n @property() target: '_blank' | '_parent' | '_self' | '_top';\n\n /**\n * When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the\n * default is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a\n * specific tab/window, this will prevent that from working correctly. You can remove or change the default value by\n * setting the attribute to an empty string or a value of your choice, respectively.\n */\n @property() rel = 'noreferrer noopener';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is present. */\n @property() download?: string;\n\n /**\n * The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\n * value of this attribute must be an id of a form in the same document or shadow root as the button.\n */\n @property() form: string;\n\n /** Used to override the form owner's `action` attribute. */\n @property({ attribute: 'formaction' }) formAction: string;\n\n /** Used to override the form owner's `enctype` attribute. */\n @property({ attribute: 'formenctype' })\n formEnctype: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';\n\n /** Used to override the form owner's `method` attribute. */\n @property({ attribute: 'formmethod' }) formMethod: 'post' | 'get';\n\n /** Used to override the form owner's `novalidate` attribute. */\n @property({ attribute: 'formnovalidate', type: Boolean }) formNoValidate: boolean;\n\n /** Used to override the form owner's `target` attribute. */\n @property({ attribute: 'formtarget' }) formTarget: '_self' | '_blank' | '_parent' | '_top' | string;\n\n /** Gets the validity state object */\n get validity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).validity;\n }\n\n return validValidityState;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).validationMessage;\n }\n\n return '';\n }\n\n firstUpdated() {\n if (this.isButton()) {\n this.formControlController.updateValidity();\n }\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleClick() {\n if (this.type === 'submit') {\n this.formControlController.submit(this);\n }\n\n if (this.type === 'reset') {\n this.formControlController.reset(this);\n }\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private isButton() {\n return this.href ? false : true;\n }\n\n private isLink() {\n return this.href ? true : false;\n }\n\n private handleSlotChange() {\n const textContent = getTextContent(this.defaultSlot).trim();\n const assignedElements = this.defaultSlot.assignedElements({flatten: true})\n const iconOnlyElement = assignedElements.length === 1 && assignedElements[0].tagName.toLowerCase() === 'syn-icon';\n\n this.iconOnly = iconOnlyElement && textContent === '';\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n if (this.isButton()) {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n }\n\n /** Simulates a click on the button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the button. */\n blur() {\n this.button.blur();\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).checkValidity();\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() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).reportValidity();\n }\n\n return true;\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n if (this.isButton()) {\n (this.button as HTMLButtonElement).setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n }\n\n render() {\n const isLink = this.isLink();\n const tag = isLink ? literal`a` : literal`button`;\n\n /* eslint-disable lit/no-invalid-html */\n /* eslint-disable lit/binding-positions */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n button: true,\n 'button--primary': true,\n 'button--text': this.variant === 'text',\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n 'button--caret': this.caret,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--filled': this.variant === 'filled',\n 'button--outline': this.variant === 'outline',\n 'button--rtl': this.localize.dir() === 'rtl',\n 'button--has-label': this.hasSlotController.test('[default]'),\n 'button--has-prefix': this.hasSlotController.test('prefix'),\n 'button--has-suffix': this.hasSlotController.test('suffix')\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : this.type)}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(isLink ? undefined : this.name)}\n value=${ifDefined(isLink ? undefined : this.value)}\n href=${ifDefined(isLink && !this.disabled ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(isLink ? this.rel : undefined)}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @invalid=${this.isButton() ? this.handleInvalid : null}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=${classMap({ 'button__label': true, 'button__icon-only': this.iconOnly })} @slotchange=${this.handleSlotChange}></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n ${\n this.caret ? html` <syn-icon part=\"caret\" class=\"button__caret\" library=\"system\" name=\"caret\"></syn-icon> ` : ''\n }\n ${this.loading ? html`<syn-spinner part=\"spinner\"></syn-spinner>` : ''}\n </${tag}>\n `;\n /* eslint-enable lit/no-invalid-html */\n /* eslint-enable lit/binding-positions */\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,gBAAgB;AAGzB,SAAS,MAAM,eAAe;AAC9B,SAAS,iBAAiB;AAE1B,SAAS,UAAU,OAAO,aAAa;AAqCvC,IAAqB,YAArB,cAAuC,eAA6C;AAAA,EAApF;AAAA;AAOE,SAAiB,wBAAwB,IAAI,sBAAsB,MAAM;AAAA,MACvE,qBAAqB,CAAC,OAAO;AAAA,IAC/B,CAAC;AAED,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,UAAU,QAAQ;AAChG,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAK9C,SAAQ,WAAW;AAEnB,SAAQ,WAAW;AACnB,mBAAU;AACP,iBAAQ;AAGS,mBAAyC;AAGzC,gBAAqC;AAGtB,iBAAQ;AAGR,oBAAW;AAGX,mBAAU;AAM1C,gBAAsC;AAMtC,gBAAO;AAMP,iBAAQ;AAGR,gBAAO;AAWP,eAAM;AAAA;AAAA;AAAA,EA4BlB,IAAI,WAAW;AACb,QAAI,KAAK,SAAS,GAAG;AACnB,aAAQ,KAAK,OAA6B;AAAA,IAC5C;AAEA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,oBAAoB;AACtB,QAAI,KAAK,SAAS,GAAG;AACnB,aAAQ,KAAK,OAA6B;AAAA,IAC5C;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,eAAe;AACb,QAAI,KAAK,SAAS,GAAG;AACnB,WAAK,sBAAsB,eAAe;AAAA,IAC5C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
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/alert/alert.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 { animateTo, stopAnimations } from '../../internal/animate.js';\nimport { blurActiveElement } from '../../internal/closeActiveElement.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { waitForEvent } from '../../internal/event.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIconButton from '../icon-button/icon-button.component.js';\nimport styles from './alert.styles.js';\nimport customStyles from './alert.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Alerts are used to display important messages inline or as toast notifications.\n * @documentation https://synergy.style/components/alert\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The alert's main content.\n * @slot icon - An icon to show in the alert. Works best with `<syn-icon>`.\n *\n * @event syn-show - Emitted when the alert opens.\n * @event syn-after-show - Emitted after the alert opens and all animations are complete.\n * @event syn-hide - Emitted when the alert closes.\n * @event syn-after-hide - Emitted after the alert closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart icon - The container that wraps the optional icon.\n * @csspart message - The container that wraps the alert's main content.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n *\n * @animation alert.show - The animation to use when showing the alert.\n * @animation alert.hide - The animation to use when hiding the alert.\n */\n@enableDefaultSettings('SynAlert')\nexport default class SynAlert extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon-button': SynIconButton };\n\n private autoHideTimeout: number;\n private remainingTimeInterval: number;\n private countdownAnimation?: Animation;\n private readonly hasSlotController = new HasSlotController(this, 'icon', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n private static currentToastStack: HTMLDivElement;\n\n private static get toastStack() {\n if (!this.currentToastStack) {\n this.currentToastStack = Object.assign(document.createElement('div'), {\n className: 'syn-toast-stack'\n });\n }\n return this.currentToastStack;\n }\n\n @query('[part~=\"base\"]') base: HTMLElement;\n\n @query('.alert__countdown-elapsed') countdownElement: HTMLElement;\n\n /**\n * Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** Enables a close button that allows the user to dismiss the alert. */\n @property({ type: Boolean, reflect: true }) closable = false;\n\n /** The alert's theme variant. */\n @property({ reflect: true }) variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger' = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\n * the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\n * the alert will not close on its own.\n */\n @property({ type: Number }) duration = Infinity;\n\n /**\n * Enables a countdown that indicates the remaining time the alert will be displayed.\n * Typically used to indicate the remaining time before a whole app refresh.\n */\n private countdown? : 'rtl' | 'ltr';\n\n @state() private remainingTime = this.duration;\n\n firstUpdated() {\n this.base.hidden = !this.open;\n }\n\n private restartAutoHide() {\n this.handleCountdownChange();\n clearTimeout(this.autoHideTimeout);\n clearInterval(this.remainingTimeInterval);\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n this.remainingTime = this.duration;\n this.remainingTimeInterval = window.setInterval(() => {\n this.remainingTime -= 100;\n }, 100);\n }\n }\n\n private pauseAutoHide() {\n this.countdownAnimation?.pause();\n clearTimeout(this.autoHideTimeout);\n clearInterval(this.remainingTimeInterval);\n }\n\n private resumeAutoHide() {\n if (this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.remainingTime);\n this.remainingTimeInterval = window.setInterval(() => {\n this.remainingTime -= 100;\n }, 100);\n this.countdownAnimation?.play();\n }\n }\n\n private handleCountdownChange() {\n if (this.open && this.duration < Infinity && this.countdown) {\n const { countdownElement } = this;\n const start = '100%';\n const end = '0';\n this.countdownAnimation = countdownElement.animate([{ width: start }, { width: end }], {\n duration: this.duration,\n easing: 'linear'\n });\n }\n }\n\n private handleCloseClick() {\n this.hide();\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('syn-show');\n\n if (this.duration < Infinity) {\n this.restartAutoHide();\n }\n\n await stopAnimations(this.base);\n this.base.hidden = false;\n const { keyframes, options } = getAnimation(this, 'alert.show', { dir: this.localize.dir() });\n await animateTo(this.base, keyframes, options);\n\n this.emit('syn-after-show');\n } else {\n // Hide\n blurActiveElement(this);\n this.emit('syn-hide');\n\n clearTimeout(this.autoHideTimeout);\n clearInterval(this.remainingTimeInterval);\n\n await stopAnimations(this.base);\n const { keyframes, options } = getAnimation(this, 'alert.hide', { dir: this.localize.dir() });\n await animateTo(this.base, keyframes, options);\n this.base.hidden = true;\n\n this.emit('syn-after-hide');\n }\n }\n\n @watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Shows the alert. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'syn-after-show');\n }\n\n /** Hides the alert */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'syn-after-hide');\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n */\n async toast() {\n return new Promise<void>(resolve => {\n this.handleCountdownChange();\n if (SynAlert.toastStack.parentElement === null) {\n document.body.append(SynAlert.toastStack);\n }\n\n SynAlert.toastStack.appendChild(this);\n\n // Wait for the toast stack to render\n requestAnimationFrame(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- force a reflow for the initial transition\n this.clientWidth;\n this.show();\n });\n\n this.addEventListener(\n 'syn-after-hide',\n () => {\n SynAlert.toastStack.removeChild(this);\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (SynAlert.toastStack.querySelector('syn-alert') === null) {\n SynAlert.toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n alert: true,\n 'alert--open': this.open,\n 'alert--closable': this.closable,\n 'alert--has-icon': this.hasSlotController.test('icon'),\n 'alert--primary': this.variant === 'primary',\n 'alert--success': this.variant === 'success',\n 'alert--neutral': this.variant === 'neutral',\n 'alert--warning': this.variant === 'warning',\n 'alert--danger': this.variant === 'danger'\n })}\n role=\"alert\"\n aria-hidden=${this.open ? 'false' : 'true'}\n @mouseenter=${this.pauseAutoHide}\n @mouseleave=${this.resumeAutoHide}\n >\n <div part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\"></slot>\n </div>\n\n <div part=\"message\" class=\"alert__message\" aria-live=\"polite\">\n <slot></slot>\n </div>\n\n ${this.closable\n ? html`\n <syn-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"alert__close-button\"\n name=\"x-lg\"\n library=\"system\"\n label=${this.localize.term('close')}\n @click=${this.handleCloseClick}\n ></syn-icon-button>\n `\n : ''}\n\n <div role=\"timer\" class=\"alert__timer\">${this.remainingTime}</div>\n\n ${this.countdown\n ? html`\n <div\n class=${classMap({\n alert__countdown: true,\n 'alert__countdown--ltr': this.countdown === 'ltr'\n })}\n >\n <div class=\"alert__countdown-elapsed\"></div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('alert.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('alert.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,gBAAgB;AAGzB,SAAS,YAAY;AAErB,SAAS,UAAU,OAAO,aAAa;AAqCvC,IAAqB,WAArB,cAAsC,eAAe;AAAA,EAArD;AAAA;AAOE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,QAAQ,QAAQ;AACjF,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAqBX,gBAAO;AAGP,oBAAW;AAG1B,mBAAoE;AAOrE,oBAAW;AAQ9B,SAAQ,gBAAgB,KAAK;AAAA;AAAA,EAtCtC,WAAmB,aAAa;AAC9B,QAAI,CAAC,KAAK,mBAAmB;AAC3B,WAAK,oBAAoB,OAAO,OAAO,SAAS,cAAc,KAAK,GAAG;AAAA,QACpE,WAAW;AAAA,MACb,CAAC;AAAA,IACH;AACA,WAAO,KAAK;AAAA,EACd;AAAA,EAiCA,eAAe;AACb,SAAK,KAAK,SAAS,CAAC,KAAK;AAAA,EAC3B;AAAA,EAEQ,kBAAkB;AACxB,SAAK,sBAAsB;AAC3B,iBAAa,KAAK,eAAe;AACjC,kBAAc,KAAK,qBAAqB;AACxC,QAAI,KAAK,QAAQ,KAAK,WAAW,UAAU;AACzC,WAAK,kBAAkB,OAAO,WAAW,MAAM,KAAK,KAAK,GAAG,KAAK,QAAQ;AACzE,WAAK,gBAAgB,KAAK;AAC1B,WAAK,wBAAwB,OAAO,YAAY,MAAM;AACpD,aAAK,iBAAiB;AAAA,MACxB,GAAG,GAAG;AAAA,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EAAE,SAAS,KAAK,CAAC;AAAA,GAnCR,SAmCU;AAOD;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA1CP,SA0CS;AAQX;AAAA,EAAhB,MAAM;AAAA,GAlDY,SAkDF;AAoDX;AAAA,EADL,MAAM,QAAQ,EAAE,sBAAsB,KAAK,CAAC;AAAA,GArG1B,SAsGb;AAiCN;AAAA,EADC,MAAM,UAAU;AAAA,GAtIE,SAuInB;AAvImB,WAArB;AAAA,EADC,sBAAsB,UAAU;AAAA,GACZ;AAiQrB,oBAAoB,cAAc;AAAA,EAChC,WAAW;AAAA,IACT,EAAE,SAAS,GAAG,OAAO,IAAI;AAAA,IACzB,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,EACzB;AAAA,EACA,SAAS,EAAE,UAAU,KAAK,QAAQ,OAAO;AAC3C,CAAC;AAED,oBAAoB,cAAc;AAAA,EAChC,WAAW;AAAA,IACT,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,IACvB,EAAE,SAAS,GAAG,OAAO,IAAI;AAAA,EAC3B;AAAA,EACA,SAAS,EAAE,UAAU,KAAK,QAAQ,OAAO;AAC3C,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/validate/validate.component.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CSSResultGroup, PropertyValues } from 'lit';\nimport { html } from 'lit';\nimport { property, queryAssignedElements, state } from 'lit/decorators.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport { watch } from '../../internal/watch.js';\nimport SynAlert from '../alert/alert.component.js';\nimport {\n getEventNameForElement,\n isBlurEvent,\n isInvalidEvent,\n normalizeEventAttribute,\n} from './utility.js';\nimport styles from './validate.styles.js';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Validate provides form field validation messages in a unified way.\n * It does this by using [the native browser validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)\n * and showing the validation message in a consistent, user defined way.\n *\n * @dependency syn-alert\n *\n * @slot - The form field that should be validated.\n * Avoid slotting in more than one element, as subsequent ones will be ignored.\n *\n * @csspart base - The component's base wrapper.\n * @csspart input-wrapper - The container that wraps the form field.\n * @csspart alert - The syn-alert that is shown when the variant is set to \"inline\".\n * @csspart alert__base - The container that wraps the alert.\n * @csspart alert__message - The container that wraps the alert message.\n * @csspart alert__icon - The container that wraps the alert icon.\n */\n@enableDefaultSettings('SynValidate')\nexport default class SynValidate extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n static dependencies = {\n 'syn-alert': SynAlert,\n };\n\n controller = new AbortController();\n\n observer: MutationObserver;\n\n @queryAssignedElements() private slottedChildren: HTMLElement[];\n\n @state() validationMessage = '';\n\n @state() eagerFirstMount = true;\n\n @state() isInternalTriggeredInvalid = false;\n\n @state() isValid = true;\n\n /**\n * The variant that should be used to show validation alerts.\n *\n * The following variants are supported:\n * - **native** (default): Uses the native browser validation, usually a browser tooltip.\n * - **inline**: Show the validation message underneath the element, using a `<syn-alert>`\n */\n @property({ reflect: true }) variant: 'native' | 'inline' = 'native';\n\n /** Do not show the error icon when using the inline variant validation */\n @property({ attribute: 'hide-icon', reflect: true, type: Boolean }) hideIcon = false;\n\n /**\n * Defines the events that trigger the validation.\n * `invalid` will always automatically be included.\n * You may also use the `live` keyword to validate on every input change.\n * `live` will make sure to listen to the `invalid`, `input` and `blur` events.\n *\n * Please have a look at the [documentation for native form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)\n * and [the use of form invalid events](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) for further information.\n *\n * @example ```html\n * <!-- Validate on invalid and change events (invalid, change) -->\n * <syn-validate on=\"invalid change\"></syn-validate>\n *\n * <!-- Validate on live events (invalid, blur, input)-->\n * <syn-validate on=\"live\"></syn-validate>\n *\n * <!-- Validate on live and custom events (invalid, blur, input, focus, change) -->\n * <syn-validate on=\"live focus change\"></syn-validate>\n * ```\n */\n @property({ reflect: true }) on: string = '';\n\n /**\n * Custom validation message to be displayed when the input is invalid.\n * Will override the default browser validation message.\n * Set to an empty string to reset the validation message.\n */\n @property({ attribute: 'custom-validation-message', type: String }) customValidationMessage = '';\n\n /**\n * Set this to true to validate the input immediately when it is rendered.\n * Best used with a `variant` of `inline`.\n * When setting eager, the input will not be focused automatically.\n *\n * When using a `variant` of `native` the browser will focus\n * the last eager field as it is using a tooltip.\n * In this case it is better to just provide one eager field.\n */\n @property({ type: Boolean }) eager = false;\n\n // Automatically refresh all event listeners when the on property changes.\n @watch('on', { waitUntilFirstUpdate: true })\n handleListenerChange() {\n this.updateEvents();\n }\n\n @watch('eager', { waitUntilFirstUpdate: false })\n async handleEagerChange() {\n if (this.eager) {\n const input = this.getInput();\n await this.updateComplete;\n input?.reportValidity();\n this.eagerFirstMount = true;\n } else {\n this.eagerFirstMount = false;\n }\n }\n\n // Synchronize the validation message on the wrapped input with the custom message\n @watch('customValidationMessage', { waitUntilFirstUpdate: true })\n handleCustomValidationMessageChange() {\n const input = this.getInput();\n if (input) {\n this.setCustomValidationMessage(input);\n this.setValidationMessage(input);\n }\n }\n\n /**\n * Returns the validity state of the input component.\n * `true` for valid and `false` for invalid.\n */\n getValidity() {\n return this.isValid;\n }\n\n /**\n * Get the input element to validate. Defined as the first slotted element\n * @returns The input element or undefined if not found\n */\n private getInput() {\n const input = this.slottedChildren[0];\n return input ? input as HTMLInputElement : undefined;\n }\n\n /**\n * Get the event names to listen for.\n * If the input is a synergy element, will use syn- prefixes.\n * @returns The event names to listen for\n */\n // eslint-disable-next-line complexity\n private getUsedEventNames() {\n const input = this.getInput();\n\n // If there is no input, skip before doing any harm\n if (!input) {\n return [];\n }\n\n // Make sure to always use an array of events\n // This is needed because on may be a special value like \"live\"\n const on = normalizeEventAttribute(this.on);\n\n // Filter makes sure to remove empty values, e.g.\n // <syn-validate on=\"\"></syn-validate>\n const [...events] = on.filter(Boolean);\n\n // Make sure to always have an invalid event\n if (!events.includes('invalid')) {\n events.push('invalid');\n }\n\n // Special handling for the live keyword:\n // live always means on input and blur\n if (events.includes('live')) {\n events.push('input');\n events.push('blur');\n }\n\n // Make sure to remove duplicated events and the live property\n // and map the events to the correct event names\n return Array.from(new Set(\n events\n .filter(e => e !== 'live')\n .map(e => getEventNameForElement(input, e)),\n ));\n }\n\n /**\n * Update the events on the input element.\n */\n private updateEvents() {\n this.controller.abort();\n this.controller = new AbortController();\n const input = this.getInput();\n\n if (!input) {\n return;\n }\n\n const events = this.getUsedEventNames();\n events.forEach(eventName => {\n input.addEventListener(eventName, this.validate, {\n capture: isInvalidEvent(eventName),\n signal: this.controller.signal,\n });\n });\n\n // If the change event is not included,\n // make sure to attach a custom listener that resets the validation message\n // This is needed as the custom message may be set on change\n const usedChangeEvent = getEventNameForElement(input, 'change');\n if (!events.includes(usedChangeEvent)) {\n input.addEventListener(usedChangeEvent, this.internalRevalidate, {\n signal: this.controller.signal,\n });\n }\n }\n\n private setValidationMessage(input: HTMLInputElement) {\n const { customValidationMessage } = this;\n const validationMessage = customValidationMessage || input.validationMessage;\n this.validationMessage = validationMessage;\n }\n\n /**\n * Set the custom validation message to the input. This will make sure to either:\n * - use the custom message if one is set or\n * - use the default message if the custom message is empty\n */\n private setCustomValidationMessage(input: HTMLInputElement) {\n // Set the custom validation message on the input only once, when the customValidationMessage\n // is changed. Otherwise there could be problems with `variant=\"native\"` and `on=\"live\"` or\n // `on=\"blur\"`, because the browser popup will never disappear even if clicking somewhere else.\n input.setCustomValidity(this.customValidationMessage);\n }\n\n /**\n * Set the validation message from the input element\n * @param e The event that was received\n */\n private internalRevalidate = (e: Event) => {\n const input = e.currentTarget as HTMLInputElement;\n if (input.validity?.valid) {\n this.validationMessage = '';\n }\n };\n\n /**\n * Handle the blur event during validation\n */\n // eslint-disable-next-line class-methods-use-this\n private handleFocus(input: HTMLInputElement) {\n const activeElement = document.activeElement! as HTMLInputElement;\n const activeElementIsWrapped = activeElement.closest('syn-validate');\n\n if (!activeElement.validity?.valid && activeElementIsWrapped) {\n // The active element is invalid do not scroll\n return;\n }\n\n input.scrollIntoView({ block: 'nearest' });\n input.focus();\n }\n\n /**\n * Triggers a validation run, showing the validation message if needed.\n */\n // eslint-disable-next-line complexity\n private validate = (e: Event) => {\n // Make sure to stop the validate component from going into an endless cycle of triggering\n if (isInvalidEvent(e.type) && this.variant === 'native' && this.isInternalTriggeredInvalid === true) {\n this.isInternalTriggeredInvalid = false;\n return;\n }\n\n // Make sure to always prevent the invalid event when not using native validation\n if (isInvalidEvent(e.type) && this.variant !== 'native') {\n e.preventDefault();\n e.stopPropagation();\n }\n\n const input = e.currentTarget as HTMLInputElement;\n this.isValid = input.validity?.valid;\n\n // When we are using eager, make sure to skip focus on the first mount\n if (this.eager && this.eagerFirstMount) {\n this.eagerFirstMount = false;\n this.setValidationMessage(input);\n return;\n }\n\n // If the active element that has focus is placed in a validate component,\n // make sure to not loose focus.\n if (!this.isValid && !isBlurEvent(e.type)) {\n this.handleFocus(input);\n }\n\n this.setValidationMessage(input);\n\n // Trigger reportValidity when using native validation, so the browser popup is also shown\n // for other events than `invalid`. All events except the blur event, should trigger this.\n if (!isBlurEvent(e.type) && this.variant === 'native') {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.updateComplete.then(() => {\n this.isInternalTriggeredInvalid = true;\n input.reportValidity();\n });\n }\n };\n\n async firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n this.updateEvents();\n\n // #713: Make sure to set the custom validation message on mount\n // When we have a custom element, we need to wait for it to be ready!\n const input = this.getInput();\n\n if (this.customValidationMessage) {\n if (input instanceof SynergyElement) {\n await input.updateComplete;\n }\n input?.setCustomValidity(this.customValidationMessage);\n }\n\n // Make sure to run validation on mount if eager is set\n if (this.eager) {\n await this.updateComplete;\n this.isValid = input?.validity?.valid ?? false;\n input?.reportValidity();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // #717: Make sure to remove to rerun validation when\n // disabled or readonly properties change on the input\n this.observer = new MutationObserver(entries => {\n const input = this.getInput();\n\n if (!input) {\n return;\n }\n\n const hasDisabledOrReadonly = entries\n // Only check for changes on the input element\n .filter(({ target }) => target === input)\n // Check if the input is disabled or readonly\n .every(entry => {\n const target = entry.target as HTMLInputElement;\n return target.hasAttribute('disabled') || target.hasAttribute('readonly');\n });\n\n if (hasDisabledOrReadonly) {\n this.isValid = true;\n this.validationMessage = '';\n } else {\n // When using a synergy element, we need to check the validity after the element is updated,\n // as we cannot rely on the validity state of the element itself.\n // Unfortunately, this depends on used browser :(.\n const waitForPromise = input instanceof SynergyElement\n ? input.updateComplete\n : Promise.resolve();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n waitForPromise.then(() => {\n this.isValid = input?.validity?.valid ?? false;\n this.validationMessage = input?.validationMessage ?? '';\n });\n }\n });\n\n this.observer.observe(this, {\n attributeFilter: ['disabled', 'readonly'],\n attributes: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.controller.abort();\n this?.observer?.disconnect();\n }\n\n private renderInlineValidation() {\n if (this.variant !== 'inline' || !this.validationMessage) {\n return '';\n }\n\n return html`\n <syn-alert\n open\n exportparts=\"base:alert__base,message:alert__message,icon:alert__icon\"\n part=\"alert\"\n variant=\"danger\"\n >\n ${!this.hideIcon\n ? html`<syn-icon slot=\"icon\" name=\"error\" library=\"system\"></syn-icon>`\n : ''\n }\n ${this.validationMessage}\n </syn-alert>\n `;\n }\n\n render() {\n return html`\n <div\n class=\"validate\"\n part=\"base\"\n >\n <slot\n class=\"validate__input-wrapper\"\n part=\"input-wrapper\"\n ></slot>\n \n ${this.renderInlineValidation()}\n </div>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,YAAY;AACrB,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../src/components/input/input.component.ts", "../../src/internal/longpress.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 { defaultValue } from '../../internal/default-value.js';\nimport { FormControlController } from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { LocalizeController } from '../../utilities/localize.js';\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 SynIcon from '../icon/icon.component.js';\nimport SynDivider from '../divider/divider.component.js';\nimport { longPress } from '../../internal/longpress.js';\nimport styles from './input.styles.js';\nimport customStyles from './input.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\nimport {\n type NumericStrategy,\n createNumericStrategy,\n nativeNumericStrategy,\n modernNumericStrategy,\n} from './strategies.js';\nimport type { SynClampDetails } from '../../events/syn-clamp.js';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Inputs collect data from the user.\n * @documentation https://synergy.style/components/input\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n * @dependency syn-divider\n *\n * @slot label - The input's label. Alternatively, you can use the `label` attribute.\n * @slot prefix - Used to prepend a presentational icon or similar element to the input.\n * @slot suffix - Used to append a presentational icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n * @slot increment-number-stepper - An icon to use in lieu of the default increment number stepper icon.\n * @slot decrement-number-stepper - An icon to use in lieu of the default decrement number stepper icon.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event syn-clear - Emitted when the clear button is activated.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n * @event syn-clamp - Emitted if the numeric strategy allows autoClamp and the value is clamped to the min or max attribute.\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 base - The component's base wrapper.\n * @csspart input - The internal `<input>` control.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart clear-button - The clear button.\n * @csspart password-toggle-button - The password toggle button.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart stepper - The container that wraps the number stepper.\n * @csspart decrement-number-stepper - The decrement number stepper button.\n * @csspart increment-number-stepper - The increment number stepper button.\n * @csspart divider - The divider between the increment and decrement number stepper buttons.\n *\n * @cssproperty --syn-input-autofill-shadow - The shadow to apply when the input is autofilled.\n * @cssproperty --syn-input-autofill-readonly-shadow - The shadow to apply when the input is readonly and autofilled.\n * @cssproperty --syn-input-autofill-text-fill-color - The text fill color to apply when the input is autofilled.\n * @cssproperty --syn-input-autofill-caret-color - The caret color to apply when the input is autofilled.\n */\n@enableDefaultSettings('SynInput')\nexport default class SynInput extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [componentStyles, formControlStyles, styles, formControlCustomStyles, customStyles];\n static dependencies = {\n\t\t'syn-icon': SynIcon,\n\t\t'syn-divider': SynDivider\n\t};\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['syn-blur', 'syn-input']\n });\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n private __numberInput = Object.assign(document.createElement('input'), { type: 'number' });\n private __dateInput = Object.assign(document.createElement('input'), { type: 'date' });\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle = false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible = false;\n\n /** Hides the increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons = false;\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 /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n #numericStrategy: NumericStrategy = nativeNumericStrategy;\n\n /**\n * Defines the strategy for handling numbers in the numeric input.\n * This is used to determine how the input behaves when the user interacts with it.\n *\n * Includes the following configuration options:\n *\n * - **autoClamp**: If true, the input will clamp the value to the min and max attributes.\n * - **noStepAlign**: If true, the input will not align the value to the step attribute.\n * - **noStepValidation**: If true, the input will not validate the value against the step attribute.\n * \n * You may provide this as one of the following values:\n *\n * - 'native': Uses the native browser implementation.\n * - 'modern': Uses a more intuitive implementation:\n * - Values are clamped to the nearest min or max value.\n * - Stepping is inclusive to the provided min and max values.\n * - Provided stepping is no longer used in validation.\n * - An object that matches the `NumericStrategy` type. Note this can only be set via `property`, not as an `attribute`!\n */\n @property({\n attribute: 'numeric-strategy',\n converter: {\n fromAttribute: (value) => {\n return value === 'modern'\n ? modernNumericStrategy\n : nativeNumericStrategy;\n },\n },\n type: Object,\n })\n set numericStrategy(value: 'native' | 'modern' | Partial<NumericStrategy>) {\n switch (typeof value) {\n case 'string': this.#numericStrategy = value === 'modern' ? modernNumericStrategy : nativeNumericStrategy; break;\n case 'object': this.#numericStrategy = createNumericStrategy(value); break;\n default: this.#numericStrategy = nativeNumericStrategy;\n }\n }\n\n /**\n * @default nativeNumericStrategy\n * @todo: This must be changed to \"modern\" in Synergy@3\n */\n get numericStrategy(): 'native' | 'modern' | Partial<NumericStrategy> {\n return this.#numericStrategy;\n }\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n /**\n * Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. This will use the native `<input type=\"{{type}}\">` implementation and may result in an error.\n */\n get valueAsDate() {\n this.__dateInput.type = this.type;\n this.__dateInput.value = this.value;\n return this.input?.valueAsDate || this.__dateInput.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n this.__dateInput.type = this.type;\n this.__dateInput.valueAsDate = newValue;\n this.value = this.__dateInput.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n this.__numberInput.value = this.value;\n return this.input?.valueAsNumber || this.__numberInput.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n this.__numberInput.valueAsNumber = newValue;\n this.value = this.__numberInput.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleStep(){\n this.handleInput();\n this.input.focus();\n }\n\n private handleStepUp() {\n this.stepUp();\n this.handleStep();\n }\n\n private handleStepDown() {\n this.stepDown();\n this.handleStep();\n }\n \n private isDecrementDisabled() {\n if(this.disabled || this.readonly) {\n return true;\n }\n\n if (this.min === undefined || this.min === null) {\n return false;\n }\n\n const min = typeof this.min === 'string' ? parseFloat(this.min) : this.min;\n return this.valueAsNumber <= min;\n }\n\n private isIncrementDisabled() {\n if(this.disabled || this.readonly) {\n return true;\n }\n\n if (this.max === undefined || this.max === null) {\n return false;\n }\n\n const max = typeof this.max === 'string' ? parseFloat(this.max) : this.max;\n return this.valueAsNumber >= max;\n }\n\n \n private handleNumericStrategyAutoClamp() {\n const min = typeof this.min === 'string' ? parseFloat(this.min) : this.min;\n const max = typeof this.max === 'string' ? parseFloat(this.max) : this.max;\n const { valueAsNumber } = this;\n\n let nextValue = valueAsNumber;\n let clampEvent = '';\n if (nextValue < min) {\n nextValue = min;\n clampEvent = 'min';\n } else if (nextValue > max) {\n nextValue = max;\n clampEvent = 'max';\n }\n\n this.value = nextValue.toString();\n\n // Fire the event if the value was clamped\n if (clampEvent) {\n this.emit('syn-clamp', {\n detail: {\n clampedTo: clampEvent as SynClampDetails['clampedTo'],\n lastUserValue: valueAsNumber,\n }\n });\n }\n this.formControlController.updateValidity();\n this.emit('syn-change');\n }\n\n private handleChange() {\n if (this.type === 'number' && this.#numericStrategy.autoClamp) {\n this.handleNumericStrategyAutoClamp();\n return;\n }\n this.value = this.input.value;\n this.emit('syn-change');\n }\n\n private handleClearClick(event: MouseEvent) {\n event.preventDefault();\n\n if (this.value !== '') {\n this.value = '';\n this.emit('syn-clear');\n this.emit('syn-input');\n this.emit('syn-change');\n }\n\n this.input.focus();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('syn-input');\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.#numericStrategy.noStepAlign && this.type === 'number') {\n const { key } = event;\n if (key === 'ArrowUp' || key === 'ArrowDown') {\n event.preventDefault();\n event.stopPropagation();\n\n if (key === 'ArrowUp') {\n this.handleStepUp();\n } else if (key === 'ArrowDown') {\n this.handleStepDown();\n }\n this.handleChange();\n return;\n }\n }\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n // See https://github.com/synergy-design-system/synergy/pull/988\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n this.formControlController.updateValidity();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n const selectionStart = start ?? this.input.selectionStart!;\n const selectionEnd = end ?? this.input.selectionEnd!;\n\n this.input.setRangeText(replacement, selectionStart, selectionEnd, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n showPicker() {\n if ('showPicker' in HTMLInputElement.prototype) {\n this.input.showPicker();\n }\n }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n if (this.#numericStrategy.noStepAlign) {\n const { max, step, valueAsNumber } = this;\n\n // Needed because the input could be empty. In this case, valueAsNumber is NaN\n const usedInitialValue = Number.isNaN(valueAsNumber) ? 0 : valueAsNumber;\n const usedMin = typeof this.min === 'string' ? parseFloat(this.min) : this.min;\n const usedMax = typeof max === 'string' ? parseFloat(max) : max;\n const usedStep = (typeof step === 'undefined' || step === null || step === 'any') ? 1 : typeof step === 'number' ? step : parseFloat(step);\n\n let wantedNextValue = usedInitialValue + usedStep;\n // Floating point issues...\n wantedNextValue = Math.abs(wantedNextValue) < Number.EPSILON ? 0 : wantedNextValue;\n\n if (typeof usedMax === 'number' && usedMax < wantedNextValue) {\n wantedNextValue = usedMax;\n } else if (typeof usedMin === 'number' && usedMin > wantedNextValue) {\n wantedNextValue = usedMin;\n }\n\n this.input.value = wantedNextValue.toString();\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n return;\n }\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n if (this.#numericStrategy.noStepAlign) {\n const { min, max, step, valueAsNumber } = this;\n\n // Needed because the input could be empty. In this case, valueAsNumber is NaN\n const usedInitialValue = Number.isNaN(valueAsNumber) ? 0 : valueAsNumber;\n const usedMin = typeof min === 'string' ? parseFloat(min) : min;\n const usedMax = typeof max === 'string' ? parseFloat(max) : max;\n const usedStep = (typeof step === 'undefined' || step === null || step === 'any') ? 1 : typeof step === 'number' ? step : parseFloat(step);\n\n let wantedNextValue = usedInitialValue - usedStep;\n // Floating point issues...\n wantedNextValue = Math.abs(wantedNextValue) < Number.EPSILON ? 0 : wantedNextValue;\n \n if (typeof usedMin === 'number' && usedMin > wantedNextValue) {\n wantedNextValue = usedMin;\n } else if (typeof usedMax === 'number' && usedMax < wantedNextValue) {\n wantedNextValue = usedMax;\n }\n \n this.input.value = wantedNextValue.toString();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n return;\n }\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\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 return this.input.checkValidity();\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() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasPrefixSlot = this.hasSlotController.test('prefix');\n const hasSuffixSlot = this.hasSlotController.test('suffix');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const hasClearIcon = this.clearable && !this.disabled && !this.readonly;\n const isClearIconVisible = hasClearIcon && (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\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--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-prefix': hasPrefixSlot,\n 'form-control--has-suffix': hasSuffixSlot\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--standard': !this.readonly,\n 'input--readonly': this.readonly,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons\n })}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control\"\n type=${this.type === 'password' && this.passwordVisible ? 'text' : this.type}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(!this.#numericStrategy.noStepValidation ? this.step as number : 'any')}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${isClearIconVisible\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=${this.localize.term('clearEntry')}\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <syn-icon name=\"x-circle-fill\" library=\"system\"></syn-icon>\n </slot>\n </button>\n `\n : ''}\n ${this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.localize.term(this.passwordVisible ? 'hidePassword' : 'showPassword')}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <syn-icon name=\"eye-slash\" library=\"system\"></syn-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <syn-icon name=\"eye\" library=\"system\"></syn-icon>\n </slot>\n `}\n </button>\n `\n : ''}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n\n ${this.type === 'number' && !this.noSpinButtons\n ? html`\n <div part=\"stepper\" class=\"input__number-stepper\">\n <button\n part=\"decrement-number-stepper\"\n class=\"input__number-stepper-button\"\n type=\"button\"\n ?disabled=${this.isDecrementDisabled()}\n aria-hidden=\"true\"\n ${longPress({ start: () => this.handleStepDown(), end: () => this.handleChange()})}\n tabindex=\"-1\"\n >\n <slot name=\"decrement-number-stepper\">\n <syn-icon name=\"indeterminate\" library=\"system\"></syn-icon>\n </slot>\n </button>\n <syn-divider class=\"input__number-divider\" part=\"divider\" vertical></syn-divider>\n <button\n part=\"increment-number-stepper\"\n class=\"input__number-stepper-button\"\n type=\"button\"\n ?disabled=${this.isIncrementDisabled()}\n aria-hidden=\"true\"\n ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange()})}\n tabindex=\"-1\"\n >\n <slot name=\"increment-number-stepper\">\n <syn-icon name=\"add\" library=\"system\"></syn-icon>\n </slot>\n </button>\n </div>\n `\n : ''}\n </div>\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 </div>\n `;\n }\n}\n", "import { type ElementPart, noChange, nothing } from 'lit';\nimport {\n AsyncDirective,\n type DirectiveParameters,\n type Part,\n PartType,\n directive,\n} from 'lit/async-directive.js';\n\ntype Callbacks = {\n start: () => void;\n end: () => void;\n};\n\n/**\n * A directive that determines,if a HTMLButtonElement is long pressed or only clicked.\n * Depending on the state it executes the callback once or repeating.\n *\n * Usage:\n *\n * <button\n * ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange()})}\n * >\n * my button\n * </button>\n */\nclass LongPressDirective extends AsyncDirective {\n host: HTMLButtonElement;\n\n observer: MutationObserver;\n\n callbacks: Callbacks;\n\n interval: NodeJS.Timeout;\n\n timeout: NodeJS.Timeout;\n\n constructor(part: Part) {\n super(part);\n if (part.type !== PartType.ELEMENT || !(part.element instanceof HTMLButtonElement)) {\n throw new Error('The `longPress` directive must be used on an HTMLButtonElement.');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n render(_callback: Callbacks): typeof nothing {\n return nothing;\n }\n\n update(part: ElementPart, [callbacks]: DirectiveParameters<this>): typeof noChange {\n // initial call\n if (this.callbacks === undefined && this.host === undefined) {\n this.host = part.element as HTMLButtonElement;\n this.callbacks = { ...callbacks };\n this.host.addEventListener('pointerdown', this.handlePointerDown);\n }\n\n return noChange;\n }\n\n reconnected(): void {\n this.host.addEventListener('pointerdown', this.handlePointerDown);\n }\n\n protected disconnected(): void {\n this.stopSpinningAndCleanUp();\n this.host.removeEventListener('pointerdown', this.handlePointerDown);\n document.removeEventListener('pointerup', this.handlePointerUp);\n }\n\n private handlePointerDown = (event: PointerEvent) => {\n // do nothing if the click was not done from the left mouse button or if the button is disabled\n if (event.button !== 0 || this.host.disabled) {\n return;\n }\n this.spinOnLongPressCallback(event);\n };\n\n /**\n * Start spinning on long press clicks otherwise handle as single click event\n */\n private spinOnLongPressCallback(event: PointerEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n // Start spinning only on long press\n this.timeout = setTimeout(() => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.timeout = undefined;\n this.interval = setInterval(() => {\n this.callbacks.start();\n }, 50);\n }, 500);\n\n document.addEventListener('pointerup', this.handlePointerUp);\n\n // when buttons becoming disabled during long-press\n this.observer?.disconnect();\n this.observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'disabled') {\n this.stopSpinningAndCleanUp();\n }\n });\n });\n this.observer.observe(this.host, { attributes: true });\n }\n\n private handlePointerUp = (pointerUp?: PointerEvent) => {\n pointerUp?.preventDefault();\n pointerUp?.stopPropagation();\n\n // we did not start to spin\n if (this.timeout) {\n this.callbacks.start();\n }\n\n this.stopSpinningAndCleanUp();\n\n this.callbacks.end();\n document.removeEventListener('pointerup', this.handlePointerUp);\n };\n\n /**\n * Stop the spinning and clean up all timer and observer\n */\n private stopSpinningAndCleanUp() {\n // stop spinning\n clearInterval(this.interval);\n\n clearTimeout(this.timeout);\n this.observer?.disconnect();\n }\n}\n\nexport const longPress = directive(LongPressDirective);\n\nexport type { LongPressDirective };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA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SAAS;AAAA,GA3HS,SA2HP;AAWZ;AAAA,EARC,SAAS;AAAA,IACR,MAAM;AAAA,IACN,WAAW;AAAA;AAAA,MAET,eAAe,WAAU,CAAC,SAAS,UAAU,UAAU,QAAQ;AAAA,MAC/D,aAAa,WAAU,QAAQ,SAAS;AAAA,IAC1C;AAAA,EACF,CAAC;AAAA,GArIkB,SAsInB;AAMY;AAAA,EAAX,SAAS;AAAA,GA5IS,SA4IP;AAkCR;AAAA,EAXH,SAAS;AAAA,IACR,WAAW;AAAA,IACX,WAAW;AAAA,MACT,eAAe,CAAC,UAAU;AACxB,eAAO,UAAU,WACb,wBACA;AAAA,MACN;AAAA,IACF;AAAA,IACA,MAAM;AAAA,EACR,CAAC;AAAA,GA7KkB,SA8Kf;AAwNJ;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GArY9B,SAsYnB;AAMA;AAAA,EADC,MAAM,QAAQ,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3Y1B,SA4YnB;AAQM;AAAA,EADL,MAAM,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAnZ3B,SAoZb;AApZa,WAArB;AAAA,EADC,sBAAsB,UAAU;AAAA,GACZ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/combobox/combobox.component.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CSSResultGroup, PropertyValues } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { animateTo, stopAnimations } from '../../internal/animate.js';\nimport { defaultValue } from '../../internal/default-value.js';\nimport { FormControlController } from '../../internal/form.js';\nimport { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { waitForEvent } from '../../internal/event.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 SynIcon from '../icon/icon.component.js';\nimport SynPopup from '../popup/popup.component.js';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\nimport SynOption from '../option/option.component.js';\nimport type SynOptGroup from '../optgroup/optgroup.js';\nimport styles from './combobox.styles.js';\nimport customStyles from './combobox.custom.styles.js';\nimport {\n createOptionFromDifferentTypes,\n filterOnlyOptgroups, getAllOptions, getAssignedElementsForSlot, normalizeString,\n} from './utils.js';\nimport { scrollIntoView } from '../../internal/scroll.js';\nimport { type OptionRenderer, defaultOptionRenderer } from './option-renderer.js';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Comboboxes allow you to choose items from a menu of predefined options.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-combobox--docs\n * @status stable\n *\n * @dependency syn-icon\n * @dependency syn-popup\n *\n * @slot - The listbox options. Must be `<syn-option>` elements.\n * You can use `<syn-optgroup>`'s to group items visually.\n * @slot label - The combobox's label. Alternatively, you can use the `label` attribute.\n * @slot prefix - Used to prepend a presentational icon or similar element to the combobox.\n * @slot suffix - Used to append a presentational icon or similar element to the combobox.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot expand-icon - The icon to show when the control is expanded and collapsed.\n * Rotates on open and close.\n * @slot help-text - Text that describes how to use the combobox.\n * Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-change - Emitted when the control's value changes.\n * @event syn-clear - Emitted when the control's value is cleared.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-show - Emitted when the combobox's menu opens.\n * @event syn-after-show - Emitted after the combobox's menu opens and all animations are complete.\n * @event syn-hide - Emitted when the combobox's menu closes.\n * @event syn-after-hide - Emitted after the combobox's menu closes and all animations are complete.\n * @event syn-invalid - Emitted when the form control has been checked for validity\n * and its constraints aren't satisfied.\n * @event syn-error - Emitted when the combobox menu fails to open.\n *\n * @csspart form-control - The form control that wraps the label, combobox, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The combobox's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart combobox - The container the wraps the prefix, combobox, clear icon, and expand button.\n * @csspart prefix - The container that wraps the prefix slot.\n * @csspart suffix - The container that wraps the suffix slot.\n * @csspart display-input - The element that displays the selected option's label,\n * an `<input>` element.\n * @csspart listbox - The listbox container where the options are slotted\n * and the filtered options list exists.\n * @csspart filtered-listbox - The container that wraps the filtered options.\n * @csspart clear-button - The clear button.\n * @csspart expand-icon - The container that wraps the expand icon.\n *\n * @animation combobox.show - The animation to use when showing the combobox.\n * @animation combobox.hide - The animation to use when hiding the combobox.\n */\n@enableDefaultSettings('SynCombobox')\nexport default class SynCombobox extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [\n componentStyles,\n formControlStyles,\n styles,\n formControlCustomStyles,\n customStyles,\n ];\n\n static dependencies = {\n 'syn-icon': SynIcon,\n 'syn-popup': SynPopup,\n };\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['syn-blur', 'syn-input'],\n });\n\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');\n\n private readonly localize = new LocalizeController(this);\n\n private closeWatcher: CloseWatcher | null;\n\n /** The last value of a syn-option, that was selected by click or via keyboard navigation */\n private lastOptionValue = '';\n\n private isOptionRendererTriggered = false;\n\n private isInitialized: boolean = false;\n\n @query('.combobox') popup: SynPopup;\n\n @query('.combobox__inputs') combobox: HTMLSlotElement;\n\n @query('.combobox__display-input') displayInput: HTMLInputElement;\n\n @query('.combobox__value-input') valueInput: HTMLInputElement;\n\n @query('.combobox__listbox') listbox: HTMLSlotElement;\n\n @query('slot:not([name])') private defaultSlot: HTMLSlotElement;\n\n @state() private hasFocus = false;\n\n @state() displayLabel = '';\n\n @state() selectedOption: SynOption | undefined;\n\n @state() numberFilteredOptions = 0;\n\n @state() cachedOptions: SynOption [] = [];\n\n /** The name of the combobox, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /**\n * The current value of the combobox, submitted as a name/value pair with form data.\n */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The combobox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Placeholder text to show as a hint when the combobox is empty. */\n @property() placeholder = '';\n\n /** Disables the combobox control. */\n @property({ reflect: true, type: Boolean }) disabled = false;\n\n /** Adds a clear button when the combobox is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /**\n * Indicates whether or not the combobox is open.\n * You can toggle this attribute to show and hide the listbox, or you can use the `show()`\n * and `hide()` methods and this attribute will reflect the combobox's open state.\n */\n @property({ reflect: true, type: Boolean }) open = false;\n\n /**\n * Enable this option to prevent the listbox from being clipped,\n * when the component is placed inside a container with `overflow: auto|scroll`.\n * Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n */\n @property({ type: Boolean }) hoist = false;\n\n /** The combobox's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /**\n * The preferred placement of the combobox's menu.\n * Note that the actual placement may vary as needed to keep the listbox inside of the viewport.\n */\n @property({ reflect: true }) placement: 'top' | 'bottom' = 'bottom';\n\n /** The combobox's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element.\n * This attribute allows you to place the form control outside of a form and associate it\n * with the form that has this `id`.\n * The form must be in the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** The combobox's required attribute. */\n @property({ reflect: true, type: Boolean }) required = false;\n\n /**\n * A function that customizes the rendered option. The first argument is the option, the second\n * is the query string, which is typed into the combobox.\n * The function should return either a Lit TemplateResult or a string containing trusted HTML\n * to render in the shown list of filtered options.\n * If the query string should be highlighted use the `highlightOptionRenderer` function.\n */\n @property() getOption: OptionRenderer = defaultOptionRenderer;\n\n /**\n * A function used to filter options in the combobox component.\n * The default filter method is a case- and diacritic-insensitive string comparison.\n *\n * @param option - The option to be filtered.\n * @param queryString - The query string used for filtering.\n * @returns A boolean indicating whether the option should be included in the filtered results.\n */\n // eslint-disable-next-line class-methods-use-this\n @property() filter: (option: SynOption, queryString: string) => boolean = (option, queryStr) => {\n let content = option?.textContent || '';\n if (option instanceof SynOption) {\n content = option.getTextLabel();\n }\n const normalizedOption = normalizeString(content);\n const normalizedQuery = normalizeString(queryStr);\n\n if (normalizedOption.includes(normalizedQuery)) {\n return true;\n }\n\n return option?.value === queryStr;\n };\n\n /** Gets the validity state object */\n get validity() {\n return this.valueInput.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.valueInput.validationMessage;\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // Because this is a form control, it shouldn't be opened initially\n this.open = false;\n }\n\n firstUpdated() {\n this.isInitialized = true;\n this.formControlController.updateValidity();\n }\n\n protected override willUpdate(changedProperties: PropertyValues) {\n super.willUpdate(changedProperties);\n\n if (!this.isInitialized && !this.defaultValue && this.value) {\n // If the value was set initially via property binding instead of attribute, we need to set\n // the defaultValue manually to be able to reset forms and the dynamic loading of options\n // are working correctly.\n this.defaultValue = this.value;\n }\n }\n\n private addOpenListeners() {\n //\n // Listen on the root node instead of the document in case the elements are inside a shadow root\n //\n // https://github.com/synergy-design-system/synergy/issues/1763\n //\n document.addEventListener('focusin', this.handleDocumentFocusIn);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n\n // If the component is rendered in a shadow root,\n // we need to attach the focusin listener there too\n if (this.getRootNode() !== document) {\n this.getRootNode().addEventListener('focusin', this.handleDocumentFocusIn);\n }\n\n if ('CloseWatcher' in window) {\n this.closeWatcher?.destroy();\n this.closeWatcher = new CloseWatcher();\n this.closeWatcher.onclose = () => {\n if (this.open) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.hide();\n this.displayInput.focus({ preventScroll: true });\n }\n };\n }\n }\n\n private removeOpenListeners() {\n document.removeEventListener('focusin', this.handleDocumentFocusIn);\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n\n if (this.getRootNode() !== document) {\n this.getRootNode().removeEventListener('focusin', this.handleDocumentFocusIn);\n }\n\n this.closeWatcher?.destroy();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleDocumentFocusIn = (event: KeyboardEvent) => {\n // Close when focusing out of the combobox\n const path = event.composedPath();\n if (this && !path.includes(this)) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.hide();\n }\n };\n\n /* eslint-disable @typescript-eslint/no-floating-promises */\n // eslint-disable-next-line complexity\n private handleDocumentKeyDown = (event: KeyboardEvent) => {\n const target = event.target as HTMLElement;\n const isClearButton = target.closest('.combobox__clear') !== null;\n\n if (isClearButton) {\n return;\n }\n\n // Close when pressing escape and open / clear input if not open\n if (event.key === 'Escape') {\n if (this.open && !this.closeWatcher) {\n event.preventDefault();\n event.stopPropagation();\n this.hide();\n this.displayInput.focus({ preventScroll: true });\n } else if (!this.open) {\n this.clearCombobox();\n }\n }\n\n // Handle enter.\n if (event.key === 'Enter') {\n const currentOption = this.getCurrentOption();\n\n // Pressing enter when focused on an input should submit the form like a native input, but\n // we wait a tick before submitting to allow users to cancel the keydown event if they need to\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n if (!this.open && !hasModifier) {\n setTimeout(() => {\n if (!event.defaultPrevented) {\n this.formControlController.submit();\n }\n });\n return;\n }\n\n if (!this.open || (currentOption && currentOption.disabled)) {\n return;\n }\n\n // Update the value based on the current selection and close it\n if (currentOption) {\n const oldValue = this.lastOptionValue;\n this.setSelectedOption(currentOption);\n\n if (this.value !== oldValue) {\n // Emit after updating\n this.updateComplete.then(() => {\n this.emit('syn-input');\n this.emit('syn-change');\n });\n }\n }\n\n this.hide();\n this.displayInput.focus({ preventScroll: true });\n return;\n }\n\n // Navigate options\n if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n // Prevent scrolling\n event.preventDefault();\n event.stopPropagation();\n // Open it\n if (!this.open) {\n this.show();\n }\n\n this.selectNextOption(event.key === 'ArrowDown');\n }\n\n // Move cursor\n if (['Home', 'End'].includes(event.key)) {\n // Prevent scrolling\n event.preventDefault();\n event.stopPropagation();\n if (event.key === 'Home') {\n this.displayInput.setSelectionRange(0, 0);\n } else if (event.key === 'End') {\n this.displayInput.setSelectionRange(\n this.displayInput.value.length,\n this.displayInput.value.length,\n );\n }\n }\n };\n /* eslint-enable @typescript-eslint/no-floating-promises */\n\n private handleDocumentMouseDown = (event: MouseEvent) => {\n // Close when clicking outside of the combobox\n const path = event.composedPath();\n if (this && !path.includes(this)) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.hide();\n }\n };\n\n private handleLabelClick() {\n this.displayInput.focus();\n }\n\n private handleComboboxMouseDown(event: MouseEvent) {\n // Ignore disabled controls\n if (this.disabled) {\n return;\n }\n\n const toggleListboxOpen = () => (this.open ? this.hide() : this.show());\n event.preventDefault();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n toggleListboxOpen().then(() => {\n setTimeout(() => this.displayInput.focus({ preventScroll: true }));\n });\n }\n\n private handleComboboxKeyDown(event: KeyboardEvent) {\n if (event.key === 'Tab') {\n return;\n }\n\n this.handleDocumentKeyDown(event);\n }\n\n private handleClearClick(event: MouseEvent) {\n event.stopPropagation();\n this.clearCombobox();\n }\n\n private clearCombobox() {\n if (this.value !== '') {\n this.value = '';\n this.displayInput.value = '';\n this.lastOptionValue = '';\n this.setSelectedOption(undefined);\n this.displayInput.focus({ preventScroll: true });\n\n // Emit after update\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.updateComplete.then(() => {\n this.emit('syn-clear');\n this.emit('syn-input');\n this.emit('syn-change');\n });\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n private preventLoosingFocus(event: MouseEvent) {\n // Don't lose focus of the input or propagate events\n event.stopPropagation();\n event.preventDefault();\n }\n\n /* eslint-disable @typescript-eslint/no-floating-promises */\n private handleOptionClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const option = target.closest('syn-option');\n const oldValue = this.lastOptionValue;\n if (option && !option.disabled) {\n this.setSelectedOption(option);\n\n // Set focus after updating so the value is announced by screen readers\n this.updateComplete.then(() => this.displayInput.focus({ preventScroll: true }));\n\n if (this.value !== oldValue) {\n // Emit after updating\n this.updateComplete.then(() => {\n this.emit('syn-input');\n this.emit('syn-change');\n });\n }\n\n this.hide();\n this.displayInput.focus({ preventScroll: true });\n }\n }\n /* eslint-enable @typescript-eslint/no-floating-promises */\n\n /**\n * Selects the following or previous option.\n *\n * @param isNext - A boolean indicating whether to select the following option (true)\n * or the previous option (false).\n */\n private selectNextOption(isNext: boolean) {\n const filteredOptions = this.getAllFilteredOptions();\n\n if (filteredOptions.length === 0) {\n return;\n }\n\n const currentOption = this.getCurrentOption();\n const currentIndex = filteredOptions.indexOf(currentOption!);\n let newIndex = Math.max(0, currentIndex);\n\n if (isNext) {\n const nextIndex = currentIndex + 1;\n newIndex = (nextIndex > filteredOptions.length - 1) ? 0 : nextIndex;\n } else {\n const previousIndex = currentIndex - 1;\n newIndex = previousIndex < 0 ? filteredOptions.length - 1 : previousIndex;\n }\n this.setCurrentOption(filteredOptions[newIndex]);\n scrollIntoView(this.getCurrentOption()!, this.listbox, 'vertical', 'auto');\n }\n\n private getAllFilteredOptions() {\n return this.getSlottedOptions().filter(option => !option.hidden);\n }\n\n private getCurrentOption() {\n return this.getAllFilteredOptions().find(option => option.current);\n }\n\n // Sets the current option, which is the option the user is currently interacting with\n // (e.g. via keyboard). Only one option may be \"current\" at a time.\n private setCurrentOption(option: SynOption | null) {\n const allOptions = this.getAllFilteredOptions();\n\n // Clear selection\n this.displayInput.removeAttribute('aria-activedescendant');\n\n allOptions.forEach(el => {\n // eslint-disable-next-line no-param-reassign\n el.current = false;\n el.setAttribute('aria-selected', 'false');\n });\n\n // Select the target option\n if (option) {\n // eslint-disable-next-line no-param-reassign\n option.current = true;\n option.setAttribute('aria-selected', 'true');\n this.displayInput.setAttribute('aria-activedescendant', option.id);\n }\n }\n\n /**\n * Updates the selected options cache, the current value, and the display value\n */\n private setSelectedOption(option: SynOption | undefined) {\n this.selectedOption = option;\n\n // Check if the selected option has a value,\n // if not take the text content of the option otherwise the input text\n let optionValue;\n if (this.selectedOption?.value) {\n optionValue = String(this.selectedOption.value);\n } else {\n optionValue = this.selectedOption?.getTextLabel();\n }\n\n if (option) {\n this.lastOptionValue = optionValue || '';\n }\n\n // Update the value\n this.value = optionValue ?? this.displayInput.value;\n\n // Update validity and display label\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.updateComplete.then(() => {\n this.displayLabel = this.selectedOption?.getTextLabel() ?? this.displayInput.value;\n this.formControlController.updateValidity();\n });\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n @watch(['filter', 'getOption'], { waitUntilFirstUpdate: true })\n handlePropertiesChange() {\n this.createComboboxOptionsFromQuery(this.value);\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n\n // Close the listbox when the control is disabled\n if (this.disabled) {\n this.open = false;\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.handleOpenChange();\n }\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n handleValueChange() {\n this.updateSelectedOptionFromValue();\n this.setCurrentOption(null);\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open && !this.disabled) {\n if (this.numberFilteredOptions === 0) {\n // Don't open the listbox if there are no options\n this.open = false;\n this.emit('syn-error');\n return;\n }\n\n // Show\n this.emit('syn-show');\n this.addOpenListeners();\n\n await stopAnimations(this);\n this.listbox.hidden = false;\n this.popup.active = true;\n\n const { keyframes, options } = getAnimation(this, 'combobox.show', { dir: this.localize.dir() });\n await animateTo(this.popup.popup, keyframes, options);\n\n this.emit('syn-after-show');\n return;\n }\n\n this.setCurrentOption(null);\n this.displayInput.removeAttribute('aria-activedescendant');\n // Hide\n this.emit('syn-hide');\n this.removeOpenListeners();\n\n await stopAnimations(this);\n const { keyframes, options } = getAnimation(this, 'combobox.hide', { dir: this.localize.dir() });\n await animateTo(this.popup.popup, keyframes, options);\n this.listbox.hidden = true;\n this.popup.active = false;\n\n this.emit('syn-after-hide');\n }\n\n /**\n * Shows the listbox. If it is not possible to open the listbox, because there are no\n * appropriate filtered options, a syn-error is emitted and the listbox stays closed.\n */\n async show() {\n if (this.open || this.disabled) {\n this.open = false;\n return undefined;\n }\n\n this.open = true;\n return Promise.race([waitForEvent(this, 'syn-after-show'), waitForEvent(this, 'syn-error')]);\n }\n\n /** Hides the listbox. */\n async hide() {\n if (!this.open || this.disabled) {\n this.open = false;\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'syn-after-hide');\n }\n\n /**\n * Checks for validity but does not show a validation message.\n * Returns `true` when valid and `false` when invalid.\n */\n checkValidity() {\n return this.valueInput.checkValidity();\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() {\n return this.valueInput.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.valueInput.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the control. */\n focus(options?: FocusOptions) {\n this.displayInput.focus(options);\n }\n\n /** Removes focus from the control. */\n blur() {\n this.displayInput.blur();\n }\n\n /* eslint-disable no-param-reassign, @typescript-eslint/no-floating-promises */\n private createComboboxOptionsFromQuery(queryString: string) {\n this.numberFilteredOptions = 0;\n this.isOptionRendererTriggered = true;\n\n // This is needed for angular. For some reason the handleDefaultSlotChange is not triggered\n // initially and therefore the cachedOptions are not set.\n if (this.cachedOptions.length === 0) {\n this.cacheSlottedOptionsAndOptgroups();\n }\n\n // Update the syn-option's based on the query string and getOption\n this.getSlottedOptions()\n .forEach(option => {\n // Use the original cached option, to do changes on it\n const cachedOption = this.cachedOptions.find(o => o.id === option.id) || option;\n const optionResult = this.getOption(cachedOption, queryString);\n let updatedOption = createOptionFromDifferentTypes(optionResult);\n\n // The type of the getOption function is incorrect, therefore use the original option\n if (!updatedOption) {\n updatedOption = cachedOption;\n }\n\n const hideOption = !(this.filter(updatedOption, queryString) || queryString === '');\n updatedOption.hidden = hideOption;\n option.replaceWith(updatedOption);\n\n if (!hideOption) {\n this.numberFilteredOptions += 1;\n }\n });\n\n // Update the syn-optgroup's if available\n const visibleOptgroups = this.getSlottedOptGroups().filter(optgroup => {\n const options = getAllOptions(Array.from(optgroup.children) as HTMLElement[]).flat();\n const isVisible = options.some(option => !option.hidden);\n optgroup.hidden = !isVisible;\n return isVisible;\n });\n\n // Hide the divider of the first visible optgroup, as it can unfortunately not be hidden via css\n visibleOptgroups[0]?.style.setProperty('--display-divider', 'none');\n\n // This is needed so the component does not endlessly rerender,\n // because the slot change event is endlessly retriggered otherwise.\n setTimeout(() => {\n this.isOptionRendererTriggered = false;\n }, 0);\n }\n /* eslint-enable no-param-reassign, @typescript-eslint/no-floating-promises */\n\n private async handleInput() {\n const inputValue = this.displayInput.value;\n this.value = inputValue;\n await this.updateComplete;\n this.open = this.numberFilteredOptions > 0;\n this.setSelectedOption(undefined);\n\n this.formControlController.updateValidity();\n this.emit('syn-input');\n }\n\n private handleChange() {\n // Only update the value and emit the event, if the change event occurred by\n // the user typing something in and removing focus of the combobox\n if (!this.selectedOption) {\n this.value = this.displayInput.value;\n // Update validity\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.updateComplete.then(() => {\n this.formControlController.updateValidity();\n });\n this.emit('syn-change');\n }\n }\n\n private getSlottedOptions() {\n return getAllOptions(getAssignedElementsForSlot(this.defaultSlot)).flat();\n }\n\n private getSlottedOptGroups(): SynOptGroup[] {\n return filterOnlyOptgroups(getAssignedElementsForSlot(this.defaultSlot));\n }\n\n /* eslint-disable no-param-reassign */\n private cacheSlottedOptionsAndOptgroups() {\n const slottedOptions = this.getSlottedOptions();\n const slottedOptgroups = this.getSlottedOptGroups();\n\n slottedOptions.forEach((option, index) => {\n option.id = option.id || `syn-combobox-option-${index}`;\n });\n\n slottedOptgroups.forEach((optgroup, index) => {\n optgroup.id = optgroup.id || `syn-combobox-optgroup-${index}`;\n });\n\n // Cache the slotted options\n this.cachedOptions = [...slottedOptions];\n }\n /* eslint-enable no-param-reassign */\n\n private updateSelectedOptionFromValue(): void {\n // check if the value has a corresponding option via value or text content\n // for empty values use the text content, as then the values of the option are not set\n const option = this.cachedOptions\n .find(o => (o.value !== '' && o.value === this.value) || (o.getTextLabel() === this.value));\n\n if (!option) {\n this.displayInput.value = this.value;\n }\n\n this.setSelectedOption(option);\n this.createComboboxOptionsFromQuery(this.value);\n }\n\n /* eslint-disable @typescript-eslint/no-floating-promises, complexity */\n /* @internal - used by options to update labels */\n public handleDefaultSlotChange() {\n // We need to check if the slotChange is triggered by our own changes we do to the already\n // slotted options or because new options were slotted into the combobox\n const slottedOptions = this.getSlottedOptions();\n const optionsLength = slottedOptions.length;\n const cachedOptionsLength = this.cachedOptions.length;\n\n if (!this.isOptionRendererTriggered || cachedOptionsLength !== optionsLength) {\n // Rerun this handler when <syn-option> is registered\n if (!customElements.get('syn-option')) {\n customElements.whenDefined('syn-option').then(() => this.handleDefaultSlotChange());\n return;\n }\n\n this.cacheSlottedOptionsAndOptgroups();\n\n this.updateSelectedOptionFromValue();\n\n if (this.hasFocus && this.value.length > 0 && !this.open) {\n this.show();\n }\n }\n }\n /* eslint-enable @typescript-eslint/no-floating-promises, complexity */\n\n /* eslint-disable @typescript-eslint/unbound-method */\n // eslint-disable-next-line complexity\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 hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;\n const isPlaceholderVisible = this.placeholder && this.value.length === 0;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-label': hasLabel,\n 'form-control--large': this.size === 'large',\n 'form-control--medium': this.size === 'medium',\n 'form-control--small': this.size === 'small',\n })}\n >\n <label\n id=\"label\"\n part=\"form-control-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 <syn-popup\n class=${classMap({\n combobox: true,\n 'combobox--bottom': this.placement === 'bottom',\n 'combobox--disabled': this.disabled,\n 'combobox--focused': this.hasFocus,\n 'combobox--large': this.size === 'large',\n 'combobox--medium': this.size === 'medium',\n 'combobox--open': this.open,\n 'combobox--placeholder-visible': isPlaceholderVisible,\n 'combobox--small': this.size === 'small',\n 'combobox--standard': true,\n 'combobox--top': this.placement === 'top',\n })}\n placement=${this.placement}\n strategy=${this.hoist ? 'fixed' : 'absolute'}\n flip\n shift\n sync=\"width\"\n auto-size=\"vertical\"\n auto-size-padding=\"10\"\n >\n <div\n part=\"combobox\"\n class=\"combobox__inputs\"\n slot=\"anchor\"\n @keydown=${this.handleComboboxKeyDown}\n @mousedown=${this.handleComboboxMouseDown}\n >\n <slot part=\"prefix\" name=\"prefix\" class=\"combobox__prefix\"></slot>\n\n <input\n part=\"display-input\"\n class=\"combobox__display-input\"\n type=\"text\"\n placeholder=${this.placeholder}\n .disabled=${this.disabled}\n .value=${this.displayLabel}\n autocomplete=\"off\"\n spellcheck=\"false\"\n autocapitalize=\"off\"\n aria-controls=\"listbox\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n aria-labelledby=\"label\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-describedby=\"help-text\"\n role=\"combobox\"\n tabindex=\"0\"\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n\n aria-autocomplete=\"list\"\n aria-owns=\"listbox\"\n @input=${this.handleInput}\n @change=${this.handleChange}\n />\n\n <input\n class=\"combobox__value-input\"\n type=\"text\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n .value=${this.value}\n tabindex=\"-1\"\n aria-hidden=\"true\"\n @focus=${() => this.focus()}\n @invalid=${this.handleInvalid}\n />\n \n ${hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"combobox__clear\"\n type=\"button\"\n aria-label=${this.localize.term('clearEntry')}\n @mousedown=${this.preventLoosingFocus}\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <syn-icon name=\"x-circle-fill\" library=\"system\"></syn-icon>\n </slot>\n </button>\n `\n : ''}\n\n <slot name=\"suffix\" part=\"suffix\" class=\"combobox__suffix\"></slot>\n\n <slot name=\"expand-icon\" part=\"expand-icon\" class=\"combobox__expand-icon\">\n <syn-icon library=\"system\" name=\"chevron-down\"></syn-icon>\n </slot>\n </div>\n\n <div\n id=\"listbox\"\n role=\"listbox\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-labelledby=\"label\"\n part=\"listbox\"\n class=\"combobox__listbox\"\n tabindex=\"-1\"\n @mousedown=${this.preventLoosingFocus}\n @mouseup=${this.handleOptionClick}\n >\n <div class=\"listbox__options\" part=\"filtered-listbox\">\n <slot @slotchange=${this.handleDefaultSlotChange}></slot> \n </div>\n </div>\n </syn-popup>\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 </div>\n `;\n }\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\nsetDefaultAnimation('combobox.show', {\n keyframes: [\n { opacity: 0, scale: 0.9 },\n { opacity: 1, scale: 1 },\n ],\n options: { duration: 100, easing: 'ease' },\n});\n\nsetDefaultAnimation('combobox.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.9 },\n ],\n options: { duration: 100, easing: 'ease' },\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,UAAU,OAAO,aAAa;AA+EvC,IAAqB,cAArB,cAAyC,eAA6C;AAAA,EAAtF;AAAA;AAcE,SAAiB,wBAAwB,IAAI,sBAAsB,MAAM;AAAA,MACvE,qBAAqB,CAAC,YAAY,WAAW;AAAA,IAC/C,CAAC;AAED,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,OAAO;AAErF,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAKvD;AAAA,SAAQ,kBAAkB;AAE1B,SAAQ,4BAA4B;AAEpC,SAAQ,gBAAyB;AAcxB,SAAQ,WAAW;AAEnB,wBAAe;AAIf,iCAAwB;AAExB,yBAA8B,CAAC;AAG5B,gBAAO;AAKP,iBAAQ;AAGJ,wBAAe;AAGF,gBAAqC;AAGtD,uBAAc;AAGkB,oBAAW;AAG1B,qBAAY;AAOG,gBAAO;AAOtB,iBAAQ;AAGzB,iBAAQ;AAMS,qBAA8B;AAGrB,oBAAW;AAQpB,gBAAO;AAGQ,oBAAW;AAS3C,qBAA4B;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;AAAA,EADC,sBAAsB,aAAa;AAAA,GACf;AA86BrB,oBAAoB,iBAAiB;AAAA,EACnC,WAAW;AAAA,IACT,EAAE,SAAS,GAAG,OAAO,IAAI;AAAA,IACzB,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,EACzB;AAAA,EACA,SAAS,EAAE,UAAU,KAAK,QAAQ,OAAO;AAC3C,CAAC;AAED,oBAAoB,iBAAiB;AAAA,EACnC,WAAW;AAAA,IACT,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,IACvB,EAAE,SAAS,GAAG,OAAO,IAAI;AAAA,EAC3B;AAAA,EACA,SAAS,EAAE,UAAU,KAAK,QAAQ,OAAO;AAC3C,CAAC;",
|
|
6
|
-
"names": ["_a", "_b", "keyframes", "options"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/tab/tab.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 { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIconButton from '../icon-button/icon-button.component.js';\nimport styles from './tab.styles.js';\nimport customStyles from './tab.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\nlet id = 0;\n\n/**\n * @summary Tabs are used inside [tab groups](/components/tab-group) to represent and activate [tab panels](/components/tab-panel).\n * @documentation https://synergy.style/components/tab\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The tab's label.\n *\n * @event syn-close - Emitted when the tab is closable and the close button is activated.\n *\n * @csspart base - The component's base wrapper.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n */\nexport default class SynTab extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon-button': SynIconButton };\n\n private readonly localize = new LocalizeController(this);\n\n private readonly attrId = ++id;\n private readonly componentId = `syn-tab-${this.attrId}`;\n\n @query('.tab') tab: HTMLElement;\n\n /** The name of the tab panel this tab is associated with. The panel must be located in the same tab group. */\n @property({ reflect: true }) panel = '';\n\n /** Draws the tab in an active state. */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /** Makes the tab closable and shows a close button. */\n @property({ type: Boolean, reflect: true }) closable = false;\n\n /** Disables the tab and prevents selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * @internal\n * Need to wrap in a `@property()` otherwise CustomElement throws a \"The result must not have attributes\" runtime error.\n */\n @property({ type: Number, reflect: true }) tabIndex = 0;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'tab');\n }\n\n private handleCloseClick(event: Event) {\n event.stopPropagation();\n this.emit('syn-close');\n }\n\n @watch('active')\n handleActiveChange() {\n this.setAttribute('aria-selected', this.active ? 'true' : 'false');\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n\n if (this.disabled && !this.active) {\n this.tabIndex = -1;\n } else {\n this.tabIndex = 0;\n }\n }\n\n render() {\n // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels\n this.id = this.id.length > 0 ? this.id : this.componentId;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n tab: true,\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled\n })}\n >\n <slot></slot>\n ${this.closable\n ? html`\n <syn-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n name=\"x-lg\"\n library=\"system\"\n label=${this.localize.term('close')}\n class=\"tab__close-button\"\n @click=${this.handleCloseClick}\n tabindex=\"-1\"\n ></syn-icon-button>\n `\n : ''}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'syn-tab': SynTab;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAErB,SAAS,UAAU,aAAa;AAShC,IAAI,KAAK;AAkBT,IAAqB,SAArB,cAAoC,eAAe;AAAA,EAAnD;AAAA;AAIE,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAEvD,SAAiB,SAAS,EAAE;AAC5B,SAAiB,cAAc,WAAW,KAAK,MAAM;AAKxB,iBAAQ;AAGO,kBAAS;AAGT,oBAAW;AAGX,oBAAW;AAMZ,oBAAW;AAAA;AAAA,EAEtD,oBAAoB;AAClB,UAAM,kBAAkB;AACxB,SAAK,aAAa,QAAQ,KAAK;AAAA,EACjC;AAAA,EAEQ,iBAAiB,OAAc;AACrC,UAAM,gBAAgB;AACtB,SAAK,KAAK,WAAW;AAAA,EACvB;AAAA,EAGA,qBAAqB;AACnB,SAAK,aAAa,iBAAiB,KAAK,SAAS,SAAS,OAAO;AAAA,EACnE;AAAA,EAGA,uBAAuB;AACrB,SAAK,aAAa,iBAAiB,KAAK,WAAW,SAAS,OAAO;AAEnE,QAAI,KAAK,YAAY,CAAC,KAAK,QAAQ;AACjC,WAAK,WAAW;AAAA,IAClB,OAAO;AACL,WAAK,WAAW;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,SAAS;AAEP,SAAK,KAAK,KAAK,GAAG,SAAS,IAAI,KAAK,KAAK,KAAK;AAE9C,WAAO;AAAA;AAAA;AAAA,gBAGK,SAAS;AAAA,MACf,KAAK;AAAA,MACL,eAAe,KAAK;AAAA,MACpB,iBAAiB,KAAK;AAAA,MACtB,iBAAiB,KAAK;AAAA,IACxB,CAAC,CAAC;AAAA;AAAA;AAAA,UAGA,KAAK,WACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMY,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,yBAE1B,KAAK,gBAAgB;AAAA;AAAA;AAAA,gBAIlC,EAAE;AAAA;AAAA;AAAA,EAGZ;AACF;AAvFqB,OACZ,SAAyB,CAAC,0BAAiB,oBAAQ,yBAAY;AADnD,OAEZ,eAAe,EAAE,mBAAmB,cAAc;AAO1C;AAAA,EAAd,MAAM,MAAM;AAAA,GATM,OASJ;AAGc;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAZR,OAYU;AAGe;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAfvB,OAeyB;AAGA;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAlBvB,OAkByB;AAGA;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GArBvB,OAqByB;AAMD;AAAA,EAA1C,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GA3BtB,OA2BwB;AAa3C;AAAA,EADC,MAAM,QAAQ;AAAA,GAvCI,OAwCnB;AAKA;AAAA,EADC,MAAM,UAAU;AAAA,GA5CE,OA6CnB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/tag/tag.custom.styles.ts"],
|
|
4
|
-
"sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n .tag {\n background-color: var(--syn-color-neutral-0);\n border-color: var(--syn-color-neutral-400);\n border-radius: var(--syn-border-radius-small);\n color: var(--syn-input-color);\n }\n\n .tag .tag__remove {\n color: var(--syn-color-neutral-500);\n }\n\n\n /* Size small */\n .tag--small {\n font-size: var(--syn-font-size-x-small);\n height: var(--syn-font-size-x-large);\n }\n\n .tag--small.tag--removable {\n padding-inline-end: var(--syn-spacing-2x-small);\n }\n\n\n /* Size medium */\n .tag--medium {\n font-size: var(--syn-font-size-small);\n height: var(--syn-font-size-2x-large);\n }\n\n .tag--medium.tag--removable {\n padding-inline-end: var(--syn-spacing-x-small);\n }\n\n .tag--medium .tag__remove {\n margin-inline-start: var(--syn-spacing-small);\n }\n\n\n /* Size large */\n .tag--large {\n font-size: var(--syn-font-size-medium);\n height: var(--syn-font-size-3x-large);\n }\n\n .tag--large .tag__remove {\n margin-inline-start: var(--syn-spacing-medium);\n }\n\n .tag--large.tag--removable {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n\n /* Hover */\n .tag.tag--removable:hover {\n background-color: var(--syn-color-neutral-100);\n }\n \n .tag .tag__remove:hover {\n color: var(--syn-color-neutral-950);\n }\n\n\n /* Focus \n ! Focus styling is currently not working because shoelace does not support to focus icon-button \n */\n .tag.tag--removable:focus ~ .tag__remove {\n border: solid 1px var(--syn-color-primary-500);\n }\n\n\n /* Slotted icon style */\n .tag--small ::slotted(syn-icon) {\n font-size: var(--syn-font-size-small);\n margin-inline-end: var(--syn-spacing-2x-small);\n }\n\n .tag--medium ::slotted(syn-icon) {\n font-size: var(--syn-font-size-medium);\n margin-inline-end: var(--syn-spacing-x-small);\n }\n\n .tag--large ::slotted(syn-icon) {\n font-size: var(--syn-font-size-large);\n margin-inline-end: var(--syn-spacing-x-small);\n }\n\n\n /* Remove icon-button style */\n .tag--small .tag__remove::part(base){\n font-size: var(--syn-font-size-medium);\n }\n\n .tag--medium .tag__remove::part(base){\n font-size: var(--syn-font-size-x-large);\n }\n\n .tag--large .tag__remove::part(base){\n font-size: var(--syn-font-size-2x-large);\n }\n`;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,4BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/breadcrumb/breadcrumb.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 { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query } from 'lit/decorators.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport styles from './breadcrumb.styles.js';\nimport customStyles from './breadcrumb.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type SynBreadcrumbItem from '../breadcrumb-item/breadcrumb-item.js';\n\n/**\n * @summary Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.\n * @documentation https://synergy.style/components/breadcrumb\n * @status stable\n * @since 2.0\n *\n * @slot - One or more breadcrumb items to display.\n * @slot separator - The separator to use between breadcrumb items. Works best with `<syn-icon>`.\n *\n * @dependency syn-icon\n *\n * @csspart base - The component's base wrapper.\n */\nexport default class SynBreadcrumb extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon': SynIcon };\n\n private readonly localize = new LocalizeController(this);\n private separatorDir = this.localize.dir();\n\n @query('slot') defaultSlot: HTMLSlotElement;\n @query('slot[name=\"separator\"]') separatorSlot: HTMLSlotElement;\n\n /**\n * The label to use for the breadcrumb control. This will not be shown on the screen, but it will be announced by\n * screen readers and other assistive devices to provide more context for users.\n */\n @property() label = '';\n\n // Generates a clone of the separator element to use for each breadcrumb item\n private getSeparator() {\n const separator = this.separatorSlot.assignedElements({ flatten: true })[0] as HTMLElement;\n\n // Clone it, remove ids, and slot it\n const clone = separator.cloneNode(true) as HTMLElement;\n [clone, ...clone.querySelectorAll('[id]')].forEach(el => el.removeAttribute('id'));\n clone.setAttribute('data-default', '');\n clone.slot = 'separator';\n\n return clone;\n }\n\n private handleSlotChange() {\n const items = [...this.defaultSlot.assignedElements({ flatten: true })].filter(\n item => item.tagName.toLowerCase() === 'syn-breadcrumb-item'\n ) as SynBreadcrumbItem[];\n\n items.forEach((item, index) => {\n // Append separators to each item if they don't already have one\n const separator = item.querySelector('[slot=\"separator\"]');\n if (separator === null) {\n // No separator exists, add one\n item.append(this.getSeparator());\n } else if (separator.hasAttribute('data-default')) {\n // A default separator exists, replace it\n separator.replaceWith(this.getSeparator());\n } else {\n // The user provided a custom separator, leave it alone\n }\n\n // The last breadcrumb item is the \"current page\"\n if (index === items.length - 1) {\n item.setAttribute('aria-current', 'page');\n } else {\n item.removeAttribute('aria-current');\n }\n });\n }\n\n render() {\n // We clone the separator and inject them into breadcrumb items, so we need to regenerate the default ones when\n // directionality changes. We do this by storing the current separator direction, waiting for render, then calling\n // the function that regenerates them.\n if (this.separatorDir !== this.localize.dir()) {\n this.separatorDir = this.localize.dir();\n this.updateComplete.then(() => this.handleSlotChange());\n }\n\n return html`\n <nav part=\"base\" class=\"breadcrumb\" aria-label=${this.label}>\n <slot @slotchange=${this.handleSlotChange}></slot>\n </nav>\n\n <span hidden aria-hidden=\"true\">\n <slot name=\"separator\">\n <syn-icon name=\"chevron-down\" library=\"system\" class=${this.localize.dir()}></syn-icon>\n </slot>\n </span>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,YAAY;AAErB,SAAS,UAAU,aAAa;AAsBhC,IAAqB,gBAArB,cAA2C,eAAe;AAAA,EAA1D;AAAA;AAIE,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AACvD,SAAQ,eAAe,KAAK,SAAS,IAAI;AAS7B,iBAAQ;AAAA;AAAA;AAAA,EAGZ,eAAe;AACrB,UAAM,YAAY,KAAK,cAAc,iBAAiB,EAAE,SAAS,KAAK,CAAC,EAAE,CAAC;AAG1E,UAAM,QAAQ,UAAU,UAAU,IAAI;AACtC,KAAC,OAAO,GAAG,MAAM,iBAAiB,MAAM,CAAC,EAAE,QAAQ,QAAM,GAAG,gBAAgB,IAAI,CAAC;AACjF,UAAM,aAAa,gBAAgB,EAAE;AACrC,UAAM,OAAO;AAEb,WAAO;AAAA,EACT;AAAA,EAEQ,mBAAmB;AACzB,UAAM,QAAQ,CAAC,GAAG,KAAK,YAAY,iBAAiB,EAAE,SAAS,KAAK,CAAC,CAAC,EAAE;AAAA,MACtE,UAAQ,KAAK,QAAQ,YAAY,MAAM;AAAA,IACzC;AAEA,UAAM,QAAQ,CAAC,MAAM,UAAU;AAE7B,YAAM,YAAY,KAAK,cAAc,oBAAoB;AACzD,UAAI,cAAc,MAAM;AAEtB,aAAK,OAAO,KAAK,aAAa,CAAC;AAAA,MACjC,WAAW,UAAU,aAAa,cAAc,GAAG;AAEjD,kBAAU,YAAY,KAAK,aAAa,CAAC;AAAA,MAC3C,OAAO;AAAA,MAEP;AAGA,UAAI,UAAU,MAAM,SAAS,GAAG;AAC9B,aAAK,aAAa,gBAAgB,MAAM;AAAA,MAC1C,OAAO;AACL,aAAK,gBAAgB,cAAc;AAAA,MACrC;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AAIP,QAAI,KAAK,iBAAiB,KAAK,SAAS,IAAI,GAAG;AAC7C,WAAK,eAAe,KAAK,SAAS,IAAI;AACtC,WAAK,eAAe,KAAK,MAAM,KAAK,iBAAiB,CAAC;AAAA,IACxD;AAEA,WAAO;AAAA,uDAC4C,KAAK,KAAK;AAAA,4BACrC,KAAK,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,iEAKgB,KAAK,SAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,EAIlF;AACF;AA7EqB,cACZ,SAAyB,CAAC,0BAAiB,2BAAQ,gCAAY;AADnD,cAEZ,eAAe,EAAE,YAAY,QAAQ;AAK7B;AAAA,EAAd,MAAM,MAAM;AAAA,GAPM,cAOJ;AACkB;AAAA,EAAhC,MAAM,wBAAwB;AAAA,GARZ,cAQc;AAMrB;AAAA,EAAX,SAAS;AAAA,GAdS,cAcP;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/radio-button/radio-button.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 { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './radio-button.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Radios buttons allow the user to select a single option from a group using a button-like control.\n * @documentation https://synergy.style/components/radio-button\n * @status stable\n * @since 2.0\n *\n * @slot - The radio button's label.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @event syn-blur - Emitted when the button loses focus.\n * @event syn-focus - Emitted when the button gains focus.\n *\n * @csspart base - The component's base wrapper.\n * @csspart button - The internal `<button>` element.\n * @csspart button--checked - The internal button element when the radio button is checked.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart label - The container that wraps the radio button's label.\n * @csspart suffix - The container that wraps the suffix.\n */\n@enableDefaultSettings('SynRadioButton')\nexport default class SynRadioButton extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n\n @query('.button') input: HTMLInputElement;\n @query('.hidden-input') hiddenInput: HTMLInputElement;\n\n @state() protected hasFocus = false;\n\n /**\n * @internal The radio button's checked state. This is exposed as an \"internal\" attribute so we can reflect it, making\n * it easier to style in button groups.\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** The radio's value. When selected, the radio group will receive this value. */\n @property() value: string;\n\n /** Disables the radio button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so\n * this attribute can typically be omitted.\n */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a pill-style radio button with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'presentation');\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n this.checked = true;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n /** Sets focus on the radio button. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the radio button. */\n blur() {\n this.input.blur();\n }\n\n render() {\n return html`\n <div part=\"base\" role=\"presentation\">\n <button\n part=\"${`button${this.checked ? ' button--checked' : ''}`}\"\n role=\"radio\"\n aria-checked=\"${this.checked}\"\n class=${classMap({\n button: true,\n 'button--default': true,\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n 'button--checked': this.checked,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--outline': true,\n 'button--pill': this.pill,\n 'button--has-label': this.hasSlotController.test('[default]'),\n 'button--has-prefix': this.hasSlotController.test('prefix'),\n 'button--has-suffix': this.hasSlotController.test('suffix')\n })}\n aria-disabled=${this.disabled}\n type=\"button\"\n value=${ifDefined(this.value)}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=\"button__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n </button>\n </div>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,gBAAgB;AAEzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,UAAU,OAAO,aAAa;AA6BvC,IAAqB,iBAArB,cAA4C,eAAe;AAAA,EAA3D;AAAA;AAGE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,UAAU,QAAQ;AAKvF,SAAU,WAAW;AAMc,mBAAU;AAMV,oBAAW;AAM1B,gBAAqC;AAGtB,gBAAO;AAAA;AAAA,EAEnD,oBAAoB;AAClB,UAAM,kBAAkB;AACxB,SAAK,a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,mBAChB,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC;AACF;AA3GqB,eACZ,SAAyB,CAAC,0BAAiB,2BAAM;AAItC;AAAA,EAAjB,MAAM,SAAS;AAAA,GALG,eAKD;AACM;AAAA,EAAvB,MAAM,eAAe;AAAA,GANH,eAMK;AAEL;AAAA,EAAlB,MAAM;AAAA,GARY,eAQA;AAMyB;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAdvB,eAcyB;AAGhC;AAAA,EAAX,SAAS;AAAA,GAjBS,eAiBP;AAGgC;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GApBvB,eAoByB;AAMf;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GA1BR,eA0BU;AAGe;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA7BvB,eA6ByB;AA4B5C;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAxD9B,eAyDnB;AAzDmB,iBAArB;AAAA,EADC,sBAAsB,gBAAgB;AAAA,GAClB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/option/option.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 { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport styles from './option.styles.js';\nimport customStyles from './option.custom.styles.js';\nimport { delimiterToWhiteSpace } from './utility.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @documentation https://synergy.style/components/option\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<syn-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\nexport default class SynOption extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon': SynIcon };\n\n // @ts-expect-error - Controller is currently unused\n private readonly localize = new LocalizeController(this);\n\n private isInitialized = false;\n\n @query('.option__label') defaultSlot: HTMLSlotElement;\n\n // the delimiter used to separate multiple values in a select\n // This is provided by the wrapping syn-select\n @state() delimiter = ' ';\n\n @state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)\n @state() selected = false; // the option is selected and has aria-selected=\"true\"\n @state() hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging\n\n /**\n * The option's value. When selected, the containing form control will receive this value. The value must be unique\n * from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\n * multiple values.\n */\n @property({ reflect: true }) value: string | number = '';\n\n /** Draws the option in a disabled state, preventing selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', 'false');\n }\n\n private handleDefaultSlotChange() {\n if (this.isInitialized) {\n // When the label changes, tell the controller to update\n customElements.whenDefined('syn-combobox').then(() => {\n const controller = this.closest('syn-combobox');\n if (controller) {\n controller.handleDefaultSlotChange();\n }\n });\n customElements.whenDefined('syn-select').then(() => {\n const controller = this.closest('syn-select');\n if (controller) {\n controller.handleDefaultSlotChange();\n }\n });\n } else {\n this.isInitialized = true;\n }\n }\n\n private handleMouseEnter() {\n this.hasHover = true;\n }\n\n private handleMouseLeave() {\n this.hasHover = false;\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('selected')\n handleSelectedChange() {\n this.setAttribute('aria-selected', this.selected ? 'true' : 'false');\n }\n\n @watch('value')\n handleValueChange() {\n if (typeof this.value === 'number') {\n return;\n }\n\n // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers\n // instead of requiring them to cast the value to a string.\n if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n const { delimiter } = this;\n\n if (this.value.includes(delimiter)) {\n console.error(`Option values cannot include \"${delimiter}\". All occurrences of \"${delimiter}\" have been replaced with \"_\".`, this);\n this.value = delimiterToWhiteSpace(this.value, this.delimiter);\n }\n }\n\n /** Returns a plain text label based on the option's content. */\n getTextLabel() {\n const nodes = this.childNodes;\n let label = '';\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n if (!(node as HTMLElement).hasAttribute('slot')) {\n label += (node as HTMLElement).textContent;\n }\n }\n\n if (node.nodeType === Node.TEXT_NODE) {\n label += node.textContent;\n }\n });\n\n return label.trim();\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n option: true,\n 'option--current': this.current,\n 'option--disabled': this.disabled,\n 'option--selected': this.selected,\n 'option--hover': this.hasHover\n })}\n @mouseenter=${this.handleMouseEnter}\n @mouseleave=${this.handleMouseLeave}\n >\n <syn-icon part=\"checked-icon\" class=\"option__check\" name=\"check\" library=\"system\" aria-hidden=\"true\"></syn-icon>\n <slot part=\"prefix\" name=\"prefix\" class=\"option__prefix\"></slot>\n <slot part=\"label\" class=\"option__label\" @slotchange=${this.handleDefaultSlotChange}></slot>\n <slot part=\"suffix\" name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fY,UAeV;AACA;AAAA,EAAR,MAAM;AAAA,GAhBY,UAgBV;AACA;AAAA,EAAR,MAAM;AAAA,GAjBY,UAiBV;AAOoB;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAxBR,UAwBU;AAGe;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA3BvB,UA2ByB;AAqC5C;AAAA,EADC,MAAM,UAAU;AAAA,GA/DE,UAgEnB;AAKA;AAAA,EADC,MAAM,UAAU;AAAA,GApEE,UAqEnB;AAKA;AAAA,EADC,MAAM,OAAO;AAAA,GAzEK,UA0EnB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/prio-nav/prio-nav.component.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport type { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit/static-html.js';\nimport { query, state } from 'lit/decorators.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './prio-nav.styles.js';\nimport SynDropdown from '../dropdown/dropdown.component.js';\nimport SynIcon from '../icon/icon.component.js';\nimport SynMenu from '../menu/menu.component.js';\nimport SynNavItem from '../nav-item/nav-item.component.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport {\n filterOnlyNavItems,\n getAssignedElementsForSlot,\n hideNavigationItem,\n showNavigationItem,\n} from './utils.js';\n\n/**\n * @summary The `<syn-prio-nav />` element provides a generic navigation bar\n * that can be used to group multiple navigation items (usually horizontal `<syn-nav-item />`s)\n * together. It will automatically group all items not visible in the viewport into a custom\n * priority menu.\n *\n * @example\n * <syn-prio-nav>\n * <syn-nav-item current horizontal>Item 1</syn-nav-item>\n * <button role=\"menuitem\">Item 2 (custom)</button>\n * <syn-nav-item horizontal>Item 3</syn-nav-item>\n * </syn-prio-nav>\n *\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-prio-nav--docs\n * @status stable\n * @since 1.14.0\n *\n * @dependency syn-dropdown\n * @dependency syn-icon\n * @dependency syn-menu\n * @dependency syn-nav-item\n *\n * @slot - The given navigation items. Must be horizontal `<syn-nav-item>`s\n * or have a role of \"menuitem\"\n *\n * @csspart base - The component's base wrapper.\n * @csspart priority-menu - The wrapper around the priority menu\n * @csspart priority-menu-nav-item - The navigation item for the priority menu\n * @csspart priority-menu-label - The label for the priority menu\n * @csspart priority-menu-icon - The icon for the priority menu\n * @csspart priority-menu-container - The container for the shifted navigation items,\n * if there is not enough space.\n *\n */\nexport default class SynPrioNav extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n static dependencies = {\n 'syn-dropdown': SynDropdown,\n 'syn-icon': SynIcon,\n 'syn-menu': SynMenu,\n 'syn-nav-item': SynNavItem,\n };\n\n /**\n * Internal resize observer\n */\n private resizeObserver: ResizeObserver;\n\n private readonly localize = new LocalizeController(this);\n\n /**\n * Reference to the rendered children slot\n */\n @query('slot:not([name])') private defaultSlot: HTMLSlotElement;\n\n /**\n * Reference to the slot where priority menu items are placed\n */\n @query('slot[name=menu]') private menuSlot: HTMLSlotElement;\n\n /**\n * The wrapper that holds the horizontal navigation items\n */\n @query('.horizontal-nav') private horizontalNav: HTMLDivElement;\n\n /**\n * The priority menu dropdown\n */\n @query('.priority-menu') private priorityMenu: SynDropdown;\n\n /**\n * Internal state reflecting if the item positions have been cached\n */\n @state() private itemPositionsCached = false;\n\n /**\n * The amount of nav items that are currently slotted\n */\n @state() private amountOfNavItems = 0;\n\n /**\n * The amount of items that are currently visible\n */\n @state() private amountOfVisibleItems = 0;\n\n /**\n * Internal state reflecting if there are items in the priority menu\n */\n @state() private hasItemsInDropdown = false;\n\n /**\n * Get a list of all slotted `<syn-nav-item />` elements\n * that are either in the main slot or the priority menu slot\n */\n private getSlottedNavItems() {\n const navItemsInDefaultSlot = filterOnlyNavItems(getAssignedElementsForSlot(this.defaultSlot));\n const navItemsInMenuSlot = filterOnlyNavItems(getAssignedElementsForSlot(this.menuSlot));\n return navItemsInDefaultSlot.concat(navItemsInMenuSlot);\n }\n\n /**\n * Cache the items right offset position to make faster checks placement into priority menu\n * @param items The items to cache the position for\n */\n private cacheItemPositions(items: SynNavItem[]) {\n const { left } = this.horizontalNav.getBoundingClientRect();\n items.forEach(item => {\n // We have to measure while the items are in the primary slot,\n // else we will just get the placement in the priority menu\n item.removeAttribute('slot');\n const { right } = item.getBoundingClientRect();\n // We also need to consider the location of the parent\n item.dataset.right = (right - left).toString();\n });\n\n this.itemPositionsCached = true;\n }\n\n /**\n * Determines which items should be shown or hidden, depending on the current width\n */\n private handlePriorityMenu() {\n const navItems = this.getSlottedNavItems();\n\n if (!this.itemPositionsCached) {\n this.cacheItemPositions(navItems);\n }\n\n // Get the widths of the horizontal nav and the priority menu\n // We subtract the width of the priority menu to get the final width\n const { width } = this.horizontalNav.getBoundingClientRect();\n\n // #651: Do not take the size of the priority menu\n // into account when it is hidden\n const reservedPrioMenuSize = this.priorityMenu.classList.contains('priority-menu--hidden')\n ? 0\n : this.priorityMenu.clientWidth;\n\n const finalWidth = width - reservedPrioMenuSize;\n\n // Cache the first item that should be hidden\n let firstHiddenItemRightPos: number | undefined;\n\n // Cache the last item so we can decide to use the finalWidth or just the width\n // later on. This is needed as otherwise the last item will be hidden when using finalWidth\n const lastNavItem = navItems.at(-1);\n\n const itemVisibilities = navItems.map(item => {\n const measureWidth = item === lastNavItem ? width : finalWidth;\n const isHidden = !!(\n firstHiddenItemRightPos\n || parseFloat(item.dataset.right!) > measureWidth\n );\n\n // Get the position of the first item\n // Will get used to position the priority menu\n if (isHidden && !firstHiddenItemRightPos) {\n firstHiddenItemRightPos = parseFloat(item.dataset.right!);\n }\n\n return {\n isHidden,\n item,\n };\n });\n\n const visibleItems = itemVisibilities.filter(({ isHidden }) => !isHidden).length;\n const hasOnlyOneItem = visibleItems === 1;\n\n // Finally, hide or show the items based on the visibility\n // As requested in #410, we hide all items if there is only one item\n itemVisibilities.forEach(({ item, isHidden }) => {\n if (isHidden || hasOnlyOneItem) {\n hideNavigationItem(item);\n } else {\n showNavigationItem(item);\n }\n });\n\n // Tell the render call that we have items in the priority menu\n // and toggle the visibility of the priority menu label\n this.hasItemsInDropdown = visibleItems !== navItems.length;\n this.amountOfVisibleItems = hasOnlyOneItem ? 0 : visibleItems;\n }\n\n private renderPriorityMenu() {\n return html`\n <syn-dropdown\n class=${classMap({\n 'priority-menu': true,\n 'priority-menu--has-visible-items': this.amountOfVisibleItems !== 0,\n 'priority-menu--hidden': !this.hasItemsInDropdown,\n })}\n part=\"priority-menu\"\n placement=\"bottom-end\"\n >\n <syn-nav-item class=\"priority-menu__nav-item\" slot=\"trigger\" horizontal part=\"priority-menu-nav-item\">\n <syn-icon \n class=\"priority-menu__icon\"\n label=\"More\"\n library=\"system\"\n name=\"more\"\n part=\"priority-menu-icon\"\n slot=\"prefix\"\n >\n </syn-icon>\n <span\n class=${classMap({\n 'priority-menu__label': true,\n 'priority-menu__label--visible': this.amountOfVisibleItems === 0,\n })}\n part=\"priority-menu-label\"\n >\n ${this.localize.term('menu')}\n </span>\n </syn-nav-item>\n\n <syn-menu part=\"priority-menu-container\">\n <slot name=\"menu\"></slot>\n </syn-menu>\n\n </syn-dropdown>\n `;\n }\n\n private slotChange() {\n const slottedItems = this.getSlottedNavItems();\n\n // Make sure to trigger a recalculation of the item positions if we a new list of slotted items\n if (slottedItems.length !== this.amountOfNavItems) {\n this.cacheItemPositions(slottedItems);\n this.handlePriorityMenu();\n this.amountOfNavItems = slottedItems.length;\n }\n }\n\n protected firstUpdated() {\n // Cache the original role of the items so we can reset it if needed.\n this.getSlottedNavItems().forEach(item => {\n item.dataset.originalRole = item.getAttribute('role') ?? '';\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(() => this.handlePriorityMenu());\n this.resizeObserver.observe(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.resizeObserver.unobserve(this);\n }\n\n render() {\n /* eslint-disable @typescript-eslint/unbound-method */\n return html`\n <nav class=\"horizontal-nav\" part=\"base\">\n <slot @slotchange=${this.slotChange}></slot>\n ${this.renderPriorityMenu()}\n </nav>\n `;\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,OAAO,aAAa;AAkD7B,IAAqB,aAArB,cAAwC,eAAe;AAAA,EAAvD;AAAA;AAeE,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAyB9C,SAAQ,sBAAsB;AAK9B,SAAQ,mBAAmB;AAK3B,SAAQ,uBAAuB;AAK/B,SAAQ,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,qBAAqB;AAC3B,UAAM,wBAAwB,mBAAmB,2BAA2B,KAAK,WAAW,CAAC;AAC7F,UAAM,qBAAqB,mBAAmB,2BAA2B,KAAK,QAAQ,CAAC;AACvF,WAAO,sBAAsB,OAAO,kBAAkB;AAAA,EACxD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMQ,mBAAmB,OAAqB;AAC9C,UAAM,EAAE,KAAK,IAAI,KAAK,cAAc,sBAAsB;AAC1D,UAAM,QAAQ,UAAQ;AAGpB,WAAK,gBAAgB,MAAM;AAC3B,YAAM,EAAE,MAAM,IAAI,KAAK,sBAAsB;AAE7C,WAAK,QAAQ,SAAS,QAAQ,MAAM,SAAS;AAAA,IAC/C,CAAC;AAED,SAAK,sBAAsB;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA,EAKQ,qBAAqB;AAC3B,UAAM,WAAW,KAAK,mBAAmB;AAEzC,QAAI,CAAC,KAAK,qBAAqB;AAC7B,WAAK,mBAAmB,QAAQ;AAAA,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