@tylertech/forge 3.0.0-next.13 → 3.0.0-next.15
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 +48615 -40598
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/app-bar/index.js +7 -0
- 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-area/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/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.3KEXRSB5.js +7 -0
- package/dist/esm/chunks/{chunk.ZGRQDDHO.js.map → chunk.3KEXRSB5.js.map} +1 -1
- package/dist/esm/chunks/{chunk.U6FJJGO3.js → chunk.3PKNBYMG.js} +1 -1
- package/dist/esm/chunks/chunk.3PKNBYMG.js.map +7 -0
- package/dist/esm/chunks/chunk.3TKTJ3BY.js +7 -0
- package/dist/esm/chunks/chunk.3TKTJ3BY.js.map +7 -0
- package/dist/esm/chunks/{chunk.MKJCHUJH.js → chunk.42YDA5FH.js} +2 -2
- package/dist/esm/chunks/chunk.447QNYAZ.js +7 -0
- package/dist/esm/chunks/{chunk.PYR2OCCH.js.map → chunk.447QNYAZ.js.map} +1 -1
- package/dist/esm/chunks/chunk.4IMRT2B3.js +7 -0
- package/dist/esm/chunks/{chunk.RES7WDKH.js.map → chunk.4IMRT2B3.js.map} +1 -1
- package/dist/esm/chunks/chunk.4JDJ33IU.js +7 -0
- package/dist/esm/chunks/{chunk.ARQMMZJL.js.map → chunk.4JDJ33IU.js.map} +1 -1
- package/dist/esm/chunks/chunk.4QCGBFLU.js +7 -0
- package/dist/esm/chunks/chunk.4QCGBFLU.js.map +7 -0
- package/dist/esm/chunks/chunk.4XN2WGMP.js +7 -0
- package/dist/esm/chunks/chunk.4XN2WGMP.js.map +7 -0
- package/dist/esm/chunks/{chunk.G73KL7P2.js → chunk.5EGEZ4IY.js} +2 -2
- package/dist/esm/chunks/chunk.5FCUOZSU.js +7 -0
- package/dist/esm/chunks/{chunk.IHAHJPMB.js.map → chunk.5FCUOZSU.js.map} +1 -1
- package/dist/esm/chunks/chunk.5KYKGNGY.js +7 -0
- package/dist/esm/chunks/{chunk.MWYQRG5W.js.map → chunk.5KYKGNGY.js.map} +1 -1
- package/dist/esm/chunks/chunk.5QZPUOGG.js +7 -0
- package/dist/esm/chunks/{chunk.7VMJLHQY.js.map → chunk.5QZPUOGG.js.map} +1 -1
- package/dist/esm/chunks/chunk.5ZMM75CJ.js +7 -0
- package/dist/esm/chunks/chunk.5ZMM75CJ.js.map +7 -0
- package/dist/esm/chunks/chunk.6FUXTHO6.js +7 -0
- package/dist/esm/chunks/{chunk.AUBOJZQ7.js.map → chunk.6FUXTHO6.js.map} +1 -1
- package/dist/esm/chunks/chunk.6ORVPXNN.js +7 -0
- package/dist/esm/chunks/{chunk.IDMDBMBR.js.map → chunk.6ORVPXNN.js.map} +1 -1
- package/dist/esm/chunks/chunk.6ZJIHOIG.js +7 -0
- package/dist/esm/chunks/chunk.6ZJIHOIG.js.map +7 -0
- package/dist/esm/chunks/chunk.7LOMI6J3.js +7 -0
- package/dist/esm/chunks/chunk.7LOMI6J3.js.map +7 -0
- package/dist/esm/chunks/chunk.7PVVZC7P.js +7 -0
- package/dist/esm/chunks/chunk.7PVVZC7P.js.map +7 -0
- package/dist/esm/chunks/chunk.AEO2X5OZ.js +7 -0
- package/dist/esm/chunks/{chunk.LOG6GQOK.js.map → chunk.AEO2X5OZ.js.map} +1 -1
- package/dist/esm/chunks/chunk.AIPDMLJD.js +7 -0
- package/dist/esm/chunks/{chunk.AMZZKEAE.js.map → chunk.AIPDMLJD.js.map} +4 -4
- package/dist/esm/chunks/chunk.APFDK6YA.js +7 -0
- package/dist/esm/chunks/chunk.APFDK6YA.js.map +7 -0
- package/dist/esm/chunks/{chunk.W2LN45WY.js → chunk.AR6YUJUH.js} +2 -2
- package/dist/esm/chunks/chunk.AVRBHXDT.js +177 -0
- package/dist/esm/chunks/{chunk.R6LQBI42.js.map → chunk.AVRBHXDT.js.map} +1 -1
- package/dist/esm/chunks/chunk.BAQYPAUM.js +7 -0
- package/dist/esm/chunks/{chunk.BB4UF5RX.js → chunk.BC7WB5RG.js} +2 -2
- package/dist/esm/chunks/chunk.BIVQ4GTK.js +7 -0
- package/dist/esm/chunks/chunk.BIVQ4GTK.js.map +7 -0
- package/dist/esm/chunks/chunk.BJD6BKGC.js +31 -0
- package/dist/esm/chunks/chunk.BJD6BKGC.js.map +7 -0
- package/dist/esm/chunks/chunk.BS73Y6IN.js +7 -0
- package/dist/esm/chunks/{chunk.36C6SIPW.js.map → chunk.BS73Y6IN.js.map} +1 -1
- package/dist/esm/chunks/chunk.BTWJPE4Y.js +7 -0
- package/dist/esm/chunks/{chunk.HOLCNJXC.js.map → chunk.BTWJPE4Y.js.map} +1 -1
- package/dist/esm/chunks/chunk.BWGDZUJV.js +12 -0
- package/dist/esm/chunks/chunk.BWGDZUJV.js.map +7 -0
- package/dist/esm/chunks/{chunk.7XFU2W25.js → chunk.BX4AQRHB.js} +2 -2
- package/dist/esm/chunks/{chunk.7XFU2W25.js.map → chunk.BX4AQRHB.js.map} +3 -3
- package/dist/esm/chunks/chunk.CBY7M4X6.js +7 -0
- package/dist/esm/chunks/{chunk.TU74SREL.js.map → chunk.CBY7M4X6.js.map} +1 -1
- package/dist/esm/chunks/{chunk.YA3RDJCV.js → chunk.CZOABXEQ.js} +2 -2
- package/dist/esm/chunks/{chunk.YA3RDJCV.js.map → chunk.CZOABXEQ.js.map} +2 -2
- package/dist/esm/chunks/chunk.DLBAZD5X.js +7 -0
- package/dist/esm/chunks/{chunk.QLCVRJ3Q.js.map → chunk.DLBAZD5X.js.map} +1 -1
- package/dist/esm/chunks/chunk.DTWXICOY.js +7 -0
- package/dist/esm/chunks/chunk.DTWXICOY.js.map +7 -0
- package/dist/esm/chunks/{chunk.KV67JXOC.js → chunk.EMCY55MX.js} +2 -2
- package/dist/esm/chunks/chunk.ESQWFHCF.js +7 -0
- package/dist/esm/chunks/chunk.ESQWFHCF.js.map +7 -0
- package/dist/esm/chunks/{chunk.FYWPZFLJ.js → chunk.EWT2PBEP.js} +2 -2
- package/dist/esm/chunks/{chunk.FYWPZFLJ.js.map → chunk.EWT2PBEP.js.map} +2 -2
- package/dist/esm/chunks/chunk.FJ5VNWYK.js +7 -0
- package/dist/esm/chunks/chunk.FJ5VNWYK.js.map +7 -0
- package/dist/esm/chunks/chunk.FJRCWWE2.js +7 -0
- package/dist/esm/chunks/chunk.FJRCWWE2.js.map +7 -0
- package/dist/esm/chunks/chunk.FQUZWINF.js +7 -0
- package/dist/esm/chunks/{chunk.5WMYF27O.js.map → chunk.FQUZWINF.js.map} +2 -2
- package/dist/esm/chunks/chunk.FSILMO6U.js +7 -0
- package/dist/esm/chunks/{chunk.3R4BUIQP.js.map → chunk.FSILMO6U.js.map} +1 -1
- package/dist/esm/chunks/chunk.FXGY5IVK.js +7 -0
- package/dist/esm/chunks/chunk.FXGY5IVK.js.map +7 -0
- package/dist/esm/chunks/chunk.G67LO74A.js +7 -0
- package/dist/esm/chunks/chunk.G67LO74A.js.map +7 -0
- package/dist/esm/chunks/chunk.GGQL3OZB.js +7 -0
- package/dist/esm/chunks/{chunk.QJCNMYD3.js.map → chunk.GGQL3OZB.js.map} +1 -1
- package/dist/esm/chunks/{chunk.K7FPXAFS.js → chunk.HZUQXCOQ.js} +2 -2
- package/dist/esm/chunks/{chunk.K7FPXAFS.js.map → chunk.HZUQXCOQ.js.map} +2 -2
- package/dist/esm/chunks/chunk.I7OY43HW.js +7 -0
- package/dist/esm/chunks/chunk.I7OY43HW.js.map +7 -0
- package/dist/esm/chunks/{chunk.FXIWCHLW.js → chunk.I7X25KEB.js} +2 -2
- package/dist/esm/chunks/chunk.ICIGXLJW.js +7 -0
- package/dist/esm/chunks/{chunk.NUMKGUCK.js.map → chunk.ICIGXLJW.js.map} +1 -1
- package/dist/esm/chunks/chunk.IHIKIZIT.js +7 -0
- package/dist/esm/chunks/chunk.ILUXZNGY.js +7 -0
- package/dist/esm/chunks/{chunk.3ZPSN2QG.js.map → chunk.ILUXZNGY.js.map} +1 -1
- package/dist/esm/chunks/chunk.JEZR25US.js +7 -0
- package/dist/esm/chunks/{chunk.3HCYRDRI.js.map → chunk.JEZR25US.js.map} +1 -1
- package/dist/esm/chunks/{chunk.ZRSDTCSD.js → chunk.JHELTQKA.js} +2 -2
- package/dist/esm/chunks/{chunk.GNDKQPDV.js → chunk.JPI4XCQL.js} +2 -2
- package/dist/esm/chunks/chunk.JRSFCVYQ.js +7 -0
- package/dist/esm/chunks/chunk.JRSFCVYQ.js.map +7 -0
- package/dist/esm/chunks/chunk.JZ27GPZJ.js +7 -0
- package/dist/esm/chunks/{chunk.7ZROQ6D3.js.map → chunk.JZ27GPZJ.js.map} +1 -1
- package/dist/esm/chunks/chunk.K3TJMIKD.js +7 -0
- package/dist/esm/chunks/{chunk.IAWYYNUU.js.map → chunk.K3TJMIKD.js.map} +1 -1
- package/dist/esm/chunks/{chunk.FLWNOP42.js → chunk.KDJZN6EW.js} +2 -2
- package/dist/esm/chunks/chunk.KGHABAFA.js +7 -0
- package/dist/esm/chunks/{chunk.URJQNB3S.js.map → chunk.KGHABAFA.js.map} +1 -1
- package/dist/esm/chunks/chunk.KR4BNI6X.js +7 -0
- package/dist/esm/chunks/{chunk.G7SMCLHQ.js.map → chunk.KR4BNI6X.js.map} +1 -1
- package/dist/esm/chunks/chunk.KUNIEX72.js +7 -0
- package/dist/esm/chunks/{chunk.IISWKFCX.js.map → chunk.KUNIEX72.js.map} +1 -1
- package/dist/esm/chunks/{chunk.675V42JS.js → chunk.KWBYYSH3.js} +2 -2
- package/dist/esm/chunks/chunk.L27ANAIL.js +7 -0
- package/dist/esm/chunks/{chunk.XNFS7YIB.js.map → chunk.L27ANAIL.js.map} +1 -1
- package/dist/esm/chunks/{chunk.XEFWZKHQ.js → chunk.L45HXBDS.js} +2 -2
- package/dist/esm/chunks/chunk.L4UXWCVD.js +7 -0
- package/dist/esm/chunks/{chunk.V24M62MC.js.map → chunk.L4UXWCVD.js.map} +1 -1
- package/dist/esm/chunks/chunk.LK6QHLW2.js +7 -0
- package/dist/esm/chunks/{chunk.LCR4YH3O.js.map → chunk.LK6QHLW2.js.map} +1 -1
- package/dist/esm/chunks/chunk.LYZXJYTW.js +7 -0
- package/dist/esm/chunks/{chunk.YAERJVPL.js.map → chunk.LYZXJYTW.js.map} +1 -1
- package/dist/esm/chunks/chunk.LZ2YQYJA.js +7 -0
- package/dist/esm/chunks/chunk.LZ2YQYJA.js.map +7 -0
- package/dist/esm/chunks/chunk.M7RYU4HQ.js +7 -0
- package/dist/esm/chunks/chunk.M7RYU4HQ.js.map +7 -0
- package/dist/esm/chunks/{chunk.HRRJIFC5.js → chunk.MHH26REX.js} +2 -2
- package/dist/esm/chunks/chunk.MROUV35N.js +7 -0
- package/dist/esm/chunks/{chunk.SIRXAA3O.js.map → chunk.MROUV35N.js.map} +1 -1
- package/dist/esm/chunks/chunk.MTSWCXTY.js +7 -0
- package/dist/esm/chunks/chunk.NBLL7VAA.js +7 -0
- package/dist/esm/chunks/chunk.NM7FJISF.js +7 -0
- package/dist/esm/chunks/chunk.NM7FJISF.js.map +7 -0
- package/dist/esm/chunks/chunk.NVR6KN2B.js +7 -0
- package/dist/esm/chunks/{chunk.BTXY3XMJ.js.map → chunk.NVR6KN2B.js.map} +1 -1
- package/dist/esm/chunks/chunk.O6F4U4VY.js +7 -0
- package/dist/esm/chunks/{chunk.5N4N6DL6.js.map → chunk.O6F4U4VY.js.map} +1 -1
- package/dist/esm/chunks/chunk.O6MGA3XK.js +7 -0
- package/dist/esm/chunks/chunk.ONII3BV3.js +7 -0
- package/dist/esm/chunks/chunk.ONII3BV3.js.map +7 -0
- package/dist/esm/chunks/chunk.OTUEB7SD.js +7 -0
- package/dist/esm/chunks/{chunk.JVLJH6PR.js.map → chunk.OTUEB7SD.js.map} +1 -1
- package/dist/esm/chunks/{chunk.PADPL4L3.js → chunk.OUIWXKO2.js} +2 -2
- package/dist/esm/chunks/chunk.PMSCH6VK.js +7 -0
- package/dist/esm/chunks/{chunk.DTLZOIUQ.js.map → chunk.PMSCH6VK.js.map} +1 -1
- package/dist/esm/chunks/chunk.PRJHBUU2.js +7 -0
- package/dist/esm/chunks/chunk.PRJHBUU2.js.map +7 -0
- package/dist/esm/chunks/chunk.Q2Q626DG.js +7 -0
- package/dist/esm/chunks/{chunk.AMLT6XJP.js.map → chunk.Q2Q626DG.js.map} +1 -1
- package/dist/esm/chunks/chunk.Q4YL47ZL.js +7 -0
- package/dist/esm/chunks/{chunk.BQ2X5SBP.js.map → chunk.Q4YL47ZL.js.map} +1 -1
- package/dist/esm/chunks/chunk.Q54DACHS.js +7 -0
- package/dist/esm/chunks/{chunk.SLJ6HDK7.js.map → chunk.Q54DACHS.js.map} +1 -1
- package/dist/esm/chunks/chunk.Q74SG6BV.js +7 -0
- package/dist/esm/chunks/{chunk.2MSL7CYM.js.map → chunk.Q74SG6BV.js.map} +1 -1
- package/dist/esm/chunks/chunk.QG5EYBS3.js +7 -0
- package/dist/esm/chunks/chunk.QG5EYBS3.js.map +7 -0
- package/dist/esm/chunks/chunk.QGMWM7IT.js +7 -0
- package/dist/esm/chunks/{chunk.QQRPV4RN.js.map → chunk.QGMWM7IT.js.map} +2 -2
- package/dist/esm/chunks/chunk.RCPUTZON.js +7 -0
- package/dist/esm/chunks/{chunk.VFKHRAWD.js.map → chunk.RCPUTZON.js.map} +1 -1
- package/dist/esm/chunks/chunk.SBKKBQDX.js +7 -0
- package/dist/esm/chunks/chunk.SBKKBQDX.js.map +7 -0
- package/dist/esm/chunks/chunk.SVVF632P.js +7 -0
- package/dist/esm/chunks/chunk.SVVF632P.js.map +7 -0
- package/dist/esm/chunks/chunk.T4J66YX5.js +7 -0
- package/dist/esm/chunks/chunk.T4J66YX5.js.map +7 -0
- package/dist/esm/chunks/chunk.THNCYT3E.js +7 -0
- package/dist/esm/chunks/{chunk.72JVXGHF.js.map → chunk.THNCYT3E.js.map} +2 -2
- package/dist/esm/chunks/chunk.TPXXHX5J.js +7 -0
- package/dist/esm/chunks/{chunk.JAWV5Y5T.js.map → chunk.TPXXHX5J.js.map} +2 -2
- package/dist/esm/chunks/chunk.TSUAFZGY.js +7 -0
- package/dist/esm/chunks/{chunk.IT7XPDAV.js.map → chunk.TSUAFZGY.js.map} +1 -1
- package/dist/esm/chunks/chunk.U42I3PGF.js +7 -0
- package/dist/esm/chunks/chunk.U42I3PGF.js.map +7 -0
- package/dist/esm/chunks/{chunk.GHR7T6U2.js → chunk.U7S4DJTU.js} +2 -2
- package/dist/esm/chunks/chunk.UOEJCU6R.js +7 -0
- package/dist/esm/chunks/{chunk.KV5IKYG2.js.map → chunk.UOEJCU6R.js.map} +1 -1
- package/dist/esm/chunks/{chunk.Z5RROENA.js → chunk.URKQICJD.js} +2 -2
- package/dist/esm/chunks/chunk.VG452D3L.js +7 -0
- package/dist/esm/chunks/{chunk.STB2FEUA.js.map → chunk.VG452D3L.js.map} +2 -2
- package/dist/esm/chunks/chunk.VQPSP4HV.js +7 -0
- package/dist/esm/chunks/{chunk.VO6YJCEU.js.map → chunk.VQPSP4HV.js.map} +1 -1
- package/dist/esm/chunks/chunk.W7BP2DDU.js +7 -0
- package/dist/esm/chunks/{chunk.WY3E33CW.js.map → chunk.W7BP2DDU.js.map} +2 -2
- package/dist/esm/chunks/chunk.WARVAVAW.js +7 -0
- package/dist/esm/chunks/{chunk.2ZU6LWHE.js.map → chunk.WARVAVAW.js.map} +1 -1
- package/dist/esm/chunks/chunk.WEHQUUXJ.js +7 -0
- package/dist/esm/chunks/{chunk.5PG6WIIX.js.map → chunk.WEHQUUXJ.js.map} +1 -1
- package/dist/esm/chunks/chunk.WJCZJ6XD.js +7 -0
- package/dist/esm/chunks/{chunk.IMLJD35R.js.map → chunk.WJCZJ6XD.js.map} +1 -1
- package/dist/esm/chunks/{chunk.QLOYOZN3.js → chunk.WMP2OLMG.js} +2 -2
- package/dist/esm/chunks/chunk.X3QZY7V4.js +7 -0
- package/dist/esm/chunks/{chunk.5RM65QPN.js.map → chunk.X3QZY7V4.js.map} +1 -1
- package/dist/esm/chunks/chunk.XQLQ73NG.js +7 -0
- package/dist/esm/chunks/{chunk.7V4BDSA5.js.map → chunk.XQLQ73NG.js.map} +1 -1
- package/dist/esm/chunks/chunk.Y4ZS3A6F.js +7 -0
- package/dist/esm/chunks/{chunk.QN5T26HH.js.map → chunk.Y4ZS3A6F.js.map} +2 -2
- package/dist/esm/chunks/chunk.YA5OQD37.js +7 -0
- package/dist/esm/chunks/{chunk.TBGMJQYJ.js.map → chunk.YA5OQD37.js.map} +1 -1
- package/dist/esm/chunks/chunk.YMSX4F3J.js +7 -0
- package/dist/esm/chunks/{chunk.FYVDTZLF.js.map → chunk.YMSX4F3J.js.map} +1 -1
- package/dist/esm/chunks/{chunk.KVCDAZ6B.js → chunk.YTBNAGLS.js} +2 -2
- package/dist/esm/chunks/chunk.Z37CZMMR.js +7 -0
- package/dist/esm/chunks/{chunk.HAKF2T2D.js.map → chunk.Z37CZMMR.js.map} +1 -1
- package/dist/esm/chunks/chunk.ZIRA4PYV.js +7 -0
- package/dist/esm/chunks/chunk.ZIRA4PYV.js.map +7 -0
- package/dist/esm/chunks/chunk.ZT7U7WOX.js +7 -0
- package/dist/esm/chunks/{chunk.HDG2GHKC.js.map → chunk.ZT7U7WOX.js.map} +1 -1
- package/dist/esm/chunks/{chunk.BBCZNGT3.js → chunk.ZX3CGET2.js} +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/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/focus-indicator/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/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/radio/radio/index.js +7 -0
- package/dist/esm/radio/radio/index.js.map +7 -0
- package/dist/esm/radio/radio-group/index.js +7 -0
- package/dist/esm/radio/radio-group/index.js.map +7 -0
- 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-button/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 +1 -1
- package/dist/esm/state-layer/index.js +1 -1
- 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/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/view-switcher/index.js +1 -1
- package/dist/esm/view-switcher/view/index.js +1 -1
- package/dist/forge-dark.css +1 -1
- package/dist/forge.css +1 -1
- package/dist/theme/forge-theme.css +1 -1
- package/esm/app-bar/app-bar/app-bar-adapter.d.ts +30 -0
- package/esm/app-bar/app-bar/app-bar-adapter.js +71 -0
- package/esm/app-bar/{app-bar-constants.d.ts → app-bar/app-bar-constants.d.ts} +7 -11
- package/esm/app-bar/app-bar/app-bar-constants.js +32 -0
- package/esm/app-bar/{app-bar-foundation.d.ts → app-bar/app-bar-foundation.d.ts} +17 -16
- package/esm/app-bar/app-bar/app-bar-foundation.js +71 -0
- package/esm/app-bar/app-bar/app-bar.d.ts +66 -0
- package/esm/app-bar/app-bar/app-bar.js +107 -0
- package/esm/app-bar/app-bar/index.d.ts +10 -0
- package/esm/app-bar/app-bar/index.js +14 -0
- package/esm/app-bar/help-button/app-bar-help-button-adapter.d.ts +8 -1
- package/esm/app-bar/help-button/app-bar-help-button-adapter.js +22 -1
- package/esm/app-bar/help-button/app-bar-help-button-constants.d.ts +7 -0
- package/esm/app-bar/help-button/app-bar-help-button-constants.js +11 -1
- package/esm/app-bar/help-button/app-bar-help-button-foundation.d.ts +4 -0
- package/esm/app-bar/help-button/app-bar-help-button-foundation.js +16 -0
- package/esm/app-bar/help-button/app-bar-help-button.d.ts +13 -2
- package/esm/app-bar/help-button/app-bar-help-button.js +26 -5
- package/esm/app-bar/index.d.ts +0 -4
- package/esm/app-bar/index.js +0 -8
- package/esm/app-bar/menu-button/app-bar-menu-button-constants.d.ts +7 -0
- package/esm/app-bar/menu-button/app-bar-menu-button-constants.js +9 -1
- package/esm/app-bar/menu-button/app-bar-menu-button.d.ts +19 -2
- package/esm/app-bar/menu-button/app-bar-menu-button.js +57 -8
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +6 -2
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +17 -1
- 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 +3 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +4 -4
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +9 -11
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +17 -4
- package/esm/app-bar/notification-button/app-bar-notification-button.js +20 -5
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +7 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +26 -3
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.d.ts +1 -3
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +2 -4
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +5 -2
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +20 -22
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +31 -2
- package/esm/app-bar/profile-button/app-bar-profile-button.js +33 -6
- package/esm/app-bar/search/app-bar-search-adapter.d.ts +8 -43
- package/esm/app-bar/search/app-bar-search-adapter.js +23 -53
- package/esm/app-bar/search/app-bar-search-constants.d.ts +0 -15
- package/esm/app-bar/search/app-bar-search-constants.js +3 -20
- package/esm/app-bar/search/app-bar-search-foundation.d.ts +3 -37
- package/esm/app-bar/search/app-bar-search-foundation.js +27 -88
- package/esm/app-bar/search/app-bar-search.d.ts +1 -21
- package/esm/app-bar/search/app-bar-search.js +13 -39
- package/esm/button/base/base-button-adapter.d.ts +4 -10
- package/esm/button/base/base-button-adapter.js +18 -21
- package/esm/button/base/base-button-constants.d.ts +3 -0
- package/esm/button/base/base-button-foundation.d.ts +6 -7
- package/esm/button/base/base-button-foundation.js +18 -14
- package/esm/button/base/base-button.d.ts +10 -6
- package/esm/button/base/base-button.js +11 -2
- package/esm/button/button-constants.d.ts +2 -0
- package/esm/button/button-constants.js +2 -1
- package/esm/button/button-foundation.d.ts +4 -0
- package/esm/button/button-foundation.js +10 -0
- package/esm/button/button.d.ts +4 -0
- package/esm/button/button.js +11 -5
- package/esm/checkbox/checkbox.js +1 -1
- package/esm/circular-progress/circular-progress-adapter.d.ts +2 -2
- package/esm/circular-progress/circular-progress-adapter.js +15 -6
- package/esm/circular-progress/circular-progress-constants.d.ts +1 -2
- package/esm/circular-progress/circular-progress-constants.js +1 -2
- package/esm/circular-progress/circular-progress-foundation.d.ts +0 -1
- package/esm/circular-progress/circular-progress-foundation.js +3 -5
- package/esm/circular-progress/circular-progress.d.ts +1 -2
- package/esm/circular-progress/circular-progress.js +6 -11
- package/esm/constants.d.ts +23 -2
- package/esm/constants.js +11 -0
- package/esm/core/base/base-adapter.d.ts +4 -0
- package/esm/core/base/base-adapter.js +7 -1
- package/esm/core/base/base-component.d.ts +4 -0
- package/esm/core/base/base-element-internals-component.d.ts +41 -0
- package/esm/core/base/base-element-internals-component.js +47 -0
- package/esm/core/base/base-focusable-component.d.ts +11 -14
- package/esm/core/base/base-focusable-component.js +14 -15
- package/esm/core/base/base-form-associated-component.d.ts +122 -0
- package/esm/core/base/base-form-associated-component.js +71 -0
- package/esm/core/base/base-form-component.d.ts +0 -10
- package/esm/core/base/base-form-component.js +0 -6
- package/esm/core/base/base-label-aware-component.d.ts +33 -0
- package/esm/core/base/base-label-aware-component.js +17 -0
- package/esm/core/base/base-nullable-form-component.d.ts +0 -10
- package/esm/core/base/base-nullable-form-component.js +0 -6
- package/esm/core/base/index.d.ts +4 -0
- package/esm/core/base/index.js +4 -0
- package/esm/core/utils/a11y-utils.d.ts +156 -0
- package/esm/core/utils/a11y-utils.js +223 -0
- package/esm/core/utils/event-utils.d.ts +1 -0
- package/esm/core/utils/event-utils.js +3 -0
- package/esm/core/utils/feature-detection.d.ts +8 -0
- package/esm/core/utils/feature-detection.js +12 -0
- package/esm/core/utils/form-utils.d.ts +24 -0
- package/esm/core/utils/form-utils.js +6 -0
- package/esm/core/utils/index.d.ts +1 -0
- package/esm/core/utils/index.js +1 -0
- package/esm/core/utils/mixin-utils.d.ts +20 -0
- package/esm/core/utils/mixin-utils.js +15 -0
- package/esm/core/utils/reflect-utils.d.ts +1 -1
- package/esm/core/utils/reflect-utils.js +2 -2
- package/esm/core/utils/utils.d.ts +1 -1
- package/esm/date-picker/base/base-date-picker.d.ts +1 -1
- package/esm/date-picker/base/base-date-picker.js +4 -3
- package/esm/floating-action-button/floating-action-button-adapter.d.ts +20 -0
- package/esm/floating-action-button/floating-action-button-adapter.js +49 -0
- package/esm/floating-action-button/floating-action-button-component-delegate.d.ts +19 -3
- package/esm/floating-action-button/floating-action-button-component-delegate.js +62 -14
- package/esm/floating-action-button/floating-action-button-constants.d.ts +19 -14
- package/esm/floating-action-button/floating-action-button-constants.js +15 -15
- package/esm/floating-action-button/floating-action-button-foundation.d.ts +27 -0
- package/esm/floating-action-button/floating-action-button-foundation.js +48 -0
- package/esm/floating-action-button/floating-action-button.d.ts +86 -25
- package/esm/floating-action-button/floating-action-button.js +117 -104
- package/esm/floating-action-button/index.d.ts +3 -1
- package/esm/floating-action-button/index.js +5 -3
- package/esm/focus-indicator/focus-indicator.js +2 -2
- package/esm/icon-button/icon-button-constants.d.ts +3 -3
- package/esm/icon-button/icon-button.d.ts +51 -0
- package/esm/icon-button/icon-button.js +54 -5
- package/esm/icon-button/index.d.ts +3 -1
- package/esm/icon-button/index.js +3 -1
- package/esm/index.d.ts +4 -4
- package/esm/index.js +31 -30
- package/esm/label/label-adapter.d.ts +2 -0
- package/esm/label/label-adapter.js +5 -2
- package/esm/label/label-aware.js +2 -1
- package/esm/label/label-constants.d.ts +6 -2
- package/esm/label/label-constants.js +12 -5
- package/esm/label/label-foundation.d.ts +16 -0
- package/esm/label/label-foundation.js +73 -8
- package/esm/label/label.d.ts +8 -0
- package/esm/label/label.js +21 -3
- package/esm/linear-progress/linear-progress-adapter.d.ts +2 -2
- package/esm/linear-progress/linear-progress-adapter.js +14 -6
- package/esm/linear-progress/linear-progress-constants.d.ts +0 -1
- package/esm/linear-progress/linear-progress-constants.js +1 -2
- package/esm/linear-progress/linear-progress-foundation.d.ts +1 -1
- package/esm/linear-progress/linear-progress-foundation.js +2 -2
- package/esm/linear-progress/linear-progress.d.ts +1 -1
- package/esm/linear-progress/linear-progress.js +5 -7
- package/esm/list/list-item/list-item.js +2 -2
- package/esm/menu/menu-adapter.d.ts +3 -3
- package/esm/menu/menu-constants.d.ts +1 -1
- package/esm/menu/menu-constants.js +1 -1
- package/esm/menu/menu-foundation.d.ts +1 -0
- package/esm/menu/menu-foundation.js +11 -4
- package/esm/paginator/paginator-constants.d.ts +9 -0
- package/esm/paginator/paginator-foundation.d.ts +5 -2
- package/esm/paginator/paginator-foundation.js +29 -8
- package/esm/paginator/paginator.d.ts +3 -1
- package/esm/paginator/paginator.js +3 -0
- package/esm/profile-card/profile-card-adapter.d.ts +5 -8
- package/esm/profile-card/profile-card-adapter.js +5 -16
- package/esm/profile-card/profile-card-constants.js +3 -3
- package/esm/profile-card/profile-card-foundation.d.ts +4 -1
- package/esm/profile-card/profile-card-foundation.js +24 -13
- package/esm/profile-card/profile-card.d.ts +1 -2
- package/esm/profile-card/profile-card.js +11 -8
- package/esm/radio/core/radio-group-manager.d.ts +83 -0
- package/esm/radio/core/radio-group-manager.js +201 -0
- package/esm/radio/index.d.ts +1 -2
- package/esm/radio/index.js +1 -6
- package/esm/radio/radio/index.d.ts +10 -0
- package/esm/radio/radio/index.js +14 -0
- package/esm/radio/radio/radio-adapter.d.ts +41 -0
- package/esm/radio/radio/radio-adapter.js +81 -0
- package/esm/radio/radio/radio-component-delegate.d.ts +5 -0
- package/esm/radio/radio/radio-component-delegate.js +6 -0
- package/esm/radio/radio/radio-constants.d.ts +39 -0
- package/esm/radio/radio/radio-constants.js +53 -0
- package/esm/radio/radio/radio-foundation.d.ts +70 -0
- package/esm/radio/radio/radio-foundation.js +199 -0
- package/esm/radio/radio/radio.d.ts +110 -0
- package/esm/radio/radio/radio.js +202 -0
- package/esm/radio/radio-group/index.d.ts +10 -0
- package/esm/radio/radio-group/index.js +14 -0
- package/esm/radio/radio-group/radio-group-adapter.d.ts +18 -0
- package/esm/radio/radio-group/radio-group-adapter.js +28 -0
- package/esm/radio/radio-group/radio-group-constants.d.ts +13 -0
- package/esm/radio/radio-group/radio-group-constants.js +19 -0
- package/esm/radio/radio-group/radio-group-foundation.d.ts +20 -0
- package/esm/radio/radio-group/radio-group-foundation.js +32 -0
- package/esm/radio/radio-group/radio-group.d.ts +44 -0
- package/esm/radio/radio-group/radio-group.js +81 -0
- package/esm/slider/slider.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.js +1 -1
- package/esm/tabs/tab/tab.js +1 -1
- package/esm/toolbar/toolbar.js +1 -1
- package/package.json +1 -2
- package/styles/app-bar/app-bar/_configuration.scss +16 -0
- package/styles/app-bar/app-bar/_core.scss +99 -0
- package/styles/app-bar/app-bar/_token-utils.scss +30 -0
- package/styles/app-bar/app-bar/app-bar.scss +156 -0
- package/styles/app-bar/app-bar/index.scss +8 -0
- package/styles/app-bar/search/_configuration.scss +10 -0
- package/styles/app-bar/search/_core.scss +73 -0
- package/styles/app-bar/search/_token-utils.scss +30 -0
- package/styles/app-bar/search/app-bar-search.scss +51 -4
- package/styles/app-bar/search/index.scss +8 -0
- package/styles/button/button.scss +27 -5
- package/styles/circular-progress/_core.scss +2 -0
- package/styles/circular-progress/circular-progress.scss +2 -2
- package/styles/core/styles/elevation/index.scss +10 -0
- package/styles/core/styles/spacing/index.scss +1 -1
- package/styles/core/styles/theme/index.scss +2 -0
- package/styles/core/styles/tokens/app-bar/app-bar/_tokens.scss +35 -0
- package/styles/core/styles/tokens/app-bar/search/_tokens.scss +35 -0
- package/styles/core/styles/tokens/circular-progress/_tokens.scss +2 -1
- package/styles/core/styles/tokens/floating-action-button/_tokens.scss +66 -0
- package/styles/core/styles/tokens/icon-button/_tokens.scss +1 -1
- package/styles/core/styles/tokens/profile-card/_tokens.scss +19 -0
- package/styles/core/styles/tokens/radio/_tokens.scss +66 -0
- package/styles/core/styles/tokens/shape/_tokens.scss +6 -0
- package/styles/core/styles/tokens/spacing/_tokens.scss +2 -0
- package/styles/core/styles/tokens/theme/_token-utils.scss +2 -2
- package/styles/core/styles/tokens/theme/_tokens.brand.scss +22 -0
- package/styles/core/styles/tokens/theme/_tokens.scss +3 -0
- package/styles/floating-action-button/_configuration.scss +16 -0
- package/styles/floating-action-button/_core.scss +103 -0
- package/styles/floating-action-button/_token-utils.scss +30 -0
- package/styles/floating-action-button/floating-action-button.scss +129 -0
- package/styles/floating-action-button/index.scss +8 -0
- package/styles/focus-indicator/focus-indicator.scss +11 -28
- package/styles/forge.scss +0 -1
- package/styles/icon-button/_core.scss +0 -4
- package/styles/icon-button/icon-button.scss +45 -11
- package/styles/label/_core.scss +2 -5
- package/styles/label/label.scss +1 -5
- package/styles/list/list-item/list-item.scss +2 -0
- package/styles/profile-card/_configuration.scss +10 -0
- package/styles/profile-card/_core.scss +58 -0
- package/styles/profile-card/_token-utils.scss +30 -0
- package/styles/profile-card/index.scss +8 -0
- package/styles/profile-card/profile-card.scss +55 -6
- package/styles/radio/index.scss +6 -0
- package/styles/radio/radio/_configuration.scss +10 -0
- package/styles/radio/radio/_core.scss +123 -0
- package/styles/radio/radio/_token-utils.scss +30 -0
- package/styles/radio/radio/index.scss +8 -0
- package/styles/radio/radio/radio.scss +102 -0
- package/styles/switch/_core.scss +6 -0
- package/styles/theme/_theme-dark.scss +0 -3
- package/styles/toolbar/_mixins.scss +0 -1
- package/dist/esm/chunks/chunk.2MSL7CYM.js +0 -7
- package/dist/esm/chunks/chunk.2ZU6LWHE.js +0 -7
- package/dist/esm/chunks/chunk.36C6SIPW.js +0 -7
- package/dist/esm/chunks/chunk.36F2GVWS.js +0 -7
- package/dist/esm/chunks/chunk.36F2GVWS.js.map +0 -7
- package/dist/esm/chunks/chunk.3HCYRDRI.js +0 -7
- package/dist/esm/chunks/chunk.3R4BUIQP.js +0 -7
- package/dist/esm/chunks/chunk.3ZPSN2QG.js +0 -7
- package/dist/esm/chunks/chunk.4SPEX2GJ.js +0 -7
- package/dist/esm/chunks/chunk.4SPEX2GJ.js.map +0 -7
- package/dist/esm/chunks/chunk.4YFJVHXN.js +0 -7
- package/dist/esm/chunks/chunk.4YFJVHXN.js.map +0 -7
- package/dist/esm/chunks/chunk.5A2PA7TL.js +0 -7
- package/dist/esm/chunks/chunk.5A2PA7TL.js.map +0 -7
- package/dist/esm/chunks/chunk.5CSXPRL3.js +0 -7
- package/dist/esm/chunks/chunk.5CSXPRL3.js.map +0 -7
- package/dist/esm/chunks/chunk.5LVZVQXB.js +0 -7
- package/dist/esm/chunks/chunk.5LVZVQXB.js.map +0 -7
- package/dist/esm/chunks/chunk.5N4N6DL6.js +0 -7
- package/dist/esm/chunks/chunk.5PG6WIIX.js +0 -7
- package/dist/esm/chunks/chunk.5RM65QPN.js +0 -7
- package/dist/esm/chunks/chunk.5WMYF27O.js +0 -7
- package/dist/esm/chunks/chunk.6M27ERWW.js +0 -12
- package/dist/esm/chunks/chunk.6M27ERWW.js.map +0 -7
- package/dist/esm/chunks/chunk.6NTYTHAL.js +0 -7
- package/dist/esm/chunks/chunk.6NTYTHAL.js.map +0 -7
- package/dist/esm/chunks/chunk.6ZNBFKNP.js +0 -7
- package/dist/esm/chunks/chunk.6ZNBFKNP.js.map +0 -7
- package/dist/esm/chunks/chunk.72JVXGHF.js +0 -7
- package/dist/esm/chunks/chunk.7V4BDSA5.js +0 -7
- package/dist/esm/chunks/chunk.7VMJLHQY.js +0 -7
- package/dist/esm/chunks/chunk.7ZROQ6D3.js +0 -7
- package/dist/esm/chunks/chunk.AMLT6XJP.js +0 -7
- package/dist/esm/chunks/chunk.AMZZKEAE.js +0 -7
- package/dist/esm/chunks/chunk.APPY5AYL.js +0 -7
- package/dist/esm/chunks/chunk.APPY5AYL.js.map +0 -7
- package/dist/esm/chunks/chunk.ARQMMZJL.js +0 -7
- package/dist/esm/chunks/chunk.AUBOJZQ7.js +0 -7
- package/dist/esm/chunks/chunk.AUCBR6CC.js +0 -7
- package/dist/esm/chunks/chunk.AUCBR6CC.js.map +0 -7
- package/dist/esm/chunks/chunk.BQ2X5SBP.js +0 -7
- package/dist/esm/chunks/chunk.BTXY3XMJ.js +0 -7
- package/dist/esm/chunks/chunk.DTLZOIUQ.js +0 -7
- package/dist/esm/chunks/chunk.EJX6RI4I.js +0 -7
- package/dist/esm/chunks/chunk.EJX6RI4I.js.map +0 -7
- package/dist/esm/chunks/chunk.EWK76SPH.js +0 -7
- package/dist/esm/chunks/chunk.EWK76SPH.js.map +0 -7
- package/dist/esm/chunks/chunk.FAXYCG55.js +0 -7
- package/dist/esm/chunks/chunk.FAXYCG55.js.map +0 -7
- package/dist/esm/chunks/chunk.FFHSUJFM.js +0 -7
- package/dist/esm/chunks/chunk.FFHSUJFM.js.map +0 -7
- package/dist/esm/chunks/chunk.FYVDTZLF.js +0 -7
- package/dist/esm/chunks/chunk.G7SMCLHQ.js +0 -7
- package/dist/esm/chunks/chunk.HAKF2T2D.js +0 -7
- package/dist/esm/chunks/chunk.HDG2GHKC.js +0 -7
- package/dist/esm/chunks/chunk.HOLCNJXC.js +0 -7
- package/dist/esm/chunks/chunk.HSI7B43D.js +0 -7
- package/dist/esm/chunks/chunk.HSI7B43D.js.map +0 -7
- package/dist/esm/chunks/chunk.IAWYYNUU.js +0 -7
- package/dist/esm/chunks/chunk.IDMDBMBR.js +0 -7
- package/dist/esm/chunks/chunk.IHAHJPMB.js +0 -7
- package/dist/esm/chunks/chunk.IISWKFCX.js +0 -7
- package/dist/esm/chunks/chunk.IMLJD35R.js +0 -7
- package/dist/esm/chunks/chunk.IT7XPDAV.js +0 -7
- package/dist/esm/chunks/chunk.JAWV5Y5T.js +0 -7
- package/dist/esm/chunks/chunk.JVLJH6PR.js +0 -7
- package/dist/esm/chunks/chunk.KPJWP77R.js +0 -7
- package/dist/esm/chunks/chunk.KV5IKYG2.js +0 -7
- package/dist/esm/chunks/chunk.LCR4YH3O.js +0 -7
- package/dist/esm/chunks/chunk.LOG6GQOK.js +0 -7
- package/dist/esm/chunks/chunk.LUIKMPQR.js +0 -7
- package/dist/esm/chunks/chunk.LUIKMPQR.js.map +0 -7
- package/dist/esm/chunks/chunk.LUNKNRRH.js +0 -7
- package/dist/esm/chunks/chunk.LUNKNRRH.js.map +0 -7
- package/dist/esm/chunks/chunk.MWYQRG5W.js +0 -7
- package/dist/esm/chunks/chunk.NUMKGUCK.js +0 -7
- package/dist/esm/chunks/chunk.O6V3YNMO.js +0 -7
- package/dist/esm/chunks/chunk.O6V3YNMO.js.map +0 -7
- package/dist/esm/chunks/chunk.OWZREAT6.js +0 -15
- package/dist/esm/chunks/chunk.OWZREAT6.js.map +0 -7
- package/dist/esm/chunks/chunk.PMYQY3D3.js +0 -7
- package/dist/esm/chunks/chunk.PMYQY3D3.js.map +0 -7
- package/dist/esm/chunks/chunk.PYR2OCCH.js +0 -7
- package/dist/esm/chunks/chunk.QJCNMYD3.js +0 -7
- package/dist/esm/chunks/chunk.QLCVRJ3Q.js +0 -7
- package/dist/esm/chunks/chunk.QN5T26HH.js +0 -7
- package/dist/esm/chunks/chunk.QQRPV4RN.js +0 -7
- package/dist/esm/chunks/chunk.R6LQBI42.js +0 -177
- package/dist/esm/chunks/chunk.RES7WDKH.js +0 -7
- package/dist/esm/chunks/chunk.RP674CRC.js +0 -7
- package/dist/esm/chunks/chunk.S5QL4SPT.js +0 -7
- package/dist/esm/chunks/chunk.S5QL4SPT.js.map +0 -7
- package/dist/esm/chunks/chunk.SIRXAA3O.js +0 -7
- package/dist/esm/chunks/chunk.SLJ6HDK7.js +0 -7
- package/dist/esm/chunks/chunk.STB2FEUA.js +0 -7
- package/dist/esm/chunks/chunk.TBGMJQYJ.js +0 -7
- package/dist/esm/chunks/chunk.TU74SREL.js +0 -7
- package/dist/esm/chunks/chunk.URJQNB3S.js +0 -7
- package/dist/esm/chunks/chunk.V24M62MC.js +0 -7
- package/dist/esm/chunks/chunk.VFKHRAWD.js +0 -7
- package/dist/esm/chunks/chunk.VO6YJCEU.js +0 -7
- package/dist/esm/chunks/chunk.WMVYRDUJ.js +0 -7
- package/dist/esm/chunks/chunk.WMVYRDUJ.js.map +0 -7
- package/dist/esm/chunks/chunk.WY3E33CW.js +0 -7
- package/dist/esm/chunks/chunk.XLL7L2UB.js +0 -7
- package/dist/esm/chunks/chunk.XLL7L2UB.js.map +0 -7
- package/dist/esm/chunks/chunk.XNFS7YIB.js +0 -7
- package/dist/esm/chunks/chunk.XYAZVLPR.js +0 -7
- package/dist/esm/chunks/chunk.YAERJVPL.js +0 -7
- package/dist/esm/chunks/chunk.YBZK6LJZ.js +0 -7
- package/dist/esm/chunks/chunk.YKIBREM5.js +0 -7
- package/dist/esm/chunks/chunk.YWAUEUAH.js +0 -7
- package/dist/esm/chunks/chunk.YWAUEUAH.js.map +0 -7
- package/dist/esm/chunks/chunk.Z5ZLKM7W.js +0 -7
- package/dist/esm/chunks/chunk.Z5ZLKM7W.js.map +0 -7
- package/dist/esm/chunks/chunk.ZGRQDDHO.js +0 -7
- package/dist/esm/chunks/chunk.ZKM667OT.js +0 -7
- package/dist/esm/chunks/chunk.ZKM667OT.js.map +0 -7
- package/dist/floating-action-button/forge-floating-action-button.css +0 -6
- package/esm/app-bar/app-bar-adapter.d.ts +0 -43
- package/esm/app-bar/app-bar-adapter.js +0 -60
- package/esm/app-bar/app-bar-constants.js +0 -37
- package/esm/app-bar/app-bar-foundation.js +0 -70
- package/esm/app-bar/app-bar.d.ts +0 -38
- package/esm/app-bar/app-bar.js +0 -75
- package/esm/radio/radio-adapter.d.ts +0 -71
- package/esm/radio/radio-adapter.js +0 -260
- package/esm/radio/radio-constants.d.ts +0 -30
- package/esm/radio/radio-constants.js +0 -36
- package/esm/radio/radio-foundation.d.ts +0 -31
- package/esm/radio/radio-foundation.js +0 -80
- package/esm/radio/radio.d.ts +0 -33
- package/esm/radio/radio.js +0 -75
- package/styles/app-bar/_mixins.scss +0 -254
- package/styles/app-bar/_variables.scss +0 -34
- package/styles/app-bar/app-bar.scss +0 -22
- package/styles/app-bar/search/_mixins.scss +0 -238
- package/styles/app-bar/search/_variables.scss +0 -18
- package/styles/floating-action-button/_extended-fab-theme.scss +0 -238
- package/styles/floating-action-button/_fab-custom-properties.scss +0 -29
- package/styles/floating-action-button/_fab-theme.scss +0 -541
- package/styles/floating-action-button/_fab.mixins.scss +0 -351
- package/styles/floating-action-button/forge-floating-action-button.scss +0 -16
- package/styles/profile-card/_mixins.scss +0 -83
- package/styles/radio/_mixins.scss +0 -309
- package/styles/radio/_radio-theme.scss +0 -314
- package/styles/radio/radio.scss +0 -19
- /package/dist/esm/{chunks/chunk.U6FJJGO3.js.map → app-bar/app-bar/index.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MKJCHUJH.js.map → chunk.42YDA5FH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.G73KL7P2.js.map → chunk.5EGEZ4IY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W2LN45WY.js.map → chunk.AR6YUJUH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KPJWP77R.js.map → chunk.BAQYPAUM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BB4UF5RX.js.map → chunk.BC7WB5RG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KV67JXOC.js.map → chunk.EMCY55MX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FXIWCHLW.js.map → chunk.I7X25KEB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RP674CRC.js.map → chunk.IHIKIZIT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZRSDTCSD.js.map → chunk.JHELTQKA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GNDKQPDV.js.map → chunk.JPI4XCQL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FLWNOP42.js.map → chunk.KDJZN6EW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.675V42JS.js.map → chunk.KWBYYSH3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XEFWZKHQ.js.map → chunk.L45HXBDS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HRRJIFC5.js.map → chunk.MHH26REX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YKIBREM5.js.map → chunk.MTSWCXTY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YBZK6LJZ.js.map → chunk.NBLL7VAA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XYAZVLPR.js.map → chunk.O6MGA3XK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PADPL4L3.js.map → chunk.OUIWXKO2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GHR7T6U2.js.map → chunk.U7S4DJTU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z5RROENA.js.map → chunk.URKQICJD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QLOYOZN3.js.map → chunk.WMP2OLMG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KVCDAZ6B.js.map → chunk.YTBNAGLS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BBCZNGT3.js.map → chunk.ZX3CGET2.js.map} +0 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/view-switcher/view-switcher-constants.ts", "../../src/view-switcher/view-switcher-adapter.ts", "../../src/view-switcher/view-switcher-foundation.ts", "../../src/view-switcher/view-switcher.ts", "../../src/view-switcher/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}view-switcher`;\n\nconst classes = {\n ROOT: 'forge-view-switcher',\n VIEW_HIDDEN: 'forge-view-switcher__view--hidden',\n VIEW_SWITCHER_SLIDE: 'forge-view-switcher--slide',\n VIEW_SWITCHER_FADE: 'forge-view-switcher--fade'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n DEFAULT_SLOT: 'slot:not([name])',\n VIEW_HIDDEN: `.${classes.VIEW_HIDDEN}`\n};\n\nconst attributes = {\n INDEX: 'index',\n ANIMATION_TYPE: 'animation-type'\n};\n\nconst numbers = {\n DEFAULT_TRANSITION_DURATION: 500\n};\n\nexport const VIEW_SWITCHER_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors,\n numbers\n};\n\nexport interface IViewSwitcherView {\n element: HTMLElement;\n}\n\nexport enum ViewAnimationDirection {\n Left = 'left',\n Right = 'right'\n}\n\nexport enum ViewSwitcherAnimationType {\n None = 'none',\n Slide = 'slide',\n Fade = 'fade'\n}\n", "import { getShadowElement, removeClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IViewSwitcherComponent } from './view-switcher';\nimport { ViewAnimationDirection, ViewSwitcherAnimationType, VIEW_SWITCHER_CONSTANTS } from './view-switcher-constants';\n\nexport interface IViewSwitcherAdapter extends IBaseAdapter {\n getViewCount(): number;\n startViewObserver(callback: MutationCallback): void;\n stopViewObserver(): void;\n initializeSlideViews(index: number): void;\n initializeFadeViews(index: number): void;\n setActiveView(index: number): void;\n hideInactiveViews(index: number): void;\n transitionToView(fromIndex: number, toIndex: number, animationType: ViewSwitcherAnimationType, direction?: ViewAnimationDirection): Promise<void>;\n setAnimationType(type: ViewSwitcherAnimationType): void;\n}\n\nexport class ViewSwitcherAdapter extends BaseAdapter<IViewSwitcherComponent> implements IViewSwitcherAdapter {\n private _rootElement: HTMLElement;\n private _slotElement: HTMLSlotElement;\n private _viewObserver: MutationObserver;\n\n constructor(component: IViewSwitcherComponent) {\n super(component);\n this._rootElement = getShadowElement(component, VIEW_SWITCHER_CONSTANTS.selectors.ROOT);\n this._slotElement = getShadowElement(component, VIEW_SWITCHER_CONSTANTS.selectors.DEFAULT_SLOT) as HTMLSlotElement;\n }\n\n public getViewCount(): number {\n return this._getViews().length;\n }\n\n public startViewObserver(callback: MutationCallback): void {\n this._viewObserver = new MutationObserver(callback);\n this._viewObserver.observe(this._component, { childList: true });\n }\n\n public stopViewObserver(): void {\n if (this._viewObserver) {\n this._viewObserver.disconnect();\n }\n }\n\n /**\n * Initializes the views with styles for a slide transition.\n * @param index The active view index.\n */\n public initializeSlideViews(index: number): void {\n let views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('opacity');\n view.style.removeProperty('display');\n\n // Ensure that the currently active view is visible\n if (i === index) {\n views[index].classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.removeProperty('visibility');\n return;\n }\n\n // We disable the transition when resetting the hidden views so that the animation doesn't occur\n view.style.transition = 'none';\n\n // Ensure the view is hidden\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.visibility = 'hidden';\n\n // Reset the position of the view to the left or right of the switcher\n if (i > index) {\n view.style.transform = 'translate3d(100%, 0, 0)';\n } else {\n view.style.transform = 'translate3d(-100%, 0, 0)';\n }\n });\n\n // Wait a frame for the views to reposition, then re-enable the transition for all hidden views\n window.requestAnimationFrame(() => {\n views = this._getViews();\n views.forEach((v, i) => {\n if (i === index) {\n return;\n }\n v.style.removeProperty('transition');\n });\n });\n }\n\n /**\n * Initializes the view styles when using a fade transition.\n * @param index The active view index.\n */\n public initializeFadeViews(index: number): void {\n const views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('transform');\n view.style.removeProperty('display');\n\n // Ensure that the visible view doesn't have the hidden class\n if (i === index) {\n view.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.removeProperty('visibility');\n return;\n }\n\n // Ensure the hidden views have the proper class\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.visibility = 'hidden';\n });\n\n // Ensure that the visible view has the proper opacity\n if (views[index]) {\n views[index].style.opacity = '1';\n }\n }\n\n /**\n * This is used when no animation type is set to allow for snapping the view into place.\n * @param index The currently active view index.\n */\n public setActiveView(index: number): void {\n const views = this._getViews();\n\n views.forEach((view, i) => {\n if (i === index) {\n return;\n }\n // Hide all non-visible views\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.display = 'none';\n });\n\n // Ensure that the active view is visible\n if (views[index]) {\n views[index].classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n views[index].style.removeProperty('display');\n }\n }\n\n /**\n * This is used when no animation type is specific to hide all non-visible views.\n * @param index The currently active view index.\n */\n public hideInactiveViews(index: number): void {\n const views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('opacity');\n view.style.removeProperty('transform');\n view.style.removeProperty('visibility');\n\n // Ensure the active view is visible\n if (i === index) {\n view.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n return;\n }\n\n // Ensure all non-active views are hidden\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.display = 'none';\n });\n }\n\n /**\n * Initiates a slide transition from one view to another.\n * @param fromIndex The view index to transition from.\n * @param toIndex The view index to transition to.\n * @param direction The transition animation direction.\n */\n public async transitionToView(fromIndex: number, toIndex: number, animationType: ViewSwitcherAnimationType, direction?: ViewAnimationDirection): Promise<void> {\n const views = this._getViews();\n const fromView = views[fromIndex];\n const toView = views[toIndex];\n\n return new Promise<void>(resolve => {\n // Show the view so we can calculate the height and start the transition in the next frame\n toView.style.removeProperty('visibility');\n\n window.requestAnimationFrame(() => {\n let transitionProp: string;\n switch (animationType) {\n case ViewSwitcherAnimationType.Slide:\n this._slideToView(fromView, toView, direction as ViewAnimationDirection);\n transitionProp = 'transform';\n break;\n case ViewSwitcherAnimationType.Fade:\n this._fadeToView(fromView, toView);\n transitionProp = 'opacity';\n break;\n default:\n return;\n }\n\n // Start the height transition (this will not animate if the height doesn't change)\n this._animateHeight(fromView, toView);\n\n if (fromView) {\n // Wait for the transform transition to complete before resolving and completing transition\n fromView.addEventListener('transitionend', transitionEndHandler);\n } else {\n toView.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n }\n\n function transitionEndHandler(evt: TransitionEvent): void {\n if (evt.propertyName === transitionProp) {\n fromView.removeEventListener('transitionend', transitionEndHandler);\n toView.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Initiates a slide transition from one view to another.\n * @param fromIndex The view index to transition from.\n * @param toIndex The view index to transition to.\n * @param direction The transition animation direction.\n */\n private _slideToView(fromView: HTMLElement | null, toView: HTMLElement, direction: ViewAnimationDirection): void {\n // Use a CSS transform on the view to slide it in the requested direction\n if (direction === ViewAnimationDirection.Left) {\n if (fromView) {\n fromView.style.transform = 'translate3d(-100%, 0, 0)';\n }\n toView.style.transform = 'translate3d(0, 0, 0)';\n } else {\n if (fromView) {\n fromView.style.transform = 'translate3d(100%, 0, 0)';\n }\n toView.style.transform = 'translate3d(0, 0, 0)';\n }\n }\n\n private _fadeToView(fromView: HTMLElement | null, toView: HTMLElement): void {\n if (fromView) {\n fromView.style.opacity = '0';\n }\n toView.style.opacity = '1';\n }\n\n /**\n * Attempts to animate the height of our container element to match that of the next view.\n * @param fromIndex The view index we are transitioning from.\n * @param toIndex The view index we are transitioning to.\n */\n private _animateHeight(fromView: HTMLElement | null, toView: HTMLElement): void {\n const fromViewHeight = fromView ? this._getViewHeight(fromView) : 0;\n const toViewHeight = this._getViewHeight(toView);\n\n // We only animate the height if it is different...\n if (fromViewHeight !== toViewHeight) {\n this._rootElement.addEventListener('transitionend', this._onRootTransitionEnd.bind(this));\n\n // Set to the height of the current view so we can animate the height from something static\n this._setHeight(fromViewHeight);\n\n // We need to wait two frames before animating to the new height due to event loop\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n // Start the transition to the new view height\n this._setHeight(toViewHeight);\n });\n });\n }\n }\n\n /**\n * Handles the root container transitionend event.\n * @param evt The transition event.\n */\n private _onRootTransitionEnd(evt: TransitionEvent): void {\n if (evt.propertyName === 'height') {\n this._rootElement.removeEventListener('transitionend', this._onRootTransitionEnd);\n // Removes the static height from the root element so that it can grow with content\n this._rootElement.style.removeProperty('height');\n }\n }\n\n /**\n * Resets the animation type on the root element.\n * @param type The animation type.\n */\n public setAnimationType(type: ViewSwitcherAnimationType): void {\n removeClass([VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_SLIDE, VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_FADE], this._component);\n\n switch (type) {\n case ViewSwitcherAnimationType.Slide:\n this._component.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_SLIDE);\n break;\n case ViewSwitcherAnimationType.Fade:\n this._component.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_FADE);\n break;\n }\n }\n\n /**\n * Get all view elements.\n */\n private _getViews(): HTMLElement[] {\n return this._slotElement.assignedNodes().filter(n => n.nodeType === 1) as HTMLElement[];\n }\n\n /**\n * Sets the height on the root container element.\n * @param viewHeight The new height.\n */\n private _setHeight(viewHeight: number): void {\n this._rootElement.style.height = `${viewHeight}px`;\n }\n\n /**\n * Calculate the absolute height of a view.\n * @param view The view to calculate height from.\n */\n private _getViewHeight(view: HTMLElement): number {\n let height = 0;\n const elements = view.children.length ? (Array.from(view.children) as HTMLElement[]) : [view];\n\n for (const element of elements) {\n const styles = window.getComputedStyle(element);\n const margin = parseFloat(styles.marginTop as string) + parseFloat(styles.marginBottom as string);\n height += Math.ceil(element.offsetHeight + margin);\n }\n\n return height;\n }\n}\n", "import { ICustomElementFoundation, Platform, isDefined } from '@tylertech/forge-core';\n\nimport { IViewSwitcherAdapter } from './view-switcher-adapter';\nimport { VIEW_SWITCHER_CONSTANTS, ViewAnimationDirection, ViewSwitcherAnimationType } from './view-switcher-constants';\n\nexport interface IViewSwitcherFoundation extends ICustomElementFoundation {\n index: number;\n animationType: ViewSwitcherAnimationType;\n next(): void;\n previous(): void;\n goToStart(): void;\n goToEnd(): void;\n}\n\nexport class ViewSwitcherFoundation implements IViewSwitcherFoundation {\n private _viewCount = 0;\n private _viewIndex = 0;\n private _animationType = ViewSwitcherAnimationType.None;\n private _viewsChangedListener: () => void;\n\n constructor(private _adapter: IViewSwitcherAdapter) {\n this._viewsChangedListener = () => this._onViewsChanged();\n }\n\n public initialize(): void {\n this._viewCount = this._adapter.getViewCount();\n this._adapter.startViewObserver(this._viewsChangedListener);\n this._adapter.setAnimationType(this._animationType);\n\n if (this._viewCount) {\n this._initializeAnimationType();\n }\n }\n\n public disconnect(): void {\n this._adapter.stopViewObserver();\n }\n\n private _initializeAnimationType(): void {\n switch (this._animationType) {\n case ViewSwitcherAnimationType.Slide:\n this._adapter.initializeSlideViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.Fade:\n this._adapter.initializeFadeViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.None:\n default:\n this._adapter.hideInactiveViews(this._viewIndex);\n break;\n }\n }\n\n private _onViewsChanged(): void {\n this._viewCount = this._adapter.getViewCount();\n\n if (this._viewCount === 0) {\n this._viewIndex = 0;\n }\n\n if (this._viewCount) {\n this._initializeAnimationType();\n }\n\n // If the view index is higher than the number of views then we need to reset it\n if (this._viewCount > 0 && this._viewIndex >= this._viewCount) {\n const currIndex = this._viewIndex;\n this._viewIndex = this._viewCount > 0 ? this._viewCount - 1 : 0;\n this._goToView(currIndex, this._viewCount);\n }\n }\n\n private async _goToView(fromIndex: number, viewCount?: number): Promise<void> {\n this._viewCount = !isDefined(viewCount) ? this._adapter.getViewCount() : viewCount as number;\n \n // If the index that we're trying to transition to is out of range, or is the same index, then we ignore the transition\n const isValidIndex = this._viewIndex >= 0 && this._viewIndex <= this._viewCount - 1;\n if (!isValidIndex || fromIndex === this._clampedViewIndex(this._viewIndex, this._viewCount)) {\n return;\n }\n\n switch (this._animationType) {\n case ViewSwitcherAnimationType.Slide:\n const animationDirection = this._viewIndex > fromIndex ? ViewAnimationDirection.Left : ViewAnimationDirection.Right;\n await this._adapter.transitionToView(fromIndex, this._viewIndex, ViewSwitcherAnimationType.Slide, animationDirection);\n this._adapter.initializeSlideViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.Fade:\n await this._adapter.transitionToView(fromIndex, this._viewIndex, ViewSwitcherAnimationType.Fade);\n this._adapter.initializeFadeViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.None:\n default:\n this._adapter.setActiveView(this._viewIndex);\n break;\n }\n }\n\n private _clampedViewIndex(viewIndex: number, viewCount: number): number {\n if (viewIndex < 0) {\n viewIndex = 0;\n } else if (viewIndex > viewCount - 1) {\n viewIndex = viewCount > 0 ? viewCount - 1 : 0;\n }\n return viewIndex;\n }\n\n public next(): void {\n this.index++;\n }\n\n public previous(): void {\n this.index--;\n }\n\n public goToStart(): void {\n this.index = 0;\n }\n\n public goToEnd(): void {\n this.index = this._viewCount - 1;\n }\n\n public get index(): number {\n return this._viewIndex;\n }\n public set index(value: number) {\n if (this._viewIndex !== value) {\n const currIndex = this._viewIndex;\n this._viewIndex = value;\n this._goToView(currIndex);\n this._adapter.setHostAttribute(VIEW_SWITCHER_CONSTANTS.attributes.INDEX, this._viewIndex.toString());\n }\n }\n\n public get animationType(): ViewSwitcherAnimationType {\n return this._animationType;\n }\n public set animationType(value: ViewSwitcherAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n this._initializeAnimationType();\n this._adapter.setAnimationType(this._animationType);\n this._adapter.setHostAttribute(VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE, this._animationType);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceNumber, FoundationProperty, upgradeProperty } from '@tylertech/forge-core';\nimport { ViewSwitcherAdapter } from './view-switcher-adapter';\nimport { ViewSwitcherFoundation } from './view-switcher-foundation';\nimport { VIEW_SWITCHER_CONSTANTS, ViewSwitcherAnimationType } from './view-switcher-constants';\nimport { ViewComponent } from './view/view';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-view-switcher\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-view-switcher{height:auto;height:var(--forge-view-switcher-height,auto);width:auto;width:var(--forge-view-switcher-width,auto);position:relative;overflow:hidden;-webkit-transition:height var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:height var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host{height:auto;height:var(--forge-view-switcher-height,auto);width:auto;width:var(--forge-view-switcher-width,auto);display:block}:host([hidden]){display:none}:host(.forge-view-switcher--slide) ::slotted(forge-view){-webkit-transition:-webkit-transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:-webkit-transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1),-webkit-transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);will-change:transform}:host(.forge-view-switcher--fade) ::slotted(forge-view){-webkit-transition:opacity var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:opacity var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);will-change:opacity}:host(.forge-view-switcher--fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}';\n\nexport interface IViewSwitcherComponent extends IBaseComponent {\n index: number;\n animationType: `${ViewSwitcherAnimationType}`;\n next(): void;\n previous(): void;\n goToStart(): void;\n goToEnd(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-view-switcher': IViewSwitcherComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-view-switcher>` custom element.\n * \n * @tag forge-view-switcher\n */\n@CustomElement({\n name: VIEW_SWITCHER_CONSTANTS.elementName,\n dependencies: [ViewComponent]\n})\nexport class ViewSwitcherComponent extends BaseComponent implements IViewSwitcherComponent {\n public static get observedAttributes(): string[] {\n return [\n VIEW_SWITCHER_CONSTANTS.attributes.INDEX,\n VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE\n ];\n }\n\n private _foundation: ViewSwitcherFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ViewSwitcherFoundation(new ViewSwitcherAdapter(this));\n }\n\n public connectedCallback(): void {\n // upgradeProperty(this, 'index');\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 VIEW_SWITCHER_CONSTANTS.attributes.INDEX:\n this.index = coerceNumber(newValue);\n break;\n case VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as ViewSwitcherAnimationType;\n break;\n }\n }\n\n /** Gets/sets the currently visible view index. */\n @FoundationProperty()\n public declare index: number;\n \n /** Gets/sets the animation type. */\n @FoundationProperty()\n public declare animationType: `${ViewSwitcherAnimationType}`;\n\n /** Transitions to the next view. */\n public next(): void {\n this._foundation.next();\n }\n\n /** Transitions to the previous view. */\n public previous(): void {\n this._foundation.previous();\n }\n\n /** Transitions to the first view. */\n public goToStart(): void {\n this._foundation.goToStart();\n }\n\n /** Transitions to the last view. */\n public goToEnd(): void {\n this._foundation.goToEnd();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { ViewSwitcherComponent } from './view-switcher';\n\nexport * from './view-switcher-adapter';\nexport * from './view-switcher-constants';\nexport * from './view-switcher-foundation';\nexport * from './view-switcher';\nexport * from './view';\n\nexport function defineViewSwitcherComponent(): void {\n defineCustomElement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nCA,EAAwB,WAAW,cACrC,CACF,CAUO,mBAA0B,CAE/B,KAAK,YAAY,WAAW,CAC9B,CAEO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAAwB,WAAW,MACtC,KAAK,MAAQI,EAAaD,CAAQ,EAClC,MACF,KAAKH,EAAwB,WAAW,eACtC,KAAK,cAAgBG,EACrB,KACJ,CACF,CAWO,MAAa,CAClB,KAAK,YAAY,KAAK,CACxB,CAGO,UAAiB,CACtB,KAAK,YAAY,SAAS,CAC5B,CAGO,WAAkB,CACvB,KAAK,YAAY,UAAU,CAC7B,CAGO,SAAgB,CACrB,KAAK,YAAY,QAAQ,CAC3B,CACF,EAzBiBE,EAAA,CADdC,EAAmB,GArCTX,EAsCI,qBAIAU,EAAA,CADdC,EAAmB,GAzCTX,EA0CI,6BA1CJA,EAANU,EAAA,CAJNE,EAAc,CACb,KAAMP,EAAwB,YAC9B,aAAc,CAACQ,CAAa,CAC9B,CAAC,GACYb,GCxBN,SAASc,IAAoC,CAClDC,EAAoBC,CAAqB,CAC3C",
|
|
6
6
|
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "numbers", "VIEW_SWITCHER_CONSTANTS", "ViewAnimationDirection", "ViewSwitcherAnimationType", "ViewSwitcherAdapter", "BaseAdapter", "component", "getShadowElement", "VIEW_SWITCHER_CONSTANTS", "callback", "index", "views", "view", "i", "v", "fromIndex", "toIndex", "animationType", "direction", "fromView", "toView", "resolve", "transitionProp", "transitionEndHandler", "evt", "fromViewHeight", "toViewHeight", "type", "removeClass", "n", "viewHeight", "height", "elements", "element", "styles", "margin", "ViewSwitcherFoundation", "_adapter", "currIndex", "fromIndex", "viewCount", "isDefined", "animationDirection", "viewIndex", "value", "VIEW_SWITCHER_CONSTANTS", "template", "styles", "ViewSwitcherComponent", "BaseComponent", "attachShadowTemplate", "ViewSwitcherFoundation", "ViewSwitcherAdapter", "VIEW_SWITCHER_CONSTANTS", "name", "oldValue", "newValue", "coerceNumber", "__decorateClass", "FoundationProperty", "CustomElement", "ViewComponent", "defineViewSwitcherComponent", "defineCustomElement", "ViewSwitcherComponent"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{b as g,g as p}from"./chunk.J2M2MXP2.js";var A=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,_=/a-z/i,h=10;function I(t){if(t=t.replace(/_|\s/g,""),A.test(t)){let c=new Date(t);if(_.test(t)||c.setMinutes(c.getMinutes()+c.getTimezoneOffset()),p(c))return c}let e=[];t.indexOf("/")!==-1?e=t.split("/"):t.indexOf("-")!==-1?e=t.split("-"):(t.length===6||t.length===8)&&!isNaN(+t)&&(e=[t.substring(0,2),t.substring(2,4),t.substring(4)]);let r=e.length===3,[n,i,a]=e;if(n==="0"&&(n="1"),i==="0"&&(i="1"),typeof a=="string"&&a.length===3&&(a=a.padStart(4,"0")),r){let c=n.length===1||n.length===2,d=i.length===1||i.length===2,f=a.length===2||a.length===4;if(!c||!d||!f)return null}else return null;if(a.length===2){let c=new Date().getFullYear()-(100-h),d=new Date().getFullYear()+h,f=String(c).slice(0,2),v=String(d).slice(0,2),S=+String(d).slice(2);a=+a<=S?`${v}${a}`:`${f}${a}`}let s=+n,o=+i,l=+a;s>12&&(s=12);let u=new Date(l,s,0).getDate();o>u&&(o=u);let m=new Date(l,s-1,o,0,0,0,0);return p(m)?m:null}function R(t){let e=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),n=String(t.getFullYear()).padStart(4,"0");return[e,r,n].join("/")}function O(t,e){return!t&&!e?!0:!t||!e||!p(t)||!p(e)?!1:t.setHours(0,0,0,0)===e.setHours(0,0,0,0)}function L(t,e){return new Date(e!=null?e:1970,t+1,0)}function N(t,e){return L(t,e).getDate()}var $=["aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-current","aria-description","aria-disabled","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],F=["aria-autocomplete","aria-description","aria-invalid","aria-keyshortcuts","aria-label"],Y=["checked","disabled","indeterminate","readOnly","required","value"],U=["name","value","formaction","formenctype","formmethod","formnovalidate","formtarget"];function V(t,e){return e.map(r=>`${t}:${r}`)}function G(t,e,r,n=!0){n&&e.some(l=>l.toLowerCase().startsWith("aria-"))&&t.setAttribute("role","presentation");let i=l=>{let u=l.split(":"),m=u.length===2?u[0]:null,c=u.length===2?u[1]:u[0],d=t.getAttribute(l);r.call({},c,d,m)};e.forEach(l=>i(l));let a={attributeFilter:e},s=l=>{l.forEach(u=>i(u.attributeName))},o=new MutationObserver(s);return o.observe(t,a),o}function w(t,e,r){r.forEach(n=>{let i=t.getAttribute(n);i!==null&&e.setAttribute(n,i)})}function y(t,e,r){r.forEach(n=>{let i=t[n];g(i)&&(e[n]=i)})}function D(t,e){let r=t.validationMessage;r&&e.setCustomValidity(r)}var E=class{get el(){return this._el}static cloneAttributes(e,r,n){w(e,r,n)}static cloneProperties(e,r,n){y(e,r,n)}static cloneValidationMessage(e,r){Object.hasOwnProperty.call(e,"validationMessage")&&Object.hasOwnProperty.call(r,"validationMessage")?D(e,r):console.warn("cloneValidationMessage() requires both elements to be input elements.")}initialize(e,r){this._attachCallback=r,this._el=e}attachElement(e){this._attachCallback(e,this._el),this._el=e}};function W(t,e){let r=document.createElement("div");r.innerHTML=t;for(let i=r.childNodes.length-1;i>=0;i--)r.childNodes[i].nodeName.toLowerCase()!=="svg"&&r.removeChild(r.childNodes[i]);let n=r.firstElementChild;return n&&n.nodeName.toLowerCase()==="svg"&&b(n)?(e&&n.setAttribute("viewBox",e),!n.hasAttribute("viewBox")&&e&&n.setAttribute("viewBox",e),n.removeAttribute("height"),n.removeAttribute("width"),n):null}function b(t){if(t.nodeType!==1)return!0;if(t.nodeName.toLowerCase()==="script")return!1;let e=Array.from(t.attributes);for(let n of e)if(typeof n.name=="string"&&n.name.toLowerCase().startsWith("on"))return!1;let r=Array.from(t.childNodes);for(let n of r)if(!b(n))return!1;return!0}var M=/^(0?[0-9]|1\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/,x=/^(0?[1-9]|1[0-2]):([0-5]\d)(:([0-5]\d))?\s*([AaPp][Mm])?$/,C=/^(\d?\d?):?(\d?\d?)(:?(\d?\d?))?\s*([AaPp][Mm]?)?$/,T=/[AaPp][Mm]?/;function X(t){let e=t.match(M)||[null,0,0,null,0],r=e[1],n=e[2],i=e[4];return{hours:r,minutes:n,seconds:i}}function j(t){let e=t.match(x)||[null,0,0,null,0,"AM"],r=e[1],n=e[2],i=e[4],a=e[5];return{hours:r,minutes:n,seconds:i,meridiem:a}}function q(t){return M.test(t)||x.test(t)}function K(t,e,r){if(t=t&&typeof t=="string"?t.replace(/_|\s/g,""):"",/^\s*$/.test(t)||/^:+$/.test(t))return"";let n=t.match(C);if(!n)return"";let i=n[1],a=n[2],s=n[4],o=n[5],l=t.match(T);l&&(o=l[0],t=t.replace(o,""),o.length===1&&(o+="m")),t.length===3&&!t.includes(":")&&(i=t[0],a=t.substring(1)),e?o="":T.test(o)?o=o.toUpperCase():/^[AaPp]/.test(o)?o.toLowerCase().startsWith("a")?o="AM":o.toLowerCase().startsWith("p")&&(o="PM"):o="";let u=+i||0,m=+a||0,c=!o||e?23:12;if(u>=c?i=String(c):u<0&&(i="00"),i=i.padStart(2,"0"),a!==void 0&&(m>59?a="59":m<0?a="00":a=a.padStart(2,"0")),s!==void 0){let f=+s||0;f>59?s="59":f<0?s="00":s=s.padStart(2,"0")}let d=i;return a!==void 0&&(d+=`:${a}`,s===void 0&&r&&(s="00")),s!==void 0&&(d+=`:${s}`),o&&(d+=` ${o}`),d}export{A as a,_ as b,I as c,R as d,O as e,L as f,N as g,$ as h,F as i,Y as j,U as k,V as l,G as m,w as n,y as o,D as p,E as q,W as r,b as s,M as t,x as u,C as v,T as w,X as x,j as y,q as z,K as A};
|
|
7
|
+
//# sourceMappingURL=chunk.QG5EYBS3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/core/utils/date-utils.ts", "../../src/core/utils/reflect-utils.ts", "../../src/core/utils/svg-utils.ts", "../../src/core/utils/time-utils.ts"],
|
|
4
|
+
"sourcesContent": ["import { isValidDate } from '@tylertech/forge-core';\n\nexport const ISO_8601_REGEX = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\nexport const ISO_TIMEZONE_REGEX = /a-z/i;\nconst FUTURE_YEAR_COERCION = 10; // The number of years in the future to coerce two-digit years into current century\n\n/**\n * Parses a date string value to a `Date` object in local time.\n * @param str The date string value.\n */\nexport function parseDateString(value: string): Date | null {\n value = value.replace(/_|\\s/g, ''); // Remove potential extraneous characters\n\n // We first check if this is a valid date in ISO 8601 format and return it if so\n if (ISO_8601_REGEX.test(value)) {\n const iso8601Date = new Date(value);\n\n // This is an ISO string, but does it have a timezone? If not, we add current timezone offset\n if (!ISO_TIMEZONE_REGEX.test(value)) {\n iso8601Date.setMinutes(iso8601Date.getMinutes() + iso8601Date.getTimezoneOffset());\n }\n\n if (isValidDate(iso8601Date)) {\n return iso8601Date;\n }\n }\n\n let values: string[] = [];\n\n // We accept dates with a \"/\" or \"-\" separator and in the format of MM/DD/YYYY\n if (value.indexOf('/') !== -1) {\n values = value.split('/');\n } else if (value.indexOf('-') !== -1) {\n values = value.split('-');\n } else if ((value.length === 6 || value.length === 8) && !isNaN(+value)) {\n values = [value.substring(0, 2), value.substring(2, 4), value.substring(4)];\n }\n\n const hasMonthDayYear = values.length === 3;\n let [month, day, year] = values;\n\n // Ensure are month and year values are coerced from 0 to 1 in case of incomplete entry\n if (month === '0') {\n month = '1';\n }\n if (day === '0') {\n day = '1';\n }\n\n // Trap for the case where only 3 digit years are entered\n if (typeof year === 'string' && year.length === 3) {\n year = year.padStart(4, '0');\n }\n \n if (hasMonthDayYear) {\n const isValidMonthLength = month.length === 1 || month.length === 2;\n const isValidDayLength = day.length === 1 || day.length === 2;\n const isValidYearLength = year.length === 2 || year.length === 4;\n\n if (!isValidMonthLength || !isValidDayLength || !isValidYearLength) {\n return null;\n }\n } else {\n return null;\n }\n\n // Check if we need to coerce two-digit years to the four-digit equivalent\n if (year.length === 2) {\n const minYear = new Date().getFullYear() - (100 - FUTURE_YEAR_COERCION);\n const maxYear = new Date().getFullYear() + FUTURE_YEAR_COERCION;\n const minYearCentury = String(minYear).slice(0, 2);\n const maxYearCentury = String(maxYear).slice(0, 2);\n const normalizedMaxYear = +String(maxYear).slice(2);\n year = +year <= normalizedMaxYear ? `${maxYearCentury}${year}` : `${minYearCentury}${year}`;\n }\n\n let numMonth = +month;\n let numDay = +day;\n const numYear = +year;\n\n if (numMonth > 12) {\n numMonth = 12;\n }\n\n const maxDaysInMonth = new Date(numYear, numMonth, 0).getDate();\n\n if (numDay > maxDaysInMonth) {\n numDay = maxDaysInMonth;\n }\n\n const parsedDate = new Date(numYear, numMonth - 1, numDay, 0, 0, 0, 0);\n return isValidDate(parsedDate) ? parsedDate : null;\n}\n\n/**\n * Formats a `Date` to a specified format.\n * @param str The date string value.\n */\nexport function formatDate(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const year = String(date.getFullYear()).padStart(4, '0');\n return [month, day, year].join('/');\n}\n\n/**\n * Determines if two date objects are equal.\n * \n * Note: Time values are ignored.\n * @param first The date to compare.\n * @param second The date to compare the first date to. \n * @returns A boolean whether the two dates are equivalent.\n */\nexport function isSameDate(first?: Date | null, second?: Date | null): boolean {\n if (!first && !second) {\n return true;\n } else if (!first || !second) {\n return false;\n } else if (!isValidDate(first) || !isValidDate(second)) {\n return false;\n }\n return first.setHours(0, 0, 0, 0) === second.setHours(0, 0, 0, 0);\n}\n\n/** \n * Returns the last date on a month.\n * \n * @param month The month.\n * @param year The year of the month, needed for February otherwise optional.\n * @returns The last date of the given month.\n */\nexport function getLastDateOfMonth(month: number, year?: number): Date {\n return new Date(year ?? 1970, month + 1, 0);\n}\n\n/**\n * Returns the number of days in a month.\n * \n * @param month The month to find the length of.\n * @param year The year to check within, needed for February otherwise optional.\n * @returns The number of days in the month.\n */\nexport function getMonthLength(month: number, year?: number): number {\n return getLastDateOfMonth(month, year).getDate();\n}\n", "import { isDefined } from '@tylertech/forge-core';\n\n/**\n * A callback function for handling forwarded attributes.\n */\nexport type AttributeForwardingCallback = (name: string, value: string | null, part: string | null) => void;\n\n/**\n * ARIA attributes capable of being reflected to a shadow element.\n */\nexport const REFLECTIVE_ARIA_ATTRIBUTES = [\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colspan',\n 'aria-current',\n 'aria-description',\n 'aria-disabled',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-level',\n 'aria-live',\n 'aria-modal',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext'\n];\n/**\n * ARIA attributes typically useful for input elements.\n */\nexport const INPUT_ARIA_ATTRIBUTES = [\n 'aria-autocomplete',\n 'aria-description',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label'\n];\n/**\n * Property names relevant to input elements.\n */\nexport const INPUT_PROPERTIES: (keyof HTMLInputElement)[] = [\n 'checked',\n 'disabled',\n 'indeterminate',\n 'readOnly',\n 'required',\n 'value'\n];\n/**\n * Attributes for buttons when used within a form.\n */\nexport const BUTTON_FORM_ATTRIBUTES = [\n 'name',\n 'value',\n 'formaction',\n 'formenctype',\n 'formmethod',\n 'formnovalidate',\n 'formtarget'\n];\n\n/**\n * Gets an array of attribute names prefixed by a part name and colon.\n * @param part The part name of a shadow element.\n * @param attributes An array of attribute names to prefix.\n * @returns An array of prefixed attribute name strings.\n */\nexport function getPartPrefixedAttributes(part: string, attributes: string[]): string[] {\n return attributes.map(attr => `${part}:${attr}`);\n}\n\n/**\n * Observes a configured array of attributes set on a source element and forwards them to a\n * callback function.\n * @param from The element to forward attributes from.\n * @param attributes Forwarded attributes.\n * @param callback A function to handle forwarded attributes.\n * @returns A `MutationObserver`.\n */\nexport function forwardAttributes(from: HTMLElement, attributes: string[], callback: AttributeForwardingCallback, genericize = true): MutationObserver {\n // Set the source element's role to presentation to prevent duplicated ARIA attributes being\n // seen by assistive technology\n if (genericize && attributes.some(attr => attr.toLowerCase().startsWith('aria-'))) {\n from.setAttribute('role', 'presentation');\n }\n\n // Parses an attribute and sends it to the provided callback\n const forwardAttribute = (name: string): void => {\n const nameParts = name.split(':');\n const partName = nameParts.length === 2 ? nameParts[0] : null;\n const attrName = nameParts.length === 2 ? nameParts[1] : nameParts[0];\n const value = from.getAttribute(name);\n\n callback.call({}, attrName, value, partName);\n };\n\n // First, forward any attributes already set on the source element\n attributes.forEach(attr => forwardAttribute(attr));\n\n // Forward new and changed attributes as needed\n const observerConfig: MutationObserverInit = { attributeFilter: attributes };\n const observerCallback: MutationCallback = mutationList => {\n mutationList.forEach(mutation => forwardAttribute(mutation.attributeName as string));\n };\n const observer = new MutationObserver(observerCallback);\n observer.observe(from, observerConfig);\n return observer;\n}\n\n/**\n * Clones attributes from one element to another.\n * @param from The source element to clone attributes from.\n * @param to The target element to clone attributes to.\n * @param attributes The list of attributes to clone.\n */\nexport function cloneAttributes(from: HTMLElement, to: HTMLElement, attributes: string[]): void {\n attributes.forEach(attr => {\n const value = from.getAttribute(attr);\n if (value !== null) {\n to.setAttribute(attr, value);\n }\n });\n}\n\n/**\n * Clones properties from one element to another.\n * @param from The source element to clone properties from.\n * @param to The target element to clone properties to.\n * @param attributes The list of properties to clone.\n */\nexport function cloneProperties<T, K extends keyof T>(from: T, to: T, properties: K[]): void {\n properties.forEach(prop => {\n const value = from[prop];\n if (isDefined(value)) {\n to[prop] = value;\n }\n });\n}\n\n/**\n * Clones the validation message of one input element to another.\n * @param from The source input element to clone the validation message from.\n * @param to The target input element to clone the validation message to.\n */\nexport function cloneValidationMessage(from: HTMLInputElement, to: HTMLInputElement): void {\n const message = from.validationMessage;\n if (message) {\n to.setCustomValidity(message);\n }\n}\n\n/**\n * A utility class for switching between elements.\n */\nexport class SlottedElementAdapter<T extends HTMLElement = HTMLElement> {\n private _el: T;\n private _attachCallback: (newEl: T, oldEl: T) => void;\n\n /**\n * Returns the element associated with this adapter.\n */\n public get el(): T {\n return this._el;\n }\n\n /**\n * Clones the specified attributes from one element to another.\n * \n * @param from - The element to clone attributes from.\n * @param to - The element to clone attributes to.\n * @param attributes - The names of the attributes to clone.\n */\n public static cloneAttributes(from: HTMLElement, to: HTMLElement, attributes: string[]): void {\n cloneAttributes(from, to, attributes);\n }\n\n /**\n * Clones the input specific properties from one element to another.\n * \n * @param from - The element to clone properties from.\n * @param to - The element to clone properties to.\n */\n public static cloneProperties(from: HTMLElement, to: HTMLElement, properties: (keyof HTMLElement)[]): void {\n cloneProperties(from, to, properties);\n }\n \n /**\n * Clones the validation message from one element to another.\n * \n * @param from - The element to clone the validation message from.\n * @param to - The element to clone the validation message to.\n */\n public static cloneValidationMessage(from: HTMLElement, to: HTMLElement): void {\n if (Object.hasOwnProperty.call(from, 'validationMessage') && Object.hasOwnProperty.call(to, 'validationMessage')) {\n cloneValidationMessage(from as HTMLInputElement, to as HTMLInputElement);\n } else {\n console.warn('cloneValidationMessage() requires both elements to be input elements.');\n }\n }\n\n /**\n * Initializes the adapter with an initial element and attach callback.\n * \n * @param el - The element to associate with the adapter.\n * @param attachCallback - The callback to invoke when attaching the element.\n */\n public initialize(el: T, attachCallback: (newEl: T, oldEl: T) => void): void {\n this._attachCallback = attachCallback;\n this._el = el;\n }\n\n /**\n * Replaces the attached element.\n * \n * @param el - The new element to attach.\n */\n public attachElement(el: T): void {\n this._attachCallback(el, this._el);\n this._el = el;\n }\n}\n", "/**\n * Creates an SVG element from a string.\n */\nexport function createSvgFromString(svgContent: string, defaultViewBox?: string): SVGSVGElement | null {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // Remove all non-svg child nodes\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n const svgElm = div.firstElementChild as SVGSVGElement;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg' && isSafeSvg(svgElm)) {\n // Check if a custom viewbox value was provided and use that if so\n if (defaultViewBox) {\n svgElm.setAttribute('viewBox', defaultViewBox);\n }\n\n // Force a default viewBox if one doesn't exist (this ensures our icon is scalable)\n if (!svgElm.hasAttribute('viewBox') && defaultViewBox) {\n svgElm.setAttribute('viewBox', defaultViewBox);\n }\n\n // Remove any height and width attributes to ensure that the icon is properly scalable\n svgElm.removeAttribute('height');\n svgElm.removeAttribute('width');\n\n return svgElm;\n }\n\n return null;\n}\n\n/**\n * Determines if the provided element is a safe SVG to use.\n * @param el The element reference to test.\n */\nexport function isSafeSvg(el: Element): boolean {\n if (el.nodeType !== 1) {\n return true;\n }\n\n // Validate no <script> tags exist\n if (el.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n // Ensure there are no inline listeners\n const attributes = Array.from(el.attributes);\n for (const attr of attributes) {\n if (typeof attr.name === 'string' && attr.name.toLowerCase().startsWith('on')) {\n return false;\n }\n }\n\n // Ensure all child nodes are valid\n const childNodes = Array.from(el.childNodes) as Element[];\n for (const node of childNodes) {\n if (!isSafeSvg(node)) {\n return false;\n }\n }\n\n return true;\n}\n", "export const TWENTY_FOUR_HOUR_TIME_REGEX = /^(0?[0-9]|1\\d|2[0-3]):([0-5]\\d)(:([0-5]\\d))?$/;\nexport const TWELVE_HOUR_TIME_REGEX = /^(0?[1-9]|1[0-2]):([0-5]\\d)(:([0-5]\\d))?\\s*([AaPp][Mm])?$/;\nexport const PARSEABLE_TIME_FORMAT = /^(\\d?\\d?):?(\\d?\\d?)(:?(\\d?\\d?))?\\s*([AaPp][Mm]?)?$/;\nexport const HAS_MERIDIEM_REGEX = /[AaPp][Mm]?/;\n\nexport function tokenize24HourTimeString(value: string): { hours: string; minutes: string; seconds: string } {\n const matches = value.match(TWENTY_FOUR_HOUR_TIME_REGEX) as RegExpMatchArray || [null, 0, 0, null, 0];\n const hours = matches[1];\n const minutes = matches[2];\n const seconds = matches[4];\n return { hours, minutes, seconds };\n}\n\nexport function tokenize12HourTimeString(value: string): { hours: string; minutes: string; seconds: string; meridiem: string } {\n const matches = value.match(TWELVE_HOUR_TIME_REGEX) as RegExpMatchArray || [null, 0, 0, null, 0, 'AM'];\n const hours = matches[1];\n const minutes = matches[2];\n const seconds = matches[4];\n const meridiem = matches[5];\n return { hours, minutes, seconds, meridiem };\n}\n\nexport function isSupportedTimeFormat(value: string): boolean {\n return TWENTY_FOUR_HOUR_TIME_REGEX.test(value) ||\n TWELVE_HOUR_TIME_REGEX.test(value);\n}\n\nexport function tryCoerceTimeString(str: string, use24HourTime: boolean, allowSeconds: boolean): string {\n str = str && typeof str === 'string' ? str.replace(/_|\\s/g, '') : '';\n if (/^\\s*$/.test(str) || /^:+$/.test(str)) {\n return '';\n }\n\n const matches = str.match(PARSEABLE_TIME_FORMAT);\n if (!matches) {\n return '';\n }\n\n let hoursStr = matches[1];\n let minutesStr = matches[2];\n let secondsStr = matches[4];\n let meridiem = matches[5];\n\n // Special case detection for meridiem\n const meridiemMatches = str.match(HAS_MERIDIEM_REGEX);\n if (meridiemMatches) {\n meridiem = meridiemMatches[0];\n str = str.replace(meridiem, ''); // Remove the meridiem from the input string our next special case\n\n // We allow for entering an \"a\" or \"p\" shorthand so let's coerce it to the proper value\n if (meridiem.length === 1) {\n meridiem += 'm';\n }\n }\n\n // Special case handling for 3-digit \"shorthand\" time values (ex. \"130\" => \"1:30 AM\")\n if (str.length === 3 && !str.includes(':')) {\n hoursStr = str[0];\n minutesStr = str.substring(1);\n }\n\n // Normalize the meridiem string\n if (use24HourTime) {\n meridiem = '';\n } else if (HAS_MERIDIEM_REGEX.test(meridiem)) {\n meridiem = meridiem.toUpperCase();\n } else {\n if (/^[AaPp]/.test(meridiem)) {\n if (meridiem.toLowerCase().startsWith('a')) {\n meridiem = 'AM';\n } else if (meridiem.toLowerCase().startsWith('p')) {\n meridiem = 'PM';\n }\n } else {\n meridiem = '';\n }\n }\n\n const hoursNum = +hoursStr || 0;\n const minutesNum = +minutesStr || 0;\n\n // Clamp and normalize hours\n const maxHours = !meridiem || use24HourTime ? 23 : 12;\n if (hoursNum >= maxHours) {\n hoursStr = String(maxHours);\n } else if (hoursNum < 0) {\n hoursStr = '00';\n }\n\n hoursStr = hoursStr.padStart(2, '0');\n\n // Clamp and normalize minutes\n if (minutesStr !== undefined) {\n if (minutesNum > 59) {\n minutesStr = '59';\n } else if (minutesNum < 0) {\n minutesStr = '00';\n } else {\n minutesStr = minutesStr.padStart(2, '0');\n }\n }\n\n // Clamp and normalize seconds (if applicable)\n if (secondsStr !== undefined) {\n const secondsNum = +secondsStr || 0;\n if (secondsNum > 59) {\n secondsStr = '59';\n } else if (secondsNum < 0) {\n secondsStr = '00';\n } else {\n secondsStr = secondsStr.padStart(2, '0');\n }\n }\n\n // Build resulting time string\n let timeStr = hoursStr;\n if (minutesStr !== undefined) {\n timeStr += `:${minutesStr}`;\n if (secondsStr === undefined && allowSeconds) {\n secondsStr = '00';\n }\n }\n if (secondsStr !== undefined) {\n timeStr += `:${secondsStr}`;\n }\n if (meridiem) {\n timeStr += ` ${meridiem}`;\n }\n\n return timeStr;\n}\n"],
|
|
5
|
+
"mappings": "+CAEO,IAAMA,EAAiB,8RACjBC,EAAqB,OAC5BC,EAAuB,GAMtB,SAASC,EAAgBC,EAA4B,CAI1D,GAHAA,EAAQA,EAAM,QAAQ,QAAS,EAAE,EAG7BJ,EAAe,KAAKI,CAAK,EAAG,CAC9B,IAAMC,EAAc,IAAI,KAAKD,CAAK,EAOlC,GAJKH,EAAmB,KAAKG,CAAK,GAChCC,EAAY,WAAWA,EAAY,WAAW,EAAIA,EAAY,kBAAkB,CAAC,EAG/EC,EAAYD,CAAW,EACzB,OAAOA,EAIX,IAAIE,EAAmB,CAAC,EAGpBH,EAAM,QAAQ,GA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AS,EAAG,GAAG,EAK3C,IAAIM,EAAUR,EACd,OAAIC,IAAe,SACjBO,GAAW,IAAIP,IACXC,IAAe,QAAaH,IAC9BG,EAAa,OAGbA,IAAe,SACjBM,GAAW,IAAIN,KAEbR,IACFc,GAAW,IAAId,KAGVc,CACT",
|
|
6
|
+
"names": ["ISO_8601_REGEX", "ISO_TIMEZONE_REGEX", "FUTURE_YEAR_COERCION", "parseDateString", "value", "iso8601Date", "isValidDate", "values", "hasMonthDayYear", "month", "day", "year", "isValidMonthLength", "isValidDayLength", "isValidYearLength", "minYear", "maxYear", "minYearCentury", "maxYearCentury", "normalizedMaxYear", "numMonth", "numDay", "numYear", "maxDaysInMonth", "parsedDate", "formatDate", "date", "isSameDate", "first", "second", "getLastDateOfMonth", "getMonthLength", "REFLECTIVE_ARIA_ATTRIBUTES", "INPUT_ARIA_ATTRIBUTES", "INPUT_PROPERTIES", "BUTTON_FORM_ATTRIBUTES", "getPartPrefixedAttributes", "part", "attributes", "attr", "forwardAttributes", "from", "callback", "genericize", "forwardAttribute", "name", "nameParts", "partName", "attrName", "value", "observerConfig", "observerCallback", "mutationList", "mutation", "observer", "cloneAttributes", "to", "cloneProperties", "properties", "prop", "isDefined", "cloneValidationMessage", "message", "SlottedElementAdapter", "el", "attachCallback", "createSvgFromString", "svgContent", "defaultViewBox", "div", "svgElm", "isSafeSvg", "el", "attributes", "attr", "childNodes", "node", "TWENTY_FOUR_HOUR_TIME_REGEX", "TWELVE_HOUR_TIME_REGEX", "PARSEABLE_TIME_FORMAT", "HAS_MERIDIEM_REGEX", "tokenize24HourTimeString", "value", "matches", "hours", "minutes", "seconds", "tokenize12HourTimeString", "meridiem", "isSupportedTimeFormat", "tryCoerceTimeString", "str", "use24HourTime", "allowSeconds", "hoursStr", "minutesStr", "secondsStr", "meridiemMatches", "hoursNum", "minutesNum", "maxHours", "secondsNum", "timeStr"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{d as L}from"./chunk.VG452D3L.js";import{a as w,p as C}from"./chunk.RCPUTZON.js";import{a as k}from"./chunk.3TKTJ3BY.js";import{a as c}from"./chunk.NVUMRW44.js";import{a as S}from"./chunk.T4J66YX5.js";import{a as v}from"./chunk.6ZJIHOIG.js";import{c as A,e as T,f as h,k as I}from"./chunk.TPXXHX5J.js";import{v as E}from"./chunk.HZUQXCOQ.js";import{k as s}from"./chunk.J2M2MXP2.js";import{d as n}from"./chunk.M3QDAYD2.js";var N=`${v}tab-bar`,B={DISABLED:"disabled",ACTIVE_TAB:"active-tab",VERTICAL:"vertical",STACKED:"stacked",CLUSTERED:"clustered",SECONDARY:"secondary",INVERTED:"inverted",AUTO_ACTIVATE:"auto-activate",SCROLL_BUTTONS:"scroll-buttons"},M={CONTAINER:".container",SCROLL_CONTAINER:".scroll-container",DEFAULT_SLOT:"slot:not([name])"},K={SCROLL_BUTTON:"scroll-button"},H={CHANGE:`${N}-change`},F={SCROLL_MARGIN:48},D={attributes:B,elementName:N,events:H,selectors:M,classes:K,numbers:F},J=new Map([["default",new Set(["Home","End"])],["horizontal",new Set(["ArrowLeft","ArrowRight"])],["vertical",new Set(["ArrowUp","ArrowDown"])]]);var R=`${v}tab`,V={DISABLED:"disabled",SELECTED:"selected",VERTICAL:"vertical",STACKED:"stacked",SECONDARY:"secondary",INVERTED:"inverted"},P={INDICATOR:".indicator"},U={SELECTED:"selected"},Y={SELECT:`${R}-select`},$={EASING:"cubic-bezier(0.4, 0, 0.2, 1)"},G={ANIMATION_DURATION:250},t={elementName:R,attributes:V,selectors:P,classes:U,events:Y,strings:$,numbers:G};var p=class extends k{constructor(e){super(e);this._tabIndicatorElement=h(this._component,t.selectors.INDICATOR),this._stateLayerElement=h(this._component,w.elementName)}initialize(){this._component.tabIndex=this._component.selected?0:-1,this._component.setAttribute("role","tab"),this._component.setAttribute("aria-selected",this._component.selected?"true":"false")}addInteractionListener(e,i){this._component.addEventListener(e,i)}setDisabled(e){this._stateLayerElement.disabled=e,this._component.tabIndex=e?-1:this._component.selected?0:-1,this._component.setAttribute("aria-disabled",String(e)),E(this._component,e,t.attributes.DISABLED,String(e))}setSelected(e){this._component.tabIndex=e?0:-1,this._component.setAttribute("aria-selected",String(e))}animateSelected(){this._tabIndicatorElement.getAnimations().forEach(i=>i.cancel());let e=this._getKeyframes();e&&this._tabIndicatorElement.animate(e,{duration:t.numbers.ANIMATION_DURATION,easing:t.strings.EASING})}animateStateLayer(){this._stateLayerElement.playAnimation()}_getKeyframes(){var x;let e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this._component.selected)return e?[{opacity:1},{transform:"none"}]:null;let i={},a=this._component.vertical,l=this._getSelectedTabIndicator(),b=(x=l==null?void 0:l.getBoundingClientRect())!=null?x:{},_=a?b.top:b.left,O=a?b.height:b.width,d=this._tabIndicatorElement.getBoundingClientRect(),m=a?d.top:d.left,z=a?d.height:d.width,u=a?"Y":"X",y=O/z;return!e&&_!==void 0&&m!==void 0&&!isNaN(y)?i.transform=`translate${u}(${(_-m).toFixed(4)}px) scale${u}(${y.toFixed(4)})`:i.opacity=0,[i,{transform:"none"}]}_getSelectedTabIndicator(){let e=A(this._component,D.elementName);if(e){let a=Array.from(e.querySelectorAll(t.elementName)).find(l=>l.hasAttribute(t.attributes.SELECTED));if(a)return h(a,t.selectors.INDICATOR)}return null}};var g=class{constructor(o){this._adapter=o;this._selected=!1;this._disabled=!1;this._vertical=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._clickListener=()=>this._onClick(),this._keydownListener=e=>this._onKeydown(e)}initialize(){this._adapter.initialize(),this._adapter.addInteractionListener("click",this._clickListener),this._adapter.addInteractionListener("keydown",this._keydownListener)}_onClick(){this._disabled||this._selected||this._dispatchSelectEvent()}_onKeydown(o){if(this._disabled||this._selected)return;(o.key===" "||o.key==="Enter")&&(o.preventDefault(),this._adapter.animateStateLayer(),this._dispatchSelectEvent())}_dispatchSelectEvent(){this._adapter.emitHostEvent(t.events.SELECT,{bubbles:!0,composed:!0})}get disabled(){return this._disabled}set disabled(o){this._disabled!==o&&(this._disabled=o,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(t.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(o){this._selected!==o&&(this._selected=o,this._adapter.setSelected(this._selected),this._adapter.animateSelected(),this._adapter.toggleHostAttribute(t.attributes.SELECTED,this._selected))}get vertical(){return this._vertical}set vertical(o){this._vertical!==o&&(this._vertical=o,this._adapter.toggleHostAttribute(t.attributes.VERTICAL,this._vertical))}get stacked(){return this._stacked}set stacked(o){this._stacked!==o&&(this._stacked=o,this._adapter.toggleHostAttribute(t.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(o){this._secondary!==o&&(this._secondary=o,this._adapter.toggleHostAttribute(t.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(o){this._inverted!==o&&(this._inverted=o,this._adapter.toggleHostAttribute(t.attributes.INVERTED,this._inverted))}};var X='<template><div class="forge-tab" part="container"><span class="content" part="content"><slot name="leading"></slot><span class="label" part="label"><slot></slot></span><slot name="trailing"></slot><span class="indicator" part="indicator"></span></span><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></template>',j=':host{display:-webkit-inline-box;display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.54)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-button-text-decoration,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding:0;margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:-webkit-inline-box;display:inline-flex;position:relative;-webkit-writing-mode:horizontal-tb;-ms-writing-mode:lr-tb;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;white-space:nowrap;-webkit-transition:150ms color linear;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding));min-height:var(--_tab-content-height);padding:var(--_tab-content-padding) calc(2 * var(--_tab-content-padding));gap:var(--_tab-content-padding)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:-1;-webkit-transform-origin:bottom left;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([secondary]) .forge-tab{--_tab-indicator-height:var(--_tab-secondary-indicator-height);--_tab-indicator-shape:var(--_tab-secondary-indicator-shape)}:host([secondary]) .content{width:100%}:host([secondary]) .indicator{min-width:100%}:host([vertical]) .forge-tab{width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical][secondary]) .content{min-height:100%}:host([vertical]:not([secondary])) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;-webkit-transform-origin:top left;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}',r=class extends I{constructor(){super();T(this,X,j),this._foundation=new g(new p(this))}static get observedAttributes(){return[t.attributes.DISABLED,t.attributes.SELECTED,t.attributes.VERTICAL,t.attributes.STACKED,t.attributes.SECONDARY,t.attributes.INVERTED]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(e,i,a){switch(e){case t.attributes.DISABLED:this.disabled=s(a);break;case t.attributes.SELECTED:this.selected=s(a);break;case t.attributes.VERTICAL:this.vertical=s(a);break;case t.attributes.STACKED:this.stacked=s(a);break;case t.attributes.SECONDARY:this.secondary=s(a);break;case t.attributes.INVERTED:this.inverted=s(a);break}}};n([c()],r.prototype,"disabled",2),n([c()],r.prototype,"selected",2),n([c()],r.prototype,"vertical",2),n([c()],r.prototype,"stacked",2),n([c()],r.prototype,"secondary",2),n([c()],r.prototype,"inverted",2),r=n([S({name:t.elementName,dependencies:[L,C]})],r);export{D as a,J as b,t as c,p as d,g as e,r as f};
|
|
7
|
+
//# sourceMappingURL=chunk.QGMWM7IT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tabs/tab-bar/tab-bar-constants.ts", "../../src/tabs/tab/tab-constants.ts", "../../src/tabs/tab/tab-adapter.ts", "../../src/tabs/tab/tab-foundation.ts", "../../src/tabs/tab/tab.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}tab-bar`;\n\nconst attributes = {\n DISABLED: 'disabled',\n ACTIVE_TAB: 'active-tab',\n VERTICAL: 'vertical',\n STACKED: 'stacked',\n CLUSTERED: 'clustered',\n SECONDARY: 'secondary',\n INVERTED: 'inverted',\n AUTO_ACTIVATE: 'auto-activate',\n SCROLL_BUTTONS: 'scroll-buttons'\n};\n\nconst selectors = {\n CONTAINER: '.container',\n SCROLL_CONTAINER: '.scroll-container',\n DEFAULT_SLOT: 'slot:not([name])'\n};\n\nconst classes = {\n SCROLL_BUTTON: 'scroll-button'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`\n};\n\nconst numbers = {\n SCROLL_MARGIN: 48\n};\n\nexport const TAB_BAR_CONSTANTS = {\n attributes,\n elementName,\n events,\n selectors,\n classes,\n numbers\n};\n\nexport const NAVIGATION_KEYS = new Map([\n ['default', new Set(['Home', 'End'])],\n ['horizontal', new Set(['ArrowLeft', 'ArrowRight'])],\n ['vertical', new Set(['ArrowUp', 'ArrowDown'])]\n]);\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}tab`;\n\nconst attributes = {\n DISABLED: 'disabled',\n SELECTED: 'selected',\n VERTICAL: 'vertical',\n STACKED: 'stacked',\n SECONDARY: 'secondary',\n INVERTED: 'inverted'\n};\n\nconst selectors = {\n INDICATOR: '.indicator'\n};\n\nconst classes = {\n SELECTED: 'selected'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nconst strings = {\n EASING: 'cubic-bezier(0.4, 0, 0.2, 1)'\n};\n\nconst numbers = {\n ANIMATION_DURATION: 250\n};\n\nexport const TAB_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes,\n events,\n strings,\n numbers\n};\n\n", "import { getShadowElement, requireParent, toggleAttribute } from '@tylertech/forge-core';\nimport { IStateLayerComponent, STATE_LAYER_CONSTANTS } from '../../state-layer';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { TAB_BAR_CONSTANTS } from '../tab-bar/tab-bar-constants';\nimport type { ITabComponent } from './tab';\nimport { TAB_CONSTANTS } from './tab-constants';\n\nexport interface ITabAdapter extends IBaseAdapter {\n initialize(): void;\n addInteractionListener(type: string, listener: EventListener): void;\n setDisabled(value: boolean): void;\n setSelected(value: boolean): void;\n animateSelected(): void;\n animateStateLayer(): void;\n}\n\nexport class TabAdapter extends BaseAdapter<ITabComponent> implements ITabAdapter {\n private readonly _tabIndicatorElement: HTMLElement;\n private readonly _stateLayerElement: IStateLayerComponent;\n\n constructor(component: ITabComponent) {\n super(component);\n this._tabIndicatorElement = getShadowElement(this._component, TAB_CONSTANTS.selectors.INDICATOR);\n this._stateLayerElement = getShadowElement(this._component, STATE_LAYER_CONSTANTS.elementName) as IStateLayerComponent;\n }\n\n public initialize(): void {\n this._component.tabIndex = this._component.selected ? 0 : -1;\n this._component.setAttribute('role', 'tab');\n this._component.setAttribute('aria-selected', this._component.selected ? 'true' : 'false');\n }\n\n public addInteractionListener(type: string, listener: EventListener): void {\n this._component.addEventListener(type, listener);\n }\n\n public setDisabled(value: boolean): void {\n this._stateLayerElement.disabled = value;\n this._component.tabIndex = value ? -1 : this._component.selected ? 0 : -1;\n this._component.setAttribute('aria-disabled', String(value));\n toggleAttribute(this._component, value, TAB_CONSTANTS.attributes.DISABLED, String(value));\n }\n\n public setSelected(value: boolean): void {\n this._component.tabIndex = value ? 0 : -1;\n this._component.setAttribute('aria-selected', String(value));\n }\n\n public animateSelected(): void {\n this._tabIndicatorElement.getAnimations().forEach(a => a.cancel());\n const frames = this._getKeyframes();\n if (frames) {\n this._tabIndicatorElement.animate(frames, { duration: TAB_CONSTANTS.numbers.ANIMATION_DURATION, easing: TAB_CONSTANTS.strings.EASING });\n }\n }\n\n public animateStateLayer(): void {\n this._stateLayerElement.playAnimation();\n }\n\n private _getKeyframes(): Keyframe[] | null {\n const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n if (!this._component.selected) {\n return reduceMotion ? [{ opacity: 1 }, { transform: 'none' }] : null;\n }\n\n const from: Keyframe = {};\n const isVertical = this._component.vertical;\n const selectedTabIndicator = this._getSelectedTabIndicator();\n const fromRect = selectedTabIndicator?.getBoundingClientRect() ?? {} as DOMRect;\n const fromPos = isVertical ? fromRect.top : fromRect.left;\n const fromExtent = isVertical ? fromRect.height : fromRect.width;\n const toRect = this._tabIndicatorElement.getBoundingClientRect();\n const toPos = isVertical ? toRect.top : toRect.left;\n const toExtent = isVertical ? toRect.height : toRect.width;\n const axis = isVertical ? 'Y' : 'X';\n const scale = fromExtent / toExtent;\n\n if (!reduceMotion && fromPos !== undefined && toPos !== undefined && !isNaN(scale)) {\n from.transform = `translate${axis}(${(fromPos - toPos).toFixed(4)}px) scale${axis}(${scale.toFixed(4)})`;\n } else {\n from.opacity = 0;\n }\n\n return [from, { transform: 'none' }];\n }\n\n private _getSelectedTabIndicator(): HTMLElement | null {\n const tabsEl = requireParent(this._component, TAB_BAR_CONSTANTS.elementName);\n if (tabsEl) {\n const tabChildren = Array.from(tabsEl.querySelectorAll(TAB_CONSTANTS.elementName)) as ITabComponent[];\n const selectedTab = tabChildren.find(tab => tab.hasAttribute(TAB_CONSTANTS.attributes.SELECTED));\n if (selectedTab) {\n return getShadowElement(selectedTab, TAB_CONSTANTS.selectors.INDICATOR);\n }\n }\n return null;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ITabAdapter } from './tab-adapter';\nimport { TAB_CONSTANTS } from './tab-constants';\n\nexport interface ITabFoundation extends ICustomElementFoundation {\n disabled: boolean;\n selected: boolean;\n vertical: boolean;\n stacked: boolean;\n secondary: boolean;\n inverted: boolean;\n}\n\nexport class TabFoundation implements ITabFoundation {\n // State\n private _selected = false;\n private _disabled = false;\n private _vertical = false;\n private _stacked = false;\n private _secondary = false;\n private _inverted = false;\n\n // Listeners\n private _clickListener: EventListener;\n private _keydownListener: EventListener;\n\n constructor(private _adapter: ITabAdapter) {\n this._clickListener = () => this._onClick();\n this._keydownListener = (evt: KeyboardEvent) => this._onKeydown(evt);\n }\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.addInteractionListener('click', this._clickListener);\n this._adapter.addInteractionListener('keydown', this._keydownListener);\n }\n\n private _onClick(): void {\n if (this._disabled || this._selected) {\n return;\n }\n this._dispatchSelectEvent();\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n if (this._disabled || this._selected) {\n return;\n }\n\n const isSelectionKey = evt.key === ' ' || evt.key === 'Enter';\n if (isSelectionKey) {\n evt.preventDefault();\n this._adapter.animateStateLayer();\n this._dispatchSelectEvent();\n }\n }\n\n private _dispatchSelectEvent(): void {\n this._adapter.emitHostEvent(TAB_CONSTANTS.events.SELECT, { bubbles: true, composed: true });\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._selected = value;\n this._adapter.setSelected(this._selected);\n this._adapter.animateSelected();\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.SELECTED, this._selected);\n }\n }\n\n public get vertical(): boolean {\n return this._vertical;\n }\n public set vertical(value: boolean) {\n if (this._vertical !== value) {\n this._vertical = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.VERTICAL, this._vertical);\n }\n }\n\n public get stacked(): boolean {\n return this._stacked;\n }\n public set stacked(value: boolean) {\n if (this._stacked !== value) {\n this._stacked = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.STACKED, this._stacked);\n }\n }\n\n public get secondary(): boolean {\n return this._secondary;\n }\n public set secondary(value: boolean) {\n if (this._secondary !== value) {\n this._secondary = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.SECONDARY, this._secondary);\n }\n }\n\n public get inverted(): boolean {\n return this._inverted;\n }\n public set inverted(value: boolean) {\n if (this._inverted !== value) {\n this._inverted = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.INVERTED, this._inverted);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport { TabAdapter } from './tab-adapter';\nimport { TabFoundation } from './tab-foundation';\nimport { TAB_CONSTANTS } from './tab-constants';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { FocusIndicatorComponent } from '../../focus-indicator/focus-indicator';\nimport { StateLayerComponent } from '../../state-layer/state-layer';\n\nconst template = '<template><div class=\\\"forge-tab\\\" part=\\\"container\\\"><span class=\\\"content\\\" part=\\\"content\\\"><slot name=\\\"leading\\\"></slot><span class=\\\"label\\\" part=\\\"label\\\"><slot></slot></span><slot name=\\\"trailing\\\"></slot><span class=\\\"indicator\\\" part=\\\"indicator\\\"></span></span><forge-state-layer exportparts=\\\"surface:state-layer\\\" target=\\\":host\\\"></forge-state-layer><forge-focus-indicator exportparts=\\\"indicator:focus-indicator\\\" target=\\\":host\\\" inward></forge-focus-indicator></div></template>';\nconst styles = ':host{display:-webkit-inline-box;display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.54)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-button-text-decoration,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding:0;margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:-webkit-inline-box;display:inline-flex;position:relative;-webkit-writing-mode:horizontal-tb;-ms-writing-mode:lr-tb;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;white-space:nowrap;-webkit-transition:150ms color linear;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding));min-height:var(--_tab-content-height);padding:var(--_tab-content-padding) calc(2 * var(--_tab-content-padding));gap:var(--_tab-content-padding)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:-1;-webkit-transform-origin:bottom left;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([secondary]) .forge-tab{--_tab-indicator-height:var(--_tab-secondary-indicator-height);--_tab-indicator-shape:var(--_tab-secondary-indicator-shape)}:host([secondary]) .content{width:100%}:host([secondary]) .indicator{min-width:100%}:host([vertical]) .forge-tab{width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical][secondary]) .content{min-height:100%}:host([vertical]:not([secondary])) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;-webkit-transform-origin:top left;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}';\n\nexport interface ITabComponent extends IBaseComponent {\n disabled: boolean;\n selected: boolean;\n vertical: boolean;\n stacked: boolean;\n secondary: boolean;\n inverted: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-tab': ITabComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-tab-select': CustomEvent<void>;\n }\n}\n\n/**\n * @tag forge-tab\n * \n * @property {boolean} disabled - The disabled state of the tab.\n * @property {boolean} selected - The selected state of the tab.\n * @property {boolean} vertical - Controls whether the tab is vertical or horizontal.\n * @property {boolean} stacked - Controls whether the tab is taller to allow for slotted leading/trailing elements.\n * @property {boolean} secondary - Controls whether the tab is styled as secondary tab navigation.\n * @property {boolean} inverted - Controls whether the tab indicator is rendered on the opposite side of the tab.\n * \n * @attribute disabled - The disabled state of the tab.\n * @attribute selected - The selected state of the tab.\n * @attribute vertical - Controls whether the tab is vertical or horizontal.\n * @attribute stacked - Controls whether the tab is taller to allow for slotted leading/trailing elements.\n * @attribute secondary - Controls whether the tab is styled as secondary tab navigation.\n * \n * @event forge-tab-select - Dispatched when the tab is selected.\n * \n * @cssproperty --forge-tab-indicator-color - The color of the tab indicator. Defaults to the primary theme.\n * @cssproperty --forge-tab-indicator-height - The height of the tab indicator.\n * @cssproperty --forge-tab-indicator-shape - The shape of the tab indicator.\n * @cssproperty --forge-tab-container-color - The color of the tab container. Defaults to the surface theme.\n * @cssproperty --forge-tab-height - The height of the tab.\n * @cssproperty --forge-tab-shape - The shape of the tab.\n * @cssproperty --forge-tab-disabled-opacity - The opacity of the tab when disabled.\n * @cssproperty --forge-tab-active-focus-icon-color - The color of the icon when the tab is active and focused. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-hover-icon-color - The color of the icon when the tab is active and hovered. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-icon-color - The color of the icon when the tab is active. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-pressed-icon-color - The color of the icon when the tab is active and pressed. Defaults to the primary theme.\n * @cssproperty --forge-tab-icon-size - The size of the icon.\n * @cssproperty --forge-tab-focus-icon-color - The color of the icon when the tab is focused. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-hover-icon-color - The color of the icon when the tab is hovered. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-icon-color - The color of the icon. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-pressed-icon-color - The color of the icon when the tab is pressed. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-active-focus-label-text-color - The color of the label text when the tab is active and focused. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-hover-label-text-color - The color of the label text when the tab is active and hovered. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-label-text-color - The color of the label text when the tab is active. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-pressed-label-text-color - The color of the label text when the tab is active and pressed. Defaults to the primary theme.\n * @cssproperty --forge-tab-focus-label-text-color - The color of the label text when the tab is focused. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-hover-label-text-color - The color of the label text when the tab is hovered. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-label-text-color - The color of the label text. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-pressed-label-text-color - The color of the label text when the tab is pressed. Defaults to the text-on-background theme.\n * \n * @csspart container - The tab container.\n * @csspart content - The tab content container.\n * @csspart label - The tab label container.\n * @csspart indicator - The tab active indicator.\n */\n@CustomElement({\n name: TAB_CONSTANTS.elementName,\n dependencies: [\n FocusIndicatorComponent,\n StateLayerComponent\n ]\n})\nexport class TabComponent extends BaseComponent implements ITabComponent {\n public static get observedAttributes(): string[] {\n return [\n TAB_CONSTANTS.attributes.DISABLED,\n TAB_CONSTANTS.attributes.SELECTED,\n TAB_CONSTANTS.attributes.VERTICAL,\n TAB_CONSTANTS.attributes.STACKED,\n TAB_CONSTANTS.attributes.SECONDARY,\n TAB_CONSTANTS.attributes.INVERTED\n ];\n }\n\n private _foundation: TabFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new TabFoundation(new TabAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case TAB_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.VERTICAL:\n this.vertical = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.STACKED:\n this.stacked = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.SECONDARY:\n this.secondary = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.INVERTED:\n this.inverted = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare disabled: boolean;\n \n @FoundationProperty()\n public declare selected: boolean;\n\n @FoundationProperty()\n public declare vertical: boolean;\n\n @FoundationProperty()\n public declare stacked: boolean;\n\n @FoundationProperty()\n public declare secondary: boolean;\n\n @FoundationProperty()\n public declare inverted: boolean;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}tab-bar`;\n\nconst attributes = {\n DISABLED: 'disabled',\n ACTIVE_TAB: 'active-tab',\n VERTICAL: 'vertical',\n STACKED: 'stacked',\n CLUSTERED: 'clustered',\n SECONDARY: 'secondary',\n INVERTED: 'inverted',\n AUTO_ACTIVATE: 'auto-activate',\n SCROLL_BUTTONS: 'scroll-buttons'\n};\n\nconst selectors = {\n CONTAINER: '.container',\n SCROLL_CONTAINER: '.scroll-container',\n DEFAULT_SLOT: 'slot:not([name])'\n};\n\nconst classes = {\n SCROLL_BUTTON: 'scroll-button'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`\n};\n\nconst numbers = {\n SCROLL_MARGIN: 48\n};\n\nexport const TAB_BAR_CONSTANTS = {\n attributes,\n elementName,\n events,\n selectors,\n classes,\n numbers\n};\n\nexport const NAVIGATION_KEYS = new Map([\n ['default', new Set(['Home', 'End'])],\n ['horizontal', new Set(['ArrowLeft', 'ArrowRight'])],\n ['vertical', new Set(['ArrowUp', 'ArrowDown'])]\n]);\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}tab`;\n\nconst attributes = {\n DISABLED: 'disabled',\n SELECTED: 'selected',\n VERTICAL: 'vertical',\n STACKED: 'stacked',\n SECONDARY: 'secondary',\n INVERTED: 'inverted'\n};\n\nconst selectors = {\n INDICATOR: '.indicator'\n};\n\nconst classes = {\n SELECTED: 'selected'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nconst strings = {\n EASING: 'cubic-bezier(0.4, 0, 0.2, 1)'\n};\n\nconst numbers = {\n ANIMATION_DURATION: 250\n};\n\nexport const TAB_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes,\n events,\n strings,\n numbers\n};\n\n", "import { getShadowElement, requireParent, toggleAttribute } from '@tylertech/forge-core';\nimport { IStateLayerComponent, STATE_LAYER_CONSTANTS } from '../../state-layer';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { TAB_BAR_CONSTANTS } from '../tab-bar/tab-bar-constants';\nimport type { ITabComponent } from './tab';\nimport { TAB_CONSTANTS } from './tab-constants';\n\nexport interface ITabAdapter extends IBaseAdapter {\n initialize(): void;\n addInteractionListener(type: string, listener: EventListener): void;\n setDisabled(value: boolean): void;\n setSelected(value: boolean): void;\n animateSelected(): void;\n animateStateLayer(): void;\n}\n\nexport class TabAdapter extends BaseAdapter<ITabComponent> implements ITabAdapter {\n private readonly _tabIndicatorElement: HTMLElement;\n private readonly _stateLayerElement: IStateLayerComponent;\n\n constructor(component: ITabComponent) {\n super(component);\n this._tabIndicatorElement = getShadowElement(this._component, TAB_CONSTANTS.selectors.INDICATOR);\n this._stateLayerElement = getShadowElement(this._component, STATE_LAYER_CONSTANTS.elementName) as IStateLayerComponent;\n }\n\n public initialize(): void {\n this._component.tabIndex = this._component.selected ? 0 : -1;\n this._component.setAttribute('role', 'tab');\n this._component.setAttribute('aria-selected', this._component.selected ? 'true' : 'false');\n }\n\n public addInteractionListener(type: string, listener: EventListener): void {\n this._component.addEventListener(type, listener);\n }\n\n public setDisabled(value: boolean): void {\n this._stateLayerElement.disabled = value;\n this._component.tabIndex = value ? -1 : this._component.selected ? 0 : -1;\n this._component.setAttribute('aria-disabled', String(value));\n toggleAttribute(this._component, value, TAB_CONSTANTS.attributes.DISABLED, String(value));\n }\n\n public setSelected(value: boolean): void {\n this._component.tabIndex = value ? 0 : -1;\n this._component.setAttribute('aria-selected', String(value));\n }\n\n public animateSelected(): void {\n this._tabIndicatorElement.getAnimations().forEach(a => a.cancel());\n const frames = this._getKeyframes();\n if (frames) {\n this._tabIndicatorElement.animate(frames, { duration: TAB_CONSTANTS.numbers.ANIMATION_DURATION, easing: TAB_CONSTANTS.strings.EASING });\n }\n }\n\n public animateStateLayer(): void {\n this._stateLayerElement.playAnimation();\n }\n\n private _getKeyframes(): Keyframe[] | null {\n const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n if (!this._component.selected) {\n return reduceMotion ? [{ opacity: 1 }, { transform: 'none' }] : null;\n }\n\n const from: Keyframe = {};\n const isVertical = this._component.vertical;\n const selectedTabIndicator = this._getSelectedTabIndicator();\n const fromRect = selectedTabIndicator?.getBoundingClientRect() ?? {} as DOMRect;\n const fromPos = isVertical ? fromRect.top : fromRect.left;\n const fromExtent = isVertical ? fromRect.height : fromRect.width;\n const toRect = this._tabIndicatorElement.getBoundingClientRect();\n const toPos = isVertical ? toRect.top : toRect.left;\n const toExtent = isVertical ? toRect.height : toRect.width;\n const axis = isVertical ? 'Y' : 'X';\n const scale = fromExtent / toExtent;\n\n if (!reduceMotion && fromPos !== undefined && toPos !== undefined && !isNaN(scale)) {\n from.transform = `translate${axis}(${(fromPos - toPos).toFixed(4)}px) scale${axis}(${scale.toFixed(4)})`;\n } else {\n from.opacity = 0;\n }\n\n return [from, { transform: 'none' }];\n }\n\n private _getSelectedTabIndicator(): HTMLElement | null {\n const tabsEl = requireParent(this._component, TAB_BAR_CONSTANTS.elementName);\n if (tabsEl) {\n const tabChildren = Array.from(tabsEl.querySelectorAll(TAB_CONSTANTS.elementName)) as ITabComponent[];\n const selectedTab = tabChildren.find(tab => tab.hasAttribute(TAB_CONSTANTS.attributes.SELECTED));\n if (selectedTab) {\n return getShadowElement(selectedTab, TAB_CONSTANTS.selectors.INDICATOR);\n }\n }\n return null;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ITabAdapter } from './tab-adapter';\nimport { TAB_CONSTANTS } from './tab-constants';\n\nexport interface ITabFoundation extends ICustomElementFoundation {\n disabled: boolean;\n selected: boolean;\n vertical: boolean;\n stacked: boolean;\n secondary: boolean;\n inverted: boolean;\n}\n\nexport class TabFoundation implements ITabFoundation {\n // State\n private _selected = false;\n private _disabled = false;\n private _vertical = false;\n private _stacked = false;\n private _secondary = false;\n private _inverted = false;\n\n // Listeners\n private _clickListener: EventListener;\n private _keydownListener: EventListener;\n\n constructor(private _adapter: ITabAdapter) {\n this._clickListener = () => this._onClick();\n this._keydownListener = (evt: KeyboardEvent) => this._onKeydown(evt);\n }\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.addInteractionListener('click', this._clickListener);\n this._adapter.addInteractionListener('keydown', this._keydownListener);\n }\n\n private _onClick(): void {\n if (this._disabled || this._selected) {\n return;\n }\n this._dispatchSelectEvent();\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n if (this._disabled || this._selected) {\n return;\n }\n\n const isSelectionKey = evt.key === ' ' || evt.key === 'Enter';\n if (isSelectionKey) {\n evt.preventDefault();\n this._adapter.animateStateLayer();\n this._dispatchSelectEvent();\n }\n }\n\n private _dispatchSelectEvent(): void {\n this._adapter.emitHostEvent(TAB_CONSTANTS.events.SELECT, { bubbles: true, composed: true });\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._selected = value;\n this._adapter.setSelected(this._selected);\n this._adapter.animateSelected();\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.SELECTED, this._selected);\n }\n }\n\n public get vertical(): boolean {\n return this._vertical;\n }\n public set vertical(value: boolean) {\n if (this._vertical !== value) {\n this._vertical = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.VERTICAL, this._vertical);\n }\n }\n\n public get stacked(): boolean {\n return this._stacked;\n }\n public set stacked(value: boolean) {\n if (this._stacked !== value) {\n this._stacked = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.STACKED, this._stacked);\n }\n }\n\n public get secondary(): boolean {\n return this._secondary;\n }\n public set secondary(value: boolean) {\n if (this._secondary !== value) {\n this._secondary = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.SECONDARY, this._secondary);\n }\n }\n\n public get inverted(): boolean {\n return this._inverted;\n }\n public set inverted(value: boolean) {\n if (this._inverted !== value) {\n this._inverted = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.INVERTED, this._inverted);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport { TabAdapter } from './tab-adapter';\nimport { TabFoundation } from './tab-foundation';\nimport { TAB_CONSTANTS } from './tab-constants';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { FocusIndicatorComponent } from '../../focus-indicator/focus-indicator';\nimport { StateLayerComponent } from '../../state-layer/state-layer';\n\nconst template = '<template><div class=\\\"forge-tab\\\" part=\\\"container\\\"><span class=\\\"content\\\" part=\\\"content\\\"><slot name=\\\"leading\\\"></slot><span class=\\\"label\\\" part=\\\"label\\\"><slot></slot></span><slot name=\\\"trailing\\\"></slot><span class=\\\"indicator\\\" part=\\\"indicator\\\"></span></span><forge-state-layer exportparts=\\\"surface:state-layer\\\" target=\\\":host\\\"></forge-state-layer><forge-focus-indicator part=\\\"focus-indicator\\\" target=\\\":host\\\" inward></forge-focus-indicator></div></template>';\nconst styles = ':host{display:-webkit-inline-box;display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.54)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-button-text-decoration,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding:0;margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:-webkit-inline-box;display:inline-flex;position:relative;-webkit-writing-mode:horizontal-tb;-ms-writing-mode:lr-tb;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;white-space:nowrap;-webkit-transition:150ms color linear;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding));min-height:var(--_tab-content-height);padding:var(--_tab-content-padding) calc(2 * var(--_tab-content-padding));gap:var(--_tab-content-padding)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:-1;-webkit-transform-origin:bottom left;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([secondary]) .forge-tab{--_tab-indicator-height:var(--_tab-secondary-indicator-height);--_tab-indicator-shape:var(--_tab-secondary-indicator-shape)}:host([secondary]) .content{width:100%}:host([secondary]) .indicator{min-width:100%}:host([vertical]) .forge-tab{width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical][secondary]) .content{min-height:100%}:host([vertical]:not([secondary])) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;-webkit-transform-origin:top left;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}';\n\nexport interface ITabComponent extends IBaseComponent {\n disabled: boolean;\n selected: boolean;\n vertical: boolean;\n stacked: boolean;\n secondary: boolean;\n inverted: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-tab': ITabComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-tab-select': CustomEvent<void>;\n }\n}\n\n/**\n * @tag forge-tab\n * \n * @property {boolean} disabled - The disabled state of the tab.\n * @property {boolean} selected - The selected state of the tab.\n * @property {boolean} vertical - Controls whether the tab is vertical or horizontal.\n * @property {boolean} stacked - Controls whether the tab is taller to allow for slotted leading/trailing elements.\n * @property {boolean} secondary - Controls whether the tab is styled as secondary tab navigation.\n * @property {boolean} inverted - Controls whether the tab indicator is rendered on the opposite side of the tab.\n * \n * @attribute disabled - The disabled state of the tab.\n * @attribute selected - The selected state of the tab.\n * @attribute vertical - Controls whether the tab is vertical or horizontal.\n * @attribute stacked - Controls whether the tab is taller to allow for slotted leading/trailing elements.\n * @attribute secondary - Controls whether the tab is styled as secondary tab navigation.\n * \n * @event forge-tab-select - Dispatched when the tab is selected.\n * \n * @cssproperty --forge-tab-indicator-color - The color of the tab indicator. Defaults to the primary theme.\n * @cssproperty --forge-tab-indicator-height - The height of the tab indicator.\n * @cssproperty --forge-tab-indicator-shape - The shape of the tab indicator.\n * @cssproperty --forge-tab-container-color - The color of the tab container. Defaults to the surface theme.\n * @cssproperty --forge-tab-height - The height of the tab.\n * @cssproperty --forge-tab-shape - The shape of the tab.\n * @cssproperty --forge-tab-disabled-opacity - The opacity of the tab when disabled.\n * @cssproperty --forge-tab-active-focus-icon-color - The color of the icon when the tab is active and focused. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-hover-icon-color - The color of the icon when the tab is active and hovered. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-icon-color - The color of the icon when the tab is active. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-pressed-icon-color - The color of the icon when the tab is active and pressed. Defaults to the primary theme.\n * @cssproperty --forge-tab-icon-size - The size of the icon.\n * @cssproperty --forge-tab-focus-icon-color - The color of the icon when the tab is focused. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-hover-icon-color - The color of the icon when the tab is hovered. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-icon-color - The color of the icon. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-pressed-icon-color - The color of the icon when the tab is pressed. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-active-focus-label-text-color - The color of the label text when the tab is active and focused. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-hover-label-text-color - The color of the label text when the tab is active and hovered. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-label-text-color - The color of the label text when the tab is active. Defaults to the primary theme.\n * @cssproperty --forge-tab-active-pressed-label-text-color - The color of the label text when the tab is active and pressed. Defaults to the primary theme.\n * @cssproperty --forge-tab-focus-label-text-color - The color of the label text when the tab is focused. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-hover-label-text-color - The color of the label text when the tab is hovered. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-label-text-color - The color of the label text. Defaults to the text-on-background theme.\n * @cssproperty --forge-tab-pressed-label-text-color - The color of the label text when the tab is pressed. Defaults to the text-on-background theme.\n * \n * @csspart container - The tab container.\n * @csspart content - The tab content container.\n * @csspart label - The tab label container.\n * @csspart indicator - The tab active indicator.\n */\n@CustomElement({\n name: TAB_CONSTANTS.elementName,\n dependencies: [\n FocusIndicatorComponent,\n StateLayerComponent\n ]\n})\nexport class TabComponent extends BaseComponent implements ITabComponent {\n public static get observedAttributes(): string[] {\n return [\n TAB_CONSTANTS.attributes.DISABLED,\n TAB_CONSTANTS.attributes.SELECTED,\n TAB_CONSTANTS.attributes.VERTICAL,\n TAB_CONSTANTS.attributes.STACKED,\n TAB_CONSTANTS.attributes.SECONDARY,\n TAB_CONSTANTS.attributes.INVERTED\n ];\n }\n\n private _foundation: TabFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new TabFoundation(new TabAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case TAB_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.VERTICAL:\n this.vertical = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.STACKED:\n this.stacked = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.SECONDARY:\n this.secondary = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.INVERTED:\n this.inverted = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare disabled: boolean;\n \n @FoundationProperty()\n public declare selected: boolean;\n\n @FoundationProperty()\n public declare vertical: boolean;\n\n @FoundationProperty()\n public declare stacked: boolean;\n\n @FoundationProperty()\n public declare secondary: boolean;\n\n @FoundationProperty()\n public declare inverted: boolean;\n}\n"],
|
|
5
|
+
"mappings": "4aAEA,IAAMA,EAA2C,GAAGC,WAE9CC,EAAa,CACjB,SAAU,WACV,WAAY,aACZ,SAAU,WACV,QAAS,UACT,UAAW,YACX,UAAW,YACX,SAAU,WACV,cAAe,gBACf,eAAgB,gBAClB,EAEMC,EAAY,CAChB,UAAW,aACX,iBAAkB,oBAClB,aAAc,kBAChB,EAEMC,EAAU,CACd,cAAe,eACjB,EAEMC,EAAS,CACb,OAAQ,GAAGL,UACb,EAEMM,EAAU,CACd,cAAe,EACjB,EAEaC,EAAoB,CAC/B,WAAAL,EACA,YAAAF,EACA,OAAAK,EACA,UAAAF,EACA,QAAAC,EACA,QAAAE,CACF,EAE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/C,MAAO,CACLC,EAAc,WAAW,SACzBA,EAAc,WAAW,SACzBA,EAAc,WAAW,SACzBA,EAAc,WAAW,QACzBA,EAAc,WAAW,UACzBA,EAAc,WAAW,QAC3B,CACF,CAUO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAAc,WAAW,SAC5B,KAAK,SAAWI,EAAcD,CAAQ,EACtC,MACF,KAAKH,EAAc,WAAW,SAC5B,KAAK,SAAWI,EAAcD,CAAQ,EACtC,MACF,KAAKH,EAAc,WAAW,SAC5B,KAAK,SAAWI,EAAcD,CAAQ,EACtC,MACF,KAAKH,EAAc,WAAW,QAC5B,KAAK,QAAUI,EAAcD,CAAQ,EACrC,MACF,KAAKH,EAAc,WAAW,UAC5B,KAAK,UAAYI,EAAcD,CAAQ,EACvC,MACF,KAAKH,EAAc,WAAW,SAC5B,KAAK,SAAWI,EAAcD,CAAQ,EACtC,KACJ,CACF,CAmBF,EAhBiBE,EAAA,CADdC,EAAmB,GA/CTX,EAgDI,wBAGAU,EAAA,CADdC,EAAmB,GAlDTX,EAmDI,wBAGAU,EAAA,CADdC,EAAmB,GArDTX,EAsDI,wBAGAU,EAAA,CADdC,EAAmB,GAxDTX,EAyDI,uBAGAU,EAAA,CADdC,EAAmB,GA3DTX,EA4DI,yBAGAU,EAAA,CADdC,EAAmB,GA9DTX,EA+DI,wBA/DJA,EAANU,EAAA,CAPNE,EAAc,CACb,KAAMP,EAAc,YACpB,aAAc,CACZQ,EACAC,CACF,CACF,CAAC,GACYd",
|
|
6
6
|
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "classes", "events", "numbers", "TAB_BAR_CONSTANTS", "NAVIGATION_KEYS", "elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "classes", "events", "strings", "numbers", "TAB_CONSTANTS", "TabAdapter", "BaseAdapter", "component", "getShadowElement", "TAB_CONSTANTS", "STATE_LAYER_CONSTANTS", "type", "listener", "value", "toggleAttribute", "a", "frames", "_a", "reduceMotion", "from", "isVertical", "selectedTabIndicator", "fromRect", "fromPos", "fromExtent", "toRect", "toPos", "toExtent", "axis", "scale", "tabsEl", "requireParent", "TAB_BAR_CONSTANTS", "selectedTab", "tab", "TabFoundation", "_adapter", "evt", "TAB_CONSTANTS", "value", "template", "styles", "TabComponent", "BaseComponent", "attachShadowTemplate", "TabFoundation", "TabAdapter", "TAB_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "FocusIndicatorComponent", "StateLayerComponent"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{b as C,j as x}from"./chunk.CZOABXEQ.js";import{a as S}from"./chunk.3TKTJ3BY.js";import{a as u}from"./chunk.NVUMRW44.js";import{a as T}from"./chunk.T4J66YX5.js";import{a as I}from"./chunk.6ZJIHOIG.js";import{e as y,f as b,k as A}from"./chunk.TPXXHX5J.js";import{k as L}from"./chunk.J2M2MXP2.js";import{a as g,d as h}from"./chunk.M3QDAYD2.js";var F=`${I}state-layer`,Y={TARGET:"target",DISABLED:"disabled"},$=g({},Y),V={SURFACE:".forge-state-layer"},W={HOVERED:"forge-state-layer--hovered",PRESSED:"forge-state-layer--pressed"},s={elementName:F,attributes:$,selectors:V,classes:W},d=class n{constructor(e,t){this.x=e;this.y=t}static fromPointerEvent(e){return new n(e.pageX,e.pageY)}},P=150,N=450,f=225,M=.2,D=10,R=75,H=.35,O="::after",w="forwards",k="cubic-bezier(0.2, 0, 0, 1)",B=(r=>(r[r.INACTIVE=0]="INACTIVE",r[r.TOUCH_DELAY=1]="TOUCH_DELAY",r[r.HOLDING=2]="HOLDING",r[r.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK",r))(B||{});function G(n){let{height:e,width:t}=n.getBoundingClientRect(),i=Math.max(e,t),r=Math.max(H*i,R),a=Math.floor(i*M),_=`${(Math.sqrt(t**2+e**2)+D+r)/a}`,c=`${a}px`;return{rippleScale:_,rippleSize:c,initialSize:a}}function U(n,e,t){let{height:i,width:r}=n.getBoundingClientRect(),a={x:(r-e)/2,y:(i-e)/2},o;return X(t)?o=K(n,t):o={x:r/2,y:i/2},o={x:o.x-e/2,y:o.y-e/2},{startPoint:o,endPoint:a}}function K(n,e){let{scrollX:t,scrollY:i}=window,{left:r,top:a}=n.getBoundingClientRect(),o=t+r,p=i+a,{x:_,y:c}=e;return{x:_-o,y:c-p}}function z(n,e,t){let{height:i,width:r}=n.getBoundingClientRect();return e>=0&&e<=r&&t>=0&&t<=i}function X(n){return n&&(n instanceof d||["x","y"].every(e=>e in n))}var m=class extends S{constructor(t){super(t);this._targetElement=null;this._surfaceElement=b(t,s.selectors.SURFACE)}destroy(){typeof this._destroyDeferListener=="function"&&(this._destroyDeferListener(),this._destroyDeferListener=void 0),this._targetElement=null}async deferInitialization(t){if(!this._targetElement)return;let{userInteraction:i,destroy:r}=C(this._targetElement);this._destroyDeferListener=r;let a=await i;t(a.type==="pointerenter"?a:void 0)}addTargetListener(t,i){var r;(r=this._targetElement)==null||r.addEventListener(t,i)}removeTargetListener(t,i){var r;(r=this._targetElement)==null||r.removeEventListener(t,i)}setHovered(t){this._surfaceElement.classList.toggle(s.classes.HOVERED,t)}setPressed(t){this._surfaceElement.classList.toggle(s.classes.PRESSED,t)}getTargetElement(){return this._targetElement}setTargetElement(t){this._targetElement=t}trySetTarget(t){this._targetElement=x(this._component,t)}startAnimation(t){var E;if(!this._surfaceElement)return;this.setPressed(!0),(E=this._rippleAnimation)==null||E.cancel();let{rippleSize:i,rippleScale:r,initialSize:a}=G(this._component),{startPoint:o,endPoint:p}=U(this._component,a,t),_=`${o.x}px, ${o.y}px`,c=`${p.x}px, ${p.y}px`;this._rippleAnimation=this._surfaceElement.animate({top:[0,0],left:[0,0],height:[i,i],width:[i,i],transform:[`translate(${_}) scale(1)`,`translate(${c}) scale(${r})`]},{pseudoElement:O,duration:N,easing:k,fill:w})}async endAnimation(){var r;let t=this._rippleAnimation,i=(r=t==null?void 0:t.currentTime)!=null?r:1/0;if(i>=f){this.setPressed(!1);return}await new Promise(a=>{setTimeout(a,f-i)}),this._rippleAnimation===t&&this.setPressed(!1)}inBounds(t,i){return z(this._component,t,i)}};var v=class{constructor(e){this._adapter=e;this._target=null;this._disabled=!1;this._attached=!1;this._deferred=!0;this._pointerState=0;this._checkBoundsAfterContextMenu=!1;this._pointerEnterListener=t=>this._onPointerEnter(t),this._pointerLeaveListener=t=>this._onPointerLeave(t),this._pointerDownListener=t=>this._onPointerDown(t),this._pointerUpListener=t=>this._onPointerUp(t),this._pointerCancelListener=t=>this._onPointerCancel(t),this._clickListener=()=>this._onClick(),this._contextmenuListener=()=>this._onContextmenu()}initialize(){this._adapter.trySetTarget(this._target),this._deferInitialization()}disconnect(){this._pointerStartEvent=void 0,this._pointerState=0,this._adapter.setHovered(!1),this._adapter.setPressed(!1),this._removeListeners(),this._adapter.destroy()}playAnimation(e){this._adapter.startAnimation(e),this._endAnimation()}_deferInitialization(){this._adapter.deferInitialization(this._onDeferredInitialize.bind(this))}_applyListeners(){this._disabled||(this._adapter.addTargetListener("pointerenter",this._pointerEnterListener),this._adapter.addTargetListener("pointerleave",this._pointerLeaveListener),this._adapter.addTargetListener("pointerdown",this._pointerDownListener),this._adapter.addTargetListener("pointerup",this._pointerUpListener),this._adapter.addTargetListener("pointercancel",this._pointerCancelListener),this._adapter.addTargetListener("click",this._clickListener),this._adapter.addTargetListener("contextmenu",this._contextmenuListener),this._attached=!0)}_removeListeners(){this._adapter.removeTargetListener("pointerenter",this._pointerEnterListener),this._adapter.removeTargetListener("pointerleave",this._pointerLeaveListener),this._adapter.removeTargetListener("pointerdown",this._pointerDownListener),this._adapter.removeTargetListener("pointerup",this._pointerUpListener),this._adapter.removeTargetListener("pointercancel",this._pointerCancelListener),this._adapter.removeTargetListener("click",this._clickListener),this._adapter.removeTargetListener("contextmenu",this._contextmenuListener),this._attached=!1}_onDeferredInitialize(e){this._applyListeners(),(e==null?void 0:e.type)==="pointerenter"&&this._pointerEnterListener(e),this._deferred=!1}_onPointerEnter(e){this._canHandleEvent(e)&&this._adapter.setHovered(!0)}_onPointerLeave(e){this._canHandleEvent(e)&&(this._adapter.setHovered(!1),this._pointerState!==0&&this._adapter.endAnimation())}async _onPointerDown(e){if(this._pointerStartEvent=e,!!this._canHandleEvent(e)){if(!this._isTouch(e.pointerType)){this._pointerState=3,this._startAnimation(e);return}this._checkBoundsAfterContextMenu&&!this._adapter.inBounds(e.x,e.y)||(this._checkBoundsAfterContextMenu=!1,this._pointerState=1,await new Promise(t=>setTimeout(t,P)),this._pointerState===1&&(this._pointerState=2,this._startAnimation(e)))}}_onPointerUp(e){if(this._canHandleEvent(e)){if(this._pointerState===2){this._pointerState=3;return}if(this._pointerState===1){this._pointerState=3,this._startAnimation(this._pointerStartEvent);return}}}_onClick(){if(!this._disabled){if(this._pointerState===3){this._endAnimation();return}this._pointerState===0&&(this._startAnimation(this._pointerStartEvent),this._endAnimation())}}_onPointerCancel(e){this._canHandleEvent(e)&&this._endAnimation()}_onContextmenu(){this._disabled||(this._checkBoundsAfterContextMenu=!0,this._adapter.endAnimation())}_startAnimation(e){let t=e?d.fromPointerEvent(e):void 0;this._adapter.startAnimation(t)}_endAnimation(){this._pointerState=0,this._adapter.endAnimation(),this._pointerStartEvent=void 0}_canHandleEvent({type:e,isPrimary:t,buttons:i,pointerType:r,pointerId:a}){if(this._disabled||!t||this._pointerStartEvent&&this._pointerStartEvent.pointerId!==a)return!1;if(e==="pointerenter"||e==="pointerleave")return!this._isTouch(r);let o=i===1;return this._isTouch(r)||o}_isTouch(e){return e==="touch"}get isAttached(){return this._attached}get targetElement(){return this._adapter.getTargetElement()}set targetElement(e){this._attached?this._removeListeners():(this._adapter.destroy(),this._deferred=!1),this._adapter.setTargetElement(e),this._deferred||this._deferInitialization()}get target(){return this._adapter.getHostAttribute(s.attributes.TARGET)}set target(e){this._target!==e&&(this._target=e,this._adapter.isConnected&&(this._attached?this._removeListeners():(this._adapter.destroy(),this._deferred=!1),this._adapter.trySetTarget(e),this._deferred||this._deferInitialization()),this._adapter.toggleHostAttribute(s.attributes.TARGET,!!this._target,this._target))}get disabled(){return this._disabled}set disabled(e){e=!!e,this._disabled!==e&&(this._disabled=e,this._adapter.isConnected&&(this._disabled?this._removeListeners():this._deferred||this._deferInitialization()),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}};var Z='<template><div class="forge-state-layer" part="surface"></div></template>',q=':host{border-radius:inherit;position:absolute;inset:0;overflow:hidden;display:-webkit-box;display:flex;margin:auto;pointer-events:none;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host([disabled]){display:none}.forge-state-layer{--_state-layer-color:var(--forge-state-layer-color, var(--forge-theme-on-surface, #000000));--_state-layer-hover-color:var(--forge-state-layer-hover-color, var(--_state-layer-color));--_state-layer-hover-opacity:var(--forge-state-layer-hover-opacity, 0.08);--_state-layer-pressed-color:var(--forge-state-layer-pressed-color, var(--_state-layer-color));--_state-layer-pressed-opacity:var(--forge-state-layer-pressed-opacity, 0.12);--_state-layer-hover-duration:var(--forge-state-layer-hover-duration, 15ms);--_state-layer-pressed-duration:var(--forge-state-layer-pressed-duration, 105ms);--_state-layer-animation-duration:var(--forge-state-layer-animation-duration, 375ms)}.forge-state-layer::after,.forge-state-layer::before{content:"";opacity:0;position:absolute}.forge-state-layer::before{background-color:var(--_state-layer-hover-color);inset:0;-webkit-transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear;transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear}.forge-state-layer::after{background:radial-gradient(closest-side,var(--_state-layer-pressed-color) max(100% - 70px,65%),transparent 100%);-webkit-transform-origin:center center;transform-origin:center center;-webkit-transition:opacity var(--_state-layer-animation-duration) linear;transition:opacity var(--_state-layer-animation-duration) linear}.forge-state-layer--hovered::before{background-color:var(--_state-layer-hover-color);opacity:var(--_state-layer-hover-opacity)}.forge-state-layer--pressed::after{opacity:var(--_state-layer-pressed-opacity);-webkit-transition-duration:var(--_state-layer-pressed-duration);transition-duration:var(--_state-layer-pressed-duration)}@media screen and (forced-colors:active){:host{display:none}}',l=class extends A{constructor(){super();y(this,Z,q),this._foundation=new v(new m(this))}static get observedAttributes(){return[s.attributes.TARGET,s.attributes.DISABLED]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,i,r){switch(t){case s.attributes.TARGET:this.target=r;break;case s.attributes.DISABLED:this.disabled=L(r);break}}playAnimation(t){this._foundation.playAnimation(t)}};h([u()],l.prototype,"targetElement",2),h([u()],l.prototype,"target",2),h([u()],l.prototype,"disabled",2),l=h([T({name:s.elementName})],l);export{s as a,d as b,P as c,N as d,f as e,M as f,D as g,R as h,H as i,O as j,w as k,k as l,B as m,m as n,v as o,l as p};
|
|
7
|
+
//# sourceMappingURL=chunk.RCPUTZON.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/state-layer/state-layer-constants.ts", "../../src/state-layer/state-layer-utils.ts", "../../src/state-layer/state-layer-adapter.ts", "../../src/state-layer/state-layer-foundation.ts", "../../src/state-layer/state-layer.ts"],
|
|
4
4
|
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}state-layer`;\n\nconst observedAttributes = {\n TARGET: 'target',\n DISABLED: 'disabled'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst selectors = {\n SURFACE: '.forge-state-layer'\n};\n\nconst classes = {\n HOVERED: 'forge-state-layer--hovered',\n PRESSED: 'forge-state-layer--pressed'\n};\n\nexport const STATE_LAYER_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes\n};\n\nexport class StateLayerCoords {\n constructor(public x: number, public y: number) {}\n\n public static fromPointerEvent(event: PointerEvent): StateLayerCoords {\n return new StateLayerCoords(event.pageX, event.pageY);\n }\n}\n\nexport const TOUCH_DELAY_MS = 150;\nexport const PRESS_GROW_MS = 450;\nexport const MINIMUM_PRESS_MS = 225;\nexport const INITIAL_ORIGIN_SCALE = 0.2;\nexport const PADDING = 10;\nexport const SOFT_EDGE_MINIMUM_SIZE = 75;\nexport const SOFT_EDGE_CONTAINER_RATIO = 0.35;\nexport const PRESS_PSEUDO = '::after';\nexport const ANIMATION_FILL = 'forwards';\nexport const EASING = 'cubic-bezier(0.2, 0, 0, 1)';\n\n/**\n * Interaction states for the state layer.\n *\n * On Touch:\n * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nexport enum PointerState {\n /**\n * Initial state of the control, no touch in progress.\n *\n * Transitions:\n * - on touch down: transition to `TOUCH_DELAY`.\n * - on mouse down: transition to `WAITING_FOR_CLICK`.\n */\n INACTIVE,\n /**\n * Touch down has been received, waiting to determine if it's a swipe or\n * scroll.\n *\n * Transitions:\n * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.\n * - on cancel: transition to `INACTIVE`.\n * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.\n */\n TOUCH_DELAY,\n /**\n * A touch has been deemed to be a press\n *\n * Transitions:\n * - on up: transition to `WAITING_FOR_CLICK`.\n */\n HOLDING,\n /**\n * The user touch has finished, transition into rest state.\n *\n * Transitions:\n * - on click end press; transition to `INACTIVE`.\n */\n WAITING_FOR_CLICK\n}\n", "import { INITIAL_ORIGIN_SCALE, PADDING, SOFT_EDGE_CONTAINER_RATIO, SOFT_EDGE_MINIMUM_SIZE, StateLayerCoords } from './state-layer-constants';\n\nexport function calcRippleSize(hostEl: HTMLElement): { rippleScale: string; rippleSize: string; initialSize: number } {\n const { height, width } = hostEl.getBoundingClientRect();\n const maxDim = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n const maxRadius = hypotenuse + PADDING;\n const rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n const rippleSize = `${initialSize}px`;\n return { rippleScale, rippleSize, initialSize };\n}\n\nexport function getTranslationCoordinates(hostEl: HTMLElement, initialSize: number, coords?: StateLayerCoords): { startPoint: { x: number; y: number }; endPoint: { x: number; y: number } } {\n const { height, width } = hostEl.getBoundingClientRect();\n const endPoint = {\n x: (width - initialSize) / 2,\n y: (height - initialSize) / 2\n };\n\n let startPoint;\n if (isValidCoords(coords)) {\n startPoint = toNormalizedCoords(hostEl, coords);\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2\n };\n }\n\n startPoint = {\n x: startPoint.x - (initialSize / 2),\n y: startPoint.y - (initialSize / 2)\n };\n\n return { startPoint, endPoint };\n}\n\nexport function toNormalizedCoords(hostEl: HTMLElement, coords: StateLayerCoords): { x: number; y: number } {\n const { scrollX, scrollY } = window;\n const { left, top } = hostEl.getBoundingClientRect();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const { x, y } = coords;\n return { x: x - documentX, y: y - documentY };\n}\n\nexport function isInBounds(hostEl: HTMLElement, x: number, y: number): boolean {\n const { height, width } = hostEl.getBoundingClientRect();\n return x >= 0 && x <= width && y >= 0 && y <= height;\n}\n\nfunction isValidCoords(value: any): value is StateLayerCoords {\n return value && (value instanceof StateLayerCoords || ['x', 'y'].every(key => key in value));\n}\n", "import { getShadowElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { locateTargetHeuristic, createUserInteractionListener } from '../core/utils/utils';\nimport { IStateLayerComponent } from './state-layer';\nimport { ANIMATION_FILL, EASING, MINIMUM_PRESS_MS, PRESS_GROW_MS, PRESS_PSEUDO, StateLayerCoords, STATE_LAYER_CONSTANTS } from './state-layer-constants';\nimport { calcRippleSize, getTranslationCoordinates, isInBounds } from './state-layer-utils';\n\nexport interface IStateLayerAdapter extends IBaseAdapter {\n destroy(): void;\n deferInitialization(listener: (evt?: PointerEvent) => void): void;\n getTargetElement(): HTMLElement | null;\n setTargetElement(el: HTMLElement | null): void;\n trySetTarget(value?: string | null): void;\n addTargetListener(type: string, listener: EventListener): void;\n removeTargetListener(type: string, listener: EventListener): void;\n setHovered(hovered: boolean): void;\n setPressed(pressed: boolean): void;\n startAnimation(coords?: StateLayerCoords): void;\n endAnimation(): Promise<void>;\n inBounds(x: number, y: number): boolean;\n}\n\nexport class StateLayerAdapter extends BaseAdapter<IStateLayerComponent> implements IStateLayerAdapter {\n private readonly _surfaceElement: HTMLElement;\n private _targetElement: HTMLElement | null = null;\n private _rippleAnimation: Animation | undefined;\n private _destroyDeferListener: (() => void) | undefined;\n\n constructor(component: IStateLayerComponent) {\n super(component);\n this._surfaceElement = getShadowElement(component, STATE_LAYER_CONSTANTS.selectors.SURFACE);\n }\n\n public destroy(): void {\n if (typeof this._destroyDeferListener === 'function') {\n this._destroyDeferListener();\n this._destroyDeferListener = undefined;\n }\n this._targetElement = null;\n }\n\n public async deferInitialization(listener: (evt?: PointerEvent) => void): Promise<void> {\n if (!this._targetElement) {\n return;\n }\n const { userInteraction, destroy } = createUserInteractionListener(this._targetElement);\n this._destroyDeferListener = destroy;\n const evt = await userInteraction;\n listener(evt.type === 'pointerenter' ? evt as PointerEvent : undefined);\n }\n\n public addTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.removeEventListener(type, listener);\n }\n\n public setHovered(hovered: boolean): void {\n this._surfaceElement.classList.toggle(STATE_LAYER_CONSTANTS.classes.HOVERED, hovered);\n }\n \n public setPressed(pressed: boolean): void {\n this._surfaceElement.classList.toggle(STATE_LAYER_CONSTANTS.classes.PRESSED, pressed);\n }\n\n public getTargetElement(): HTMLElement | null {\n return this._targetElement;\n }\n\n public setTargetElement(el: HTMLElement | null): void {\n this._targetElement = el;\n }\n\n public trySetTarget(value?: string | null): void {\n this._targetElement = locateTargetHeuristic(this._component, value);\n }\n\n public startAnimation(coords?: StateLayerCoords): void {\n if (!this._surfaceElement) {\n return;\n }\n\n this.setPressed(true);\n this._rippleAnimation?.cancel();\n\n const { rippleSize, rippleScale, initialSize } = calcRippleSize(this._component);\n const { startPoint, endPoint } = getTranslationCoordinates(this._component, initialSize, coords);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n this._rippleAnimation = this._surfaceElement.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [rippleSize, rippleSize],\n width: [rippleSize, rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${rippleScale})`\n ]\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: EASING,\n fill: ANIMATION_FILL\n });\n }\n\n public async endAnimation(): Promise<void> {\n const animation = this._rippleAnimation;\n const pressAnimationPlayState = animation?.currentTime ?? Infinity;\n\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.setPressed(false);\n return;\n }\n\n await new Promise(resolve => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);\n });\n\n if (this._rippleAnimation !== animation) {\n return;\n }\n\n this.setPressed(false);\n }\n\n public inBounds(x: number, y: number): boolean {\n return isInBounds(this._component, x, y);\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IStateLayerAdapter } from './state-layer-adapter';\nimport { PointerState, StateLayerCoords, STATE_LAYER_CONSTANTS, TOUCH_DELAY_MS } from './state-layer-constants';\n\nexport interface IStateLayerFoundation extends ICustomElementFoundation {\n targetElement: HTMLElement | null;\n target: string | null;\n disabled: boolean;\n playAnimation(coords?: StateLayerCoords): void;\n}\n\nexport class StateLayerFoundation implements IStateLayerFoundation {\n // State\n private _target: string | null = null;\n private _disabled = false;\n private _attached = false;\n private _deferred = true;\n private _pointerStartEvent: PointerEvent | undefined;\n private _pointerState: PointerState = PointerState.INACTIVE;\n private _checkBoundsAfterContextMenu = false;\n\n // Listeners\n private _pointerEnterListener: EventListener;\n private _pointerLeaveListener: EventListener;\n private _pointerDownListener: EventListener;\n private _pointerUpListener: EventListener;\n private _pointerCancelListener: EventListener;\n private _clickListener: EventListener;\n private _contextmenuListener: EventListener;\n\n constructor(private _adapter: IStateLayerAdapter) {\n this._pointerEnterListener = (evt: PointerEvent) => this._onPointerEnter(evt);\n this._pointerLeaveListener = (evt: PointerEvent) => this._onPointerLeave(evt);\n this._pointerDownListener = (evt: PointerEvent) => this._onPointerDown(evt);\n this._pointerUpListener = (evt: PointerEvent) => this._onPointerUp(evt);\n this._pointerCancelListener = (evt: PointerEvent) => this._onPointerCancel(evt);\n this._clickListener = () => this._onClick();\n this._contextmenuListener = () => this._onContextmenu();\n }\n\n public initialize(): void {\n this._adapter.trySetTarget(this._target);\n\n // We defer initialization until the first pointerenter event is received.\n //\n // This is a performance optimization to avoid attaching many listeners to the target element\n // until the user is first interacting with it.\n this._deferInitialization();\n }\n\n public disconnect(): void {\n this._pointerStartEvent = undefined;\n this._pointerState = PointerState.INACTIVE;\n this._adapter.setHovered(false);\n this._adapter.setPressed(false);\n this._removeListeners(); // Must be called before destroying adapter\n this._adapter.destroy();\n }\n\n public playAnimation(coords?: StateLayerCoords): void {\n this._adapter.startAnimation(coords);\n this._endAnimation();\n }\n\n private _deferInitialization(): void {\n this._adapter.deferInitialization(this._onDeferredInitialize.bind(this));\n }\n\n private _applyListeners(): void {\n if (this._disabled) {\n return;\n }\n\n this._adapter.addTargetListener('pointerenter', this._pointerEnterListener);\n this._adapter.addTargetListener('pointerleave', this._pointerLeaveListener);\n this._adapter.addTargetListener('pointerdown', this._pointerDownListener);\n this._adapter.addTargetListener('pointerup', this._pointerUpListener);\n this._adapter.addTargetListener('pointercancel', this._pointerCancelListener);\n this._adapter.addTargetListener('click', this._clickListener);\n this._adapter.addTargetListener('contextmenu', this._contextmenuListener);\n this._attached = true;\n }\n\n private _removeListeners(): void {\n this._adapter.removeTargetListener('pointerenter', this._pointerEnterListener);\n this._adapter.removeTargetListener('pointerleave', this._pointerLeaveListener);\n this._adapter.removeTargetListener('pointerdown', this._pointerDownListener);\n this._adapter.removeTargetListener('pointerup', this._pointerUpListener);\n this._adapter.removeTargetListener('pointercancel', this._pointerCancelListener);\n this._adapter.removeTargetListener('click', this._clickListener);\n this._adapter.removeTargetListener('contextmenu', this._contextmenuListener);\n this._attached = false;\n }\n\n private _onDeferredInitialize(evt?: PointerEvent): void {\n this._applyListeners();\n\n if (evt?.type === 'pointerenter') {\n // Manually trigger the pointerenter listener since this is in response to a pointerenter event already\n this._pointerEnterListener(evt);\n }\n \n this._deferred = false;\n }\n\n private _onPointerEnter(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n this._adapter.setHovered(true);\n }\n\n private _onPointerLeave(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n\n this._adapter.setHovered(false);\n\n if (this._pointerState !== PointerState.INACTIVE) {\n this._adapter.endAnimation();\n }\n }\n\n private async _onPointerDown(evt: PointerEvent): Promise<void> {\n this._pointerStartEvent = evt;\n\n if (!this._canHandleEvent(evt)) {\n return;\n }\n \n if (!this._isTouch(evt.pointerType)) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n this._startAnimation(evt);\n return;\n }\n\n // after a longpress contextmenu event, an extra `pointerdown` can be\n // dispatched to the pressed element. Check that the down is within\n // bounds of the element in this case.\n if (this._checkBoundsAfterContextMenu && !this._adapter.inBounds(evt.x, evt.y)) {\n return;\n }\n\n this._checkBoundsAfterContextMenu = false;\n\n this._pointerState = PointerState.TOUCH_DELAY;\n await new Promise(resolve => setTimeout(resolve, TOUCH_DELAY_MS));\n\n if (this._pointerState !== PointerState.TOUCH_DELAY) {\n return;\n }\n\n this._pointerState = PointerState.HOLDING;\n this._startAnimation(evt);\n }\n\n private _onPointerUp(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n\n if (this._pointerState === PointerState.HOLDING) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n return;\n }\n\n if (this._pointerState === PointerState.TOUCH_DELAY) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n this._startAnimation(this._pointerStartEvent);\n return;\n }\n }\n\n private _onClick(): void {\n if (this._disabled) {\n return;\n }\n\n if (this._pointerState === PointerState.WAITING_FOR_CLICK) {\n this._endAnimation();\n return;\n }\n\n if (this._pointerState === PointerState.INACTIVE) {\n this._startAnimation(this._pointerStartEvent);\n this._endAnimation();\n }\n }\n\n private _onPointerCancel(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n this._endAnimation();\n }\n\n private _onContextmenu(): void {\n if (this._disabled) {\n return;\n }\n\n this._checkBoundsAfterContextMenu = true;\n this._adapter.endAnimation();\n }\n\n private _startAnimation(evt?: PointerEvent): void {\n const coords = evt ? StateLayerCoords.fromPointerEvent(evt) : undefined;\n this._adapter.startAnimation(coords);\n }\n\n private _endAnimation(): void {\n this._pointerState = PointerState.INACTIVE;\n this._adapter.endAnimation();\n this._pointerStartEvent = undefined;\n }\n\n private _canHandleEvent({ type, isPrimary, buttons, pointerType, pointerId }: PointerEvent): boolean {\n if (this._disabled || !isPrimary) {\n return false;\n }\n\n if (this._pointerStartEvent && this._pointerStartEvent.pointerId !== pointerId) {\n return false;\n }\n\n if (type === 'pointerenter' || type === 'pointerleave') {\n return !this._isTouch(pointerType);\n }\n\n const isPrimaryButton = buttons === 1;\n return this._isTouch(pointerType) || isPrimaryButton;\n }\n\n private _isTouch(pointerType: string): boolean {\n return pointerType === 'touch';\n }\n\n public get isAttached(): boolean {\n return this._attached;\n }\n\n public get targetElement(): HTMLElement | null {\n return this._adapter.getTargetElement();\n }\n public set targetElement(el: HTMLElement | null) {\n // Always remove the listeners from the previous target element\n if (this._attached) {\n this._removeListeners();\n } else {\n // If unattached destroy the defer listener to recreate on the new target element\n this._adapter.destroy();\n this._deferred = false;\n }\n\n this._adapter.setTargetElement(el);\n\n // If we are not already deferring attaching the listeners, then do that now\n if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n public get target(): string | null {\n return this._adapter.getHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET);\n }\n public set target(value: string | null) {\n if (this._target !== value) {\n this._target = value;\n\n if (this._adapter.isConnected) {\n if (this._attached) {\n this._removeListeners();\n } else {\n this._adapter.destroy();\n this._deferred = false;\n }\n\n this._adapter.trySetTarget(value);\n\n if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET, Boolean(this._target), this._target as string);\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n value = Boolean(value);\n if (this._disabled !== value) {\n this._disabled = value;\n\n if (this._adapter.isConnected) {\n if (this._disabled) {\n this._removeListeners();\n } else if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { StateLayerAdapter } from './state-layer-adapter';\nimport { StateLayerFoundation } from './state-layer-foundation';\nimport { StateLayerCoords, STATE_LAYER_CONSTANTS } from './state-layer-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-state-layer\\\" part=\\\"surface\\\"></div></template>';\nconst styles = ':host{border-radius:inherit;position:absolute;inset:0;overflow:hidden;display:-webkit-box;display:flex;margin:auto;pointer-events:none;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host([disabled]){display:none}.forge-state-layer{--_state-layer-color:var(--forge-state-layer-color, var(--forge-theme-on-surface, #000000));--_state-layer-hover-color:var(--forge-state-layer-hover-color, var(--_state-layer-color));--_state-layer-hover-opacity:var(--forge-state-layer-hover-opacity, 0.08);--_state-layer-pressed-color:var(--forge-state-layer-pressed-color, var(--_state-layer-color));--_state-layer-pressed-opacity:var(--forge-state-layer-pressed-opacity, 0.12);--_state-layer-hover-duration:var(--forge-state-layer-hover-duration, 15ms);--_state-layer-pressed-duration:var(--forge-state-layer-pressed-duration, 105ms);--_state-layer-animation-duration:var(--forge-state-layer-animation-duration, 375ms)}.forge-state-layer::after,.forge-state-layer::before{content:\\\"\\\";opacity:0;position:absolute}.forge-state-layer::before{background-color:var(--_state-layer-hover-color);inset:0;-webkit-transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear;transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear}.forge-state-layer::after{background:radial-gradient(closest-side,var(--_state-layer-pressed-color) max(100% - 70px,65%),transparent 100%);-webkit-transform-origin:center center;transform-origin:center center;-webkit-transition:opacity var(--_state-layer-animation-duration) linear;transition:opacity var(--_state-layer-animation-duration) linear}.forge-state-layer--hovered::before{background-color:var(--_state-layer-hover-color);opacity:var(--_state-layer-hover-opacity)}.forge-state-layer--pressed::after{opacity:var(--_state-layer-pressed-opacity);-webkit-transition-duration:var(--_state-layer-pressed-duration);transition-duration:var(--_state-layer-pressed-duration)}@media screen and (forced-colors:active){:host{display:none}}';\n\nexport interface IStateLayerComponent extends IBaseComponent {\n targetElement: HTMLElement | null;\n target: string | null;\n disabled: boolean;\n playAnimation(coords?: StateLayerCoords): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-state-layer': IStateLayerComponent;\n }\n}\n\n/**\n * @tag forge-state-layer\n * \n * @summary State layers show the interaction status of an element.\n * \n * @description \n * A state layer is a semi-transparent overlay on an element that indicates its interaction\n * state. State layers provide a systematic approach to visualizing states by using opacity.\n * A layer can be applied to an entire element or in a circular shape. Only one state layer\n * can be applied at a given time.\n * \n * @property {HTMLElement} targetElement - The element to attach the state layer to.\n * @property {string} target - The id of the element to attach the state layer to.\n * @property {boolean} disabled - Controls whether the state layer is disabled.\n * \n * @attribute {string} target - The id of the element to attach the state layer to.\n * @attribute {boolean} disabled - Controls whether the state layer is disabled.\n * \n * @cssproperty --forge-state-layer-color - The color of the state layer. Defaults to the on-surface theme.\n * @cssproperty --forge-state-layer-hover-color - The color of the state layer when hovered.\n * @cssproperty --forge-state-layer-hover-opacity - The opacity of the state layer when hovered.\n * @cssproperty --forge-state-layer-pressed-color - The color of the state layer when pressed.\n * @cssproperty --forge-state-layer-pressed-opacity - The opacity of the state layer when pressed.\n * @cssproperty --forge-state-layer-hover-duration - The duration of the hover animation.\n * @cssproperty --forge-state-layer-animation-duration - The duration of the animation.\n * @cssproperty --forge-state-layer-pressed-duration - The duration of the pressed animation.\n * \n * @csspart surface - The surface element.\n */\n@CustomElement({\n name: STATE_LAYER_CONSTANTS.elementName\n})\nexport class StateLayerComponent extends BaseComponent implements IStateLayerComponent {\n public static get observedAttributes(): string[] {\n return [\n STATE_LAYER_CONSTANTS.attributes.TARGET,\n STATE_LAYER_CONSTANTS.attributes.DISABLED\n ];\n }\n\n private _foundation: StateLayerFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new StateLayerFoundation(new StateLayerAdapter(this));\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 STATE_LAYER_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case STATE_LAYER_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare targetElement: HTMLElement | null;\n\n @FoundationProperty()\n public declare target: string | null;\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n /**\n * Triggers the animation to run.\n * \n * Note: If coordinates are not provided, the transition will originate from the center of the target element.\n * \n * @param {StateLayerCoords} [coords] - The coordinates to play the animation from.\n */\n public playAnimation(coords?: StateLayerCoords): void {\n this._foundation.playAnimation(coords);\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "4VAEA,IAAMA,EAAc,GAAGC,eAEjBC,EAAqB,CACzB,OAAQ,SACR,SAAU,UACZ,EAEMC,EAAaC,EAAA,GACdF,GAGCG,EAAY,CAChB,QAAS,oBACX,EAEMC,EAAU,CACd,QAAS,6BACT,QAAS,4BACX,EAEaC,EAAwB,CACnC,YAAAP,EACA,WAAAG,EACA,UAAAE,EACA,QAAAC,CACF,EAEaE,EAAN,MAAMC,CAAiB,CAC5B,YAAmBC,EAAkBC,EAAW,CAA7B,OAAAD,EAAkB,OAAAC,CAAY,CAEjD,OAAc,iBAAiBC,EAAuC,CACpE,OAAO,IAAIH,EAAiBG,EAAM,MAAOA,EAAM,KAAK,CACtD,CACF,EAEaC,EAAiB,IACjBC,EAAgB,IAChBC,EAAmB,IACnBC,EAAuB,GACvBC,EAAU,GACVC,EAAyB,GACzBC,EAA4B,IAC5BC,EAAe,UACfC,EAAiB,WACjBC,EAAS,6BAYVC,OAQVA,IAAA,uBAUAA,IAAA,6BAOAA,IAAA,qBAOAA,IAAA,yCAhCUA,OAAA,ICxDL,SAASC,EAAeC,EAAuF,CACpH,GAAM,CAAE,OAAAC,EAAQ,MAAAC,CAAM,EAAIF,EAAO,sBAAsB,EACjDG,EAAS,KAAK,IAAIF,EAAQC,CAAK,EAC/BE,EAAe,KAAK,IAAIC,EAA4BF,EAAQG,CAAsB,EAClFC,EA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B,GAnCTZ,EAoCI,6BAGAW,EAAA,CADdC,EAAmB,GAtCTZ,EAuCI,sBAGAW,EAAA,CADdC,EAAmB,GAzCTZ,EA0CI,wBA1CJA,EAANW,EAAA,CAHNE,EAAc,CACb,KAAMR,EAAsB,WAC9B,CAAC,GACYL",
|
|
6
6
|
"names": ["elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "attributes", "__spreadValues", "selectors", "classes", "STATE_LAYER_CONSTANTS", "StateLayerCoords", "_StateLayerCoords", "x", "y", "event", "TOUCH_DELAY_MS", "PRESS_GROW_MS", "MINIMUM_PRESS_MS", "INITIAL_ORIGIN_SCALE", "PADDING", "SOFT_EDGE_MINIMUM_SIZE", "SOFT_EDGE_CONTAINER_RATIO", "PRESS_PSEUDO", "ANIMATION_FILL", "EASING", "PointerState", "calcRippleSize", "hostEl", "height", "width", "maxDim", "softEdgeSize", "SOFT_EDGE_CONTAINER_RATIO", "SOFT_EDGE_MINIMUM_SIZE", "initialSize", "INITIAL_ORIGIN_SCALE", "rippleScale", "PADDING", "rippleSize", "getTranslationCoordinates", "coords", "endPoint", "startPoint", "isValidCoords", "toNormalizedCoords", "scrollX", "scrollY", "left", "top", "documentX", "documentY", "x", "y", "isInBounds", "value", "StateLayerCoords", "key", "StateLayerAdapter", "BaseAdapter", "component", "getShadowElement", "STATE_LAYER_CONSTANTS", "listener", "userInteraction", "destroy", "createUserInteractionListener", "evt", "type", "_a", "hovered", "pressed", "el", "value", "locateTargetHeuristic", "coords", "rippleSize", "rippleScale", "initialSize", "calcRippleSize", "startPoint", "endPoint", "getTranslationCoordinates", "translateStart", "translateEnd", "PRESS_PSEUDO", "PRESS_GROW_MS", "EASING", "ANIMATION_FILL", "animation", "pressAnimationPlayState", "MINIMUM_PRESS_MS", "resolve", "x", "y", "isInBounds", "StateLayerFoundation", "_adapter", "evt", "coords", "resolve", "TOUCH_DELAY_MS", "StateLayerCoords", "type", "isPrimary", "buttons", "pointerType", "pointerId", "isPrimaryButton", "el", "STATE_LAYER_CONSTANTS", "value", "template", "styles", "StateLayerComponent", "BaseComponent", "attachShadowTemplate", "StateLayerFoundation", "StateLayerAdapter", "STATE_LAYER_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "coords", "__decorateClass", "FoundationProperty", "CustomElement"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{d as h}from"./chunk.I7X25KEB.js";import{a as g,d as C}from"./chunk.I7OY43HW.js";import{w as i}from"./chunk.EWT2PBEP.js";import{a as _,d as N}from"./chunk.AIPDMLJD.js";import{m as d}from"./chunk.QG5EYBS3.js";import{a as b}from"./chunk.T4J66YX5.js";import{a as f}from"./chunk.6ZJIHOIG.js";import{a as c,d as p,g as l,k as u}from"./chunk.TPXXHX5J.js";import{v as s}from"./chunk.HZUQXCOQ.js";import{a as m,d as a}from"./chunk.M3QDAYD2.js";var T=`${f}app-bar-menu-button`,I={ICON:"icon"},A=m({},I),B=["aria-label","aria-labelledby"],o={elementName:T,observedAttributes:I,attributes:A,forwardedAttributes:B};var E='<template><forge-icon-button aria-label="Toggle menu"><forge-icon name="menu"></forge-icon></forge-icon-button><forge-tooltip delay="500" position="bottom">Menu</forge-tooltip></template>',n=class extends u{constructor(){super();this._iconName=i.name;N.define(i)}static get observedAttributes(){return Object.values(o.observedAttributes)}initializedCallback(){p(this,E)}connectedCallback(){this._iconButtonElement=l(this,g.elementName),this._iconElement=this._iconButtonElement.querySelector(_.elementName),this._iconElement.name!==this._iconName&&(this._iconElement.name=this._iconName);let t=this._iconButtonElement.getAttribute("aria-label");this._forwardObserver=d(this,o.forwardedAttributes,(r,e)=>{r==="aria-label"&&!e&&(e=t),s(this._iconButtonElement,!!e,r,e!=null?e:void 0)})}disconnectedCallback(){var t;(t=this._forwardObserver)==null||t.disconnect(),this._forwardObserver=void 0}attributeChangedCallback(t,r,e){switch(t){case o.attributes.ICON:this.icon=e;break}}get icon(){return this._iconName}set icon(t){this._iconName!==t&&(this._iconName=t!=null?t:i.name,this._iconElement&&(this._iconElement.name=this._iconName),this.setAttribute(o.attributes.ICON,this._iconName))}};n=a([b({name:o.elementName,dependencies:[C,h]})],n);function D(){c(n)}export{o as a,n as b,D as c};
|
|
7
|
+
//# sourceMappingURL=chunk.SBKKBQDX.js.map
|