@tylertech/forge 2.13.2 → 2.14.0-dev.1
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/custom-elements.json +2804 -504
- package/dist/button/forge-button.css +1 -1
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/avatar/index.js +1 -1
- package/dist/esm/backdrop/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/core/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/chunk.2BNDXFI5.js +7 -0
- package/dist/esm/chunks/chunk.2BNDXFI5.js.map +7 -0
- package/dist/esm/chunks/{chunk.PYG4YVBA.js → chunk.2DXG2R3M.js} +2 -2
- package/dist/esm/chunks/chunk.2DXG2R3M.js.map +7 -0
- package/dist/esm/chunks/{chunk.UUX4QJ4D.js → chunk.3KQL7VAZ.js} +1 -1
- package/dist/esm/chunks/{chunk.UUX4QJ4D.js.map → chunk.3KQL7VAZ.js.map} +2 -2
- package/dist/esm/chunks/chunk.44IJE5UL.js +7 -0
- package/dist/esm/chunks/chunk.44IJE5UL.js.map +7 -0
- package/dist/esm/chunks/{chunk.MIYZJUXH.js → chunk.47A2CN5U.js} +2 -2
- package/dist/esm/chunks/{chunk.MIYZJUXH.js.map → chunk.47A2CN5U.js.map} +2 -2
- package/dist/esm/chunks/{chunk.OLNFXF3V.js → chunk.4BEI55KI.js} +2 -2
- package/dist/esm/chunks/{chunk.OLNFXF3V.js.map → chunk.4BEI55KI.js.map} +2 -2
- package/dist/esm/chunks/{chunk.EC6JSIQW.js → chunk.4DAIIJ37.js} +1 -1
- package/dist/esm/chunks/{chunk.EC6JSIQW.js.map → chunk.4DAIIJ37.js.map} +2 -2
- package/dist/esm/chunks/{chunk.B52LJRGH.js → chunk.4FSAAN6W.js} +2 -2
- package/dist/esm/chunks/{chunk.B52LJRGH.js.map → chunk.4FSAAN6W.js.map} +2 -2
- package/dist/esm/chunks/chunk.4NI63FGK.js +7 -0
- package/dist/esm/chunks/chunk.4NI63FGK.js.map +7 -0
- package/dist/esm/chunks/{chunk.KBMLP7UT.js → chunk.4WPFFNLH.js} +2 -2
- package/dist/esm/chunks/{chunk.KBMLP7UT.js.map → chunk.4WPFFNLH.js.map} +3 -3
- package/dist/esm/chunks/chunk.4X2OFZDL.js +7 -0
- package/dist/esm/chunks/chunk.4X2OFZDL.js.map +7 -0
- package/dist/esm/chunks/chunk.5FPFRE4H.js +7 -0
- package/dist/esm/chunks/chunk.5FPFRE4H.js.map +7 -0
- package/dist/esm/chunks/chunk.6OKJPSUE.js +7 -0
- package/dist/esm/chunks/chunk.6OKJPSUE.js.map +7 -0
- package/dist/esm/chunks/{chunk.AMFXGOSA.js → chunk.6YPD6CQM.js} +1 -1
- package/dist/esm/chunks/{chunk.AMFXGOSA.js.map → chunk.6YPD6CQM.js.map} +2 -2
- package/dist/esm/chunks/chunk.72AUOVCD.js +7 -0
- package/dist/esm/chunks/chunk.72AUOVCD.js.map +7 -0
- package/dist/esm/chunks/{chunk.X5JLUP7O.js → chunk.73AYD2BF.js} +2 -2
- package/dist/esm/chunks/{chunk.X5JLUP7O.js.map → chunk.73AYD2BF.js.map} +2 -2
- package/dist/esm/chunks/chunk.77Y3EABF.js +7 -0
- package/dist/esm/chunks/chunk.77Y3EABF.js.map +7 -0
- package/dist/esm/chunks/chunk.7A6MX6CS.js +7 -0
- package/dist/esm/chunks/chunk.7A6MX6CS.js.map +7 -0
- package/dist/esm/chunks/{chunk.V55E5JD5.js → chunk.7UKA4E5A.js} +2 -2
- package/dist/esm/chunks/{chunk.V55E5JD5.js.map → chunk.7UKA4E5A.js.map} +2 -2
- package/dist/esm/chunks/{chunk.GVQVA7P3.js → chunk.7XFU2W25.js} +1 -1
- package/dist/esm/chunks/{chunk.GVQVA7P3.js.map → chunk.7XFU2W25.js.map} +2 -2
- package/dist/esm/chunks/{chunk.MYNPY3AQ.js → chunk.AFLH5HUG.js} +2 -2
- package/dist/esm/chunks/{chunk.MYNPY3AQ.js.map → chunk.AFLH5HUG.js.map} +2 -2
- package/dist/esm/chunks/{chunk.24D46RLZ.js → chunk.ARJ3EVVO.js} +2 -2
- package/dist/esm/chunks/{chunk.24D46RLZ.js.map → chunk.ARJ3EVVO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.OOW3UKT4.js → chunk.BE7PZANN.js} +2 -2
- package/dist/esm/chunks/{chunk.OOW3UKT4.js.map → chunk.BE7PZANN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.3STDLL5U.js → chunk.BJE6O5ES.js} +2 -2
- package/dist/esm/chunks/{chunk.3STDLL5U.js.map → chunk.BJE6O5ES.js.map} +2 -2
- package/dist/esm/chunks/{chunk.2GY2VPJG.js → chunk.BJZ7RB5F.js} +1 -1
- package/dist/esm/chunks/{chunk.2GY2VPJG.js.map → chunk.BJZ7RB5F.js.map} +2 -2
- package/dist/esm/chunks/chunk.BTBHIIGI.js +7 -0
- package/dist/esm/chunks/chunk.BTBHIIGI.js.map +7 -0
- package/dist/esm/chunks/chunk.C7AN6FMW.js +7 -0
- package/dist/esm/chunks/chunk.C7AN6FMW.js.map +7 -0
- package/dist/esm/chunks/{chunk.NV2HNCQH.js → chunk.DFJUCHEO.js} +2 -2
- package/dist/esm/chunks/{chunk.NV2HNCQH.js.map → chunk.DFJUCHEO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.AWCBH5KW.js → chunk.DONAMICM.js} +1 -1
- package/dist/esm/chunks/{chunk.AWCBH5KW.js.map → chunk.DONAMICM.js.map} +2 -2
- package/dist/esm/chunks/chunk.DQJPIDVW.js +7 -0
- package/dist/esm/chunks/chunk.DQJPIDVW.js.map +7 -0
- package/dist/esm/chunks/{chunk.PBJEZJTY.js → chunk.DT7MZR5Y.js} +2 -2
- package/dist/esm/chunks/{chunk.PBJEZJTY.js.map → chunk.DT7MZR5Y.js.map} +2 -2
- package/dist/esm/chunks/chunk.DYNEJBYK.js +7 -0
- package/dist/esm/chunks/{chunk.O5I3ZMDA.js.map → chunk.DYNEJBYK.js.map} +2 -2
- package/dist/esm/chunks/chunk.E6CYXNS2.js +7 -0
- package/dist/esm/chunks/chunk.E6CYXNS2.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZFD3OE45.js → chunk.EGRUD7S7.js} +2 -2
- package/dist/esm/chunks/{chunk.ZFD3OE45.js.map → chunk.EGRUD7S7.js.map} +2 -2
- package/dist/esm/chunks/chunk.ESR2NHOS.js +7 -0
- package/dist/esm/chunks/chunk.ESR2NHOS.js.map +7 -0
- package/dist/esm/chunks/{chunk.55BOUOT6.js → chunk.F2B24WLK.js} +2 -2
- package/dist/esm/chunks/{chunk.55BOUOT6.js.map → chunk.F2B24WLK.js.map} +2 -2
- package/dist/esm/chunks/chunk.F3MP6AXF.js +29 -0
- package/dist/esm/chunks/chunk.F3MP6AXF.js.map +7 -0
- package/dist/esm/chunks/{chunk.Z4MN5NB5.js → chunk.FRYLJWYL.js} +2 -2
- package/dist/esm/chunks/{chunk.Z4MN5NB5.js.map → chunk.FRYLJWYL.js.map} +2 -2
- package/dist/esm/chunks/chunk.FVRSGKJD.js +7 -0
- package/dist/esm/chunks/chunk.FVRSGKJD.js.map +7 -0
- package/dist/esm/chunks/chunk.G3ZTZ4AN.js +7 -0
- package/dist/esm/chunks/chunk.G3ZTZ4AN.js.map +7 -0
- package/dist/esm/chunks/{chunk.MNPORZ4F.js → chunk.G45OZEIS.js} +2 -2
- package/dist/esm/chunks/{chunk.MNPORZ4F.js.map → chunk.G45OZEIS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.5PXABBKU.js → chunk.G5MGGEFP.js} +2 -2
- package/dist/esm/chunks/{chunk.5PXABBKU.js.map → chunk.G5MGGEFP.js.map} +2 -2
- package/dist/esm/chunks/{chunk.Y6FFG7XO.js → chunk.GO5A4GKZ.js} +1 -1
- package/dist/esm/chunks/{chunk.Y6FFG7XO.js.map → chunk.GO5A4GKZ.js.map} +2 -2
- package/dist/esm/chunks/{chunk.L54GENPD.js → chunk.H4Z4DHPA.js} +2 -2
- package/dist/esm/chunks/{chunk.L54GENPD.js.map → chunk.H4Z4DHPA.js.map} +2 -2
- package/dist/esm/chunks/chunk.HBMNXZES.js +7 -0
- package/dist/esm/chunks/chunk.HBMNXZES.js.map +7 -0
- package/dist/esm/chunks/{chunk.Y5GQ2BA7.js → chunk.HPDBSBQJ.js} +2 -2
- package/dist/esm/chunks/{chunk.Y5GQ2BA7.js.map → chunk.HPDBSBQJ.js.map} +2 -2
- package/dist/esm/chunks/{chunk.TLS4ALGU.js → chunk.HU27X3IT.js} +2 -2
- package/dist/esm/chunks/{chunk.TLS4ALGU.js.map → chunk.HU27X3IT.js.map} +2 -2
- package/dist/esm/chunks/{chunk.ORF746AF.js → chunk.HV6SPRC4.js} +2 -2
- package/dist/esm/chunks/{chunk.ORF746AF.js.map → chunk.HV6SPRC4.js.map} +2 -2
- package/dist/esm/chunks/chunk.I5BAZWUF.js +7 -0
- package/dist/esm/chunks/chunk.I5BAZWUF.js.map +7 -0
- package/dist/esm/chunks/chunk.IGTXLDZS.js +7 -0
- package/dist/esm/chunks/{chunk.BYRJ7577.js.map → chunk.IGTXLDZS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.GXUYYBVO.js → chunk.ILRWZHH3.js} +2 -2
- package/dist/esm/chunks/chunk.ILRWZHH3.js.map +7 -0
- package/dist/esm/chunks/{chunk.Z6S62LZJ.js → chunk.INCKI5IX.js} +2 -2
- package/dist/esm/chunks/{chunk.Z6S62LZJ.js.map → chunk.INCKI5IX.js.map} +2 -2
- package/dist/esm/chunks/{chunk.IMZ5PF4C.js → chunk.J2H5RXTX.js} +2 -2
- package/dist/esm/chunks/{chunk.IMZ5PF4C.js.map → chunk.J2H5RXTX.js.map} +2 -2
- package/dist/esm/chunks/{chunk.G76HB2FK.js → chunk.J2M2MXP2.js} +1 -1
- package/dist/esm/chunks/{chunk.G76HB2FK.js.map → chunk.J2M2MXP2.js.map} +2 -2
- package/dist/esm/chunks/{chunk.SVGEVCXA.js → chunk.J6WCFQSS.js} +2 -2
- package/dist/esm/chunks/{chunk.SVGEVCXA.js.map → chunk.J6WCFQSS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.HWVLZ44Q.js → chunk.JEN6YP2Q.js} +2 -2
- package/dist/esm/chunks/{chunk.HWVLZ44Q.js.map → chunk.JEN6YP2Q.js.map} +2 -2
- package/dist/esm/chunks/{chunk.JXY6MTP3.js → chunk.JHBCYICS.js} +2 -2
- package/dist/esm/chunks/{chunk.JXY6MTP3.js.map → chunk.JHBCYICS.js.map} +2 -2
- package/dist/esm/chunks/chunk.JHY2CKEH.js +7 -0
- package/dist/esm/chunks/{chunk.VW4JVRH7.js.map → chunk.JHY2CKEH.js.map} +2 -2
- package/dist/esm/chunks/{chunk.FL6SJHQU.js → chunk.K2C4W3CO.js} +2 -2
- package/dist/esm/chunks/{chunk.FL6SJHQU.js.map → chunk.K2C4W3CO.js.map} +3 -3
- package/dist/esm/chunks/chunk.K6AFP52A.js +7 -0
- package/dist/esm/chunks/chunk.K6AFP52A.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZAGCOV55.js → chunk.KE6GOYAB.js} +2 -2
- package/dist/esm/chunks/{chunk.ZAGCOV55.js.map → chunk.KE6GOYAB.js.map} +2 -2
- package/dist/esm/chunks/{chunk.B3IJU6XJ.js → chunk.KTGSZEAG.js} +1 -1
- package/dist/esm/chunks/{chunk.B3IJU6XJ.js.map → chunk.KTGSZEAG.js.map} +2 -2
- package/dist/esm/chunks/{chunk.BMFJLHDR.js → chunk.KU5CXXGS.js} +2 -2
- package/dist/esm/chunks/{chunk.BMFJLHDR.js.map → chunk.KU5CXXGS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.ALJ3FDXL.js → chunk.KZO4DT2S.js} +2 -2
- package/dist/esm/chunks/{chunk.ALJ3FDXL.js.map → chunk.KZO4DT2S.js.map} +3 -3
- package/dist/esm/chunks/{chunk.7MVBJ37L.js → chunk.LDN4HLF7.js} +2 -2
- package/dist/esm/chunks/{chunk.7MVBJ37L.js.map → chunk.LDN4HLF7.js.map} +2 -2
- package/dist/esm/chunks/chunk.LFLREB3C.js +7 -0
- package/dist/esm/chunks/chunk.LFLREB3C.js.map +7 -0
- package/dist/esm/chunks/{chunk.E37HEAJ5.js → chunk.LIKJD4SK.js} +1 -1
- package/dist/esm/chunks/{chunk.E37HEAJ5.js.map → chunk.LIKJD4SK.js.map} +2 -2
- package/dist/esm/chunks/{chunk.S76NW5JY.js → chunk.LYOQ2RGP.js} +2 -2
- package/dist/esm/chunks/{chunk.S76NW5JY.js.map → chunk.LYOQ2RGP.js.map} +2 -2
- package/dist/esm/chunks/chunk.MHOS3IHQ.js +7 -0
- package/dist/esm/chunks/chunk.MHOS3IHQ.js.map +7 -0
- package/dist/esm/chunks/{chunk.IARIRFXO.js → chunk.MLV25D2G.js} +2 -2
- package/dist/esm/chunks/{chunk.IARIRFXO.js.map → chunk.MLV25D2G.js.map} +2 -2
- package/dist/esm/chunks/{chunk.N24NHF7Y.js → chunk.MXTDW27J.js} +2 -2
- package/dist/esm/chunks/{chunk.N24NHF7Y.js.map → chunk.MXTDW27J.js.map} +2 -2
- package/dist/esm/chunks/{chunk.LZMYHIO2.js → chunk.MZLPUI6R.js} +1 -1
- package/dist/esm/chunks/{chunk.LZMYHIO2.js.map → chunk.MZLPUI6R.js.map} +2 -2
- package/dist/esm/chunks/{chunk.SLSVRMAS.js → chunk.N4PVZUJX.js} +2 -2
- package/dist/esm/chunks/{chunk.SLSVRMAS.js.map → chunk.N4PVZUJX.js.map} +2 -2
- package/dist/esm/chunks/{chunk.YG2KLPHA.js.map → chunk.NW7NV2A2.js} +7 -7
- package/dist/esm/chunks/chunk.NW7NV2A2.js.map +7 -0
- package/dist/esm/chunks/{chunk.LGEYSCS2.js → chunk.O4FB4BV5.js} +2 -2
- package/dist/esm/chunks/{chunk.LGEYSCS2.js.map → chunk.O4FB4BV5.js.map} +2 -2
- package/dist/esm/chunks/{chunk.N46G56GG.js → chunk.O73S5LF3.js} +2 -2
- package/dist/esm/chunks/{chunk.N46G56GG.js.map → chunk.O73S5LF3.js.map} +2 -2
- package/dist/esm/chunks/{chunk.BCP2YATB.js → chunk.OV4QNVJH.js} +2 -2
- package/dist/esm/chunks/{chunk.BCP2YATB.js.map → chunk.OV4QNVJH.js.map} +2 -2
- package/dist/esm/chunks/{chunk.OJFI5I6O.js → chunk.OZ5BPXNV.js} +2 -2
- package/dist/esm/chunks/{chunk.OJFI5I6O.js.map → chunk.OZ5BPXNV.js.map} +2 -2
- package/dist/esm/chunks/{chunk.VHKQHMK3.js → chunk.P3IA2WTO.js} +2 -2
- package/dist/esm/chunks/{chunk.VHKQHMK3.js.map → chunk.P3IA2WTO.js.map} +3 -3
- package/dist/esm/chunks/{chunk.HWQEGQDD.js → chunk.PALRSBSY.js} +2 -2
- package/dist/esm/chunks/{chunk.HWQEGQDD.js.map → chunk.PALRSBSY.js.map} +2 -2
- package/dist/esm/chunks/{chunk.R4NDFXVA.js → chunk.PN26D52V.js} +2 -2
- package/dist/esm/chunks/{chunk.R4NDFXVA.js.map → chunk.PN26D52V.js.map} +2 -2
- package/dist/esm/chunks/chunk.PYIFIHDK.js +7 -0
- package/dist/esm/chunks/chunk.PYIFIHDK.js.map +7 -0
- package/dist/esm/chunks/{chunk.WEUNLYMQ.js → chunk.RB5BTA5N.js} +2 -2
- package/dist/esm/chunks/{chunk.WEUNLYMQ.js.map → chunk.RB5BTA5N.js.map} +2 -2
- package/dist/esm/chunks/{chunk.NYMNX3S7.js → chunk.RBAVT3XQ.js} +2 -2
- package/dist/esm/chunks/{chunk.NYMNX3S7.js.map → chunk.RBAVT3XQ.js.map} +2 -2
- package/dist/esm/chunks/chunk.RE5X26QT.js +29 -0
- package/dist/esm/chunks/chunk.RE5X26QT.js.map +7 -0
- package/dist/esm/chunks/chunk.RG6CDWEX.js +7 -0
- package/dist/esm/chunks/chunk.RG6CDWEX.js.map +7 -0
- package/dist/esm/chunks/chunk.RHFNK6EE.js +7 -0
- package/dist/esm/chunks/chunk.RHFNK6EE.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZMXKZJRM.js → chunk.ROR6JMAE.js} +2 -2
- package/dist/esm/chunks/{chunk.ZMXKZJRM.js.map → chunk.ROR6JMAE.js.map} +2 -2
- package/dist/esm/chunks/chunk.RYMPSU4J.js +7 -0
- package/dist/esm/chunks/chunk.RYMPSU4J.js.map +7 -0
- package/dist/esm/chunks/{chunk.MBS5VMYY.js → chunk.SAQVWOVK.js} +2 -2
- package/dist/esm/chunks/{chunk.MBS5VMYY.js.map → chunk.SAQVWOVK.js.map} +3 -3
- package/dist/esm/chunks/chunk.SD4LLO5A.js +12 -0
- package/dist/esm/chunks/chunk.SD4LLO5A.js.map +7 -0
- package/dist/esm/chunks/{chunk.TCAOLSLI.js → chunk.SXTTEIIH.js} +2 -2
- package/dist/esm/chunks/{chunk.TCAOLSLI.js.map → chunk.SXTTEIIH.js.map} +2 -2
- package/dist/esm/chunks/{chunk.MWD47ZZU.js → chunk.T76JYRPR.js} +2 -2
- package/dist/esm/chunks/{chunk.MWD47ZZU.js.map → chunk.T76JYRPR.js.map} +3 -3
- package/dist/esm/chunks/chunk.TR5YMNJJ.js +7 -0
- package/dist/esm/chunks/chunk.TR5YMNJJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.DRXMITOO.js → chunk.TWZXQQQO.js} +2 -2
- package/dist/esm/chunks/{chunk.DRXMITOO.js.map → chunk.TWZXQQQO.js.map} +3 -3
- package/dist/esm/chunks/chunk.U6WGJELL.js +7 -0
- package/dist/esm/chunks/chunk.U6WGJELL.js.map +7 -0
- package/dist/esm/chunks/chunk.U724KSZU.js +7 -0
- package/dist/esm/chunks/chunk.U724KSZU.js.map +7 -0
- package/dist/esm/chunks/{chunk.LZHDRATV.js → chunk.UBD2DPQN.js} +2 -2
- package/dist/esm/chunks/{chunk.LZHDRATV.js.map → chunk.UBD2DPQN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.2ZQ3ZDPN.js → chunk.UF43SSFY.js} +2 -2
- package/dist/esm/chunks/{chunk.2ZQ3ZDPN.js.map → chunk.UF43SSFY.js.map} +2 -2
- package/dist/esm/chunks/chunk.ULIFS3UR.js +7 -0
- package/dist/esm/chunks/chunk.ULIFS3UR.js.map +7 -0
- package/dist/esm/chunks/{chunk.2LHBE2QZ.js → chunk.UT7QUGAO.js} +2 -2
- package/dist/esm/chunks/{chunk.2LHBE2QZ.js.map → chunk.UT7QUGAO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.STS5TIUV.js → chunk.V4TCOZLK.js} +1 -1
- package/dist/esm/chunks/chunk.V4TCOZLK.js.map +7 -0
- package/dist/esm/chunks/chunk.V7WKXEZC.js +7 -0
- package/dist/esm/chunks/chunk.V7WKXEZC.js.map +7 -0
- package/dist/esm/chunks/{chunk.HHJJJ73Y.js → chunk.VAKNDCLP.js} +2 -2
- package/dist/esm/chunks/{chunk.HHJJJ73Y.js.map → chunk.VAKNDCLP.js.map} +3 -3
- package/dist/esm/chunks/chunk.VC2BG2RS.js +7 -0
- package/dist/esm/chunks/chunk.VC2BG2RS.js.map +7 -0
- package/dist/esm/chunks/{chunk.3L7T5WYL.js → chunk.WP4QOOIS.js} +2 -2
- package/dist/esm/chunks/{chunk.3L7T5WYL.js.map → chunk.WP4QOOIS.js.map} +2 -2
- package/dist/esm/chunks/chunk.WY7DECJD.js +7 -0
- package/dist/esm/chunks/chunk.WY7DECJD.js.map +7 -0
- package/dist/esm/chunks/{chunk.YONRMJU5.js → chunk.X5LGVZGO.js} +2 -2
- package/dist/esm/chunks/chunk.X5LGVZGO.js.map +7 -0
- package/dist/esm/chunks/{chunk.HPJ4AQIE.js → chunk.XHV3GQ7L.js} +2 -2
- package/dist/esm/chunks/{chunk.HPJ4AQIE.js.map → chunk.XHV3GQ7L.js.map} +2 -2
- package/dist/esm/chunks/{chunk.5TVWDATE.js → chunk.XUW3GG46.js} +2 -2
- package/dist/esm/chunks/{chunk.5TVWDATE.js.map → chunk.XUW3GG46.js.map} +2 -2
- package/dist/esm/chunks/chunk.XZ4WI7VK.js +7 -0
- package/dist/esm/chunks/chunk.XZ4WI7VK.js.map +7 -0
- package/dist/esm/chunks/{chunk.MMVZJLXE.js → chunk.Y4GKBJGI.js} +2 -2
- package/dist/esm/chunks/{chunk.MMVZJLXE.js.map → chunk.Y4GKBJGI.js.map} +2 -2
- package/dist/esm/chunks/chunk.Y66GSZJB.js +7 -0
- package/dist/esm/chunks/{chunk.5BDTX7CR.js.map → chunk.Y66GSZJB.js.map} +3 -3
- package/dist/esm/chunks/chunk.Y72NANFX.js +7 -0
- package/dist/esm/chunks/chunk.Y72NANFX.js.map +7 -0
- package/dist/esm/chunks/chunk.YBEBD4CN.js +7 -0
- package/dist/esm/chunks/chunk.YBEBD4CN.js.map +7 -0
- package/dist/esm/chunks/{chunk.D4SNVKDA.js → chunk.YI4JTY4T.js} +1 -1
- package/dist/esm/chunks/{chunk.D4SNVKDA.js.map → chunk.YI4JTY4T.js.map} +2 -2
- package/dist/esm/chunks/{chunk.E43TT4RI.js → chunk.YPZNIYQL.js} +1 -1
- package/dist/esm/chunks/{chunk.E43TT4RI.js.map → chunk.YPZNIYQL.js.map} +2 -2
- package/dist/esm/chunks/{chunk.F5I55MXD.js → chunk.ZUNZKRRK.js} +2 -2
- package/dist/esm/chunks/{chunk.F5I55MXD.js.map → chunk.ZUNZKRRK.js.map} +2 -2
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/base/index.js +1 -1
- package/dist/esm/core/delegates/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/mask/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/divider/index.js +1 -1
- package/dist/esm/drawer/base/index.js +1 -1
- package/dist/esm/drawer/drawer/index.js +1 -1
- package/dist/esm/drawer/index.js +1 -1
- package/dist/esm/drawer/mini-drawer/index.js +1 -1
- package/dist/esm/drawer/modal-drawer/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/floating-label/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/inline-message/index.js +1 -1
- package/dist/esm/keyboard-shortcut/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/linear-progress/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/page-state/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/product-icon/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/scaffold/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/option-group/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/skeleton/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +7 -0
- package/dist/esm/stack/index.js.map +7 -0
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/toolbar/index.js +1 -1
- package/dist/esm/tooltip/index.js +1 -1
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/view-switcher/index.js +1 -1
- package/dist/esm/view-switcher/view/index.js +1 -1
- package/dist/floating-action-button/forge-floating-action-button.css +1 -1
- package/dist/floating-label/forge-floating-label.css +1 -1
- package/dist/forge.css +1 -1
- package/dist/utils/forge-utils.css +1 -1
- package/esm/app-bar/app-bar.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +3 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +5 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.d.ts +1 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.js +2 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +4 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +14 -0
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +2 -0
- package/esm/app-bar/notification-button/app-bar-notification-button.js +9 -2
- package/esm/autocomplete/autocomplete-adapter.d.ts +11 -10
- package/esm/autocomplete/autocomplete-adapter.js +4 -1
- package/esm/autocomplete/autocomplete-constants.d.ts +11 -12
- package/esm/autocomplete/autocomplete-constants.js +1 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +14 -7
- package/esm/autocomplete/autocomplete-foundation.js +26 -4
- package/esm/autocomplete/autocomplete-utils.d.ts +4 -5
- package/esm/autocomplete/autocomplete.d.ts +10 -4
- package/esm/autocomplete/autocomplete.js +10 -3
- package/esm/badge/badge.js +1 -1
- package/esm/busy-indicator/busy-indicator.js +2 -2
- package/esm/button/button-constants.d.ts +1 -0
- package/esm/button/button-constants.js +2 -1
- package/esm/button/button.d.ts +1 -1
- package/esm/button/button.js +6 -7
- package/esm/calendar/calendar-foundation.js +1 -0
- package/esm/calendar/calendar.js +1 -1
- package/esm/card/card.js +1 -1
- package/esm/checkbox/checkbox-adapter.d.ts +1 -2
- package/esm/checkbox/checkbox-adapter.js +12 -8
- package/esm/checkbox/checkbox-foundation.js +0 -3
- package/esm/chip-field/chip-field-adapter.d.ts +2 -0
- package/esm/chip-field/chip-field-adapter.js +8 -3
- package/esm/chip-field/chip-field-foundation.js +1 -0
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/chips/chip/chip-adapter.d.ts +17 -2
- package/esm/chips/chip/chip-adapter.js +90 -15
- package/esm/chips/chip/chip-constants.d.ts +4 -0
- package/esm/chips/chip/chip-constants.js +6 -2
- package/esm/chips/chip/chip-foundation.d.ts +2 -0
- package/esm/chips/chip/chip-foundation.js +38 -13
- package/esm/chips/chip/chip.d.ts +2 -0
- package/esm/chips/chip/chip.js +5 -2
- package/esm/chips/chip-set/chip-set-adapter.d.ts +4 -0
- package/esm/chips/chip-set/chip-set-adapter.js +24 -0
- package/esm/chips/chip-set/chip-set-foundation.d.ts +3 -0
- package/esm/chips/chip-set/chip-set-foundation.js +8 -0
- package/esm/chips/chip-set/chip-set.d.ts +1 -0
- package/esm/chips/chip-set/chip-set.js +3 -0
- package/esm/circular-progress/circular-progress.js +1 -1
- package/esm/color-picker/color-picker-foundation.d.ts +1 -0
- package/esm/color-picker/color-picker-foundation.js +19 -8
- package/esm/core/mask/intermediate-time-parser.d.ts +49 -0
- package/esm/core/mask/intermediate-time-parser.js +106 -0
- package/esm/core/mask/time-input-mask.d.ts +0 -1
- package/esm/core/mask/time-input-mask.js +79 -58
- package/esm/core/mask/time-segment-parser.d.ts +22 -0
- package/esm/core/mask/time-segment-parser.js +46 -0
- package/esm/core/utils/date-utils.js +2 -2
- package/esm/core/utils/time-utils.d.ts +1 -0
- package/esm/core/utils/time-utils.js +20 -3
- package/esm/core/utils/utils.d.ts +0 -6
- package/esm/core/utils/utils.js +0 -10
- package/esm/date-picker/base/base-date-picker-foundation.js +2 -1
- package/esm/date-picker/base/base-date-picker.d.ts +2 -2
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +2 -2
- package/esm/date-range-picker/date-range-picker-foundation.js +1 -1
- package/esm/dialog/dialog-adapter.d.ts +0 -2
- package/esm/dialog/dialog-adapter.js +1 -10
- package/esm/dialog/dialog-foundation.js +2 -3
- package/esm/drawer/modal-drawer/modal-drawer.js +1 -1
- package/esm/file-picker/file-picker-adapter.js +3 -2
- package/esm/file-picker/file-picker-foundation.d.ts +2 -0
- package/esm/file-picker/file-picker-foundation.js +15 -38
- package/esm/file-picker/file-picker.d.ts +1 -0
- package/esm/file-picker/file-picker.js +3 -0
- package/esm/floating-action-button/floating-action-button-constants.js +1 -1
- package/esm/icon-button/icon-button-constants.js +1 -1
- package/esm/icon-button/icon-button.d.ts +1 -1
- package/esm/icon-button/icon-button.js +6 -6
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -0
- package/esm/linear-progress/linear-progress.js +2 -2
- package/esm/list/list-item/list-item-foundation.js +1 -2
- package/esm/list/list-item/list-item.js +1 -1
- package/esm/list-dropdown/cascading-list-dropdown-aware-foundation.d.ts +5 -2
- package/esm/list-dropdown/cascading-list-dropdown-aware-foundation.js +3 -1
- package/esm/list-dropdown/list-dropdown-adapter.d.ts +2 -0
- package/esm/list-dropdown/list-dropdown-adapter.js +6 -0
- package/esm/list-dropdown/list-dropdown-aware-foundation.d.ts +8 -0
- package/esm/list-dropdown/list-dropdown-aware-foundation.js +14 -0
- package/esm/list-dropdown/list-dropdown-aware.d.ts +11 -2
- package/esm/list-dropdown/list-dropdown-aware.js +12 -0
- package/esm/list-dropdown/list-dropdown-constants.d.ts +10 -3
- package/esm/list-dropdown/list-dropdown-constants.js +2 -0
- package/esm/list-dropdown/list-dropdown-foundation.js +5 -6
- package/esm/list-dropdown/list-dropdown-utils.d.ts +1 -0
- package/esm/list-dropdown/list-dropdown-utils.js +40 -18
- package/esm/menu/menu-adapter.d.ts +2 -0
- package/esm/menu/menu-adapter.js +7 -0
- package/esm/menu/menu-constants.js +1 -1
- package/esm/menu/menu-foundation.d.ts +12 -3
- package/esm/menu/menu-foundation.js +28 -17
- package/esm/menu/menu.d.ts +6 -1
- package/esm/menu/menu.js +9 -3
- package/esm/popup/popup-adapter.js +9 -1
- package/esm/popup/popup-constants.d.ts +1 -0
- package/esm/popup/popup-constants.js +2 -1
- package/esm/popup/popup-foundation.d.ts +4 -0
- package/esm/popup/popup-foundation.js +7 -0
- package/esm/popup/popup.d.ts +2 -0
- package/esm/popup/popup.js +4 -1
- package/esm/profile-card/profile-card.js +1 -1
- package/esm/quantity-field/quantity-field-adapter.d.ts +2 -0
- package/esm/quantity-field/quantity-field-adapter.js +8 -0
- package/esm/quantity-field/quantity-field-foundation.js +1 -0
- package/esm/quantity-field/quantity-field.js +6 -0
- package/esm/radio/radio-adapter.d.ts +3 -3
- package/esm/radio/radio-adapter.js +17 -15
- package/esm/radio/radio-foundation.js +1 -1
- package/esm/ripple/forge-ripple.d.ts +4 -0
- package/esm/ripple/forge-ripple.js +8 -0
- package/esm/select/core/base-select-adapter.js +8 -6
- package/esm/select/core/base-select-constants.d.ts +2 -0
- package/esm/select/core/base-select-constants.js +3 -1
- package/esm/select/core/base-select-foundation.d.ts +0 -9
- package/esm/select/core/base-select-foundation.js +5 -26
- package/esm/select/core/select-utils.js +1 -1
- package/esm/select/option-group/option-group.d.ts +12 -1
- package/esm/select/option-group/option-group.js +7 -0
- package/esm/select/select/select.js +5 -3
- package/esm/slider/slider.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/stack/index.d.ts +10 -0
- package/esm/stack/index.js +14 -0
- package/esm/stack/stack-adapter.d.ts +15 -0
- package/esm/stack/stack-adapter.js +18 -0
- package/esm/stack/stack-constants.d.ts +29 -0
- package/esm/stack/stack-constants.js +36 -0
- package/esm/stack/stack-foundation.d.ts +39 -0
- package/esm/stack/stack-foundation.js +70 -0
- package/esm/stack/stack.d.ts +41 -0
- package/esm/stack/stack.js +74 -0
- package/esm/switch/switch.js +38 -13
- package/esm/table/table-foundation.d.ts +7 -0
- package/esm/table/table-foundation.js +9 -0
- package/esm/table/table-utils.js +6 -3
- package/esm/table/table.d.ts +7 -0
- package/esm/table/table.js +8 -0
- package/esm/table/types.d.ts +8 -4
- package/esm/text-field/text-field.js +1 -1
- package/esm/time-picker/time-picker-adapter.d.ts +4 -0
- package/esm/time-picker/time-picker-adapter.js +8 -0
- package/esm/time-picker/time-picker-component-delegate.js +1 -6
- package/esm/time-picker/time-picker-foundation.d.ts +3 -0
- package/esm/time-picker/time-picker-foundation.js +46 -14
- package/esm/toast/toast.js +1 -1
- package/esm/toolbar/toolbar.js +2 -2
- package/esm/tooltip/tooltip-foundation.d.ts +1 -0
- package/esm/tooltip/tooltip-foundation.js +3 -0
- package/esm/tooltip/tooltip.js +1 -1
- package/esm/view-switcher/view-switcher.js +1 -1
- package/package.json +31 -4
- package/styles/busy-indicator/_mixins.scss +1 -0
- package/styles/chip-field/_selector.scss +12 -13
- package/styles/chip-field/chip-field.scss +1 -1
- package/styles/chips/chip/_mixins.scss +19 -6
- package/styles/field/_base.scss +2 -2
- package/styles/field/_selector.scss +1 -1
- package/styles/list/list-item/_mixins.scss +28 -17
- package/styles/list/list-item/_variables.scss +13 -4
- package/styles/popup/popup.scss +4 -0
- package/styles/stack/_mixins.scss +49 -0
- package/styles/stack/_variables.scss +6 -0
- package/styles/stack/stack.scss +46 -0
- package/styles/toolbar/_mixins.scss +1 -2
- package/styles/toolbar/toolbar.scss +13 -0
- package/styles/view-switcher/_mixins.scss +2 -0
- package/dist/esm/chunks/chunk.2CEW64ZM.js +0 -7
- package/dist/esm/chunks/chunk.2CEW64ZM.js.map +0 -7
- package/dist/esm/chunks/chunk.36VS7FMU.js +0 -7
- package/dist/esm/chunks/chunk.36VS7FMU.js.map +0 -7
- package/dist/esm/chunks/chunk.3MP6OFVU.js +0 -7
- package/dist/esm/chunks/chunk.3MP6OFVU.js.map +0 -7
- package/dist/esm/chunks/chunk.4K3IV4GI.js +0 -7
- package/dist/esm/chunks/chunk.4K3IV4GI.js.map +0 -7
- package/dist/esm/chunks/chunk.5BDTX7CR.js +0 -7
- package/dist/esm/chunks/chunk.5EQPGUZH.js +0 -7
- package/dist/esm/chunks/chunk.5EQPGUZH.js.map +0 -7
- package/dist/esm/chunks/chunk.6LXDG4W5.js +0 -7
- package/dist/esm/chunks/chunk.6LXDG4W5.js.map +0 -7
- package/dist/esm/chunks/chunk.7R6TYPPS.js +0 -7
- package/dist/esm/chunks/chunk.7R6TYPPS.js.map +0 -7
- package/dist/esm/chunks/chunk.7TDB3VFH.js +0 -7
- package/dist/esm/chunks/chunk.7TDB3VFH.js.map +0 -7
- package/dist/esm/chunks/chunk.BCD4AAI2.js +0 -7
- package/dist/esm/chunks/chunk.BCD4AAI2.js.map +0 -7
- package/dist/esm/chunks/chunk.BTI5I25G.js +0 -12
- package/dist/esm/chunks/chunk.BTI5I25G.js.map +0 -7
- package/dist/esm/chunks/chunk.BYRJ7577.js +0 -7
- package/dist/esm/chunks/chunk.DB2WESQC.js +0 -7
- package/dist/esm/chunks/chunk.DB2WESQC.js.map +0 -7
- package/dist/esm/chunks/chunk.DLAIQJHL.js +0 -7
- package/dist/esm/chunks/chunk.DLAIQJHL.js.map +0 -7
- package/dist/esm/chunks/chunk.DURRORXO.js +0 -29
- package/dist/esm/chunks/chunk.DURRORXO.js.map +0 -7
- package/dist/esm/chunks/chunk.EDU7RQD7.js +0 -7
- package/dist/esm/chunks/chunk.EDU7RQD7.js.map +0 -7
- package/dist/esm/chunks/chunk.ETIN6DEM.js +0 -7
- package/dist/esm/chunks/chunk.ETIN6DEM.js.map +0 -7
- package/dist/esm/chunks/chunk.F2GXZPID.js +0 -7
- package/dist/esm/chunks/chunk.F2GXZPID.js.map +0 -7
- package/dist/esm/chunks/chunk.F3Q62EMG.js +0 -7
- package/dist/esm/chunks/chunk.F3Q62EMG.js.map +0 -7
- package/dist/esm/chunks/chunk.GEMZPO6Z.js +0 -7
- package/dist/esm/chunks/chunk.GEMZPO6Z.js.map +0 -7
- package/dist/esm/chunks/chunk.GXUYYBVO.js.map +0 -7
- package/dist/esm/chunks/chunk.HYMB3XDK.js +0 -9
- package/dist/esm/chunks/chunk.HYMB3XDK.js.map +0 -7
- package/dist/esm/chunks/chunk.JMXJXZTS.js +0 -7
- package/dist/esm/chunks/chunk.JMXJXZTS.js.map +0 -7
- package/dist/esm/chunks/chunk.M4KJNCLO.js +0 -7
- package/dist/esm/chunks/chunk.M4KJNCLO.js.map +0 -7
- package/dist/esm/chunks/chunk.MBWEYW6M.js +0 -7
- package/dist/esm/chunks/chunk.MBWEYW6M.js.map +0 -7
- package/dist/esm/chunks/chunk.O2R6MBT5.js +0 -7
- package/dist/esm/chunks/chunk.O2R6MBT5.js.map +0 -7
- package/dist/esm/chunks/chunk.O5I3ZMDA.js +0 -7
- package/dist/esm/chunks/chunk.ON6FJ2D6.js +0 -7
- package/dist/esm/chunks/chunk.ON6FJ2D6.js.map +0 -7
- package/dist/esm/chunks/chunk.PCSCKTFS.js +0 -7
- package/dist/esm/chunks/chunk.PCSCKTFS.js.map +0 -7
- package/dist/esm/chunks/chunk.PYG4YVBA.js.map +0 -7
- package/dist/esm/chunks/chunk.Q3RRONZQ.js +0 -7
- package/dist/esm/chunks/chunk.Q3RRONZQ.js.map +0 -7
- package/dist/esm/chunks/chunk.QH4DLM3R.js +0 -7
- package/dist/esm/chunks/chunk.QH4DLM3R.js.map +0 -7
- package/dist/esm/chunks/chunk.QIJHHDYF.js +0 -7
- package/dist/esm/chunks/chunk.QIJHHDYF.js.map +0 -7
- package/dist/esm/chunks/chunk.QMRLSOAB.js +0 -7
- package/dist/esm/chunks/chunk.QMRLSOAB.js.map +0 -7
- package/dist/esm/chunks/chunk.QZHEP4X2.js +0 -29
- package/dist/esm/chunks/chunk.QZHEP4X2.js.map +0 -7
- package/dist/esm/chunks/chunk.STS5TIUV.js.map +0 -7
- package/dist/esm/chunks/chunk.UOWU5VVK.js +0 -7
- package/dist/esm/chunks/chunk.UOWU5VVK.js.map +0 -7
- package/dist/esm/chunks/chunk.VW4JVRH7.js +0 -7
- package/dist/esm/chunks/chunk.WOHCW6KW.js +0 -7
- package/dist/esm/chunks/chunk.WOHCW6KW.js.map +0 -7
- package/dist/esm/chunks/chunk.WU24GAQY.js +0 -7
- package/dist/esm/chunks/chunk.WU24GAQY.js.map +0 -7
- package/dist/esm/chunks/chunk.XSZ4S77A.js +0 -7
- package/dist/esm/chunks/chunk.XSZ4S77A.js.map +0 -7
- package/dist/esm/chunks/chunk.Y4L7AVUS.js +0 -7
- package/dist/esm/chunks/chunk.Y4L7AVUS.js.map +0 -7
- package/dist/esm/chunks/chunk.YG2KLPHA.js +0 -7
- package/dist/esm/chunks/chunk.YONRMJU5.js.map +0 -7
- package/dist/esm/chunks/chunk.YWRCWMNO.js +0 -7
- package/dist/esm/chunks/chunk.YWRCWMNO.js.map +0 -7
- package/dist/esm/chunks/chunk.ZPBGKHHM.js +0 -7
- package/dist/esm/chunks/chunk.ZPBGKHHM.js.map +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{b,c as L}from"./chunk.WY7DECJD.js";import{b as z}from"./chunk.Y66GSZJB.js";import{a as C}from"./chunk.KTGSZEAG.js";import{a as I,b as x}from"./chunk.BE7PZANN.js";import{a as E,e as w,g as m,l as R}from"./chunk.Y4GKBJGI.js";import{f as v,g as y,s as k}from"./chunk.PN26D52V.js";import{k as _}from"./chunk.J2M2MXP2.js";import{a as g,b as h,f as p}from"./chunk.MCIQXNKY.js";var D=`${x}radio`,A={RADIO:"mdc-radio",RADIO_DENSE:"forge-radio--dense",DISABLED:"mdc-radio--disabled",WRAPPER_DISABLED:"forge-radio-wrapper--disabled",CHECKED:"forge-radio--checked",FOCUSED:"forge-radio--focused",ENABLED:"forge-radio--enabled"},S={WRAPPER:".forge-radio-wrapper",RADIO:".mdc-radio",RADIO_INPUT:'input[type="radio"]',LABEL:"label"},O={DENSE:"dense",ROLE:"role",RADIOGROUP_ROLE:"radiogroup",SLOT:"slot"},N=["checked","disabled"],i={elementName:D,classes:A,selectors:S,attributes:O,inputProperties:N};var d=class{constructor(e){this._adapter=e;this._dense=!1}connect(){this._adapter.connect(),this._adapter.deferRippleInitialization(),this._focusListenerCallback=()=>this._adapter.syncFocusedStateWithInput(),this._disabledListenerCallback=()=>this._adapter.syncDisabledStateWithInput(),this._syncRadiogroupCheckStyles=()=>this._adapter.syncRadiogroupCheckStyles(),this._addFocusEventListeners(),this._addInputDisabledListener(),this._extendNativeInputSetter(),this._addRadioChangeListener(),this._adapter.syncCheckedStateWithInput(),this._adapter.syncDisabledStateWithInput(),this._adapter.syncFocusedStateWithInput(),this._applyDense(),this.syncCheckedState()}disconnect(){this._removeFocusEventListeners(),this._removeInputDisabledListener(),this._adapter.revertNativeInputSetter(),this._removeRadioChangeListener(),this._adapter.destroyRipple()}syncCheckedState(){this._adapter.syncCheckedStateWithInput()}_applyDense(){this._dense?(this._adapter.addRootClass(i.classes.RADIO_DENSE),this._adapter.setHostAttribute(i.attributes.DENSE)):(this._adapter.removeRootClass(i.classes.RADIO_DENSE),this._adapter.removeHostAttribute(i.attributes.DENSE))}_extendNativeInputSetter(){this._adapter.extendNativeInputSetter(this._syncRadiogroupCheckStyles)}_addRadioChangeListener(){this._adapter.addInputEventListener("change",this._syncRadiogroupCheckStyles)}_removeRadioChangeListener(){this._adapter.removeInputEventListener("change",this._syncRadiogroupCheckStyles)}_addFocusEventListeners(){this._adapter.addInputEventListener("focus",this._focusListenerCallback),this._adapter.addInputEventListener("blur",this._focusListenerCallback)}_removeFocusEventListeners(){this._adapter.removeInputEventListener("focus",this._focusListenerCallback),this._adapter.removeInputEventListener("blur",this._focusListenerCallback)}_addInputDisabledListener(){this._adapter.addInputDisabledAttributeChangeListener(this._disabledListenerCallback)}_removeInputDisabledListener(){this._adapter.removeInputDisabledAttributeChangeListener()}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._applyDense())}};var c=class{constructor(e){this._component=e;this._rootElement=m(this._component,i.selectors.RADIO),this._containerElement=m(this._component,i.selectors.WRAPPER)}get root(){return this._rootElement}get unbounded(){return!0}get disabled(){return this._isDisabled()}connect(){let e=this._component.querySelector(i.selectors.LABEL);e&&e.setAttribute(i.attributes.SLOT,i.selectors.LABEL)}async deferRippleInitialization(){let e=await z(this._rootElement);this._rippleInstance||(this._rippleInstance=this._createRipple(),e==="focusin"&&this._rippleInstance.handleFocus())}destroyRipple(){var e;(e=this._rippleInstance)==null||e.destroy(),this._rippleInstance=void 0}setHostAttribute(e,t=""){this._component.setAttribute(e,t)}removeHostAttribute(e){this._component.removeAttribute(e)}addRootClass(e){this._rootElement.classList.add(e)}removeRootClass(e){this._rootElement.classList.remove(e)}addContainerClass(e){this._containerElement.classList.add(e)}removeContainerClass(e){this._containerElement.classList.remove(e)}syncDisabledStateWithInput(){this.inputDisabled?(this.addRootClass(i.classes.DISABLED),this.removeRootClass(i.classes.ENABLED),this.addContainerClass(i.classes.WRAPPER_DISABLED)):(this.addRootClass(i.classes.ENABLED),this.removeRootClass(i.classes.DISABLED),this.removeContainerClass(i.classes.WRAPPER_DISABLED))}syncFocusedStateWithInput(){k()===this._inputElement?this.addRootClass(i.classes.FOCUSED):this.removeRootClass(i.classes.FOCUSED)}syncCheckedStateWithInput(){this.inputChecked?this.addRootClass(i.classes.CHECKED):this.removeRootClass(i.classes.CHECKED)}addInputEventListener(e,t){!this._inputElement||this._inputElement.addEventListener(e,t)}removeInputEventListener(e,t){!this._inputElement||this._inputElement.removeEventListener(e,t)}addInputDisabledAttributeChangeListener(e){this._setupInputDisabledAttributeMutationObserver(e)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}getRadiosFromContainingRadiogroup(){let e=this._getContainingRadioGroup(this._component);return e==null?null:e.querySelectorAll(i.elementName)}syncRadiogroupCheckStyles(){let e=this.getRadiosFromContainingRadiogroup();e&&e.forEach(t=>t.syncCheckedState())}extendNativeInputSetter(e){if(!this._inputElement)return;let t=this._inputElement,r=Object.getPrototypeOf(t);i.inputProperties.forEach(o=>{let a=Object.getOwnPropertyDescriptor(r,o);if(!!this._validPropertyDescriptor(a)&&a){let f={configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:l=>{var s;(s=a.set)==null||s.call(t,l),e()}};Object.defineProperty(t,o,f)}})}revertNativeInputSetter(){if(!this._inputElement)return;let e=this._inputElement,t=Object.getPrototypeOf(e);i.inputProperties.forEach(r=>{let o=Object.getOwnPropertyDescriptor(t,r);!this._validPropertyDescriptor(o)||Object.defineProperty(e,r,o)})}_validPropertyDescriptor(e){return!!e&&typeof e.set=="function"}_getContainingRadioGroup(e){if(!e||!e.parentElement)throw new Error('Unable to locate ancestor element with role="radiogroup". When using radios, a parent with this attribute must be applied.');let t=e.parentElement,r=t.getAttribute(i.attributes.ROLE);return!!r&&r.toLocaleLowerCase()===i.attributes.RADIOGROUP_ROLE.toLocaleLowerCase()?t:this._getContainingRadioGroup(t)}_setupInputDisabledAttributeMutationObserver(e){if(!this._inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let t=o=>this._inputDisabledAttributeMutationCallback(o,e);this._inputAttributeMutationObserver=new MutationObserver(t);let r={attributes:!0,attributeOldValue:!0,attributeFilter:["disabled"]};this._inputAttributeMutationObserver.observe(this._inputElement,r)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(e,t){for(let r of e)r.type!=="attributes"||!r.attributeName||r.attributeName!=="disabled"||r.target[r.attributeName]===r.oldValue||t()}get inputDisabled(){return this._inputElement?this._inputElement.disabled:!1}get inputChecked(){return this._inputElement?this._inputElement.checked:!1}get _inputElement(){return this._nativeInputElement||(this._nativeInputElement=this._component.querySelector(i.selectors.RADIO_INPUT)),this._nativeInputElement}_isDisabled(){return this._inputElement?this._inputElement.disabled:!1}_createRipple(){let e=h(g({},b.createAdapter(this)),{deregisterInteractionHandler:(t,r)=>{this._inputElement&&this._inputElement.removeEventListener(t,r,{passive:!0})},isSurfaceActive:()=>this._inputElement?this._inputElement.matches(":active"):!1,isUnbounded:()=>Boolean(this.unbounded),registerInteractionHandler:(t,r)=>{this._inputElement&&this._inputElement.addEventListener(t,r,{passive:!0})},isSurfaceDisabled:()=>this._inputElement?this._inputElement.disabled:!1,addClass:t=>v(t,this._rootElement),removeClass:t=>y(t,this._rootElement),updateCssVariable:(t,r)=>this._rootElement.style.setProperty(t,r)});return new b(this._rootElement,new L(e))}};var P='<template><div class="forge-radio-wrapper forge-form-field" part="root"><div class="mdc-radio" part="container"><slot></slot><div class="mdc-radio__background" part="background"><div class="mdc-radio__outer-circle" part="outer-circle"></div><div class="mdc-radio__inner-circle" part="inner-circle"></div></div><div class="mdc-radio__ripple" part="ripple-container"></div></div><slot name="label"></slot></div></template>',M='.mdc-radio{padding:10px;display:inline-block;position:relative;-webkit-box-flex:0;flex:0 0 auto;-webkit-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.54);border-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-radio.forge-radio--enabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__inner-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio .mdc-radio__background::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio .mdc-radio__background::before{top:-10px;left:-10px;width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio__background{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;-webkit-transform:scale(0,0);transform:scale(0,0);border-radius:50%;opacity:0;pointer-events:none;content:"";-webkit-transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transform:scale(0,0);transform:scale(0,0);border-width:10px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio ::slotted(input[type=radio]){position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;top:0;right:0;left:0;width:40px;height:40px}.mdc-radio.forge-radio--dense{padding:4px;margin:0}.mdc-radio.forge-radio--dense .mdc-radio__background::before{top:-4px;left:-4px;width:28px;height:28px}.mdc-radio.forge-radio--dense .mdc-radio__native-control{top:0;right:0;left:0;width:28px;height:28px}.mdc-radio.forge-radio--dense ::slotted(input[type=radio]){width:28px;height:28px}.mdc-radio--disabled+::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-radio--checked .mdc-radio__background,.mdc-radio--disabled .mdc-radio__background{-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled .mdc-radio__background{cursor:default}.forge-radio--focused .mdc-radio__background::before{-webkit-transform:scale(1);transform:scale(1);opacity:.12;-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-radio{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-radio .mdc-radio__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-radio .mdc-radio__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-radio.mdc-ripple-upgraded--unbounded .mdc-radio__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-radio.mdc-ripple-upgraded--foreground-activation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-radio.mdc-ripple-upgraded--foreground-deactivation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after,.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-ripple-surface--hover .mdc-radio__ripple::before,.mdc-radio:hover .mdc-radio__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__ripple::before,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-radio:not(.mdc-ripple-upgraded) .mdc-radio__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-radio:not(.mdc-ripple-upgraded):active .mdc-radio__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-radio.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__background::before,.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__background::before{content:none}.mdc-radio__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.forge-radio-wrapper--disabled{cursor:not-allowed}.forge-radio-wrapper--disabled ::slotted(label){cursor:not-allowed}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field ::slotted([slot=label]){-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~::slotted([slot=label]){padding-left:8px}.forge-form-field--align-end ::slotted([slot=label]){-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}:host{display:inline-block}:host([hidden]){display:none}',n=class extends R{constructor(){super();w(this,P,M),this._foundation=new d(new c(this))}static get observedAttributes(){return[i.attributes.DENSE]}connectedCallback(){this._ensureRadioInputElement().then(()=>this._foundation.connect())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,r,o){switch(t){case i.attributes.DENSE:this.dense=_(o);break}}_ensureRadioInputElement(){return new Promise(t=>{if(this.querySelector(i.selectors.RADIO_INPUT)){t();return}let o=new MutationObserver(a=>{a.reduce((l,s)=>l+s.addedNodes.length,0)>0&&this.querySelector(i.selectors.RADIO_INPUT)&&(o.disconnect(),t())});o.observe(this,{childList:!0,subtree:!0})})}syncCheckedState(){this._foundation.syncCheckedState()}};p([C()],n.prototype,"dense",2),n=p([I({name:i.elementName})],n);function re(){E(n)}export{i as a,n as b,re as c};
|
|
7
|
+
//# sourceMappingURL=chunk.72AUOVCD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/radio/radio-constants.ts", "../../src/radio/radio-foundation.ts", "../../src/radio/radio-adapter.ts", "../../src/radio/radio.ts", "../../src/radio/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}radio`;\n\nconst classes = {\n RADIO: 'mdc-radio',\n RADIO_DENSE: 'forge-radio--dense',\n DISABLED: 'mdc-radio--disabled',\n WRAPPER_DISABLED: 'forge-radio-wrapper--disabled',\n CHECKED: 'forge-radio--checked',\n FOCUSED: 'forge-radio--focused',\n ENABLED: 'forge-radio--enabled'\n};\n\nconst selectors = {\n WRAPPER: '.forge-radio-wrapper',\n RADIO: '.mdc-radio',\n RADIO_INPUT: 'input[type=\"radio\"]',\n LABEL: 'label'\n};\n\nconst attributes = {\n DENSE: 'dense',\n ROLE: 'role',\n RADIOGROUP_ROLE: 'radiogroup',\n SLOT: 'slot'\n};\n\nconst inputProperties = ['checked', 'disabled'];\n\nexport const RADIO_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n inputProperties\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IRadioAdapter } from './radio-adapter';\nimport { RADIO_CONSTANTS } from './radio-constants';\n\nexport interface IRadioFoundation extends ICustomElementFoundation {\n dense: boolean;\n}\n\nexport class RadioFoundation implements IRadioFoundation {\n private _dense = false;\n private _focusListenerCallback: () => void;\n private _disabledListenerCallback: () => void;\n private _syncRadiogroupCheckStyles: () => void;\n\n constructor(private _adapter: IRadioAdapter) {}\n\n public connect(): void {\n this._adapter.connect();\n this._adapter.deferRippleInitialization();\n this._focusListenerCallback = () => this._adapter.syncFocusedStateWithInput();\n this._disabledListenerCallback = () => this._adapter.syncDisabledStateWithInput();\n this._syncRadiogroupCheckStyles = () => this._adapter.syncRadiogroupCheckStyles();\n this._addFocusEventListeners();\n this._addInputDisabledListener();\n this._extendNativeInputSetter();\n this._addRadioChangeListener();\n this._adapter.syncCheckedStateWithInput();\n this._adapter.syncDisabledStateWithInput();\n this._adapter.syncFocusedStateWithInput();\n this._applyDense();\n this.syncCheckedState();\n }\n\n public disconnect(): void {\n this._removeFocusEventListeners();\n this._removeInputDisabledListener();\n this._adapter.revertNativeInputSetter();\n this._removeRadioChangeListener();\n this._adapter.destroyRipple();\n }\n\n public syncCheckedState(): void {\n this._adapter.syncCheckedStateWithInput();\n }\n\n private _applyDense(): void {\n if (this._dense) {\n this._adapter.addRootClass(RADIO_CONSTANTS.classes.RADIO_DENSE);\n this._adapter.setHostAttribute(RADIO_CONSTANTS.attributes.DENSE);\n } else {\n this._adapter.removeRootClass(RADIO_CONSTANTS.classes.RADIO_DENSE);\n this._adapter.removeHostAttribute(RADIO_CONSTANTS.attributes.DENSE);\n }\n }\n\n private _extendNativeInputSetter(): void {\n this._adapter.extendNativeInputSetter(this._syncRadiogroupCheckStyles);\n }\n\n private _addRadioChangeListener(): void {\n this._adapter.addInputEventListener('change', this._syncRadiogroupCheckStyles);\n }\n\n private _removeRadioChangeListener(): void {\n this._adapter.removeInputEventListener('change', this._syncRadiogroupCheckStyles);\n }\n\n private _addFocusEventListeners(): void {\n this._adapter.addInputEventListener('focus', this._focusListenerCallback);\n this._adapter.addInputEventListener('blur', this._focusListenerCallback);\n }\n\n private _removeFocusEventListeners(): void {\n this._adapter.removeInputEventListener('focus', this._focusListenerCallback);\n this._adapter.removeInputEventListener('blur', this._focusListenerCallback);\n }\n\n private _addInputDisabledListener(): void {\n this._adapter.addInputDisabledAttributeChangeListener(this._disabledListenerCallback);\n }\n\n private _removeInputDisabledListener(): void {\n this._adapter.removeInputDisabledAttributeChangeListener();\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._applyDense();\n }\n }\n}\n", "import { addClass, getShadowElement, removeClass, getActiveElement } from '@tylertech/forge-core';\nimport { IRadioComponent } from './radio';\nimport { RADIO_CONSTANTS } from './radio-constants';\nimport { ForgeRipple, ForgeRippleAdapter, ForgeRippleCapableSurface, ForgeRippleFoundation } from '../ripple';\nimport { userInteractionListener } from '../core/utils';\n\nexport interface IRadioAdapter {\n connect(): void;\n deferRippleInitialization(): Promise<void>;\n destroyRipple(): void;\n setHostAttribute(name: string, value?: string): void;\n removeHostAttribute(name: string): void;\n addRootClass(className: string): void;\n removeRootClass(className: string): void;\n addContainerClass(className: string): void;\n removeContainerClass(className: string): void;\n syncCheckedStateWithInput(): void;\n syncFocusedStateWithInput(): void;\n syncDisabledStateWithInput(): void;\n addInputEventListener(event: string, callback: (event: Event) => void): void;\n removeInputEventListener(event: string, callback: (event: Event) => void): void;\n addInputDisabledAttributeChangeListener(callback: () => void): void;\n removeInputDisabledAttributeChangeListener(): void;\n extendNativeInputSetter(callback: () => void): void;\n revertNativeInputSetter(): void;\n syncRadiogroupCheckStyles(): void;\n}\n\nexport class RadioAdapter implements IRadioAdapter, ForgeRippleCapableSurface {\n private _rootElement: HTMLElement;\n private _containerElement: HTMLElement;\n private _nativeInputElement: HTMLInputElement | null;\n private _inputAttributeMutationObserver?: MutationObserver;\n private _rippleInstance: ForgeRipple | undefined;\n\n constructor(private _component: IRadioComponent) {\n this._rootElement = getShadowElement(this._component, RADIO_CONSTANTS.selectors.RADIO);\n this._containerElement = getShadowElement(this._component, RADIO_CONSTANTS.selectors.WRAPPER);\n }\n\n // ForgeRippleCapableSurface\n public get root(): Element {\n return this._rootElement;\n }\n\n public get unbounded(): boolean | undefined {\n return true;\n }\n\n public get disabled(): boolean | undefined {\n return this._isDisabled();\n }\n\n public connect(): void {\n const labelElement = this._component.querySelector(RADIO_CONSTANTS.selectors.LABEL) as HTMLLabelElement;\n if (labelElement) {\n labelElement.setAttribute(RADIO_CONSTANTS.attributes.SLOT, RADIO_CONSTANTS.selectors.LABEL);\n }\n }\n\n public async deferRippleInitialization(): Promise<void> {\n const type = await userInteractionListener(this._rootElement);\n if (!this._rippleInstance) {\n this._rippleInstance = this._createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n }\n\n public destroyRipple(): void {\n this._rippleInstance?.destroy();\n this._rippleInstance = undefined;\n }\n\n public setHostAttribute(name: string, value = ''): void {\n this._component.setAttribute(name, value);\n }\n\n public removeHostAttribute(name: string): void {\n this._component.removeAttribute(name);\n }\n\n public addRootClass(className: string): void {\n this._rootElement.classList.add(className);\n }\n\n public removeRootClass(className: string): void {\n this._rootElement.classList.remove(className);\n }\n\n public addContainerClass(className: string): void {\n this._containerElement.classList.add(className);\n }\n\n public removeContainerClass(className: string): void {\n this._containerElement.classList.remove(className);\n }\n\n public syncDisabledStateWithInput(): void {\n if (this.inputDisabled) {\n this.addRootClass(RADIO_CONSTANTS.classes.DISABLED);\n this.removeRootClass(RADIO_CONSTANTS.classes.ENABLED);\n this.addContainerClass(RADIO_CONSTANTS.classes.WRAPPER_DISABLED);\n } else {\n this.addRootClass(RADIO_CONSTANTS.classes.ENABLED);\n this.removeRootClass(RADIO_CONSTANTS.classes.DISABLED);\n this.removeContainerClass(RADIO_CONSTANTS.classes.WRAPPER_DISABLED);\n }\n }\n\n public syncFocusedStateWithInput(): void {\n if (getActiveElement() === this._inputElement) {\n this.addRootClass(RADIO_CONSTANTS.classes.FOCUSED);\n } else {\n this.removeRootClass(RADIO_CONSTANTS.classes.FOCUSED);\n }\n }\n\n public syncCheckedStateWithInput(): void {\n if (this.inputChecked) {\n this.addRootClass(RADIO_CONSTANTS.classes.CHECKED);\n } else {\n this.removeRootClass(RADIO_CONSTANTS.classes.CHECKED);\n }\n }\n\n public addInputEventListener(event: string, callback: (event: Event) => void): void {\n if (!this._inputElement) {\n return;\n }\n\n this._inputElement.addEventListener(event, callback);\n }\n\n public removeInputEventListener(event: string, callback: (event: Event) => void): void {\n if (!this._inputElement) {\n return;\n }\n\n this._inputElement.removeEventListener(event, callback);\n }\n\n public addInputDisabledAttributeChangeListener(callback: () => void): void {\n this._setupInputDisabledAttributeMutationObserver(callback);\n }\n\n public removeInputDisabledAttributeChangeListener(): void {\n this._cleanupInputDisabledAttributeMutationObserver();\n }\n\n // Get the collection of all forge-radios under the containing radiogroup ancestor.\n public getRadiosFromContainingRadiogroup(): NodeListOf<IRadioComponent> | null {\n const radioGroup = this._getContainingRadioGroup(this._component);\n if (radioGroup == null) {\n return null;\n }\n\n return radioGroup.querySelectorAll(RADIO_CONSTANTS.elementName);\n }\n\n public syncRadiogroupCheckStyles(): void {\n const radios = this.getRadiosFromContainingRadiogroup();\n if (radios) {\n radios.forEach(x => x.syncCheckedState());\n }\n }\n\n public extendNativeInputSetter(callback: () => void): void {\n if (!this._inputElement) {\n return;\n }\n\n const nativeInput = this._inputElement;\n const inputProto = Object.getPrototypeOf(nativeInput);\n RADIO_CONSTANTS.inputProperties.forEach(controlState => {\n const desc = Object.getOwnPropertyDescriptor(inputProto, controlState) as PropertyDescriptor;\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!this._validPropertyDescriptor(desc)) {\n return;\n }\n\n if (desc) {\n const nativeInputDesc = {\n configurable: desc.configurable,\n enumerable: desc.enumerable,\n get: desc.get,\n set: (state: boolean) => {\n desc.set?.call(nativeInput, state);\n callback();\n }\n };\n Object.defineProperty(nativeInput, controlState, nativeInputDesc);\n }\n });\n }\n\n public revertNativeInputSetter(): void {\n if (!this._inputElement) {\n return;\n }\n\n const nativeInput = this._inputElement;\n const inputProto = Object.getPrototypeOf(nativeInput);\n RADIO_CONSTANTS.inputProperties.forEach(controlState => {\n const desc = Object.getOwnPropertyDescriptor(inputProto, controlState) as PropertyDescriptor;\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!this._validPropertyDescriptor(desc)) {\n return;\n }\n Object.defineProperty(nativeInput, controlState, desc);\n });\n }\n\n private _validPropertyDescriptor(inputPropDesc: PropertyDescriptor | undefined): boolean {\n return !!inputPropDesc && typeof inputPropDesc.set === 'function';\n }\n\n // Recursively crawl up the node tree looking for the containing radiogroup ancestor element.\n private _getContainingRadioGroup(element: HTMLElement): HTMLElement | null {\n if (!element || !element.parentElement) {\n throw new Error('Unable to locate ancestor element with role=\"radiogroup\". When using radios, a parent with this attribute must be applied.');\n }\n\n const parentElement = element.parentElement;\n const roleValue = parentElement.getAttribute(RADIO_CONSTANTS.attributes.ROLE);\n if (!!roleValue && roleValue.toLocaleLowerCase() === RADIO_CONSTANTS.attributes.RADIOGROUP_ROLE.toLocaleLowerCase()) {\n return parentElement;\n }\n\n return this._getContainingRadioGroup(parentElement);\n }\n\n private _setupInputDisabledAttributeMutationObserver(callback: () => void): void {\n if (!this._inputElement) {\n return;\n }\n\n this._cleanupInputDisabledAttributeMutationObserver();\n const mutationCallback = (mutationRecords: MutationRecord[]): void => this._inputDisabledAttributeMutationCallback(mutationRecords, callback);\n this._inputAttributeMutationObserver = new MutationObserver(mutationCallback);\n const mutationOptions: MutationObserverInit = {\n attributes: true,\n attributeOldValue: true,\n attributeFilter: ['disabled']\n };\n this._inputAttributeMutationObserver.observe(this._inputElement, mutationOptions);\n }\n\n private _cleanupInputDisabledAttributeMutationObserver(): void {\n if (this._inputAttributeMutationObserver) {\n this._inputAttributeMutationObserver.disconnect();\n delete this._inputAttributeMutationObserver;\n }\n }\n\n private _inputDisabledAttributeMutationCallback(mutationRecords: MutationRecord[], callback: () => void): void {\n for (const mutationRecord of mutationRecords) {\n // Skip:\n // - Non-attribute mutations.\n // - Mutations without an attribute name.\n // - Mutations without a matching attribute name.\n // - Mutations that did not change the attribute value.\n if (mutationRecord.type !== 'attributes'\n || !mutationRecord.attributeName\n || mutationRecord.attributeName !== 'disabled'\n || mutationRecord.target[mutationRecord.attributeName] === mutationRecord.oldValue) {\n continue;\n }\n\n callback();\n }\n }\n\n public get inputDisabled(): boolean {\n if (!this._inputElement) {\n return false;\n }\n\n return this._inputElement.disabled;\n }\n\n public get inputChecked(): boolean {\n if (!this._inputElement) {\n return false;\n }\n\n return this._inputElement.checked;\n }\n\n private get _inputElement(): HTMLInputElement | null {\n if (!this._nativeInputElement) {\n this._nativeInputElement = this._component.querySelector<HTMLInputElement>(RADIO_CONSTANTS.selectors.RADIO_INPUT);\n }\n\n return this._nativeInputElement;\n }\n\n private _isDisabled(): boolean {\n return this._inputElement ? this._inputElement.disabled : false;\n }\n\n private _createRipple(): ForgeRipple {\n const adapter: ForgeRippleAdapter = {\n ...ForgeRipple.createAdapter(this),\n deregisterInteractionHandler: (evtType, handler) => {\n if (this._inputElement) {\n this._inputElement.removeEventListener(evtType, handler, { passive: true } as AddEventListenerOptions);\n }\n },\n isSurfaceActive: () => this._inputElement ? this._inputElement.matches(':active') : false,\n isUnbounded: () => Boolean(this.unbounded),\n registerInteractionHandler: (evtType, handler) => {\n if (this._inputElement) {\n this._inputElement.addEventListener(evtType, handler, { passive: true });\n }\n },\n isSurfaceDisabled: () => this._inputElement ? this._inputElement.disabled : false,\n addClass: (className: string) => addClass(className, this._rootElement),\n removeClass: (className: string) => removeClass(className, this._rootElement),\n updateCssVariable: (varName: string, value: string | null) => this._rootElement.style.setProperty(varName, value)\n };\n return new ForgeRipple(this._rootElement, new ForgeRippleFoundation(adapter));\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { RADIO_CONSTANTS } from './radio-constants';\nimport { RadioFoundation } from './radio-foundation';\nimport { RadioAdapter } from './radio-adapter';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-radio-wrapper forge-form-field\\\" part=\\\"root\\\"><div class=\\\"mdc-radio\\\" part=\\\"container\\\"><slot></slot><div class=\\\"mdc-radio__background\\\" part=\\\"background\\\"><div class=\\\"mdc-radio__outer-circle\\\" part=\\\"outer-circle\\\"></div><div class=\\\"mdc-radio__inner-circle\\\" part=\\\"inner-circle\\\"></div></div><div class=\\\"mdc-radio__ripple\\\" part=\\\"ripple-container\\\"></div></div><slot name=\\\"label\\\"></slot></div></template>';\nconst styles = '.mdc-radio{padding:10px;display:inline-block;position:relative;-webkit-box-flex:0;flex:0 0 auto;-webkit-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.54);border-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-radio.forge-radio--enabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__inner-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio .mdc-radio__background::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio .mdc-radio__background::before{top:-10px;left:-10px;width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio__background{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;-webkit-transform:scale(0,0);transform:scale(0,0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\";-webkit-transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transform:scale(0,0);transform:scale(0,0);border-width:10px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio ::slotted(input[type=radio]){position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;top:0;right:0;left:0;width:40px;height:40px}.mdc-radio.forge-radio--dense{padding:4px;margin:0}.mdc-radio.forge-radio--dense .mdc-radio__background::before{top:-4px;left:-4px;width:28px;height:28px}.mdc-radio.forge-radio--dense .mdc-radio__native-control{top:0;right:0;left:0;width:28px;height:28px}.mdc-radio.forge-radio--dense ::slotted(input[type=radio]){width:28px;height:28px}.mdc-radio--disabled+::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-radio--checked .mdc-radio__background,.mdc-radio--disabled .mdc-radio__background{-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled .mdc-radio__background{cursor:default}.forge-radio--focused .mdc-radio__background::before{-webkit-transform:scale(1);transform:scale(1);opacity:.12;-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-radio{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-radio .mdc-radio__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-radio .mdc-radio__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-radio.mdc-ripple-upgraded--unbounded .mdc-radio__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-radio.mdc-ripple-upgraded--foreground-activation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-radio.mdc-ripple-upgraded--foreground-deactivation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after,.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-ripple-surface--hover .mdc-radio__ripple::before,.mdc-radio:hover .mdc-radio__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__ripple::before,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-radio:not(.mdc-ripple-upgraded) .mdc-radio__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-radio:not(.mdc-ripple-upgraded):active .mdc-radio__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-radio.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__background::before,.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__background::before{content:none}.mdc-radio__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.forge-radio-wrapper--disabled{cursor:not-allowed}.forge-radio-wrapper--disabled ::slotted(label){cursor:not-allowed}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field ::slotted([slot=label]){-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~::slotted([slot=label]){padding-left:8px}.forge-form-field--align-end ::slotted([slot=label]){-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}:host{display:inline-block}:host([hidden]){display:none}';\n\nexport interface IRadioComponent extends IBaseComponent {\n dense: boolean;\n syncCheckedState(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-radio': IRadioComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-radio>` element.\n * \n * @tag forge-radio\n */\n@CustomElement({\n name: RADIO_CONSTANTS.elementName\n})\nexport class RadioComponent extends BaseComponent implements IRadioComponent {\n public static get observedAttributes(): string[] {\n return [\n RADIO_CONSTANTS.attributes.DENSE\n ];\n }\n\n protected _foundation: RadioFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new RadioFoundation(new RadioAdapter(this));\n }\n\n public connectedCallback(): void {\n this._ensureRadioInputElement().then(() => this._foundation.connect());\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case RADIO_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n }\n }\n\n private _ensureRadioInputElement(): Promise<void> {\n // Not using core function ensureChild because it was not selecting the input properly\n return new Promise<void>(resolve => {\n const element = this.querySelector(RADIO_CONSTANTS.selectors.RADIO_INPUT);\n if (element) {\n resolve();\n return;\n }\n\n const observer = new MutationObserver(changes => {\n const hasAddedNodes = changes.reduce((prev, curr) => prev + curr.addedNodes.length, 0) > 0;\n if (hasAddedNodes) {\n if (this.querySelector(RADIO_CONSTANTS.selectors.RADIO_INPUT)) {\n observer.disconnect();\n resolve();\n }\n }\n });\n observer.observe(this, { childList: true, subtree: true });\n });\n }\n\n public syncCheckedState(): void {\n this._foundation.syncCheckedState();\n }\n\n /** Gets/sets whether the radio button is dense. */\n @FoundationProperty()\n public declare dense: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { RadioComponent } from './radio';\n\nexport * from './radio-constants';\nexport * from './radio';\n\nexport function defineRadioComponent(): void {\n defineCustomElement(RadioComponent);\n}\n"],
|
|
5
|
+
"mappings": "0XAEA,IAAMA,EAA2C,GAAGC,SAE9CC,EAAU,CACd,MAAO,YACP,YAAa,qBACb,SAAU,sBACV,iBAAkB,gCAClB,QAAS,uBACT,QAAS,uBACT,QAAS,sBACX,EAEMC,EAAY,CAChB,QAAS,uBACT,MAAO,aACP,YAAa,sBACb,MAAO,OACT,EAEMC,EAAa,CACjB,MAAO,QACP,KAAM,OACN,gBAAiB,aACjB,KAAM,MACR,EAEMC,EAAkB,CAAC,UAAW,UAAU,EAEjCC,EAAkB,CAC7B,YAAAN,EACA,QAAAE,EACA,UAAAC,EACA,WAAAC,EACA,gBAAAC,CACF,EC3BO,IAAME,EAAN,KAAkD,CAMvD,YAAoBC,EAAyB,CAAzB,cAAAA,EALpB,KAAQ,OAAS,EAK6B,CAEvC,SAAgB,CACrB,KAAK,SAAS,QAAQ,EACtB,KAAK,SAAS,0BAA0B,EACxC,KAAK,uBAAyB,IAAM,KAAK,SAAS,0BAA0B,EAC5E,KAAK,0BAA4B,IAAM,KAAK,SAAS,2BAA2B,EAChF,KAAK,2BAA6B,IAAM,KAAK,SAAS,0BAA0B,EAChF,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,SAAS,0BAA0B,EACxC,KAAK,SAAS,2BAA2B,EACzC,KAAK,SAAS,0BAA0B,EACxC,KAAK,YAAY,EACjB,KAAK,iBAAiB,CACxB,CAEO,YAAmB,CACxB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,SAAS,wBAAwB,EACtC,KAAK,2BAA2B,EAChC,KAAK,SAAS,cAAc,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,oBAA+B,CAC/C,MAAO,CACLC,EAAgB,WAAW,KAC7B,CACF,CAUO,mBAA0B,CAC/B,KAAK,yBAAyB,EAAE,KAAK,IAAM,KAAK,YAAY,QAAQ,CAAC,CACvE,CAEO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,QACDD,EAAgB,WAAW,MAC9B,KAAK,MAAQI,EAAcD,CAAQ,EACnC,MAEN,CAEQ,0BAA0C,CAEhD,OAAO,IAAI,QAAcE,GAAW,CAElC,GADgB,KAAK,cAAcL,EAAgB,UAAU,WAAW,EAC3D,CACXK,EAAQ,EACR,MACF,CAEA,IAAMC,EAAW,IAAI,iBAAiBC,GAAW,CACzBA,EAAQ,OAAO,CAACC,EAAMC,IAASD,EAAOC,EAAK,WAAW,OAAQ,CAAC,EAAI,GAEnF,KAAK,cAAcT,EAAgB,UAAU,WAAW,IAC1DM,EAAS,WAAW,EACpBD,EAAQ,EAGd,CAAC,EACDC,EAAS,QAAQ,KAAM,CAAE,UAAW,GAAM,QAAS,EAAK,CAAC,CAC3D,CAAC,CACH,CAEO,kBAAyB,CAC9B,KAAK,YAAY,iBAAiB,CACpC,CAKF,EADiBI,EAAA,CADdC,EAAmB,GA1DThB,EA2DI,qBA3DJA,EAANe,EAAA,CAHNE,EAAc,CACb,KAAMZ,EAAgB,WACxB,CAAC,GACYL,GCrBN,SAASkB,IAA6B,CAC3CC,EAAoBC,CAAc,CACpC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "inputProperties", "RADIO_CONSTANTS", "RadioFoundation", "_adapter", "RADIO_CONSTANTS", "value", "RadioAdapter", "_component", "getShadowElement", "RADIO_CONSTANTS", "labelElement", "type", "userInteractionListener", "_a", "name", "value", "className", "getActiveElement", "event", "callback", "radioGroup", "radios", "x", "nativeInput", "inputProto", "controlState", "desc", "nativeInputDesc", "state", "inputPropDesc", "element", "parentElement", "roleValue", "mutationCallback", "mutationRecords", "mutationOptions", "mutationRecord", "adapter", "__spreadProps", "__spreadValues", "ForgeRipple", "evtType", "handler", "addClass", "removeClass", "varName", "ForgeRippleFoundation", "template", "styles", "RadioComponent", "BaseComponent", "attachShadowTemplate", "RadioFoundation", "RadioAdapter", "RADIO_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "resolve", "observer", "changes", "prev", "curr", "__decorateClass", "FoundationProperty", "CustomElement", "defineRadioComponent", "defineCustomElement", "RadioComponent"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as s,d as R}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as s,d as R}from"./chunk.U724KSZU.js";import{a as u,d as P}from"./chunk.SXTTEIIH.js";import{a as I,e as N}from"./chunk.V7WKXEZC.js";import{b as x}from"./chunk.7A6MX6CS.js";import{d as U}from"./chunk.4WPFFNLH.js";import{a as B}from"./chunk.YI4JTY4T.js";import{a as O}from"./chunk.G5MGGEFP.js";import{a as n}from"./chunk.KTGSZEAG.js";import{a as A,b as L}from"./chunk.BE7PZANN.js";import{a as g,d as E,h as f,l as C}from"./chunk.Y4GKBJGI.js";import{c as v,s as b}from"./chunk.PN26D52V.js";import{h as m,k as p,l as c}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var S=`${L}app-bar-profile-button`,F={FULL_NAME:"full-name",EMAIL:"email",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count",AVATAR_TEXT:"avatar-text",SIGN_OUT_BUTTON:"sign-out-button",PROFILE_BUTTON:"profile-button",SIGN_OUT_BUTTON_TEXT:"sign-out-button-text",PROFILE_BUTTON_TEXT:"profile-button-text",OPEN:"open"},w={BUTTON:"button"},i={elementName:S,attributes:F,selectors:w};var _=class extends O{constructor(e){super(e)}initialize(){this._avatarElement=f(this._component,u.elementName),this._buttonElement=f(this._component,i.selectors.BUTTON)}setClickListener(e){this._component.addEventListener("click",e)}removeClickListener(e){this._component.removeEventListener("click",e)}openPopup(e,l,a,k,T){return this._profileCardElement=document.createElement(s.elementName),this._profileCardElement.fullName=e.fullName,this._profileCardElement.email=e.email,this._profileCardElement.signOut=e.signOut,this._profileCardElement.profile=e.profile,this._profileCardElement.signOutText=e.signOutButtonText,this._profileCardElement.profileText=e.profileButtonText,this._profileCardElement.avatarText=e.avatarText,this._profileCardElement.avatarImageUrl=e.avatarImageUrl,this._profileCardElement.avatarLetterCount=e.avatarLetterCount,this._profileCardElement.addEventListener(s.events.PROFILE,()=>a()),this._profileCardElement.addEventListener(s.events.SIGN_OUT,()=>k()),T&&this._profileCardElement.appendChild(T),this._popupElement=document.createElement(I.elementName),this._popupElement.targetElement=this._component,this._popupElement.placement="bottom-end",this._popupElement.animationType="menu",this._popupElement.appendChild(this._profileCardElement),this._popupElement.open=!0,v(this._popupElement,y=>{!this._popupElement||this._component.contains(b())||l()},!0)}closePopup(){this._popupElement&&(this._popupElement.open=!1,this._popupElement=void 0,this._profileCardElement=void 0)}requestFocus(){this._buttonElement.focus()}setAvatarText(e){this._avatarElement.text=e}setAvatarLetterCount(e){this._avatarElement.letterCount=e}setAvatarImageUrl(e){this._avatarElement.imageUrl=e}setSignOutButtonText(e){var l;this._profileCardElement&&(this._profileCardElement.signOutText=e,(l=this._popupElement)==null||l.position())}setProfileButtonText(e){var l;this._profileCardElement&&(this._profileCardElement.profileText=e,(l=this._popupElement)==null||l.position())}};var d=class{constructor(t){this._adapter=t;this._avatarLetterCount=u.numbers.DEFAULT_LETTER_COUNT;this._showSignOutButton=s.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=s.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=s.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=s.defaults.PROFILE_BUTTON_TEXT;this._open=!1;this._isInitialized=!1;this._clickListener=e=>this._onClick(e),this._dismissListener=()=>this._onDimiss(),this._keydownListener=e=>this._onKeydown(e),this._profileButtonListener=()=>this._onProfileButtonClick(),this._signOutButtonListener=()=>this._onSignOutButtonClick()}initialize(){this._adapter.initialize(),this._adapter.setClickListener(this._clickListener),this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setAvatarText(this._avatarText),this._isInitialized=!0}disconnect(){this._open&&this._closeDropdown(),this._adapter.removeWindowListener("keydown",this._keydownListener),this._adapter.removeClickListener(this._clickListener),this._isInitialized=!1}_onClick(t){this._open?this._closeDropdown():this._openDropdown()}_onKeydown(t){(t.key==="Escape"||t.keyCode===27)&&(this._closeDropdown(),this._adapter.requestFocus())}_onDimiss(){B.WEBKIT?window.requestAnimationFrame(()=>this._closeDropdown()):this._closeDropdown()}_onProfileButtonClick(){this._adapter.emitHostEvent(s.events.PROFILE),this._closeDropdown(),this._adapter.requestFocus()}_onSignOutButtonClick(){this._adapter.emitHostEvent(s.events.SIGN_OUT),this._closeDropdown(),this._adapter.requestFocus()}_openDropdown(){if(this._open)return;m(this._cancelDismissListener)&&this._cancelDismissListener();let t={fullName:this._fullName,email:this._email,signOut:this._showSignOutButton,profile:this._showProfileButton,signOutButtonText:this._signOutButtonText,profileButtonText:this._profileButtonText,avatarText:this._avatarText,avatarImageUrl:this._avatarImageUrl,avatarLetterCount:this._avatarLetterCount},e=this._profileCardBuilder?this._profileCardBuilder():void 0;this._cancelDismissListener=this._adapter.openPopup(t,this._dismissListener,this._profileButtonListener,this._signOutButtonListener,e),this._adapter.addWindowListener("keydown",this._keydownListener),this._open=!0,!t.signOut&&!t.profile&&this._adapter.requestFocus()}_closeDropdown(){!this._open||(m(this._cancelDismissListener)&&this._cancelDismissListener(),this._open=!1,this._adapter.removeWindowListener("keydown",this._keydownListener),this._adapter.closePopup())}get fullName(){return this._fullName}set fullName(t){this._fullName!==t&&(this._fullName=t,this._adapter.setHostAttribute(i.attributes.FULL_NAME,this._fullName))}get email(){return this._email}set email(t){this._email!==t&&(this._email=t,this._adapter.setHostAttribute(i.attributes.EMAIL,this._email))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(t){this._avatarImageUrl!==t&&(this._avatarImageUrl=t,this._isInitialized&&(this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setHostAttribute(i.attributes.AVATAR_IMAGE_URL,this._avatarImageUrl)))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(t){this._avatarLetterCount!==t&&(this._avatarLetterCount=t,this._isInitialized&&(this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setHostAttribute(i.attributes.AVATAR_LETTER_COUNT,this._avatarLetterCount)))}get avatarText(){return this._avatarText}set avatarText(t){this._avatarText!==t&&(this._avatarText=t,this._isInitialized&&(this._adapter.setAvatarText(this._avatarText),this._adapter.setHostAttribute(i.attributes.AVATAR_TEXT,this._avatarText)))}get signOutButton(){return this._showSignOutButton}set signOutButton(t){this._showSignOutButton!==t&&(this._showSignOutButton=t,this._adapter.setHostAttribute(i.attributes.SIGN_OUT_BUTTON,this._showSignOutButton))}get profileButton(){return this._showProfileButton}set profileButton(t){this._showProfileButton!==t&&(this._showProfileButton=t,this._adapter.setHostAttribute(i.attributes.PROFILE_BUTTON,this._showProfileButton))}get signOutButtonText(){return this._signOutButtonText}set signOutButtonText(t){this._signOutButtonText!==t&&(this._signOutButtonText=t,this._adapter.setSignOutButtonText(t))}get profileButtonText(){return this._profileButtonText}set profileButtonText(t){this._profileButtonText!==t&&(this._profileButtonText=t,this._adapter.setProfileButtonText(t))}get open(){return this._open}set open(t){this._open!==t&&(t?this._openDropdown():this._closeDropdown())}get profileCardBuilder(){return this._profileCardBuilder}set profileCardBuilder(t){this._profileCardBuilder=t}};var M='<template><forge-icon-button><button type="button" aria-label="View profile card"><forge-avatar aria-hidden="true"></forge-avatar></button><forge-tooltip delay="500" position="bottom">View profile</forge-tooltip></forge-icon-button></template>',r=class extends C{constructor(){super();this._foundation=new d(new _(this))}static get observedAttributes(){return[i.attributes.FULL_NAME,i.attributes.EMAIL,i.attributes.AVATAR_IMAGE_URL,i.attributes.AVATAR_LETTER_COUNT,i.attributes.AVATAR_TEXT,i.attributes.SIGN_OUT_BUTTON,i.attributes.PROFILE_BUTTON,i.attributes.SIGN_OUT_BUTTON_TEXT,i.attributes.PROFILE_BUTTON_TEXT,i.attributes.OPEN]}initializedCallback(){E(this,M)}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,a){switch(e){case i.attributes.FULL_NAME:this.fullName=a;break;case i.attributes.EMAIL:this.email=a;break;case i.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=a;break;case i.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=c(a);break;case i.attributes.AVATAR_TEXT:this.avatarText=a;break;case i.attributes.SIGN_OUT_BUTTON:this.signOutButton=p(a);break;case i.attributes.PROFILE_BUTTON:this.profileButton=p(a);break;case i.attributes.SIGN_OUT_BUTTON_TEXT:this.signOutButtonText=a;break;case i.attributes.PROFILE_BUTTON_TEXT:this.profileButtonText=a;break;case i.attributes.OPEN:this.open=p(a);break}}};o([n()],r.prototype,"fullName",2),o([n()],r.prototype,"email",2),o([n()],r.prototype,"avatarImageUrl",2),o([n()],r.prototype,"avatarLetterCount",2),o([n()],r.prototype,"avatarText",2),o([n()],r.prototype,"signOutButton",2),o([n()],r.prototype,"profileButton",2),o([n()],r.prototype,"signOutButtonText",2),o([n()],r.prototype,"profileButtonText",2),o([n()],r.prototype,"open",2),o([n()],r.prototype,"profileCardBuilder",2),r=o([A({name:i.elementName,dependencies:[N,R,x,P,U]})],r);function Ot(){g(r)}export{i as a,_ as b,d as c,r as d,Ot as e};
|
|
7
|
+
//# sourceMappingURL=chunk.73AYD2BF.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/app-bar/profile-button/app-bar-profile-button-constants.ts", "../../src/app-bar/profile-button/app-bar-profile-button-adapter.ts", "../../src/app-bar/profile-button/app-bar-profile-button-foundation.ts", "../../src/app-bar/profile-button/app-bar-profile-button.ts", "../../src/app-bar/profile-button/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}app-bar-profile-button`;\n\nconst attributes = {\n FULL_NAME: 'full-name',\n EMAIL: 'email',\n AVATAR_IMAGE_URL: 'avatar-image-url',\n AVATAR_LETTER_COUNT: 'avatar-letter-count',\n AVATAR_TEXT: 'avatar-text',\n SIGN_OUT_BUTTON: 'sign-out-button',\n PROFILE_BUTTON: 'profile-button',\n SIGN_OUT_BUTTON_TEXT: 'sign-out-button-text',\n PROFILE_BUTTON_TEXT: 'profile-button-text',\n OPEN: 'open'\n};\n\nconst selectors = {\n BUTTON: 'button'\n};\n\nexport const APP_BAR_PROFILE_BUTTON_CONSTANTS = {\n elementName,\n attributes,\n selectors\n};\n\nexport interface IAppBarProfileCardConfig {\n fullName: string;\n email: string;\n signOut: boolean;\n profile: boolean;\n signOutButtonText: string;\n profileButtonText: string;\n avatarText: string;\n avatarImageUrl: string;\n avatarLetterCount: number;\n}\n\nexport type AppBarProfileButtonProfileCardBuilder = () => HTMLElement;\n", "import { getLightElement, notChildEventListener, getActiveElement } from '@tylertech/forge-core';\nimport { AVATAR_CONSTANTS, IAvatarComponent } from '../../avatar';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IPopupComponent, PopupAnimationType, PopupPlacement, POPUP_CONSTANTS } from '../../popup';\nimport { IProfileCardComponent, PROFILE_CARD_CONSTANTS } from '../../profile-card';\nimport { IAppBarProfileButtonComponent } from './app-bar-profile-button';\nimport { IAppBarProfileCardConfig, APP_BAR_PROFILE_BUTTON_CONSTANTS } from './app-bar-profile-button-constants';\n\nexport interface IAppBarProfileButtonAdapter extends IBaseAdapter {\n initialize(): void;\n setClickListener(listener: (evt: MouseEvent) => void): void;\n removeClickListener(listener: (evt: MouseEvent) => void): void;\n openPopup(profileCardConfig: IAppBarProfileCardConfig, dismissListener: () => void, profileListener: () => void, signOutListener: () => void, profileCardContent?: HTMLElement): () => void;\n closePopup(): void;\n requestFocus(): void;\n setAvatarText(value: string): void;\n setAvatarLetterCount(value: number): void;\n setAvatarImageUrl(value: string): void;\n setSignOutButtonText(value: string): void;\n setProfileButtonText(value: string): void;\n}\n\nexport class AppBarProfileButtonAdapter extends BaseAdapter<IAppBarProfileButtonComponent> implements IAppBarProfileButtonAdapter {\n private _avatarElement: IAvatarComponent;\n private _buttonElement: HTMLButtonElement;\n private _popupElement?: IPopupComponent;\n private _profileCardElement?: IProfileCardComponent;\n\n constructor(component: IAppBarProfileButtonComponent) {\n super(component);\n }\n\n public initialize(): void {\n this._avatarElement = getLightElement(this._component, AVATAR_CONSTANTS.elementName) as IAvatarComponent;\n this._buttonElement = getLightElement(this._component, APP_BAR_PROFILE_BUTTON_CONSTANTS.selectors.BUTTON) as HTMLButtonElement;\n }\n\n public setClickListener(listener: (evt: MouseEvent) => void): void {\n this._component.addEventListener('click', listener);\n }\n\n public removeClickListener(listener: (evt: MouseEvent) => void): void {\n this._component.removeEventListener('click', listener);\n }\n\n public openPopup(profileCardConfig: IAppBarProfileCardConfig, dismissListener: () => void, profileListener: () => void, signOutListener: () => void, profileCardContent?: HTMLElement): () => void {\n this._profileCardElement = document.createElement(PROFILE_CARD_CONSTANTS.elementName);\n this._profileCardElement.fullName = profileCardConfig.fullName;\n this._profileCardElement.email = profileCardConfig.email;\n this._profileCardElement.signOut = profileCardConfig.signOut;\n this._profileCardElement.profile = profileCardConfig.profile;\n this._profileCardElement.signOutText = profileCardConfig.signOutButtonText;\n this._profileCardElement.profileText = profileCardConfig.profileButtonText;\n this._profileCardElement.avatarText = profileCardConfig.avatarText;\n this._profileCardElement.avatarImageUrl = profileCardConfig.avatarImageUrl;\n this._profileCardElement.avatarLetterCount = profileCardConfig.avatarLetterCount;\n this._profileCardElement.addEventListener(PROFILE_CARD_CONSTANTS.events.PROFILE, () => profileListener());\n this._profileCardElement.addEventListener(PROFILE_CARD_CONSTANTS.events.SIGN_OUT, () => signOutListener());\n\n if (profileCardContent) {\n this._profileCardElement.appendChild(profileCardContent);\n }\n\n this._popupElement = document.createElement(POPUP_CONSTANTS.elementName);\n this._popupElement.targetElement = this._component;\n this._popupElement.placement = 'bottom-end';\n this._popupElement.animationType = PopupAnimationType.Menu;\n this._popupElement.appendChild(this._profileCardElement);\n this._popupElement.open = true;\n\n return notChildEventListener(this._popupElement, activeElement => {\n if (!this._popupElement) {\n return;\n }\n if (!this._component.contains(getActiveElement())) {\n dismissListener();\n }\n }, true);\n }\n\n public closePopup(): void {\n if (this._popupElement) {\n this._popupElement.open = false;\n this._popupElement = undefined;\n this._profileCardElement = undefined;\n }\n }\n\n public requestFocus(): void {\n this._buttonElement.focus();\n }\n\n public setAvatarText(value: string): void {\n this._avatarElement.text = value;\n }\n\n public setAvatarLetterCount(value: number): void {\n this._avatarElement.letterCount = value;\n }\n\n public setAvatarImageUrl(value: string): void {\n this._avatarElement.imageUrl = value;\n }\n\n public setSignOutButtonText(value: string): void {\n if (this._profileCardElement) {\n this._profileCardElement.signOutText = value;\n this._popupElement?.position();\n }\n }\n\n public setProfileButtonText(value: string): void {\n if (this._profileCardElement) {\n this._profileCardElement.profileText = value;\n this._popupElement?.position();\n }\n }\n}\n", "import { ICustomElementFoundation, isFunction, Platform, getActiveElement } from '@tylertech/forge-core';\nimport { AVATAR_CONSTANTS } from '../../avatar';\nimport { PROFILE_CARD_CONSTANTS } from '../../profile-card';\nimport { IAppBarProfileButtonAdapter } from './app-bar-profile-button-adapter';\nimport { IAppBarProfileCardConfig, AppBarProfileButtonProfileCardBuilder, APP_BAR_PROFILE_BUTTON_CONSTANTS } from './app-bar-profile-button-constants';\n\nexport interface IAppBarProfileButtonFoundation extends ICustomElementFoundation {\n fullName: string;\n email: string;\n avatarImageUrl: string;\n avatarLetterCount: number;\n avatarText: string;\n signOutButton: boolean;\n profileButton: boolean;\n signOutButtonText: string;\n profileButtonText: string;\n open: boolean;\n profileCardBuilder: AppBarProfileButtonProfileCardBuilder;\n}\n\nexport class AppBarProfileButtonFoundation implements IAppBarProfileButtonFoundation {\n private _fullName: string;\n private _email: string;\n private _avatarImageUrl: string;\n private _avatarLetterCount = AVATAR_CONSTANTS.numbers.DEFAULT_LETTER_COUNT;\n private _avatarText: string;\n private _showSignOutButton = PROFILE_CARD_CONSTANTS.defaults.SHOW_SIGN_OUT_BUTTON;\n private _showProfileButton = PROFILE_CARD_CONSTANTS.defaults.SHOW_PROFILE_BUTTON;\n private _signOutButtonText = PROFILE_CARD_CONSTANTS.defaults.SIGN_OUT_BUTTON_TEXT;\n private _profileButtonText = PROFILE_CARD_CONSTANTS.defaults.PROFILE_BUTTON_TEXT;\n private _profileCardBuilder: AppBarProfileButtonProfileCardBuilder;\n private _open = false;\n private _isInitialized = false;\n private _clickListener: (evt: MouseEvent) => void;\n private _dismissListener: () => void;\n private _cancelDismissListener: () => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _profileButtonListener: () => void;\n private _signOutButtonListener: () => void;\n\n constructor(private _adapter: IAppBarProfileButtonAdapter) {\n this._clickListener = evt => this._onClick(evt);\n this._dismissListener = () => this._onDimiss();\n this._keydownListener = evt => this._onKeydown(evt);\n this._profileButtonListener = () => this._onProfileButtonClick();\n this._signOutButtonListener = () => this._onSignOutButtonClick();\n }\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.setClickListener(this._clickListener);\n this._adapter.setAvatarImageUrl(this._avatarImageUrl);\n this._adapter.setAvatarLetterCount(this._avatarLetterCount);\n this._adapter.setAvatarText(this._avatarText);\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n if (this._open) {\n this._closeDropdown();\n }\n this._adapter.removeWindowListener('keydown', this._keydownListener);\n this._adapter.removeClickListener(this._clickListener);\n this._isInitialized = false;\n }\n\n private _onClick(evt: MouseEvent): void {\n if (!this._open) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n if (evt.key === 'Escape' || evt.keyCode === 27) {\n this._closeDropdown();\n this._adapter.requestFocus();\n }\n }\n\n private _onDimiss(): void {\n if (Platform.WEBKIT) {\n window.requestAnimationFrame(() => this._closeDropdown());\n } else {\n this._closeDropdown();\n }\n }\n\n private _onProfileButtonClick(): void {\n this._adapter.emitHostEvent(PROFILE_CARD_CONSTANTS.events.PROFILE);\n this._closeDropdown();\n this._adapter.requestFocus();\n }\n\n private _onSignOutButtonClick(): void {\n this._adapter.emitHostEvent(PROFILE_CARD_CONSTANTS.events.SIGN_OUT);\n this._closeDropdown();\n this._adapter.requestFocus();\n }\n\n private _openDropdown(): void {\n if (this._open) {\n return;\n }\n\n if (isFunction(this._cancelDismissListener)) {\n this._cancelDismissListener();\n }\n const profileCardConfig: IAppBarProfileCardConfig = {\n fullName: this._fullName,\n email: this._email,\n signOut: this._showSignOutButton,\n profile: this._showProfileButton,\n signOutButtonText: this._signOutButtonText,\n profileButtonText: this._profileButtonText,\n avatarText: this._avatarText,\n avatarImageUrl: this._avatarImageUrl,\n avatarLetterCount: this._avatarLetterCount\n };\n const profileCardContent = this._profileCardBuilder ? this._profileCardBuilder() : undefined;\n this._cancelDismissListener = this._adapter.openPopup(profileCardConfig, this._dismissListener, this._profileButtonListener, this._signOutButtonListener, profileCardContent);\n this._adapter.addWindowListener('keydown', this._keydownListener);\n this._open = true;\n\n // If we aren't showing the sign out or profile buttons then leave focus on our button\n if (!profileCardConfig.signOut && !profileCardConfig.profile) {\n this._adapter.requestFocus();\n }\n }\n\n private _closeDropdown(): void {\n if (!this._open) {\n return;\n }\n if (isFunction(this._cancelDismissListener)) {\n this._cancelDismissListener();\n }\n this._open = false;\n this._adapter.removeWindowListener('keydown', this._keydownListener);\n this._adapter.closePopup();\n }\n\n public get fullName(): string {\n return this._fullName;\n }\n public set fullName(value: string) {\n if (this._fullName !== value) {\n this._fullName = value;\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.FULL_NAME, this._fullName);\n }\n }\n\n public get email(): string {\n return this._email;\n }\n public set email(value: string) {\n if (this._email !== value) {\n this._email = value;\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.EMAIL, this._email);\n }\n }\n\n public get avatarImageUrl(): string {\n return this._avatarImageUrl;\n }\n public set avatarImageUrl(value: string) {\n if (this._avatarImageUrl !== value) {\n this._avatarImageUrl = value;\n if (this._isInitialized) {\n this._adapter.setAvatarImageUrl(this._avatarImageUrl);\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_IMAGE_URL, this._avatarImageUrl);\n }\n }\n }\n\n public get avatarLetterCount(): number {\n return this._avatarLetterCount;\n }\n public set avatarLetterCount(value: number) {\n if (this._avatarLetterCount !== value) {\n this._avatarLetterCount = value;\n if (this._isInitialized) {\n this._adapter.setAvatarLetterCount(this._avatarLetterCount);\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_LETTER_COUNT, this._avatarLetterCount as any);\n }\n }\n }\n\n public get avatarText(): string {\n return this._avatarText;\n }\n public set avatarText(value: string) {\n if (this._avatarText !== value) {\n this._avatarText = value;\n if (this._isInitialized) {\n this._adapter.setAvatarText(this._avatarText);\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_TEXT, this._avatarText);\n }\n }\n }\n\n public get signOutButton(): boolean {\n return this._showSignOutButton;\n }\n public set signOutButton(value: boolean) {\n if (this._showSignOutButton !== value) {\n this._showSignOutButton = value;\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.SIGN_OUT_BUTTON, this._showSignOutButton as any);\n }\n }\n\n public get profileButton(): boolean {\n return this._showProfileButton;\n }\n public set profileButton(value: boolean) {\n if (this._showProfileButton !== value) {\n this._showProfileButton = value;\n this._adapter.setHostAttribute(APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.PROFILE_BUTTON, this._showProfileButton as any);\n }\n }\n\n public get signOutButtonText(): string {\n return this._signOutButtonText;\n }\n public set signOutButtonText(value: string) {\n if (this._signOutButtonText !== value) {\n this._signOutButtonText = value;\n this._adapter.setSignOutButtonText(value);\n }\n }\n\n public get profileButtonText(): string {\n return this._profileButtonText;\n }\n public set profileButtonText(value: string) {\n if (this._profileButtonText !== value) {\n this._profileButtonText = value;\n this._adapter.setProfileButtonText(value);\n }\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n if (value) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n }\n\n public get profileCardBuilder(): AppBarProfileButtonProfileCardBuilder {\n return this._profileCardBuilder;\n }\n public set profileCardBuilder(fn: AppBarProfileButtonProfileCardBuilder) {\n this._profileCardBuilder = fn;\n }\n}\n", "import { CustomElement, attachLightTemplate, coerceNumber, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\nimport { AppBarProfileButtonAdapter } from './app-bar-profile-button-adapter';\nimport { AppBarProfileButtonFoundation } from './app-bar-profile-button-foundation';\nimport { APP_BAR_PROFILE_BUTTON_CONSTANTS, AppBarProfileButtonProfileCardBuilder } from './app-bar-profile-button-constants';\nimport { ProfileCardComponent } from '../../profile-card';\nimport { IconButtonComponent } from '../../icon-button';\nimport { AvatarComponent } from '../../avatar';\nimport { PopupComponent } from '../../popup';\nimport { TooltipComponent } from '../../tooltip';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\n\nconst template = '<template><forge-icon-button><button type=\\\"button\\\" aria-label=\\\"View profile card\\\"><forge-avatar aria-hidden=\\\"true\\\"></forge-avatar></button><forge-tooltip delay=\\\"500\\\" position=\\\"bottom\\\">View profile</forge-tooltip></forge-icon-button></template>';\n\nexport interface IAppBarProfileButtonComponent extends IBaseComponent {\n avatarImageUrl: string;\n avatarLetterCount: number;\n avatarText: string;\n fullName: string;\n email: string;\n signOutButton: boolean;\n profileButton: boolean;\n signOutButtonText: string;\n profileButtonText: string;\n open: boolean;\n profileCardBuilder: (fn: AppBarProfileButtonProfileCardBuilder) => void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-app-bar-profile-button': IAppBarProfileButtonComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-app-bar-profile-button>` custom element.\n * \n * @tag forge-app-bar-profile-button\n */\n@CustomElement({\n name: APP_BAR_PROFILE_BUTTON_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n ProfileCardComponent,\n IconButtonComponent,\n AvatarComponent,\n TooltipComponent\n ]\n})\nexport class AppBarProfileButtonComponent extends BaseComponent implements IAppBarProfileButtonComponent {\n public static get observedAttributes(): string[] {\n return [\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.FULL_NAME,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.EMAIL,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_IMAGE_URL,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_LETTER_COUNT,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_TEXT,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.SIGN_OUT_BUTTON,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.PROFILE_BUTTON,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.SIGN_OUT_BUTTON_TEXT,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.PROFILE_BUTTON_TEXT,\n APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.OPEN\n ];\n }\n\n private _foundation: AppBarProfileButtonFoundation;\n\n constructor() {\n super();\n this._foundation = new AppBarProfileButtonFoundation(new AppBarProfileButtonAdapter(this));\n }\n\n public initializedCallback(): void {\n attachLightTemplate(this, template);\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.FULL_NAME:\n this.fullName = newValue;\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.EMAIL:\n this.email = newValue;\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_IMAGE_URL:\n this.avatarImageUrl = newValue;\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_LETTER_COUNT:\n this.avatarLetterCount = coerceNumber(newValue);\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.AVATAR_TEXT:\n this.avatarText = newValue;\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.SIGN_OUT_BUTTON:\n this.signOutButton = coerceBoolean(newValue);\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.PROFILE_BUTTON:\n this.profileButton = coerceBoolean(newValue);\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.SIGN_OUT_BUTTON_TEXT:\n this.signOutButtonText = newValue;\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.PROFILE_BUTTON_TEXT:\n this.profileButtonText = newValue;\n break;\n case APP_BAR_PROFILE_BUTTON_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare fullName: string;\n\n @FoundationProperty()\n public declare email: string;\n\n @FoundationProperty()\n public declare avatarImageUrl: string;\n\n @FoundationProperty()\n public declare avatarLetterCount: number;\n\n @FoundationProperty()\n public declare avatarText: string;\n\n @FoundationProperty()\n public declare signOutButton: boolean;\n\n @FoundationProperty()\n public declare profileButton: boolean;\n\n @FoundationProperty()\n public declare signOutButtonText: string;\n\n @FoundationProperty()\n public declare profileButtonText: string;\n\n @FoundationProperty()\n public declare open: boolean;\n\n /** Sets the profile card builder callback that will be used to add extra content to the profile card. */\n @FoundationProperty()\n public declare profileCardBuilder: AppBarProfileButtonProfileCardBuilder;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { AppBarProfileButtonComponent } from './app-bar-profile-button';\n\nexport * from './app-bar-profile-button-adapter';\nexport * from './app-bar-profile-button-constants';\nexport * from './app-bar-profile-button-foundation';\nexport * from './app-bar-profile-button';\n\nexport function defineAppBarProfileButtonComponent(): void {\n defineCustomElement(AppBarProfileButtonComponent);\n}\n"],
|
|
5
|
-
"mappings": "8kBAEA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "8kBAEA,IAAMA,EAA2C,GAAGC,0BAE9CC,EAAa,CACjB,UAAW,YACX,MAAO,QACP,iBAAkB,mBAClB,oBAAqB,sBACrB,YAAa,cACb,gBAAiB,kBACjB,eAAgB,iBAChB,qBAAsB,uBACtB,oBAAqB,sBACrB,KAAM,MACR,EAEMC,EAAY,CAChB,OAAQ,QACV,EAEaC,EAAmC,CAC9C,YAAAJ,EACA,WAAAE,EACA,UAAAC,CACF,ECHO,IAAME,EAAN,cAAyCC,CAAkF,CAMhI,YAAYC,EAA0C,CACpD,MAAMA,CAAS,CACjB,CAEO,YAAmB,CACxB,KAAK,eAAiBC,EAAgB,KAAK,WAAYC,EAAiB,WAAW,EACnF,KAAK,eAAiBD,EAAgB,KAAK,WAAYE,EAAiC,UAAU,MAAM,CAC1G,CAEO,iBAAiBC,EAA2C,CACjE,KAAK,WAAW,iBAAiB,QAASA,CAAQ,CACpD,CAEO,oBAAoBA,EAA2C,CACpE,KAAK,WAAW,oBAAoB,QAASA,CAAQ,CACvD,CAEO,UAAUC,EAA6CC,EAA6BC,EAA6BC,EAA6BC,EAA8C,CACjM,YAAK,oBAAsB,SAAS,cAAcC,EAAuB,WAAW,EACpF,KA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ON_CONSTANTS", "AppBarProfileButtonAdapter", "BaseAdapter", "component", "getLightElement", "AVATAR_CONSTANTS", "APP_BAR_PROFILE_BUTTON_CONSTANTS", "listener", "profileCardConfig", "dismissListener", "profileListener", "signOutListener", "profileCardContent", "PROFILE_CARD_CONSTANTS", "POPUP_CONSTANTS", "notChildEventListener", "activeElement", "getActiveElement", "value", "_a", "AppBarProfileButtonFoundation", "_adapter", "AVATAR_CONSTANTS", "PROFILE_CARD_CONSTANTS", "evt", "Platform", "isFunction", "profileCardConfig", "profileCardContent", "value", "APP_BAR_PROFILE_BUTTON_CONSTANTS", "fn", "template", "AppBarProfileButtonComponent", "BaseComponent", "AppBarProfileButtonFoundation", "AppBarProfileButtonAdapter", "APP_BAR_PROFILE_BUTTON_CONSTANTS", "attachLightTemplate", "name", "oldValue", "newValue", "coerceNumber", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "PopupComponent", "ProfileCardComponent", "IconButtonComponent", "AvatarComponent", "TooltipComponent", "defineAppBarProfileButtonComponent", "defineCustomElement", "AppBarProfileButtonComponent"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as l,b as p}from"./chunk.BE7PZANN.js";import{a as i,l as n}from"./chunk.Y4GKBJGI.js";import{f as r}from"./chunk.MCIQXNKY.js";var a=`${p}option-group`,m={LABEL:"label"},o={elementName:a,attributes:m};var e=class extends n{constructor(){super()}static get observedAttributes(){return[o.attributes.LABEL]}attributeChangedCallback(t,c,s){switch(t){case o.attributes.LABEL:this.label=s;break}}get label(){return this._label}set label(t){this._label!==t&&(this._label=t||"",this.setAttribute(o.attributes.LABEL,this._label))}get text(){return this._label}set text(t){this.label=t}};e=r([l({name:o.elementName})],e);function E(){i(e)}export{o as a,e as b,E as c};
|
|
7
|
+
//# sourceMappingURL=chunk.77Y3EABF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/select/option-group/option-group-constants.ts", "../../src/select/option-group/option-group.ts", "../../src/select/option-group/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}option-group`;\n\nconst attributes = {\n LABEL: 'label'\n};\n\nexport const OPTION_GROUP_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { CustomElement } from '@tylertech/forge-core';\nimport { ListDropdownOptionGroupBuilder } from '../../list-dropdown/list-dropdown-constants';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { ISelectOption, ISelectOptionGroup } from '../core';\nimport { OPTION_GROUP_CONSTANTS } from './option-group-constants';\n\nexport interface IOptionGroupComponent extends Required<ISelectOptionGroup>, IBaseComponent {\n label: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-option-group': IOptionGroupComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-option-group>` element.\n * \n * @tag forge-option-group\n */\n@CustomElement({\n name: OPTION_GROUP_CONSTANTS.elementName\n})\nexport class OptionGroupComponent extends BaseComponent implements IOptionGroupComponent {\n public static get observedAttributes(): string[] {\n return [\n OPTION_GROUP_CONSTANTS.attributes.LABEL\n ];\n }\n\n private _label: string;\n\n constructor() {\n super();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case OPTION_GROUP_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n break;\n }\n }\n\n /** Gets/sets the label of this option group. */\n public get label(): string {\n return this._label;\n }\n public set label(value: string) {\n if (this._label !== value) {\n this._label = value || '';\n this.setAttribute(OPTION_GROUP_CONSTANTS.attributes.LABEL, this._label);\n }\n }\n\n /** The child options of this group. */\n public declare options: ISelectOption[];\n\n /** The builder function for the group content. */\n public declare builder: ListDropdownOptionGroupBuilder;\n\n /** Gets/sets the optional group value. */\n public declare value: any;\n\n /** The text content for the group. */\n public get text(): string {\n return this._label;\n }\n public set text(value: string) {\n this.label = value;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { OptionGroupComponent } from './option-group';\n\nexport * from './option-group-constants';\nexport * from './option-group';\n\nexport function defineOptionGroupComponent(): void {\n defineCustomElement(OptionGroupComponent);\n}\n"],
|
|
5
|
+
"mappings": "sIAEA,IAAMA,EAA2C,GAAGC,gBAE9CC,EAAa,CACjB,MAAO,OACT,EAEaC,EAAyB,CACpC,YAAAH,EACA,WAAAE,CACF,ECaO,IAAME,EAAN,cAAmCC,CAA+C,CASvF,aAAc,CACZ,MAAM,CACR,CAVA,WAAkB,oBAA+B,CAC/C,MAAO,CACLC,EAAuB,WAAW,KACpC,CACF,CAQO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,QACDD,EAAuB,WAAW,MACrC,KAAK,MAAQG,EACb,MAEN,CAGA,IAAW,OAAgB,CACzB,OAAO,KAAK,MACd,CACA,IAAW,MAAMC,EAAe,CAC1B,KAAK,SAAWA,IAClB,KAAK,OAASA,GAAS,GACvB,KAAK,aAAaJ,EAAuB,WAAW,MAAO,KAAK,MAAM,EAE1E,CAYA,IAAW,MAAe,CACxB,OAAO,KAAK,MACd,CACA,IAAW,KAAKI,EAAe,CAC7B,KAAK,MAAQA,CACf,CACF,EAhDaN,EAANO,EAAA,CAHNC,EAAc,CACb,KAAMN,EAAuB,WAC/B,CAAC,GACYF,GCjBN,SAASS,GAAmC,CACjDC,EAAoBC,CAAoB,CAC1C",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "OPTION_GROUP_CONSTANTS", "OptionGroupComponent", "BaseComponent", "OPTION_GROUP_CONSTANTS", "name", "oldValue", "newValue", "value", "__decorateClass", "CustomElement", "defineOptionGroupComponent", "defineCustomElement", "OptionGroupComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{b as I}from"./chunk.WY7DECJD.js";import{a as E}from"./chunk.JHBCYICS.js";import{b as f}from"./chunk.Y66GSZJB.js";import{a as g}from"./chunk.47A2CN5U.js";import{a as m,b as h,d as b}from"./chunk.BE7PZANN.js";import{a as u,i as _,l as d}from"./chunk.Y4GKBJGI.js";import{f as l,m as c,t as p}from"./chunk.PN26D52V.js";import{k as s,l as a}from"./chunk.J2M2MXP2.js";import{f as r}from"./chunk.MCIQXNKY.js";var v=`${h}icon-button`,y={TOGGLE:"toggle",IS_ON:"is-on",ICON_ON:"forge-icon-button-on",DENSE:"dense",DENSITY_LEVEL:"density-level"},L={BUTTON:"button, a",ICON:"i, span, svg, img, forge-icon"},B={BUTTON:"forge-icon-button",BUTTON_ON:"forge-icon-button--on",BUTTON_DENSE:"forge-icon-button--dense",ICON:"forge-icon-button__icon",ICON_ON:"forge-icon-button__icon--on",DENSITY:["forge-icon-button--dense-1","forge-icon-button--dense-2","forge-icon-button--dense-3","forge-icon-button--dense-4","forge-icon-button--dense-5","forge-icon-button--dense-6"]},S={CHANGE:`${v}-change`},e={elementName:v,attributes:y,selectors:L,classes:B,events:S};var o=class extends d{constructor(){super();this._toggle=!1;this._isOn=!1;this._dense=!1;this._densityLevel=5}static get observedAttributes(){return[e.attributes.IS_ON,e.attributes.DENSE,e.attributes.DENSITY_LEVEL,e.attributes.TOGGLE]}connectedCallback(){this.querySelector(e.selectors.BUTTON)?this._initialize():c(this,e.selectors.BUTTON).then(()=>this._initialize())}disconnectedCallback(){this._rippleInstance&&this._rippleInstance.destroy()}attributeChangedCallback(t,n,i){switch(t){case e.attributes.IS_ON:this.isOn=s(i);break;case e.attributes.DENSE:this.dense=s(i);break;case e.attributes.DENSITY_LEVEL:this.densityLevel=a(i);break;case e.attributes.TOGGLE:this.toggle=s(i);break}}get toggle(){return this._toggle}set toggle(t){this._toggle=t,this._toggle?this._initializeToggle():this._destroyToggle()}get isOn(){return this._isOn}set isOn(t){this._isOn!==t&&(this._isOn=t,this._applyToggle())}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._applyDensity())}get densityLevel(){return this._densityLevel}set densityLevel(t){this._densityLevel!==t&&(this._densityLevel=t,this._densityLevel<=0?this._densityLevel=1:this._densityLevel>6?this._densityLevel=6:typeof this._densityLevel!="number"&&(this._densityLevel=5),this._applyDensity())}_initialize(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this._buttonElement.classList.add(e.classes.BUTTON),this._applyToggle(),this._applyDensity(),this._toggleHandler=()=>{this._toggleValue(),_(this,e.events.CHANGE,this._isOn,!0)},this._toggle&&this._initializeToggle(),this._deferRippleInitialization())}async _deferRippleInitialization(){let t=await f(this._buttonElement);this._rippleInstance||(this._rippleInstance=this._createRipple(),t==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){this._rippleInstance&&this._rippleInstance.destroy();let t=new I(this._buttonElement);return t.unbounded=!0,t}_toggleValue(){this._isOn=!this._isOn,this._applyToggle()}_applyToggle(){!this._buttonElement||(p(this._buttonElement,this._isOn,e.classes.BUTTON_ON),this._toggle&&this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))}_applyDensity(){if(!!this._buttonElement){if(e.classes.DENSITY.forEach(t=>this._buttonElement.classList.remove(t)),this._dense){if(this.setAttribute(e.attributes.DENSE,""),this._buttonElement.classList.add(e.classes.BUTTON_DENSE),this._densityLevel<7&&this._densityLevel>0&&this.densityLevel!==5){let t=e.classes.DENSITY[this._densityLevel-1];this._buttonElement.classList.add(t),this.setAttribute(e.attributes.DENSITY_LEVEL,this._densityLevel.toString())}}else this.removeAttribute(e.attributes.DENSE),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE);this._rippleInstance&&this._rippleInstance.layout()}}_initializeToggle(){if(!this._buttonElement)return;let t=Array.from(this._buttonElement.querySelectorAll(e.selectors.ICON));if(t.length!==2){console.error('You must specify two icons, one for "on" and one for "off".');return}if(t.forEach(n=>n.classList.add(e.classes.ICON)),!t.some(n=>n.classList.contains(e.classes.ICON_ON))){let n=t.find(i=>i.hasAttribute(e.attributes.ICON_ON));n?n.classList.add(e.classes.ICON_ON):t[0].classList.add(e.classes.ICON_ON)}this._buttonElement.addEventListener("click",this._toggleHandler),window.requestAnimationFrame(()=>{this._isOn&&(this._buttonElement.classList.add(e.classes.BUTTON_ON),this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))})}_destroyToggle(){!this._buttonElement||this._buttonElement.removeEventListener("click",this._toggleHandler)}layout(){this._rippleInstance&&this._rippleInstance.layout()}};o=r([m({name:e.elementName})],o);var N=class extends g{constructor(t){super(t)}_build(){var n;let t=document.createElement(e.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(n=this._config.options)!=null&&n.tooltip){let i=document.createElement("forge-tooltip");i.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(i.position=this._config.options.tooltipPosition),t.appendChild(i)}return t}get iconElement(){return this._iconElement}get disabled(){return!!this._buttonElement.disabled}set disabled(t){this._buttonElement.disabled=t}get butttonElement(){return this._buttonElement}get buttonElement(){return this._buttonElement}_configure(){this._configureIcon()}_configureIcon(){var n,i;if(!((n=this._config.options)!=null&&n.iconName))return;switch(((i=this._config.options)==null?void 0:i.iconType)||"component"){case"font":let O=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[b];l(O,this._buttonElement),this._buttonElement.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(E.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&l(this._config.options.iconClass,this._iconElement),this._buttonElement.appendChild(this._iconElement);break}}onClick(t){this._buttonElement.addEventListener("click",t)}onFocus(t){this._buttonElement.addEventListener("focus",n=>t(n))}onBlur(t){this._buttonElement.addEventListener("blur",n=>t(n))}};function Q(){u(o)}export{e as a,o as b,N as c,Q as d};
|
|
7
|
+
//# sourceMappingURL=chunk.7A6MX6CS.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/icon-button/icon-button-constants.ts", "../../src/icon-button/icon-button.ts", "../../src/icon-button/icon-button-component-delegate.ts", "../../src/icon-button/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}icon-button`;\n\nconst attributes = {\n TOGGLE: 'toggle',\n IS_ON: 'is-on',\n ICON_ON: 'forge-icon-button-on',\n DENSE: 'dense',\n DENSITY_LEVEL: 'density-level'\n};\n\nconst selectors = {\n BUTTON: 'button, a',\n ICON: 'i, span, svg, img, forge-icon'\n};\n\nconst classes = {\n BUTTON: 'forge-icon-button',\n BUTTON_ON: 'forge-icon-button--on',\n BUTTON_DENSE: 'forge-icon-button--dense',\n ICON: 'forge-icon-button__icon',\n ICON_ON: 'forge-icon-button__icon--on',\n DENSITY: [\n 'forge-icon-button--dense-1',\n 'forge-icon-button--dense-2',\n 'forge-icon-button--dense-3',\n 'forge-icon-button--dense-4',\n 'forge-icon-button--dense-5',\n 'forge-icon-button--dense-6'\n ]\n};\n\nconst events = {\n CHANGE: `${elementName}-change`\n};\n\nexport const ICON_BUTTON_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes,\n events\n};\n", "import { coerceBoolean, coerceNumber, CustomElement, emitEvent, ensureChild, toggleClass } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { ForgeRipple } from '../ripple';\nimport { userInteractionListener } from '../core/utils';\nimport { ICON_BUTTON_CONSTANTS } from './icon-button-constants';\n\nexport interface IIconButtonComponent extends IBaseComponent {\n toggle: boolean;\n isOn: boolean;\n dense: boolean;\n densityLevel: number;\n layout(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-icon-button': IIconButtonComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-icon-button-change': CustomEvent<boolean>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-icon-button>` element.\n * \n * @tag forge-icon-button\n */\n@CustomElement({\n name: ICON_BUTTON_CONSTANTS.elementName\n})\nexport class IconButtonComponent extends BaseComponent implements IIconButtonComponent {\n public static get observedAttributes(): string[] {\n return [\n ICON_BUTTON_CONSTANTS.attributes.IS_ON,\n ICON_BUTTON_CONSTANTS.attributes.DENSE,\n ICON_BUTTON_CONSTANTS.attributes.DENSITY_LEVEL,\n ICON_BUTTON_CONSTANTS.attributes.TOGGLE\n ];\n }\n\n private _rippleInstance: ForgeRipple;\n private _buttonElement: HTMLButtonElement;\n private _toggle = false;\n private _isOn = false;\n private _dense = false;\n private _densityLevel = 5;\n private _toggleHandler: (event: Event) => void;\n\n constructor() {\n super();\n }\n\n public connectedCallback(): void {\n if (this.querySelector(ICON_BUTTON_CONSTANTS.selectors.BUTTON)) {\n this._initialize();\n } else {\n ensureChild(this, ICON_BUTTON_CONSTANTS.selectors.BUTTON).then(() => this._initialize());\n }\n }\n\n public disconnectedCallback(): void {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case ICON_BUTTON_CONSTANTS.attributes.IS_ON:\n this.isOn = coerceBoolean(newValue);\n break;\n case ICON_BUTTON_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case ICON_BUTTON_CONSTANTS.attributes.DENSITY_LEVEL:\n this.densityLevel = coerceNumber(newValue);\n break;\n case ICON_BUTTON_CONSTANTS.attributes.TOGGLE:\n this.toggle = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Gets/sets whether the button is togglable. */\n public get toggle(): boolean {\n return this._toggle;\n }\n public set toggle(value: boolean) {\n this._toggle = value;\n\n if (this._toggle) {\n this._initializeToggle();\n } else {\n this._destroyToggle();\n }\n }\n\n /** Gets/sets the toggled state of the icon button. Only applies when `toggle = true`. */\n public get isOn(): boolean {\n return this._isOn;\n }\n public set isOn(value: boolean) {\n if (this._isOn !== value) {\n this._isOn = value;\n this._applyToggle();\n }\n }\n\n /** Gets/sets whether the icon button is dense. */\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._applyDensity();\n }\n }\n\n /** Controls the density level. 1 (least dense) to 6 (most dense). */\n public get densityLevel(): number {\n return this._densityLevel;\n }\n public set densityLevel(value: number) {\n if (this._densityLevel !== value) {\n this._densityLevel = value;\n\n if (this._densityLevel <= 0) {\n this._densityLevel = 1;\n } else if (this._densityLevel > 6) {\n this._densityLevel = 6;\n } else if (typeof this._densityLevel !== 'number') {\n this._densityLevel = 5;\n }\n\n this._applyDensity();\n }\n }\n\n private _initialize(): void {\n this._buttonElement = this.querySelector(ICON_BUTTON_CONSTANTS.selectors.BUTTON) as HTMLButtonElement;\n if (!this._buttonElement) {\n return;\n }\n\n this._buttonElement.classList.add(ICON_BUTTON_CONSTANTS.classes.BUTTON);\n this._applyToggle();\n this._applyDensity();\n this._toggleHandler = () => {\n this._toggleValue();\n emitEvent(this, ICON_BUTTON_CONSTANTS.events.CHANGE, this._isOn, true);\n };\n\n if (this._toggle) {\n this._initializeToggle();\n }\n\n // We wait to initialize the ripple instance until the user interacts with the component to avoid unnecessary performance overhead\n this._deferRippleInitialization();\n }\n\n private async _deferRippleInitialization(): Promise<void> {\n const type = await userInteractionListener(this._buttonElement);\n if (!this._rippleInstance) {\n this._rippleInstance = this._createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n }\n\n private _createRipple(): ForgeRipple {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n const ripple = new ForgeRipple(this._buttonElement);\n ripple.unbounded = true;\n return ripple;\n }\n\n private _toggleValue(): void {\n this._isOn = !this._isOn;\n this._applyToggle();\n }\n\n private _applyToggle(): void {\n if (!this._buttonElement) {\n return;\n }\n toggleClass(this._buttonElement, this._isOn, ICON_BUTTON_CONSTANTS.classes.BUTTON_ON);\n if (this._toggle) {\n this._buttonElement.setAttribute('aria-pressed', `${this._isOn}`);\n }\n }\n\n private _applyDensity(): void {\n if (!this._buttonElement) {\n return;\n }\n\n // Remove all other density classes first\n ICON_BUTTON_CONSTANTS.classes.DENSITY.forEach(c => this._buttonElement.classList.remove(c));\n\n if (this._dense) {\n this.setAttribute(ICON_BUTTON_CONSTANTS.attributes.DENSE, '');\n this._buttonElement.classList.add(ICON_BUTTON_CONSTANTS.classes.BUTTON_DENSE);\n\n // 5 is the default density level (we apply 5 implicitly in the regular dense class)\n // Exclude 5 since its already covered by dense class\n if (this._densityLevel < 7 && this._densityLevel > 0 && this.densityLevel !== 5) {\n const densityLevelClass = ICON_BUTTON_CONSTANTS.classes.DENSITY[this._densityLevel - 1];\n this._buttonElement.classList.add(densityLevelClass);\n this.setAttribute(ICON_BUTTON_CONSTANTS.attributes.DENSITY_LEVEL, this._densityLevel.toString());\n }\n } else {\n this.removeAttribute(ICON_BUTTON_CONSTANTS.attributes.DENSE);\n this._buttonElement.classList.remove(ICON_BUTTON_CONSTANTS.classes.BUTTON_DENSE);\n }\n\n // re-layout the ripple for cases where dense was changed after initial layout\n if (this._rippleInstance) {\n this._rippleInstance.layout();\n }\n }\n\n private _initializeToggle(): void {\n if (!this._buttonElement) {\n return;\n }\n const icons = Array.from(this._buttonElement.querySelectorAll(ICON_BUTTON_CONSTANTS.selectors.ICON));\n\n // We require two icon/image elements to be specified for the \"on\" and \"off\" states\n if (icons.length !== 2) {\n console.error('You must specify two icons, one for \"on\" and one for \"off\".');\n return;\n }\n\n // Add the icon class to each icon\n icons.forEach(icon => icon.classList.add(ICON_BUTTON_CONSTANTS.classes.ICON));\n\n // If there are no icons that specify the \"on\" class, then automatically choose the first icon as the \"on\" icon and add the class,\n // alternatively we check for the existence of a `forge-icon-button-on` attribute on any of the icons and use that.\n if (!icons.some(icon => icon.classList.contains(ICON_BUTTON_CONSTANTS.classes.ICON_ON))) {\n const requestedOnIcon = icons.find(icon => icon.hasAttribute(ICON_BUTTON_CONSTANTS.attributes.ICON_ON));\n if (requestedOnIcon) {\n requestedOnIcon.classList.add(ICON_BUTTON_CONSTANTS.classes.ICON_ON);\n } else {\n icons[0].classList.add(ICON_BUTTON_CONSTANTS.classes.ICON_ON);\n }\n }\n\n this._buttonElement.addEventListener('click', this._toggleHandler);\n\n // Wait a frame to ensure the value of the `on` property has been set\n window.requestAnimationFrame(() => {\n if (this._isOn) {\n this._buttonElement.classList.add(ICON_BUTTON_CONSTANTS.classes.BUTTON_ON);\n this._buttonElement.setAttribute('aria-pressed', `${this._isOn}`);\n }\n });\n }\n\n private _destroyToggle(): void {\n if (!this._buttonElement) {\n return;\n }\n this._buttonElement.removeEventListener('click', this._toggleHandler);\n }\n\n public layout(): void {\n if (this._rippleInstance) {\n this._rippleInstance.layout();\n }\n }\n}\n", "import { addClass } from '@tylertech/forge-core';\nimport { IconExternalType, ICON_CONSTANTS, IIconComponent } from '../icon';\nimport { ICON_CLASS_NAME } from '../constants';\nimport { BaseComponentDelegate, IBaseComponentDelegateConfig, IBaseComponentDelegateOptions } from '../core/delegates/base-component-delegate';\nimport { IIconButtonComponent } from './icon-button';\nimport { ICON_BUTTON_CONSTANTS } from './icon-button-constants';\nimport { PopupPlacement } from '../popup';\n\nexport type IconButtonComponentDelegateProps = Partial<IIconButtonComponent>;\nexport interface IIconButtonComponentDelegateOptions extends IBaseComponentDelegateOptions {\n iconName?: string;\n iconExternal?: boolean;\n iconExternalType?: IconExternalType;\n iconType?: 'font' | 'component';\n iconClass?: string | string[];\n tooltip?: string;\n tooltipPosition?: PopupPlacement;\n}\nexport interface IIconButtonComponentDelegateConfig extends IBaseComponentDelegateConfig<IIconButtonComponent, IIconButtonComponentDelegateOptions> {}\n\nexport class IconButtonComponentDelegate extends BaseComponentDelegate<IIconButtonComponent, IIconButtonComponentDelegateOptions> {\n private _buttonElement: HTMLButtonElement;\n private _iconElement?: IIconComponent;\n\n constructor(config?: IIconButtonComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IIconButtonComponent {\n const component = document.createElement(ICON_BUTTON_CONSTANTS.elementName);\n this._buttonElement = document.createElement('button');\n this._buttonElement.type = 'button';\n component.appendChild(this._buttonElement);\n\n if (this._config.options?.tooltip) {\n const tooltip = document.createElement('forge-tooltip');\n tooltip.textContent = this._config.options.tooltip;\n \n if (this._config.options.tooltipPosition) {\n tooltip.position = this._config.options.tooltipPosition;\n }\n\n component.appendChild(tooltip);\n }\n\n return component;\n }\n\n public get iconElement(): IIconComponent | undefined {\n return this._iconElement;\n }\n\n public get disabled(): boolean {\n return !!this._buttonElement.disabled;\n }\n public set disabled(value: boolean) {\n this._buttonElement.disabled = value;\n }\n\n /** @deprecated Use buttonElement instead. */\n public get butttonElement(): HTMLButtonElement | undefined {\n return this._buttonElement;\n }\n\n public get buttonElement(): HTMLButtonElement | undefined {\n return this._buttonElement;\n }\n\n protected _configure(): void {\n this._configureIcon();\n }\n\n private _configureIcon(): void {\n if (!this._config.options?.iconName) {\n return;\n }\n\n const type = this._config.options?.iconType || 'component';\n\n switch (type) {\n case 'font':\n const classes = Array.isArray(this._config.options.iconClass) ? this._config.options.iconClass : [ICON_CLASS_NAME];\n addClass(classes, this._buttonElement);\n this._buttonElement.textContent = this._config.options.iconName;\n break;\n case 'component':\n this._iconElement = document.createElement(ICON_CONSTANTS.elementName);\n this._iconElement.name = this._config.options.iconName;\n if (this._config.options.iconExternal !== undefined) {\n this._iconElement.external = !!this._config.options.iconExternal;\n }\n if (this._config.options.iconExternalType) {\n this._iconElement.externalType = this._config.options.iconExternalType;\n }\n if (this._config.options.iconClass) {\n addClass(this._config.options.iconClass, this._iconElement);\n }\n this._buttonElement.appendChild(this._iconElement);\n break;\n }\n }\n\n public onClick(listener: (evt: MouseEvent) => void): void {\n this._buttonElement.addEventListener('click', listener);\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._buttonElement.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._buttonElement.addEventListener('blur', evt => listener(evt));\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { IconButtonComponent } from './icon-button';\n\nexport * from './icon-button-constants';\nexport * from './icon-button';\nexport * from './icon-button-component-delegate';\n\nexport function defineIconButtonComponent(): void {\n defineCustomElement(IconButtonComponent);\n}\n"],
|
|
5
|
+
"mappings": "yZAEA,IAAMA,EAA2C,GAAGC,eAE9CC,EAAa,CACjB,OAAQ,SACR,MAAO,QACP,QAAS,uBACT,MAAO,QACP,cAAe,eACjB,EAEMC,EAAY,CAChB,OAAQ,YACR,KAAM,+BACR,EAEMC,EAAU,CACd,OAAQ,oBACR,UAAW,wBACX,aAAc,2BACd,KAAM,0BACN,QAAS,8BACT,QAAS,CACP,6BACA,6BACA,6BACA,6BACA,6BACA,4BACF,CACF,EAEMC,EAAS,CACb,OAAQ,GAAGL,UACb,EAEaM,EAAwB,CACnC,YAAAN,EACA,WAAAE,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,CACF,ECXO,IAAME,EAAN,cAAkCC,CAA8C,CAkBrF,aAAc,CACZ,MAAM,EAPR,KAAQ,QAAU,GAClB,KAAQ,MAAQ,GAChB,KAAQ,OAAS,GACjB,KAAQ,cAAgB,CAKxB,CAnBA,WAAkB,oBAA+B,CAC/C,MAAO,CACLC,EAAsB,WAAW,MACjCA,EAAsB,WAAW,MACjCA,EAAsB,WAAW,cACjCA,EAAsB,WAAW,MACnC,CACF,CAcO,mBAA0B,CAC3B,KAAK,cAAcA,EAAsB,UAAU,MAAM,EAC3D,KAAK,YAAY,EAEjB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QAAQ,mBACvB,KAAK,aAAa,aAAe,KAAK,QAAQ,QAAQ,kBAEpD,KAAK,QAAQ,QAAQ,WACvBD,EAAS,KAAK,QAAQ,QAAQ,UAAW,KAAK,YAAY,EAE5D,KAAK,eAAe,YAAY,KAAK,YAAY,EACjD,MAEN,CAEO,QAAQE,EAA2C,CACxD,KAAK,eAAe,iBAAiB,QAASA,CAAQ,CACxD,CAEO,QAAQA,EAAsC,CACnD,KAAK,eAAe,iBAAiB,QAASC,GAAOD,EAASC,CAAG,CAAC,CACpE,CAEO,OAAOD,EAAsC,CAClD,KAAK,eAAe,iBAAiB,OAAQC,GAAOD,EAASC,CAAG,CAAC,CACnE,CACF,ECzGO,SAASC,GAAkC,CAChDC,EAAoBC,CAAmB,CACzC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "classes", "events", "ICON_BUTTON_CONSTANTS", "IconButtonComponent", "BaseComponent", "ICON_BUTTON_CONSTANTS", "ensureChild", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "value", "emitEvent", "type", "userInteractionListener", "ripple", "ForgeRipple", "toggleClass", "c", "densityLevelClass", "icons", "icon", "requestedOnIcon", "__decorateClass", "CustomElement", "IconButtonComponentDelegate", "BaseComponentDelegate", "config", "_a", "component", "ICON_BUTTON_CONSTANTS", "tooltip", "value", "_b", "classes", "ICON_CLASS_NAME", "addClass", "ICON_CONSTANTS", "listener", "evt", "defineIconButtonComponent", "defineCustomElement", "IconButtonComponent"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as n}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as n}from"./chunk.BJZ7RB5F.js";import{a as g}from"./chunk.G5MGGEFP.js";import{a as l}from"./chunk.KTGSZEAG.js";import{a as I,b as S}from"./chunk.BE7PZANN.js";import{a as T,e as E,g as _,l as f}from"./chunk.Y4GKBJGI.js";import{g as h,p as O}from"./chunk.PN26D52V.js";import{k as C,l as c}from"./chunk.J2M2MXP2.js";import{f as s}from"./chunk.MCIQXNKY.js";var A=`${S}product-icon`,d={PRODUCT_ICON_BACKGROUND:"forge-product-icon__background",PRODUCT_ICON:"forge-product-icon__icon",PRODUCT_TEXT:"forge-product-icon__text"},x={PRODUCT_ICON_BACKGROUND:`.${d.PRODUCT_ICON_BACKGROUND}`,PRODUCT_ICON:`.${d.PRODUCT_ICON}`,PRODUCT_TEXT:`.${d.PRODUCT_TEXT}`,SLOT:"slot"},R={COLOR:"color",SIZE:"size",SHADOW:"shadow",ITERATIONS:"iterations"},v={DEFAULT_SIZE:64,DEFAULT_ITERATIONS:32,ACCESSIBILITY_COLOR_THRESHOLD:300,ICON_FONT_SIZE_MODIFIER:.75,TEXT_FONT_SIZE_MODIFIER:.5},N={DEFAULT_COLOR_VALUE:"indigo-500",DEFAULT_COLOR_PALETTE:"indigo",DEFAULT_COLOR_SHADE:500,DEFAULT_BACKGROUND_COLOR:n.indigoPalette[500]},t={elementName:A,attributes:R,classes:d,selectors:x,numbers:v,strings:N};var p=class extends g{constructor(e){super(e);this._backgroundElement=_(e,t.selectors.PRODUCT_ICON_BACKGROUND),this._iconElement=_(e,t.selectors.PRODUCT_ICON),this._textElement=_(e,t.selectors.PRODUCT_TEXT)}setBackgroundColor(e){this._backgroundElement.style.backgroundColor=e}setIconColor(e){this._iconElement.style.color=e,this._textElement.style.color=e}setElementSize(e){this._backgroundElement.style.height=`${e}px`,this._backgroundElement.style.width=`${e}px`}setFontSize(e){let a=e*t.numbers.TEXT_FONT_SIZE_MODIFIER,r=e*t.numbers.ICON_FONT_SIZE_MODIFIER;this._iconElement.style.setProperty("--forge-product-icon-font-size",`${r}px`),this._textElement.style.setProperty("--forge-product-icon-font-size",`${a}px`),this._iconElement.style.fontSize=`var(--forge-product-icon-font-size, ${r}px)`,this._textElement.style.fontSize=`var(--forge-product-icon-font-size, ${a}px)`}removeIconClass(e){h(e,this._iconElement),h(e,this._textElement)}setTextShadow(e,a,r){if(e){let b=O(a,r);this._iconElement.style.textShadow=b,this._textElement.style.textShadow=b}else this._iconElement.style.removeProperty("text-shadow"),this._textElement.style.removeProperty("text-shadow")}};var u=class{constructor(o){this._adapter=o;this._colorValue=t.strings.DEFAULT_COLOR_VALUE;this._colorPalette=t.strings.DEFAULT_COLOR_PALETTE;this._colorShade=t.strings.DEFAULT_COLOR_SHADE;this._size=t.numbers.DEFAULT_SIZE;this._shadow=!0;this._backgroundColor=t.strings.DEFAULT_BACKGROUND_COLOR;this._iterations=t.numbers.DEFAULT_ITERATIONS;this._usingCustomIterations=!1}initialize(){this._adapter.setElementSize(this._size),this._updateFontSize(),this._parseColor(),this._render()}_parseColor(){this._colorValue.includes("-")?(this._colorPalette=this._colorValue.split("-")[0],this._colorShade=c(this._colorValue.split("-")[1])):(this._colorPalette=this._colorValue,this._colorShade=t.strings.DEFAULT_COLOR_SHADE)}_updateSize(){this._adapter.setElementSize(this._size),this._usingCustomIterations||(this._iterations=this._size/2,this._updateShadow())}_updateFontSize(){this._adapter.setFontSize(this._size)}_updateShadow(){this._shadow&&this._adapter.setTextShadow(this._shadow,this._iterations,this._shadowColor)}_render(){if(!this._colorValue)return;let o=this._colorShade<=t.numbers.ACCESSIBILITY_COLOR_THRESHOLD?"#000000":"#ffffff",e=this._colorShade+300;n[`${this._colorPalette}Palette`]||(this._colorPalette=t.strings.DEFAULT_COLOR_PALETTE),this._backgroundColor=n[`${this._colorPalette}Palette`][this._colorShade],this._shadowColor=n[`${this._colorPalette}Palette`][e],this._adapter.setBackgroundColor(this._backgroundColor),this._adapter.setIconColor(o),this._updateShadow()}get color(){return this._colorValue}set color(o){this._colorValue!==o&&(this._colorValue=o,this._parseColor(),this._render(),this._adapter.setHostAttribute(t.attributes.COLOR,this._colorValue))}get size(){return this._size}set size(o){this._size!==o&&(this._size=o,this._updateSize(),this._updateFontSize(),this._adapter.setHostAttribute(t.attributes.SIZE,this._size.toString()))}get shadow(){return this._shadow}set shadow(o){this._shadow!==o&&(this._shadow=o,this._adapter.setTextShadow(this._shadow,this._iterations,this._shadowColor),this._shadow?this._adapter.setHostAttribute(t.attributes.SHADOW,""):this._adapter.removeIconClass(t.attributes.SHADOW))}get iterations(){return this._iterations}set iterations(o){this._iterations!==o&&(this._usingCustomIterations=!0,this._iterations=o,this._updateShadow(),this._adapter.setHostAttribute(t.attributes.ITERATIONS,this._iterations.toString()))}};var D='<template><div class="forge-product-icon__background" part="root"><div class="forge-product-icon__container" part="container"><span class="forge-product-icon__icon" part="icon-container"><slot></slot></span><span class="forge-product-icon__text" part="text-container"><slot name="text"></slot></span></div></div></template>',L=".forge-product-icon__background{border-radius:50%;border-radius:var(--forge-product-icon-border-radius,50%);height:64px;width:64px;overflow:hidden}.forge-product-icon__container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;height:100%;width:100%}.forge-product-icon__icon ::slotted(*),.forge-product-icon__text ::slotted(*){display:-webkit-box!important;display:flex!important;color:#fff!important;font-size:var(--forge-product-icon-font-size, 48px)!important}:host{display:inline-block}:host([hidden]){display:none}",i=class extends f{constructor(){super();E(this,D,L),this._foundation=new u(new p(this))}static get observedAttributes(){return[t.attributes.COLOR,t.attributes.SIZE,t.attributes.SHADOW,t.attributes.ITERATIONS]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(e,a,r){switch(e){case t.attributes.COLOR:this.color=r;break;case t.attributes.SIZE:this.size=c(r);break;case t.attributes.SHADOW:this.shadow=C(r);break;case t.attributes.ITERATIONS:this.iterations=c(r);break}}};s([l()],i.prototype,"color",2),s([l()],i.prototype,"size",2),s([l()],i.prototype,"shadow",2),s([l()],i.prototype,"iterations",2),i=s([I({name:t.elementName})],i);function ot(){T(i)}export{t as a,p as b,u as c,i as d,ot as e};
|
|
7
|
+
//# sourceMappingURL=chunk.7UKA4E5A.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/product-icon/product-icon-constants.ts", "../../src/product-icon/product-icon-adapter.ts", "../../src/product-icon/product-icon-foundation.ts", "../../src/product-icon/product-icon.ts", "../../src/product-icon/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\r\nimport { COLOR_CONSTANTS } from '../theme/color-constants';\r\n\r\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}product-icon`;\r\n\r\nconst classes = {\r\n PRODUCT_ICON_BACKGROUND: 'forge-product-icon__background',\r\n PRODUCT_ICON: 'forge-product-icon__icon',\r\n PRODUCT_TEXT: 'forge-product-icon__text'\r\n};\r\n\r\nconst selectors = {\r\n PRODUCT_ICON_BACKGROUND: `.${classes.PRODUCT_ICON_BACKGROUND}`,\r\n PRODUCT_ICON: `.${classes.PRODUCT_ICON}`,\r\n PRODUCT_TEXT: `.${classes.PRODUCT_TEXT}`,\r\n SLOT: 'slot'\r\n};\r\n\r\nconst attributes = {\r\n COLOR: 'color',\r\n SIZE: 'size',\r\n SHADOW: 'shadow',\r\n ITERATIONS: 'iterations'\r\n};\r\n\r\nconst numbers = {\r\n DEFAULT_SIZE: 64,\r\n DEFAULT_ITERATIONS: 32,\r\n ACCESSIBILITY_COLOR_THRESHOLD: 300,\r\n ICON_FONT_SIZE_MODIFIER: 0.75,\r\n TEXT_FONT_SIZE_MODIFIER: 0.5\r\n};\r\n\r\nconst strings = {\r\n DEFAULT_COLOR_VALUE: 'indigo-500',\r\n DEFAULT_COLOR_PALETTE: 'indigo',\r\n DEFAULT_COLOR_SHADE: 500,\r\n DEFAULT_BACKGROUND_COLOR: COLOR_CONSTANTS.indigoPalette[500]\r\n};\r\n\r\nexport const PRODUCT_ICON_CONSTANTS = {\r\n elementName,\r\n attributes,\r\n classes,\r\n selectors,\r\n numbers,\r\n strings\r\n};\r\n", "import { addClass, generateTextShadow, getShadowElement, Platform, removeClass } from '@tylertech/forge-core';\r\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\r\nimport { IProductIconComponent } from './product-icon';\r\nimport { PRODUCT_ICON_CONSTANTS } from './product-icon-constants';\r\n\r\nexport interface IProductIconAdapter extends IBaseAdapter {\r\n setBackgroundColor(color: string): void;\r\n setIconColor(color: string): void;\r\n setElementSize(value: number): void;\r\n setFontSize(value: number): void;\r\n setTextShadow(hasShadow: boolean, iterations: number, shadowColor: string): void;\r\n removeIconClass(classes: string | string[]): void;\r\n}\r\n\r\nexport class ProductIconAdapter extends BaseAdapter<IProductIconComponent> implements IProductIconAdapter {\r\n private _backgroundElement: HTMLElement;\r\n private _iconElement: HTMLElement;\r\n private _textElement: HTMLElement;\r\n\r\n constructor(component: IProductIconComponent) {\r\n super(component);\r\n this._backgroundElement = getShadowElement(component, PRODUCT_ICON_CONSTANTS.selectors.PRODUCT_ICON_BACKGROUND);\r\n this._iconElement = getShadowElement(component, PRODUCT_ICON_CONSTANTS.selectors.PRODUCT_ICON);\r\n this._textElement = getShadowElement(component, PRODUCT_ICON_CONSTANTS.selectors.PRODUCT_TEXT);\r\n }\r\n\r\n public setBackgroundColor(color: string): void {\r\n this._backgroundElement.style.backgroundColor = color;\r\n }\r\n\r\n public setIconColor(color: string): void {\r\n this._iconElement.style.color = color;\r\n this._textElement.style.color = color;\r\n }\r\n\r\n public setElementSize(value: number): void {\r\n this._backgroundElement.style.height = `${value}px`;\r\n this._backgroundElement.style.width = `${value}px`;\r\n }\r\n\r\n public setFontSize(value: number): void {\r\n const textFontSize = value * PRODUCT_ICON_CONSTANTS.numbers.TEXT_FONT_SIZE_MODIFIER;\r\n const iconFontSize = value * PRODUCT_ICON_CONSTANTS.numbers.ICON_FONT_SIZE_MODIFIER;\r\n\r\n this._iconElement.style.setProperty('--forge-product-icon-font-size', `${iconFontSize}px`);\r\n this._textElement.style.setProperty('--forge-product-icon-font-size', `${textFontSize}px`);\r\n\r\n this._iconElement.style.fontSize = `var(--forge-product-icon-font-size, ${iconFontSize}px)`;\r\n this._textElement.style.fontSize = `var(--forge-product-icon-font-size, ${textFontSize}px)`;\r\n }\r\n\r\n public removeIconClass(classes: string | string[]): void {\r\n removeClass(classes, this._iconElement);\r\n removeClass(classes, this._textElement);\r\n }\r\n\r\n public setTextShadow(hasShadow: boolean, iterations: number, shadowColor: string): void {\r\n if (hasShadow) {\r\n const shadow = generateTextShadow(iterations, shadowColor);\r\n this._iconElement.style.textShadow = shadow;\r\n this._textElement.style.textShadow = shadow;\r\n } else {\r\n this._iconElement.style.removeProperty('text-shadow');\r\n this._textElement.style.removeProperty('text-shadow');\r\n }\r\n }\r\n}\r\n", "import { ICustomElementFoundation, coerceNumber } from '@tylertech/forge-core';\r\n\r\nimport { COLOR_CONSTANTS } from '../theme';\r\nimport { IProductIconAdapter } from './product-icon-adapter';\r\nimport { PRODUCT_ICON_CONSTANTS } from './product-icon-constants';\r\n\r\nexport interface IProductIconFoundation extends ICustomElementFoundation {\r\n color: string;\r\n size: number;\r\n shadow: boolean;\r\n iterations: number;\r\n}\r\n\r\nexport class ProductIconFoundation implements IProductIconFoundation {\r\n private _colorValue = PRODUCT_ICON_CONSTANTS.strings.DEFAULT_COLOR_VALUE;\r\n private _colorPalette = PRODUCT_ICON_CONSTANTS.strings.DEFAULT_COLOR_PALETTE;\r\n private _colorShade = PRODUCT_ICON_CONSTANTS.strings.DEFAULT_COLOR_SHADE;\r\n private _size = PRODUCT_ICON_CONSTANTS.numbers.DEFAULT_SIZE;\r\n private _shadow = true;\r\n private _backgroundColor = PRODUCT_ICON_CONSTANTS.strings.DEFAULT_BACKGROUND_COLOR;\r\n private _shadowColor: string;\r\n private _iterations = PRODUCT_ICON_CONSTANTS.numbers.DEFAULT_ITERATIONS;\r\n private _usingCustomIterations = false;\r\n\r\n constructor(private _adapter: IProductIconAdapter) {}\r\n\r\n public initialize(): void {\r\n this._adapter.setElementSize(this._size);\r\n this._updateFontSize();\r\n this._parseColor();\r\n this._render();\r\n }\r\n\r\n private _parseColor(): void {\r\n if (this._colorValue.includes('-')) {\r\n this._colorPalette = this._colorValue.split('-')[0];\r\n this._colorShade = coerceNumber(this._colorValue.split('-')[1]);\r\n } else {\r\n this._colorPalette = this._colorValue;\r\n this._colorShade = PRODUCT_ICON_CONSTANTS.strings.DEFAULT_COLOR_SHADE;\r\n }\r\n }\r\n\r\n private _updateSize(): void {\r\n this._adapter.setElementSize(this._size);\r\n\r\n // If not using a custom iteration value, then we need to adjust the shadow length\r\n if (!this._usingCustomIterations) {\r\n this._iterations = this._size / 2;\r\n this._updateShadow();\r\n }\r\n }\r\n\r\n private _updateFontSize(): void {\r\n this._adapter.setFontSize(this._size);\r\n }\r\n\r\n private _updateShadow(): void {\r\n if (this._shadow) {\r\n this._adapter.setTextShadow(this._shadow, this._iterations, this._shadowColor);\r\n }\r\n }\r\n\r\n private _render(): void {\r\n if (!this._colorValue) {\r\n return;\r\n }\r\n\r\n const iconColor = this._colorShade <= PRODUCT_ICON_CONSTANTS.numbers.ACCESSIBILITY_COLOR_THRESHOLD ? '#000000' : '#ffffff';\r\n const shadowIncrement = this._colorShade + 300;\r\n\r\n if (!COLOR_CONSTANTS[`${this._colorPalette}Palette`]) {\r\n this._colorPalette = PRODUCT_ICON_CONSTANTS.strings.DEFAULT_COLOR_PALETTE;\r\n }\r\n\r\n this._backgroundColor = COLOR_CONSTANTS[`${this._colorPalette}Palette`][this._colorShade];\r\n this._shadowColor = COLOR_CONSTANTS[`${this._colorPalette}Palette`][shadowIncrement];\r\n\r\n this._adapter.setBackgroundColor(this._backgroundColor);\r\n this._adapter.setIconColor(iconColor);\r\n this._updateShadow();\r\n }\r\n\r\n public get color(): string {\r\n return this._colorValue;\r\n }\r\n public set color(value: string) {\r\n if (this._colorValue !== value) {\r\n this._colorValue = value;\r\n this._parseColor();\r\n this._render();\r\n this._adapter.setHostAttribute(PRODUCT_ICON_CONSTANTS.attributes.COLOR, this._colorValue);\r\n }\r\n }\r\n\r\n public get size(): number {\r\n return this._size;\r\n }\r\n public set size(value: number) {\r\n if (this._size !== value) {\r\n this._size = value;\r\n this._updateSize();\r\n this._updateFontSize();\r\n this._adapter.setHostAttribute(PRODUCT_ICON_CONSTANTS.attributes.SIZE, this._size.toString());\r\n }\r\n }\r\n\r\n public get shadow(): boolean {\r\n return this._shadow;\r\n }\r\n public set shadow(value: boolean) {\r\n if (this._shadow !== value) {\r\n this._shadow = value;\r\n this._adapter.setTextShadow(this._shadow, this._iterations, this._shadowColor);\r\n if (this._shadow) {\r\n this._adapter.setHostAttribute(PRODUCT_ICON_CONSTANTS.attributes.SHADOW, '');\r\n } else {\r\n this._adapter.removeIconClass(PRODUCT_ICON_CONSTANTS.attributes.SHADOW);\r\n }\r\n }\r\n }\r\n\r\n public get iterations(): number {\r\n return this._iterations;\r\n }\r\n public set iterations(value: number) {\r\n if (this._iterations !== value) {\r\n this._usingCustomIterations = true;\r\n this._iterations = value;\r\n this._updateShadow();\r\n this._adapter.setHostAttribute(PRODUCT_ICON_CONSTANTS.attributes.ITERATIONS, this._iterations.toString());\r\n }\r\n }\r\n}\r\n", "import { CustomElement, attachShadowTemplate, coerceNumber, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\r\nimport { ProductIconAdapter } from './product-icon-adapter';\r\nimport { ProductIconFoundation } from './product-icon-foundation';\r\nimport { PRODUCT_ICON_CONSTANTS } from './product-icon-constants';\r\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\r\n\r\nconst template = '<template><div class=\\\"forge-product-icon__background\\\" part=\\\"root\\\"><div class=\\\"forge-product-icon__container\\\" part=\\\"container\\\"><span class=\\\"forge-product-icon__icon\\\" part=\\\"icon-container\\\"><slot></slot></span><span class=\\\"forge-product-icon__text\\\" part=\\\"text-container\\\"><slot name=\\\"text\\\"></slot></span></div></div></template>';\r\nconst styles = '.forge-product-icon__background{border-radius:50%;border-radius:var(--forge-product-icon-border-radius,50%);height:64px;width:64px;overflow:hidden}.forge-product-icon__container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;height:100%;width:100%}.forge-product-icon__icon ::slotted(*),.forge-product-icon__text ::slotted(*){display:-webkit-box!important;display:flex!important;color:#fff!important;font-size:var(--forge-product-icon-font-size, 48px)!important}:host{display:inline-block}:host([hidden]){display:none}';\r\n\r\nexport interface IProductIconComponent extends IBaseComponent {\r\n color: string;\r\n size: number;\r\n shadow: boolean;\r\n iterations: number;\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n 'forge-product-icon': IProductIconComponent;\r\n }\r\n}\r\n\r\n/**\r\n * The web component class behind the `<forge-product-icon>` custom element.\r\n * \r\n * @tag forge-product-icon\r\n */\r\n@CustomElement({\r\n name: PRODUCT_ICON_CONSTANTS.elementName\r\n})\r\nexport class ProductIconComponent extends BaseComponent implements IProductIconComponent {\r\n public static get observedAttributes(): string[] {\r\n return [\r\n PRODUCT_ICON_CONSTANTS.attributes.COLOR,\r\n PRODUCT_ICON_CONSTANTS.attributes.SIZE,\r\n PRODUCT_ICON_CONSTANTS.attributes.SHADOW,\r\n PRODUCT_ICON_CONSTANTS.attributes.ITERATIONS\r\n ];\r\n }\r\n\r\n private _foundation: ProductIconFoundation;\r\n\r\n constructor() {\r\n super();\r\n attachShadowTemplate(this, template, styles);\r\n this._foundation = new ProductIconFoundation(new ProductIconAdapter(this));\r\n }\r\n\r\n public connectedCallback(): void {\r\n this._foundation.initialize();\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n switch (name) {\r\n case PRODUCT_ICON_CONSTANTS.attributes.COLOR:\r\n this.color = newValue;\r\n break;\r\n case PRODUCT_ICON_CONSTANTS.attributes.SIZE:\r\n this.size = coerceNumber(newValue);\r\n break;\r\n case PRODUCT_ICON_CONSTANTS.attributes.SHADOW:\r\n this.shadow = coerceBoolean(newValue);\r\n break;\r\n case PRODUCT_ICON_CONSTANTS.attributes.ITERATIONS:\r\n this.iterations = coerceNumber(newValue);\r\n break;\r\n }\r\n }\r\n\r\n /** The color of the container element from the material color palette. */\r\n @FoundationProperty()\r\n public declare color: string;\r\n\r\n /** Controls the height and width of the container element. */\r\n @FoundationProperty()\r\n public declare size: number;\r\n\r\n /** Controls the visibility of the text shadow. */\r\n @FoundationProperty()\r\n public declare shadow: boolean;\r\n\r\n /** The number of iterations to apply the text shadow. */\r\n @FoundationProperty()\r\n public declare iterations: number;\r\n}\r\n", "import { defineCustomElement } from '@tylertech/forge-core';\r\n\r\nimport { ProductIconComponent } from './product-icon';\r\n\r\nexport * from './product-icon-adapter';\r\nexport * from './product-icon-constants';\r\nexport * from './product-icon-foundation';\r\nexport * from './product-icon';\r\n\r\nexport function defineProductIconComponent(): void {\r\n defineCustomElement(ProductIconComponent);\r\n}\r\n"],
|
|
5
|
-
"mappings": "0WAGA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "0WAGA,IAAMA,EAA2C,GAAGC,gBAE9CC,EAAU,CACd,wBAAyB,iCACzB,aAAc,2BACd,aAAc,0BAChB,EAEMC,EAAY,CAChB,wBAAyB,IAAID,EAAQ,0BACrC,aAAc,IAAIA,EAAQ,eAC1B,aAAc,IAAIA,EAAQ,eAC1B,KAAM,MACR,EAEME,EAAa,CACjB,MAAO,QACP,KAAM,OACN,OAAQ,SACR,WAAY,YACd,EAEMC,EAAU,CACd,aAAc,GACd,mBAAoB,GACpB,8BAA+B,IAC/B,wBAAyB,IACzB,wBAAyB,EAC3B,EAEMC,EAAU,CACd,oBAAqB,aACrB,sBAAuB,SACvB,oBAAqB,IACrB,yBAA0BC,EAAgB,cAAc,IAC1D,EAEaC,EAAyB,CACpC,YAAAR,EACA,WAAAI,EACA,QAAAF,EACA,UAAAC,EACA,QAAAE,EACA,QAAAC,CACF,ECjCO,IAAMG,EAAN,cAAiCC,CAAkE,CAKxG,YAAYC,EAAkC,CAC5C,MAAMA,CAAS,EACf,KAAK,mBAAqBC,EAAiBD,EAAWE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CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,QACDD,EAAuB,WAAW,MACrC,KAAK,MAAQG,EACb,WACGH,EAAuB,WAAW,KACrC,KAAK,KAAOI,EAAaD,CAAQ,EACjC,WACGH,EAAuB,WAAW,OACrC,KAAK,OAASK,EAAcF,CAAQ,EACpC,WACGH,EAAuB,WAAW,WACrC,KAAK,WAAaI,EAAaD,CAAQ,EACvC,MAEN,CAiBF,EAbiBG,EAAA,CADdC,EAAmB,GAxCTZ,EAyCI,qBAIAW,EAAA,CADdC,EAAmB,GA5CTZ,EA6CI,oBAIAW,EAAA,CADdC,EAAmB,GAhDTZ,EAiDI,sBAIAW,EAAA,CADdC,EAAmB,GApDTZ,EAqDI,0BArDJA,EAANW,EAAA,CAHNE,EAAc,CACb,KAAMR,EAAuB,WAC/B,CAAC,GACYL,GCrBN,SAASc,IAAmC,CACjDC,EAAoBC,CAAoB,CAC1C",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "numbers", "strings", "COLOR_CONSTANTS", "PRODUCT_ICON_CONSTANTS", "ProductIconAdapter", "BaseAdapter", "component", "getShadowElement", "PRODUCT_ICON_CONSTANTS", "color", "value", "textFontSize", "iconFontSize", "classes", "removeClass", "hasShadow", "iterations", "shadowColor", "shadow", "generateTextShadow", "ProductIconFoundation", "_adapter", "PRODUCT_ICON_CONSTANTS", "coerceNumber", "iconColor", "shadowIncrement", "COLOR_CONSTANTS", "value", "template", "styles", "ProductIconComponent", "BaseComponent", "attachShadowTemplate", "ProductIconFoundation", "ProductIconAdapter", "PRODUCT_ICON_CONSTANTS", "name", "oldValue", "newValue", "coerceNumber", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "defineProductIconComponent", "defineCustomElement", "ProductIconComponent"]
|
|
7
7
|
}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
function n(e,o){let r=()=>o.dispatchEvent(new Event("scroll"));return e.addEventListener("scroll",r,!0),()=>e.removeEventListener("scroll",r,!0)}function t(e){return e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"}export{n as a,t as b};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
7
|
+
//# sourceMappingURL=chunk.7XFU2W25.js.map
|