@tylertech/forge 3.0.0-next.11 → 3.0.0-next.13
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/README.md +1 -6
- package/custom-elements.json +63803 -41782
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/avatar/index.js +1 -1
- package/dist/esm/backdrop/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/index.js +7 -0
- package/dist/esm/button-area/index.js.map +7 -0
- 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.SMGXXR6K.js → chunk.2MSL7CYM.js} +2 -2
- package/dist/esm/chunks/chunk.2ZU6LWHE.js +7 -0
- package/dist/esm/chunks/chunk.2ZU6LWHE.js.map +7 -0
- package/dist/esm/chunks/{chunk.COVTBIQQ.js → chunk.36C6SIPW.js} +2 -2
- package/dist/esm/chunks/{chunk.COVTBIQQ.js.map → chunk.36C6SIPW.js.map} +2 -2
- package/dist/esm/chunks/chunk.36F2GVWS.js +7 -0
- package/dist/esm/chunks/chunk.36F2GVWS.js.map +7 -0
- package/dist/esm/chunks/{chunk.M56LSSPW.js → chunk.3HCYRDRI.js} +2 -2
- package/dist/esm/chunks/{chunk.4ZKX3SO5.js → chunk.3R4BUIQP.js} +2 -2
- package/dist/esm/chunks/{chunk.YWNCJ7XP.js → chunk.3ZPSN2QG.js} +2 -2
- package/dist/esm/chunks/chunk.4SPEX2GJ.js +7 -0
- package/dist/esm/chunks/chunk.4SPEX2GJ.js.map +7 -0
- package/dist/esm/chunks/chunk.4YFJVHXN.js +7 -0
- package/dist/esm/chunks/chunk.4YFJVHXN.js.map +7 -0
- package/dist/esm/chunks/chunk.5A2PA7TL.js +7 -0
- package/dist/esm/chunks/chunk.5A2PA7TL.js.map +7 -0
- package/dist/esm/chunks/chunk.5CSXPRL3.js +7 -0
- package/dist/esm/chunks/chunk.5CSXPRL3.js.map +7 -0
- package/dist/esm/chunks/chunk.5LVZVQXB.js +7 -0
- package/dist/esm/chunks/{chunk.MGLL67VO.js.map → chunk.5LVZVQXB.js.map} +2 -2
- package/dist/esm/chunks/{chunk.LFODKHUO.js → chunk.5N4N6DL6.js} +2 -2
- package/dist/esm/chunks/chunk.5PG6WIIX.js +7 -0
- package/dist/esm/chunks/chunk.5PG6WIIX.js.map +7 -0
- package/dist/esm/chunks/{chunk.JIKSKUDW.js → chunk.5RM65QPN.js} +2 -2
- package/dist/esm/chunks/{chunk.JIKSKUDW.js.map → chunk.5RM65QPN.js.map} +3 -3
- package/dist/esm/chunks/chunk.5WMYF27O.js +7 -0
- package/dist/esm/chunks/chunk.5WMYF27O.js.map +7 -0
- package/dist/esm/chunks/{chunk.QOJESHEV.js → chunk.675V42JS.js} +2 -2
- package/dist/esm/chunks/chunk.6M27ERWW.js +12 -0
- package/dist/esm/chunks/chunk.6M27ERWW.js.map +7 -0
- package/dist/esm/chunks/chunk.6NTYTHAL.js +7 -0
- package/dist/esm/chunks/chunk.6NTYTHAL.js.map +7 -0
- package/dist/esm/chunks/chunk.6ZNBFKNP.js +7 -0
- package/dist/esm/chunks/chunk.6ZNBFKNP.js.map +7 -0
- package/dist/esm/chunks/{chunk.7TMLILLW.js → chunk.72JVXGHF.js} +2 -2
- package/dist/esm/chunks/{chunk.7TMLILLW.js.map → chunk.72JVXGHF.js.map} +1 -1
- package/dist/esm/chunks/chunk.7V4BDSA5.js +7 -0
- package/dist/esm/chunks/chunk.7V4BDSA5.js.map +7 -0
- package/dist/esm/chunks/chunk.7VMJLHQY.js +7 -0
- package/dist/esm/chunks/chunk.7VMJLHQY.js.map +7 -0
- package/dist/esm/chunks/chunk.7ZROQ6D3.js +7 -0
- package/dist/esm/chunks/chunk.7ZROQ6D3.js.map +7 -0
- package/dist/esm/chunks/{chunk.DG4ZM3AW.js → chunk.AMLT6XJP.js} +2 -2
- package/dist/esm/chunks/chunk.AMZZKEAE.js +7 -0
- package/dist/esm/chunks/chunk.AMZZKEAE.js.map +7 -0
- package/dist/esm/chunks/{chunk.MTKSU2BV.js → chunk.APPY5AYL.js} +2 -2
- package/dist/esm/chunks/{chunk.4YFVG4KP.js → chunk.ARQMMZJL.js} +2 -2
- package/dist/esm/chunks/chunk.AUBOJZQ7.js +7 -0
- package/dist/esm/chunks/chunk.AUBOJZQ7.js.map +7 -0
- package/dist/esm/chunks/chunk.AUCBR6CC.js +7 -0
- package/dist/esm/chunks/{chunk.SFCGOCQK.js.map → chunk.AUCBR6CC.js.map} +2 -2
- package/dist/esm/chunks/{chunk.5MZ5SGMO.js → chunk.BB4UF5RX.js} +2 -2
- package/dist/esm/chunks/chunk.BBCZNGT3.js +7 -0
- package/dist/esm/chunks/chunk.BBCZNGT3.js.map +7 -0
- package/dist/esm/chunks/chunk.BQ2X5SBP.js +7 -0
- package/dist/esm/chunks/{chunk.TYLOAD7R.js.map → chunk.BQ2X5SBP.js.map} +2 -2
- package/dist/esm/chunks/chunk.BTXY3XMJ.js +7 -0
- package/dist/esm/chunks/chunk.BTXY3XMJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.Q7Z3SJ5F.js → chunk.DTLZOIUQ.js} +2 -2
- package/dist/esm/chunks/chunk.EJX6RI4I.js +7 -0
- package/dist/esm/chunks/chunk.EJX6RI4I.js.map +7 -0
- package/dist/esm/chunks/chunk.EWK76SPH.js +7 -0
- package/dist/esm/chunks/chunk.EWK76SPH.js.map +7 -0
- package/dist/esm/chunks/chunk.FAXYCG55.js +7 -0
- package/dist/esm/chunks/chunk.FAXYCG55.js.map +7 -0
- package/dist/esm/chunks/chunk.FFHSUJFM.js +7 -0
- package/dist/esm/chunks/chunk.FFHSUJFM.js.map +7 -0
- package/dist/esm/chunks/{chunk.OWCYRSI3.js → chunk.FLWNOP42.js} +2 -2
- package/dist/esm/chunks/{chunk.S3JMOOWC.js → chunk.FXIWCHLW.js} +2 -2
- package/dist/esm/chunks/chunk.FYVDTZLF.js +7 -0
- package/dist/esm/chunks/{chunk.CDGZYUQS.js.map → chunk.FYVDTZLF.js.map} +2 -2
- package/dist/esm/chunks/chunk.G73KL7P2.js +7 -0
- package/dist/esm/chunks/{chunk.7DB3XVPI.js.map → chunk.G73KL7P2.js.map} +3 -3
- package/dist/esm/chunks/chunk.G7SMCLHQ.js +7 -0
- package/dist/esm/chunks/chunk.G7SMCLHQ.js.map +7 -0
- package/dist/esm/chunks/chunk.GHR7T6U2.js +7 -0
- package/dist/esm/chunks/chunk.GHR7T6U2.js.map +7 -0
- package/dist/esm/chunks/{chunk.CWTV3TB3.js → chunk.GNDKQPDV.js} +2 -2
- package/dist/esm/chunks/{chunk.ULY4H76N.js → chunk.HAKF2T2D.js} +2 -2
- package/dist/esm/chunks/chunk.HDG2GHKC.js +7 -0
- package/dist/esm/chunks/{chunk.SBYX7VZ4.js.map → chunk.HDG2GHKC.js.map} +2 -2
- package/dist/esm/chunks/{chunk.WPG7NNQX.js → chunk.HOLCNJXC.js} +2 -2
- package/dist/esm/chunks/{chunk.W4247Q2P.js → chunk.HRRJIFC5.js} +2 -2
- package/dist/esm/chunks/chunk.HSI7B43D.js +7 -0
- package/dist/esm/chunks/chunk.HSI7B43D.js.map +7 -0
- package/dist/esm/chunks/chunk.IAWYYNUU.js +7 -0
- package/dist/esm/chunks/chunk.IAWYYNUU.js.map +7 -0
- package/dist/esm/chunks/{chunk.SU4FU7GK.js → chunk.IDMDBMBR.js} +2 -2
- package/dist/esm/chunks/{chunk.FCATJM34.js → chunk.IHAHJPMB.js} +2 -2
- package/dist/esm/chunks/chunk.IISWKFCX.js +7 -0
- package/dist/esm/chunks/chunk.IISWKFCX.js.map +7 -0
- package/dist/esm/chunks/{chunk.XKI46BH2.js → chunk.IMLJD35R.js} +2 -2
- package/dist/esm/chunks/{chunk.624UKZFU.js → chunk.IT7XPDAV.js} +2 -2
- package/dist/esm/chunks/{chunk.MVTBJPO2.js → chunk.JAWV5Y5T.js} +1 -1
- package/dist/esm/chunks/{chunk.MVTBJPO2.js.map → chunk.JAWV5Y5T.js.map} +2 -2
- package/dist/esm/chunks/{chunk.JLLHDJSO.js → chunk.JVLJH6PR.js} +2 -2
- package/dist/esm/chunks/chunk.KPJWP77R.js +7 -0
- package/dist/esm/chunks/{chunk.2EWV2XBP.js → chunk.KV5IKYG2.js} +2 -2
- package/dist/esm/chunks/chunk.KV67JXOC.js +7 -0
- package/dist/esm/chunks/{chunk.B4T3R53C.js.map → chunk.KV67JXOC.js.map} +2 -2
- package/dist/esm/chunks/{chunk.A62DE5PD.js → chunk.LCR4YH3O.js} +2 -2
- package/dist/esm/chunks/{chunk.FWFOOQMA.js → chunk.LOG6GQOK.js} +2 -2
- package/dist/esm/chunks/chunk.LUIKMPQR.js +7 -0
- package/dist/esm/chunks/chunk.LUIKMPQR.js.map +7 -0
- package/dist/esm/chunks/chunk.LUNKNRRH.js +7 -0
- package/dist/esm/chunks/chunk.LUNKNRRH.js.map +7 -0
- package/dist/esm/chunks/chunk.MKJCHUJH.js +7 -0
- package/dist/esm/chunks/chunk.MKJCHUJH.js.map +7 -0
- package/dist/esm/chunks/chunk.MWYQRG5W.js +7 -0
- package/dist/esm/chunks/{chunk.YX7WLO5Y.js.map → chunk.MWYQRG5W.js.map} +2 -2
- package/dist/esm/chunks/{chunk.YLG6ZC5K.js → chunk.NUMKGUCK.js} +2 -2
- package/dist/esm/chunks/{chunk.XI3MJSIS.js → chunk.O6V3YNMO.js} +2 -2
- package/dist/esm/chunks/chunk.OWZREAT6.js +15 -0
- package/dist/esm/chunks/chunk.OWZREAT6.js.map +7 -0
- package/dist/esm/chunks/chunk.PMYQY3D3.js +7 -0
- package/dist/esm/chunks/chunk.PMYQY3D3.js.map +7 -0
- package/dist/esm/chunks/chunk.PYR2OCCH.js +7 -0
- package/dist/esm/chunks/{chunk.5565ZSTH.js.map → chunk.PYR2OCCH.js.map} +2 -2
- package/dist/esm/chunks/chunk.QJCNMYD3.js +7 -0
- package/dist/esm/chunks/{chunk.SJJS4LYN.js.map → chunk.QJCNMYD3.js.map} +2 -2
- package/dist/esm/chunks/{chunk.TK5I4RHF.js → chunk.QLCVRJ3Q.js} +2 -2
- package/dist/esm/chunks/chunk.QLOYOZN3.js +7 -0
- package/dist/esm/chunks/{chunk.F5SY2D4B.js.map → chunk.QLOYOZN3.js.map} +3 -3
- package/dist/esm/chunks/chunk.QN5T26HH.js +7 -0
- package/dist/esm/chunks/chunk.QN5T26HH.js.map +7 -0
- package/dist/esm/chunks/chunk.QQRPV4RN.js +7 -0
- package/dist/esm/chunks/{chunk.PEBT47AU.js.map → chunk.QQRPV4RN.js.map} +2 -2
- package/dist/esm/chunks/chunk.R6LQBI42.js +177 -0
- package/dist/esm/chunks/chunk.R6LQBI42.js.map +7 -0
- package/dist/esm/chunks/chunk.RES7WDKH.js +7 -0
- package/dist/esm/chunks/chunk.RES7WDKH.js.map +7 -0
- package/dist/esm/chunks/chunk.RP674CRC.js +7 -0
- package/dist/esm/chunks/chunk.S5QL4SPT.js +7 -0
- package/dist/esm/chunks/chunk.S5QL4SPT.js.map +7 -0
- package/dist/esm/chunks/chunk.SIRXAA3O.js +7 -0
- package/dist/esm/chunks/chunk.SIRXAA3O.js.map +7 -0
- package/dist/esm/chunks/{chunk.LTT67HTW.js → chunk.SLJ6HDK7.js} +2 -2
- package/dist/esm/chunks/chunk.STB2FEUA.js +7 -0
- package/dist/esm/chunks/chunk.STB2FEUA.js.map +7 -0
- package/dist/esm/chunks/chunk.TBGMJQYJ.js +7 -0
- package/dist/esm/chunks/chunk.TBGMJQYJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.6OW6Q3EW.js → chunk.TU74SREL.js} +2 -2
- package/dist/esm/chunks/{chunk.EK24Y56W.js → chunk.URJQNB3S.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKOP3XT.js → chunk.V24M62MC.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKOP3XT.js.map → chunk.V24M62MC.js.map} +2 -2
- package/dist/esm/chunks/chunk.VFKHRAWD.js +7 -0
- package/dist/esm/chunks/chunk.VFKHRAWD.js.map +7 -0
- package/dist/esm/chunks/chunk.VO6YJCEU.js +7 -0
- package/dist/esm/chunks/chunk.VO6YJCEU.js.map +7 -0
- package/dist/esm/chunks/{chunk.K3KAM2PL.js → chunk.W2LN45WY.js} +2 -2
- package/dist/esm/chunks/{chunk.MHBBMC6O.js → chunk.WMVYRDUJ.js} +2 -2
- package/dist/esm/chunks/{chunk.MHBBMC6O.js.map → chunk.WMVYRDUJ.js.map} +2 -2
- package/dist/esm/chunks/chunk.WY3E33CW.js +7 -0
- package/dist/esm/chunks/chunk.WY3E33CW.js.map +7 -0
- package/dist/esm/chunks/{chunk.Z6FCL3G3.js → chunk.XEFWZKHQ.js} +2 -2
- package/dist/esm/chunks/{chunk.NR3MLTXF.js → chunk.XLL7L2UB.js} +2 -2
- package/dist/esm/chunks/chunk.XNFS7YIB.js +7 -0
- package/dist/esm/chunks/chunk.XNFS7YIB.js.map +7 -0
- package/dist/esm/chunks/chunk.XYAZVLPR.js +7 -0
- package/dist/esm/chunks/chunk.YA3RDJCV.js +7 -0
- package/dist/esm/chunks/chunk.YA3RDJCV.js.map +7 -0
- package/dist/esm/chunks/{chunk.2QHD3DCR.js → chunk.YAERJVPL.js} +2 -2
- package/dist/esm/chunks/chunk.YBZK6LJZ.js +7 -0
- package/dist/esm/chunks/chunk.YKIBREM5.js +7 -0
- package/dist/esm/chunks/chunk.YKIBREM5.js.map +7 -0
- package/dist/esm/chunks/chunk.YWAUEUAH.js +7 -0
- package/dist/esm/chunks/chunk.YWAUEUAH.js.map +7 -0
- package/dist/esm/chunks/chunk.Z5RROENA.js +7 -0
- package/dist/esm/chunks/{chunk.6OUJSOJY.js.map → chunk.Z5RROENA.js.map} +3 -3
- package/dist/esm/chunks/{chunk.ZJC2DSNM.js → chunk.Z5ZLKM7W.js} +2 -2
- package/dist/esm/chunks/chunk.ZGRQDDHO.js +7 -0
- package/dist/esm/chunks/{chunk.BY25RT52.js.map → chunk.ZGRQDDHO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.VSQOTSAO.js → chunk.ZKM667OT.js} +2 -2
- package/dist/esm/chunks/{chunk.VSQOTSAO.js.map → chunk.ZKM667OT.js.map} +2 -2
- package/dist/esm/chunks/chunk.ZRSDTCSD.js +7 -0
- package/dist/esm/chunks/chunk.ZRSDTCSD.js.map +7 -0
- package/dist/esm/chunks/chunk.ZSZFWZAI.js +7 -0
- package/dist/esm/chunks/chunk.ZSZFWZAI.js.map +7 -0
- 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/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 +7 -0
- package/dist/esm/label/index.js.map +7 -0
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/linear-progress/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/page-state/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/product-icon/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/scaffold/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/option-group/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/skeleton/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-button/index.js +7 -0
- package/dist/esm/split-button/index.js.map +7 -0
- 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/table/forge-table.css +1 -1
- package/dist/theme/forge-theme.css +1 -1
- package/dist/typography/forge-typography-legacy.css +1 -1
- package/dist/typography/forge-typography.css +1 -1
- package/esm/app-bar/app-bar.js +1 -1
- package/esm/app-bar/help-button/app-bar-help-button.js +1 -1
- package/esm/app-bar/menu-button/app-bar-menu-button.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button.js +1 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +1 -1
- package/esm/app-bar/profile-button/app-bar-profile-button.js +1 -1
- package/esm/autocomplete/autocomplete-constants.d.ts +3 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +3 -1
- package/esm/autocomplete/autocomplete-foundation.js +16 -2
- package/esm/autocomplete/autocomplete.d.ts +7 -1
- package/esm/autocomplete/autocomplete.js +7 -0
- package/esm/banner/banner-constants.js +1 -1
- package/esm/banner/banner.js +2 -2
- package/esm/bottom-sheet/bottom-sheet.js +1 -1
- package/esm/busy-indicator/busy-indicator.js +2 -2
- package/esm/button/base/base-button-adapter.d.ts +72 -0
- package/esm/button/base/base-button-adapter.js +250 -0
- package/esm/button/base/base-button-constants.d.ts +41 -0
- package/esm/button/base/base-button-constants.js +32 -0
- package/esm/button/base/base-button-foundation.d.ts +75 -0
- package/esm/button/base/base-button-foundation.js +234 -0
- package/esm/button/base/base-button.d.ts +51 -0
- package/esm/button/base/base-button.js +106 -0
- package/esm/button/button-adapter.d.ts +14 -0
- package/esm/button/button-adapter.js +14 -0
- package/esm/button/button-component-delegate.d.ts +4 -4
- package/esm/button/button-component-delegate.js +13 -17
- package/esm/button/button-constants.d.ts +10 -18
- package/esm/button/button-constants.js +6 -22
- package/esm/button/button-foundation.d.ts +25 -0
- package/esm/button/button-foundation.js +49 -0
- package/esm/button/button.d.ts +126 -30
- package/esm/button/button.js +160 -159
- package/esm/button/index.d.ts +3 -1
- package/esm/button/index.js +3 -1
- package/esm/button-area/button-area-adapter.d.ts +48 -0
- package/esm/button-area/button-area-adapter.js +121 -0
- package/esm/button-area/button-area-constants.d.ts +24 -0
- package/esm/button-area/button-area-constants.js +30 -0
- package/esm/button-area/button-area-foundation.d.ts +29 -0
- package/esm/button-area/button-area-foundation.js +94 -0
- package/esm/button-area/button-area.d.ts +29 -0
- package/esm/button-area/button-area.js +55 -0
- package/esm/button-area/index.d.ts +10 -0
- package/esm/button-area/index.js +14 -0
- package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
- package/esm/calendar/calendar-dom-utils.js +18 -30
- package/esm/calendar/calendar-foundation.js +6 -0
- package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
- package/esm/calendar/calendar.js +1 -1
- package/esm/checkbox/checkbox-adapter.d.ts +50 -59
- package/esm/checkbox/checkbox-adapter.js +104 -186
- package/esm/checkbox/checkbox-component-delegate.d.ts +18 -9
- package/esm/checkbox/checkbox-component-delegate.js +58 -51
- package/esm/checkbox/checkbox-constants.d.ts +14 -56
- package/esm/checkbox/checkbox-constants.js +17 -50
- package/esm/checkbox/checkbox-foundation.d.ts +48 -18
- package/esm/checkbox/checkbox-foundation.js +139 -139
- package/esm/checkbox/checkbox.d.ts +120 -9
- package/esm/checkbox/checkbox.js +235 -36
- package/esm/checkbox/index.d.ts +1 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/chip-field/chip-field-adapter.js +1 -1
- package/esm/chip-field/chip-field-constants.d.ts +3 -0
- package/esm/chip-field/chip-field-constants.js +4 -0
- package/esm/chip-field/chip-field-foundation.d.ts +5 -0
- package/esm/chip-field/chip-field-foundation.js +20 -1
- package/esm/chip-field/chip-field.d.ts +5 -0
- package/esm/chip-field/chip-field.js +21 -3
- package/esm/chips/chip/chip.js +1 -1
- package/esm/circular-progress/circular-progress-constants.d.ts +4 -0
- package/esm/circular-progress/circular-progress-constants.js +2 -0
- package/esm/circular-progress/circular-progress-foundation.d.ts +9 -0
- package/esm/circular-progress/circular-progress-foundation.js +21 -0
- package/esm/circular-progress/circular-progress.d.ts +15 -2
- package/esm/circular-progress/circular-progress.js +25 -3
- package/esm/color-picker/color-picker.js +2 -2
- package/esm/constants.d.ts +7 -0
- package/esm/constants.js +4 -0
- package/esm/core/base/base-adapter.d.ts +18 -3
- package/esm/core/base/base-adapter.js +30 -2
- package/esm/core/base/base-component.d.ts +0 -1
- package/esm/core/base/base-component.js +0 -1
- package/esm/core/base/base-focusable-component.d.ts +49 -0
- package/esm/core/base/base-focusable-component.js +90 -0
- package/esm/core/base/base-form-component.d.ts +45 -0
- package/esm/core/base/base-form-component.js +19 -0
- package/esm/core/base/base-nullable-form-component.d.ts +35 -0
- package/esm/core/base/base-nullable-form-component.js +20 -0
- package/esm/core/keyboard/key-manager.d.ts +18 -0
- package/esm/core/keyboard/key-manager.js +47 -0
- package/esm/core/utils/feature-detection.d.ts +10 -0
- package/esm/core/utils/feature-detection.js +12 -0
- package/esm/core/utils/index.d.ts +2 -0
- package/esm/core/utils/index.js +2 -0
- package/esm/core/utils/reflect-utils.d.ts +107 -0
- package/esm/core/utils/reflect-utils.js +227 -0
- package/esm/core/utils/utils.d.ts +8 -0
- package/esm/core/utils/utils.js +15 -0
- package/esm/date-picker/base/base-date-picker-foundation.js +1 -1
- package/esm/date-picker/base/base-date-picker-utils.js +5 -8
- package/esm/date-range-picker/date-range-picker-foundation.js +2 -2
- package/esm/drawer/drawer/drawer.js +1 -1
- package/esm/drawer/mini-drawer/mini-drawer.js +1 -1
- package/esm/drawer/modal-drawer/modal-drawer.js +1 -1
- package/esm/expansion-panel/expansion-panel-adapter.d.ts +1 -0
- package/esm/expansion-panel/expansion-panel-adapter.js +7 -2
- package/esm/expansion-panel/expansion-panel.js +1 -1
- package/esm/field/field-constants.d.ts +8 -0
- package/esm/field/field-constants.js +10 -8
- package/esm/field/field-foundation.d.ts +1 -0
- package/esm/field/field-foundation.js +17 -7
- package/esm/file-picker/file-picker-component-delegate.js +1 -1
- package/esm/file-picker/file-picker.js +1 -1
- package/esm/floating-label/floating-label-foundation.d.ts +4 -1
- package/esm/floating-label/floating-label-foundation.js +9 -6
- package/esm/floating-label/floating-label.d.ts +6 -2
- package/esm/floating-label/floating-label.js +2 -2
- package/esm/focus-indicator/focus-indicator-adapter.d.ts +2 -2
- package/esm/focus-indicator/focus-indicator-adapter.js +3 -3
- package/esm/focus-indicator/focus-indicator-foundation.js +4 -3
- package/esm/focus-indicator/focus-indicator.js +1 -1
- package/esm/icon/icon-adapter.d.ts +0 -2
- package/esm/icon/icon-adapter.js +4 -5
- package/esm/icon/icon-foundation.js +0 -1
- package/esm/icon-button/icon-button-adapter.d.ts +12 -0
- package/esm/icon-button/icon-button-adapter.js +11 -0
- package/esm/icon-button/icon-button-component-delegate.d.ts +0 -4
- package/esm/icon-button/icon-button-component-delegate.js +8 -18
- package/esm/icon-button/icon-button-constants.d.ts +26 -17
- package/esm/icon-button/icon-button-constants.js +17 -28
- package/esm/icon-button/icon-button-foundation.d.ts +39 -0
- package/esm/icon-button/icon-button-foundation.js +122 -0
- package/esm/icon-button/icon-button.d.ts +69 -41
- package/esm/icon-button/icon-button.js +107 -213
- package/esm/index.d.ts +3 -0
- package/esm/index.js +8 -1
- package/esm/keyboard-shortcut/keyboard-shortcut-constants.d.ts +1 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +6 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +9 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +4 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.js +3 -0
- package/esm/label/index.d.ts +11 -0
- package/esm/label/index.js +15 -0
- package/esm/label/label-adapter.d.ts +51 -0
- package/esm/label/label-adapter.js +102 -0
- package/esm/label/label-aware.d.ts +15 -0
- package/esm/label/label-aware.js +13 -0
- package/esm/label/label-constants.d.ts +17 -0
- package/esm/label/label-constants.js +31 -0
- package/esm/label/label-foundation.d.ts +40 -0
- package/esm/label/label-foundation.js +106 -0
- package/esm/label/label.d.ts +49 -0
- package/esm/label/label.js +80 -0
- package/esm/linear-progress/linear-progress-constants.d.ts +3 -0
- package/esm/linear-progress/linear-progress-constants.js +1 -0
- package/esm/linear-progress/linear-progress-foundation.d.ts +5 -0
- package/esm/linear-progress/linear-progress-foundation.js +13 -3
- package/esm/linear-progress/linear-progress.d.ts +8 -1
- package/esm/linear-progress/linear-progress.js +13 -2
- package/esm/list/list/list-adapter.d.ts +17 -41
- package/esm/list/list/list-adapter.js +42 -60
- package/esm/list/list/list-constants.d.ts +13 -5
- package/esm/list/list/list-constants.js +15 -7
- package/esm/list/list/list-foundation.d.ts +24 -16
- package/esm/list/list/list-foundation.js +84 -75
- package/esm/list/list/list.d.ts +47 -8
- package/esm/list/list/list.js +83 -11
- package/esm/list/list-item/list-item-adapter.d.ts +39 -90
- package/esm/list/list-item/list-item-adapter.js +147 -127
- package/esm/list/list-item/list-item-constants.d.ts +31 -27
- package/esm/list/list-item/list-item-constants.js +19 -32
- package/esm/list/list-item/list-item-foundation.d.ts +41 -56
- package/esm/list/list-item/list-item-foundation.js +139 -204
- package/esm/list/list-item/list-item.d.ts +120 -37
- package/esm/list/list-item/list-item.js +171 -84
- package/esm/list-dropdown/list-dropdown-adapter.js +1 -6
- package/esm/list-dropdown/list-dropdown-constants.d.ts +4 -0
- package/esm/list-dropdown/list-dropdown-utils.js +23 -24
- package/esm/menu/menu-constants.js +1 -1
- package/esm/menu/menu-foundation.js +0 -4
- package/esm/menu/menu.js +1 -1
- package/esm/paginator/paginator-adapter.d.ts +30 -24
- package/esm/paginator/paginator-adapter.js +68 -0
- package/esm/paginator/paginator-constants.js +4 -4
- package/esm/paginator/paginator-foundation.d.ts +35 -80
- package/esm/paginator/paginator-foundation.js +221 -255
- package/esm/paginator/paginator.d.ts +1 -2
- package/esm/paginator/paginator.js +5 -4
- package/esm/popup/popup-adapter.d.ts +3 -1
- package/esm/popup/popup-adapter.js +3 -0
- package/esm/popup/popup-foundation.js +5 -3
- package/esm/popup/popup.d.ts +4 -1
- package/esm/popup/popup.js +1 -1
- package/esm/profile-card/profile-card.js +2 -2
- package/esm/quantity-field/quantity-field-constants.js +2 -2
- package/esm/select/core/base-select-adapter.js +3 -0
- package/esm/select/core/base-select-foundation.js +3 -1
- package/esm/select/option/option-constants.d.ts +1 -0
- package/esm/select/option/option-constants.js +1 -0
- package/esm/select/option/option-foundation.d.ts +13 -0
- package/esm/select/option/option-foundation.js +28 -0
- package/esm/select/option/option.d.ts +7 -0
- package/esm/select/option/option.js +13 -0
- package/esm/slider/slider-adapter.d.ts +1 -1
- package/esm/slider/slider-adapter.js +3 -2
- package/esm/slider/slider-constants.js +3 -3
- package/esm/slider/slider.d.ts +6 -11
- package/esm/slider/slider.js +11 -7
- package/esm/split-button/index.d.ts +10 -0
- package/esm/split-button/index.js +14 -0
- package/esm/split-button/split-button-adapter.d.ts +30 -0
- package/esm/split-button/split-button-adapter.js +84 -0
- package/esm/split-button/split-button-constants.d.ts +21 -0
- package/esm/split-button/split-button-constants.js +23 -0
- package/esm/split-button/split-button-foundation.d.ts +37 -0
- package/esm/split-button/split-button-foundation.js +77 -0
- package/esm/split-button/split-button.d.ts +57 -0
- package/esm/split-button/split-button.js +103 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/state-layer/state-layer-adapter.js +1 -0
- package/esm/state-layer/state-layer-foundation.js +10 -1
- package/esm/state-layer/state-layer.js +1 -1
- package/esm/stepper/stepper/stepper-foundation.js +1 -1
- package/esm/switch/index.d.ts +2 -0
- package/esm/switch/index.js +2 -0
- package/esm/switch/switch-adapter.d.ts +64 -0
- package/esm/switch/switch-adapter.js +151 -0
- package/esm/switch/switch-component-delegate.d.ts +22 -6
- package/esm/switch/switch-component-delegate.js +64 -29
- package/esm/switch/switch-constants.d.ts +23 -6
- package/esm/switch/switch-constants.js +29 -10
- package/esm/switch/switch-foundation.d.ts +65 -0
- package/esm/switch/switch-foundation.js +162 -0
- package/esm/switch/switch.d.ts +162 -33
- package/esm/switch/switch.js +249 -136
- package/esm/table/table-foundation.d.ts +2 -0
- package/esm/table/table-foundation.js +17 -6
- package/esm/table/table-utils.js +13 -1
- package/esm/table/types.d.ts +1 -0
- package/esm/tabs/tab/tab.js +2 -2
- package/esm/tabs/tab-bar/tab-bar-adapter.js +17 -20
- package/esm/tabs/tab-bar/tab-bar.js +1 -1
- package/esm/time-picker/time-picker-adapter.js +5 -8
- package/esm/time-picker/time-picker-foundation.js +3 -3
- package/esm/toast/toast-adapter.d.ts +1 -1
- package/esm/toast/toast-adapter.js +1 -1
- package/esm/toast/toast.js +2 -2
- package/package.json +1 -7
- package/styles/app-bar/_mixins.scss +9 -4
- package/styles/banner/banner.scss +0 -1
- package/styles/bottom-sheet/bottom-sheet.scss +0 -1
- package/styles/busy-indicator/_mixins.scss +1 -1
- package/styles/busy-indicator/busy-indicator.scss +0 -1
- package/styles/button/_configuration.scss +16 -0
- package/styles/button/_core.scss +183 -0
- package/styles/button/_token-utils.scss +30 -0
- package/styles/button/button.scss +208 -0
- package/styles/button/index.scss +8 -0
- package/styles/button-area/_mixins.scss +47 -0
- package/styles/button-area/button-area.scss +16 -0
- package/styles/button-toggle/button-toggle/_mixins.scss +26 -7
- package/styles/calendar/calendar-menu/_mixins.scss +48 -2
- package/styles/calendar/calendar.scss +0 -4
- package/styles/{button/forge-button.scss → checkbox/_configuration.scss} +4 -3
- package/styles/checkbox/_core.scss +157 -0
- package/styles/checkbox/_token-utils.scss +30 -0
- package/styles/checkbox/checkbox.scss +143 -7
- package/styles/checkbox/index.scss +8 -0
- package/styles/chip-field/_base.scss +1 -0
- package/styles/chip-field/_selector.scss +2 -2
- package/styles/chips/chip/_mixins.scss +21 -7
- package/styles/circular-progress/_configuration.scss +8 -15
- package/styles/circular-progress/_core.scss +19 -19
- package/styles/circular-progress/_token-utils.scss +30 -0
- package/styles/circular-progress/circular-progress.scss +51 -4
- package/styles/circular-progress/index.scss +1 -0
- package/styles/color-picker/color-picker.scss +0 -3
- package/styles/core/styles/_utils.scss +148 -11
- package/styles/core/styles/scrollbar/index.scss +45 -0
- package/styles/core/styles/spacing/index.scss +8 -1
- package/styles/core/styles/theme/_color-utils.scss +63 -0
- package/styles/core/styles/theme/_utils.scss +82 -0
- package/styles/core/styles/theme/index.scss +39 -13
- package/styles/core/styles/tokens/_token-utils.scss +118 -0
- package/styles/core/styles/tokens/button/_tokens.scss +115 -0
- package/styles/core/styles/tokens/checkbox/_tokens.scss +69 -0
- package/styles/core/styles/tokens/circular-progress/_tokens.scss +13 -3
- package/styles/core/styles/tokens/color-palette/_extended-color-palette.scss +88 -0
- package/styles/core/styles/tokens/color-palette/index.scss +7 -0
- package/styles/core/styles/tokens/focus-indicator/_tokens.scss +8 -5
- package/styles/core/styles/tokens/icon-button/_tokens.scss +106 -0
- package/styles/core/styles/tokens/index.scss +0 -1
- package/styles/core/styles/tokens/linear-progress/_tokens.scss +15 -4
- package/styles/core/styles/tokens/list/list/_tokens.scss +16 -0
- package/styles/core/styles/tokens/list/list-item/_tokens.scss +77 -0
- package/styles/core/styles/tokens/scrollbar/_tokens.scss +26 -0
- package/styles/core/styles/tokens/slider/_tokens.scss +9 -11
- package/styles/core/styles/tokens/spacing/_tokens.scss +25 -11
- package/styles/core/styles/tokens/split-button/_tokens.scss +21 -0
- package/styles/core/styles/tokens/state-layer/_tokens.scss +5 -5
- package/styles/core/styles/tokens/switch/_tokens.scss +108 -0
- package/styles/core/styles/tokens/tabs/tab/_tokens.scss +3 -1
- package/styles/core/styles/tokens/tabs/tab-bar/_tokens.scss +3 -3
- package/styles/core/styles/tokens/theme/_color-emphasis.scss +38 -0
- package/styles/core/styles/tokens/theme/_token-utils.scss +50 -0
- package/styles/core/styles/tokens/theme/_tokens.core.scss +45 -0
- package/styles/core/styles/tokens/theme/_tokens.scss +62 -117
- package/styles/core/styles/tokens/theme/_tokens.status.scss +49 -0
- package/styles/core/styles/tokens/theme/_tokens.surface.scss +65 -0
- package/styles/core/styles/tokens/theme/_tokens.text.scss +38 -0
- package/styles/core/styles/tokens/theme/_tokens.utilities.scss +30 -0
- package/styles/core/styles/tokens/typography/_scale.scss +39 -0
- package/styles/core/styles/tokens/typography/_tokens.body.scss +41 -0
- package/styles/core/styles/tokens/typography/_tokens.core.scss +31 -0
- package/styles/core/styles/tokens/typography/_tokens.display.scss +67 -0
- package/styles/core/styles/tokens/typography/_tokens.heading.scss +70 -0
- package/styles/core/styles/tokens/typography/_tokens.label.scss +36 -0
- package/styles/core/styles/tokens/typography/_tokens.scss +16 -211
- package/styles/core/styles/tokens/typography/_tokens.subheading.scss +66 -0
- package/styles/core/styles/tokens/typography/_type-utils.scss +37 -0
- package/styles/core/styles/tokens/typography/_weight.scss +20 -0
- package/styles/core/styles/typography/index.scss +56 -6
- package/styles/file-picker/_mixins.scss +1 -1
- package/styles/focus-indicator/_animations.scss +6 -4
- package/styles/focus-indicator/_configuration.scss +2 -15
- package/styles/focus-indicator/_core.scss +20 -25
- package/styles/focus-indicator/_token-utils.scss +31 -0
- package/styles/focus-indicator/focus-indicator.scss +28 -6
- package/styles/focus-indicator/index.scss +1 -0
- package/styles/forge.scss +0 -2
- package/styles/icon-button/_configuration.scss +16 -0
- package/styles/icon-button/_core.scss +145 -0
- package/styles/icon-button/_token-utils.scss +30 -0
- package/styles/icon-button/icon-button.scss +315 -0
- package/styles/icon-button/index.scss +8 -0
- package/styles/label/_core.scss +17 -0
- package/styles/{icon-button/forge-icon-button.scss → label/index.scss} +1 -3
- package/styles/label/label.scss +18 -0
- package/styles/linear-progress/_animations.scss +3 -1
- package/styles/linear-progress/_configuration.scss +15 -16
- package/styles/linear-progress/_core.scss +17 -19
- package/styles/linear-progress/_token-utils.scss +31 -0
- package/styles/linear-progress/index.scss +1 -0
- package/styles/linear-progress/linear-progress.scss +42 -6
- package/styles/list/list/_configuration.scss +10 -0
- package/styles/list/list/_core.scss +16 -0
- package/styles/list/list/_token-utils.scss +30 -0
- package/styles/list/list/index.scss +8 -0
- package/styles/list/list/list.scss +29 -3
- package/styles/list/list-item/_configuration.scss +16 -0
- package/styles/list/list-item/_core.scss +195 -0
- package/styles/list/list-item/_token-utils.scss +30 -0
- package/styles/list/list-item/index.scss +8 -0
- package/styles/list/list-item/list-item.scss +199 -12
- package/styles/menu/menu.scss +1 -1
- package/styles/paginator/paginator.scss +0 -1
- package/styles/profile-card/profile-card.scss +0 -1
- package/styles/slider/_configuration.scss +5 -50
- package/styles/slider/_core.scss +59 -70
- package/styles/slider/_token-utils.scss +30 -0
- package/styles/slider/index.scss +1 -0
- package/styles/slider/slider.scss +28 -5
- package/styles/split-button/_configuration.scss +12 -0
- package/styles/split-button/_token-utils.scss +30 -0
- package/styles/split-button/index.scss +7 -0
- package/styles/split-button/split-button.scss +97 -0
- package/styles/state-layer/_configuration.scss +2 -9
- package/styles/state-layer/_core.scss +11 -16
- package/styles/state-layer/_token-utils.scss +31 -0
- package/styles/state-layer/index.scss +1 -0
- package/styles/state-layer/state-layer.scss +7 -0
- package/styles/switch/_configuration.scss +10 -0
- package/styles/switch/_core.scss +252 -0
- package/styles/switch/_token-utils.scss +30 -0
- package/styles/switch/index.scss +8 -0
- package/styles/switch/switch.scss +167 -47
- package/styles/table/_mixins.scss +20 -2
- package/styles/tabs/tab/_configuration.scss +7 -44
- package/styles/tabs/tab/_core.scss +30 -35
- package/styles/tabs/tab/_token-utils.scss +30 -0
- package/styles/tabs/tab/index.scss +1 -0
- package/styles/tabs/tab/tab.scss +89 -45
- package/styles/tabs/tab-bar/_configuration.scss +2 -5
- package/styles/tabs/tab-bar/_core.scss +26 -9
- package/styles/tabs/tab-bar/_token-utils.scss +30 -0
- package/styles/tabs/tab-bar/index.scss +2 -1
- package/styles/tabs/tab-bar/tab-bar.scss +68 -34
- package/styles/theme/_theme-dark.scss +0 -2
- package/styles/theme/_theme.scss +3 -45
- package/styles/theme/forge-theme.scss +21 -3
- package/styles/toast/_mixins.scss +1 -1
- package/styles/toast/toast.scss +0 -2
- package/styles/typography/_mixins.scss +0 -20
- package/styles/typography/forge-typography.scss +5 -2
- package/dist/button/forge-button.css +0 -6
- package/dist/esm/chunks/chunk.2AJ7FFI6.js +0 -7
- package/dist/esm/chunks/chunk.2AJ7FFI6.js.map +0 -7
- package/dist/esm/chunks/chunk.3HB22HCX.js +0 -7
- package/dist/esm/chunks/chunk.4C6KHYUO.js +0 -7
- package/dist/esm/chunks/chunk.54OOOQ4R.js +0 -7
- package/dist/esm/chunks/chunk.54OOOQ4R.js.map +0 -7
- package/dist/esm/chunks/chunk.5565ZSTH.js +0 -7
- package/dist/esm/chunks/chunk.6GC5AJPE.js +0 -7
- package/dist/esm/chunks/chunk.6GC5AJPE.js.map +0 -7
- package/dist/esm/chunks/chunk.6OUJSOJY.js +0 -7
- package/dist/esm/chunks/chunk.7CGKFRBK.js +0 -7
- package/dist/esm/chunks/chunk.7CGKFRBK.js.map +0 -7
- package/dist/esm/chunks/chunk.7DB3XVPI.js +0 -7
- package/dist/esm/chunks/chunk.ALIYGJXA.js +0 -129
- package/dist/esm/chunks/chunk.ALIYGJXA.js.map +0 -7
- package/dist/esm/chunks/chunk.B4T3R53C.js +0 -7
- package/dist/esm/chunks/chunk.BH2TUG2V.js +0 -7
- package/dist/esm/chunks/chunk.BH2TUG2V.js.map +0 -7
- package/dist/esm/chunks/chunk.BKL2BAYW.js +0 -7
- package/dist/esm/chunks/chunk.BKL2BAYW.js.map +0 -7
- package/dist/esm/chunks/chunk.BY25RT52.js +0 -7
- package/dist/esm/chunks/chunk.CDGZYUQS.js +0 -7
- package/dist/esm/chunks/chunk.CKW7KKDW.js +0 -7
- package/dist/esm/chunks/chunk.CKW7KKDW.js.map +0 -7
- package/dist/esm/chunks/chunk.CXY6K7EI.js +0 -7
- package/dist/esm/chunks/chunk.CXY6K7EI.js.map +0 -7
- package/dist/esm/chunks/chunk.D5TAI6Q7.js +0 -7
- package/dist/esm/chunks/chunk.D5TAI6Q7.js.map +0 -7
- package/dist/esm/chunks/chunk.DBNJHUYY.js +0 -7
- package/dist/esm/chunks/chunk.DBNJHUYY.js.map +0 -7
- package/dist/esm/chunks/chunk.DMCBAYQX.js +0 -7
- package/dist/esm/chunks/chunk.DMCBAYQX.js.map +0 -7
- package/dist/esm/chunks/chunk.DXN7ZOH3.js +0 -7
- package/dist/esm/chunks/chunk.DXN7ZOH3.js.map +0 -7
- package/dist/esm/chunks/chunk.F4VXEE76.js +0 -7
- package/dist/esm/chunks/chunk.F4VXEE76.js.map +0 -7
- package/dist/esm/chunks/chunk.F5SY2D4B.js +0 -7
- package/dist/esm/chunks/chunk.F74YURLV.js +0 -7
- package/dist/esm/chunks/chunk.F74YURLV.js.map +0 -7
- package/dist/esm/chunks/chunk.FG2GNAM2.js +0 -7
- package/dist/esm/chunks/chunk.FG2GNAM2.js.map +0 -7
- package/dist/esm/chunks/chunk.GNG64TXK.js +0 -7
- package/dist/esm/chunks/chunk.GNG64TXK.js.map +0 -7
- package/dist/esm/chunks/chunk.GO5A4GKZ.js +0 -7
- package/dist/esm/chunks/chunk.GO5A4GKZ.js.map +0 -7
- package/dist/esm/chunks/chunk.HHCO64F3.js +0 -7
- package/dist/esm/chunks/chunk.HHCO64F3.js.map +0 -7
- package/dist/esm/chunks/chunk.ISC7SZSP.js +0 -7
- package/dist/esm/chunks/chunk.ISC7SZSP.js.map +0 -7
- package/dist/esm/chunks/chunk.IX25DYIM.js +0 -7
- package/dist/esm/chunks/chunk.IX25DYIM.js.map +0 -7
- package/dist/esm/chunks/chunk.JUJGROHA.js +0 -7
- package/dist/esm/chunks/chunk.JUJGROHA.js.map +0 -7
- package/dist/esm/chunks/chunk.KJP2VA6Q.js +0 -7
- package/dist/esm/chunks/chunk.KJP2VA6Q.js.map +0 -7
- package/dist/esm/chunks/chunk.LK4AAUOP.js +0 -7
- package/dist/esm/chunks/chunk.LK4AAUOP.js.map +0 -7
- package/dist/esm/chunks/chunk.LXPFG7MW.js +0 -7
- package/dist/esm/chunks/chunk.LXPFG7MW.js.map +0 -7
- package/dist/esm/chunks/chunk.MACPUZC2.js +0 -7
- package/dist/esm/chunks/chunk.MACPUZC2.js.map +0 -7
- package/dist/esm/chunks/chunk.MGLL67VO.js +0 -7
- package/dist/esm/chunks/chunk.MXEKIEJA.js +0 -7
- package/dist/esm/chunks/chunk.MXEKIEJA.js.map +0 -7
- package/dist/esm/chunks/chunk.N43BCJHN.js +0 -7
- package/dist/esm/chunks/chunk.N43BCJHN.js.map +0 -7
- package/dist/esm/chunks/chunk.P2CW5MQO.js +0 -12
- package/dist/esm/chunks/chunk.P2CW5MQO.js.map +0 -7
- package/dist/esm/chunks/chunk.P2ZCNO63.js +0 -7
- package/dist/esm/chunks/chunk.P2ZCNO63.js.map +0 -7
- package/dist/esm/chunks/chunk.PEBT47AU.js +0 -7
- package/dist/esm/chunks/chunk.PH3HUFJJ.js +0 -7
- package/dist/esm/chunks/chunk.PH3HUFJJ.js.map +0 -7
- package/dist/esm/chunks/chunk.Q7JUJNYD.js +0 -7
- package/dist/esm/chunks/chunk.QCRRHGBA.js +0 -7
- package/dist/esm/chunks/chunk.QCRRHGBA.js.map +0 -7
- package/dist/esm/chunks/chunk.SBYX7VZ4.js +0 -7
- package/dist/esm/chunks/chunk.SFCGOCQK.js +0 -7
- package/dist/esm/chunks/chunk.SJJS4LYN.js +0 -7
- package/dist/esm/chunks/chunk.TYLOAD7R.js +0 -7
- package/dist/esm/chunks/chunk.UJ2WQOLO.js +0 -7
- package/dist/esm/chunks/chunk.UJ2WQOLO.js.map +0 -7
- package/dist/esm/chunks/chunk.VVXSELXX.js +0 -7
- package/dist/esm/chunks/chunk.VVXSELXX.js.map +0 -7
- package/dist/esm/chunks/chunk.VZWNNK7A.js +0 -7
- package/dist/esm/chunks/chunk.VZWNNK7A.js.map +0 -7
- package/dist/esm/chunks/chunk.X3C3J5MH.js +0 -7
- package/dist/esm/chunks/chunk.X3C3J5MH.js.map +0 -7
- package/dist/esm/chunks/chunk.XGOAYMK2.js +0 -7
- package/dist/esm/chunks/chunk.XGOAYMK2.js.map +0 -7
- package/dist/esm/chunks/chunk.YRMR7IOS.js +0 -7
- package/dist/esm/chunks/chunk.YRMR7IOS.js.map +0 -7
- package/dist/esm/chunks/chunk.YX7WLO5Y.js +0 -7
- package/dist/esm/chunks/chunk.YZLASVCK.js +0 -177
- package/dist/esm/chunks/chunk.YZLASVCK.js.map +0 -7
- package/dist/esm/chunks/chunk.ZDD2NLGP.js +0 -7
- package/dist/esm/chunks/chunk.ZKGSQQGU.js +0 -12
- package/dist/esm/chunks/chunk.ZKGSQQGU.js.map +0 -7
- package/dist/esm/chunks/chunk.ZVBZ3LGP.js +0 -7
- package/dist/esm/chunks/chunk.ZVBZ3LGP.js.map +0 -7
- package/dist/icon-button/forge-icon-button.css +0 -6
- package/styles/button/_button-base.scss +0 -183
- package/styles/button/_button-filled-theme.scss +0 -60
- package/styles/button/_button-filled.scss +0 -71
- package/styles/button/_button-outlined-theme.scss +0 -175
- package/styles/button/_button-outlined.scss +0 -76
- package/styles/button/_button-protected-theme.scss +0 -60
- package/styles/button/_button-protected.scss +0 -88
- package/styles/button/_button-ripple.scss +0 -69
- package/styles/button/_button-shared-theme.scss +0 -447
- package/styles/button/_button-text-theme.scss +0 -60
- package/styles/button/_button-text.scss +0 -57
- package/styles/button/_button.mixins.scss +0 -148
- package/styles/button/_mixins.scss +0 -183
- package/styles/checkbox/_checkbox-custom-properties.scss +0 -11
- package/styles/checkbox/_checkbox-theme.scss +0 -577
- package/styles/checkbox/_checkbox.mixins.scss +0 -595
- package/styles/icon-button/_mixins.scss +0 -345
- package/styles/icon-button/_variables.scss +0 -42
- package/styles/list/list/_mixins.scss +0 -45
- package/styles/list/list-item/_mixins.scss +0 -413
- package/styles/list/list-item/_variables.scss +0 -43
- package/styles/switch/_switch-mixins.scss +0 -301
- package/styles/switch/_switch-theme.scss +0 -701
- /package/dist/esm/chunks/{chunk.SMGXXR6K.js.map → chunk.2MSL7CYM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M56LSSPW.js.map → chunk.3HCYRDRI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4ZKX3SO5.js.map → chunk.3R4BUIQP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YWNCJ7XP.js.map → chunk.3ZPSN2QG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LFODKHUO.js.map → chunk.5N4N6DL6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QOJESHEV.js.map → chunk.675V42JS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DG4ZM3AW.js.map → chunk.AMLT6XJP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MTKSU2BV.js.map → chunk.APPY5AYL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4YFVG4KP.js.map → chunk.ARQMMZJL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5MZ5SGMO.js.map → chunk.BB4UF5RX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q7Z3SJ5F.js.map → chunk.DTLZOIUQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OWCYRSI3.js.map → chunk.FLWNOP42.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.S3JMOOWC.js.map → chunk.FXIWCHLW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CWTV3TB3.js.map → chunk.GNDKQPDV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ULY4H76N.js.map → chunk.HAKF2T2D.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WPG7NNQX.js.map → chunk.HOLCNJXC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W4247Q2P.js.map → chunk.HRRJIFC5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SU4FU7GK.js.map → chunk.IDMDBMBR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FCATJM34.js.map → chunk.IHAHJPMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XKI46BH2.js.map → chunk.IMLJD35R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.624UKZFU.js.map → chunk.IT7XPDAV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JLLHDJSO.js.map → chunk.JVLJH6PR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4C6KHYUO.js.map → chunk.KPJWP77R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2EWV2XBP.js.map → chunk.KV5IKYG2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.A62DE5PD.js.map → chunk.LCR4YH3O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FWFOOQMA.js.map → chunk.LOG6GQOK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YLG6ZC5K.js.map → chunk.NUMKGUCK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XI3MJSIS.js.map → chunk.O6V3YNMO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TK5I4RHF.js.map → chunk.QLCVRJ3Q.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q7JUJNYD.js.map → chunk.RP674CRC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LTT67HTW.js.map → chunk.SLJ6HDK7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6OW6Q3EW.js.map → chunk.TU74SREL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EK24Y56W.js.map → chunk.URJQNB3S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K3KAM2PL.js.map → chunk.W2LN45WY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z6FCL3G3.js.map → chunk.XEFWZKHQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NR3MLTXF.js.map → chunk.XLL7L2UB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3HB22HCX.js.map → chunk.XYAZVLPR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2QHD3DCR.js.map → chunk.YAERJVPL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZDD2NLGP.js.map → chunk.YBZK6LJZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZJC2DSNM.js.map → chunk.Z5ZLKM7W.js.map} +0 -0
- /package/styles/core/styles/tokens/{_color-palette.scss → color-palette/_material-color-palette.scss} +0 -0
package/esm/switch/switch.js
CHANGED
|
@@ -4,190 +4,303 @@
|
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { __decorate } from "tslib";
|
|
7
|
-
import { CustomElement, attachShadowTemplate, coerceBoolean,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { CustomElement, FoundationProperty, attachShadowTemplate, coerceBoolean, isDefined, isString, toggleAttribute } from '@tylertech/forge-core';
|
|
8
|
+
import { BaseNullableFormComponent } from '../core/base/base-nullable-form-component';
|
|
9
|
+
import { FocusIndicatorComponent } from '../focus-indicator/focus-indicator';
|
|
10
|
+
import { StateLayerComponent } from '../state-layer/state-layer';
|
|
11
|
+
import { SwitchAdapter } from './switch-adapter';
|
|
10
12
|
import { SWITCH_CONSTANTS } from './switch-constants';
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
const styles = '.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.mdc-switch{-webkit-box-align:center;align-items:center;background:0 0;border:none;display:-webkit-inline-box;display:inline-flex;flex-shrink:0;margin:0;outline:0;overflow:visible;padding:0;position:relative}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::after,.mdc-switch__track::before{border:1px solid transparent;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;content:\"\";height:100%;left:0;position:absolute;width:100%}.mdc-switch__track::before{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__track::after{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch__track[dir=rtl]::after,[dir=rtl] .mdc-switch__track::after{-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track[dir=rtl]::before,[dir=rtl] .mdc-switch--selected .mdc-switch__track::before{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);left:0;right:auto;-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__handle-track[dir=rtl],[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__handle-track[dir=rtl],[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch__handle{display:-webkit-box;display:flex;pointer-events:auto;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;right:auto}.mdc-switch__handle[dir=rtl],[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mdc-switch__handle::after,.mdc-switch__handle::before{border:1px solid transparent;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;content:\"\";width:100%;height:100%;left:0;position:absolute;top:0;-webkit-transition:background-color 75ms 0s cubic-bezier(.4, 0, .2, 1),border-color 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:background-color 75ms 0s cubic-bezier(.4, 0, .2, 1),border-color 75ms 0s cubic-bezier(.4, 0, .2, 1);z-index:-1}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;-webkit-transition:opacity 30ms 0s cubic-bezier(.4, 0, 1, 1);transition:opacity 30ms 0s cubic-bezier(.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;-webkit-transition:opacity 45ms 30ms cubic-bezier(0, 0, .2, 1);transition:opacity 45ms 30ms cubic-bezier(0, 0, .2, 1)}.mdc-switch{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-switch .mdc-switch__ripple::after,.mdc-switch .mdc-switch__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-switch .mdc-switch__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-switch .mdc-switch__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-switch.mdc-ripple-upgraded--unbounded .mdc-switch__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-switch.mdc-ripple-upgraded--foreground-activation .mdc-switch__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-switch.mdc-ripple-upgraded--foreground-deactivation .mdc-switch__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-switch .mdc-switch__ripple::after,.mdc-switch .mdc-switch__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after,.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-switch{width:36px;width:var(--mdc-switch-track-width,36px)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:#3d5afe;background:var(--mdc-switch-selected-handle-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-hover-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-focus-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-pressed-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:#3d5afe;background:var(--mdc-switch-disabled-selected-handle-color,#3d5afe)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:#9e9e9e;background:var(--mdc-switch-unselected-handle-color,#9e9e9e)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-hover-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-focus-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-pressed-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:#424242;background:var(--mdc-switch-disabled-unselected-handle-color,#424242)}.mdc-switch .mdc-switch__handle::before{background:#fff;background:var(--mdc-switch-handle-surface-color,var(--mdc-theme-surface,#fff))}.mdc-switch:enabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0, 0, 0, 0.12);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--mdc-switch-handle-elevation,var(--mdc-elevation-box-shadow-for-gss));box-shadow:var(--mdc-switch-handle-elevation,var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch:disabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0, 0, 0, 0.12);-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--mdc-switch-disabled-handle-elevation,var(--mdc-elevation-box-shadow-for-gss));box-shadow:var(--mdc-switch-disabled-handle-elevation,var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch .mdc-switch__handle{height:20px;height:var(--mdc-switch-handle-height,20px)}.mdc-switch:disabled .mdc-switch__handle::after{opacity:.24;opacity:var(--mdc-switch-disabled-handle-opacity, .24)}.mdc-switch .mdc-switch__handle{border-radius:10px;border-radius:var(--mdc-switch-handle-shape,10px)}.mdc-switch .mdc-switch__handle{width:20px;width:var(--mdc-switch-handle-width,20px)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - 20px);width:calc(100% - var(--mdc-switch-handle-width,20px))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-selected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-selected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-unselected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-unselected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:.54;opacity:var(--mdc-switch-disabled-selected-icon-opacity, .54)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:.54;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, .54)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:18px;width:var(--mdc-switch-selected-icon-size,18px);height:18px;height:var(--mdc-switch-selected-icon-size,18px)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:18px;width:var(--mdc-switch-unselected-icon-size,18px);height:18px;height:var(--mdc-switch-unselected-icon-size,18px)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-hover-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-focus-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-pressed-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-hover-state-layer-color,#424242)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-focus-state-layer-color,#424242)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-pressed-state-layer-color,#424242)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before{opacity:.04;opacity:var(--mdc-switch-selected-hover-state-layer-opacity, .04)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, .12)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.1;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, .1)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before{opacity:.04;opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, .04)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, .12)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.1;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, .1)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mdc-switch .mdc-switch__ripple{height:48px;height:var(--mdc-switch-state-layer-size,48px);width:48px;width:var(--mdc-switch-state-layer-size,48px)}.mdc-switch .mdc-switch__track{height:14px;height:var(--mdc-switch-track-height,14px)}.mdc-switch:disabled .mdc-switch__track{opacity:.12;opacity:var(--mdc-switch-disabled-track-opacity, .12)}.mdc-switch:enabled .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-track-color,#cfd6ff)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-hover-track-color,#cfd6ff)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-focus-track-color,#cfd6ff)}.mdc-switch:enabled:active .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-pressed-track-color,#cfd6ff)}.mdc-switch:disabled .mdc-switch__track::after{background:#3d5afe;background:var(--mdc-switch-disabled-selected-track-color,#3d5afe)}.mdc-switch:enabled .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-track-color,#e0e0e0)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-hover-track-color,#e0e0e0)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-focus-track-color,#e0e0e0)}.mdc-switch:enabled:active .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-pressed-track-color,#e0e0e0)}.mdc-switch:disabled .mdc-switch__track::before{background:#424242;background:var(--mdc-switch-disabled-unselected-track-color,#424242)}.mdc-switch .mdc-switch__track{border-radius:7px;border-radius:var(--mdc-switch-track-shape,7px)}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-switch:disabled .mdc-switch__handle::after{opacity:1;opacity:var(--mdc-switch-disabled-handle-opacity, 1)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-selected-icon-color,GrayText)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-unselected-icon-color,GrayText)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-selected-icon-opacity, 1)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 1)}.mdc-switch:disabled .mdc-switch__track{opacity:1;opacity:var(--mdc-switch-disabled-track-opacity, 1)}}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field>label{-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~label{padding-left:8px}.forge-form-field--align-end>label{-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}.forge-switch__container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-switch__container.forge-switch--label-position-start{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;flex-flow:row-reverse}.forge-switch__container.forge-switch--label-position-start .forge-switch__label{margin-left:auto;padding-right:8px}:host{display:inline-block}:host *{cursor:pointer}:host .forge-switch__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);padding-left:8px}:host([hidden]){display:none}:host([dense]) .mdc-switch__ripple{height:28px;width:28px}:host([disabled]) *{cursor:not-allowed}:host([disabled]) .forge-switch__label{color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}';
|
|
14
|
-
import { createUserInteractionListener } from '../core/utils';
|
|
15
|
-
class ForgeMDCSwitch extends MDCSwitch {
|
|
16
|
-
initialize() {
|
|
17
|
-
// Do not call super.initialize()
|
|
18
|
-
// We defer instantiation of the ripple until first user interaction
|
|
19
|
-
this._deferRippleInitialization();
|
|
20
|
-
}
|
|
21
|
-
destroy() {
|
|
22
|
-
var _a;
|
|
23
|
-
// We are not calling super.destroy() because it expects `ripple` to be set when it might not be yet
|
|
24
|
-
// We instead just replicate all existing functionality, but allow for `ripple` to be undefined
|
|
25
|
-
this.foundation.destroy();
|
|
26
|
-
(_a = this.ripple) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
27
|
-
this.root.removeEventListener('click', this.foundation.handleClick);
|
|
28
|
-
if (typeof this._destroyUserInteractionListener === 'function') {
|
|
29
|
-
this._destroyUserInteractionListener();
|
|
30
|
-
this._destroyUserInteractionListener = undefined;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async _deferRippleInitialization() {
|
|
34
|
-
const { userInteraction, destroy } = createUserInteractionListener(this.root);
|
|
35
|
-
this._destroyUserInteractionListener = destroy;
|
|
36
|
-
const { type } = await userInteraction;
|
|
37
|
-
this._destroyUserInteractionListener = undefined;
|
|
38
|
-
this.ripple = new MDCRipple(this.root, this.createRippleFoundation());
|
|
39
|
-
if (type === 'focusin') {
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
41
|
-
this.ripple['foundation'].handleFocus();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
13
|
+
import { SwitchFoundation } from './switch-foundation';
|
|
14
|
+
import { internals } from '../constants';
|
|
15
|
+
const template = '<template><div class=\"forge-switch\" part=\"switch\"><div id=\"container\" class=\"container\"><slot name=\"input\"><input id=\"input\" class=\"input\" type=\"checkbox\" role=\"switch\"></slot><div class=\"track\" part=\"track\"></div><div class=\"handle\" part=\"handle\"><div id=\"icon-off\" class=\"icon icon__off\" part=\"icon-off\"><slot name=\"icon-off\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M20 13H4v-2h16v2z\"/></svg></slot></div><div id=\"icon-on\" class=\"icon icon__on\" part=\"icon-on\"><slot name=\"icon-on\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\"/></svg></slot></div><forge-state-layer target=\"container\" exportparts=\"surface:state-layer\"></forge-state-layer></div><forge-focus-indicator target=\"container\" exportparts=\"indicator:focus-indicator\"></forge-focus-indicator></div><label id=\"label\" for=\"input\" class=\"label\" part=\"label\"><slot></slot></label></div></template>';
|
|
16
|
+
const styles = ':host{display:inline-block}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-handle-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, var(--forge-shape-round, 50%));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, var(--forge-shape-full, 9999px));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, space-between);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-state-layer-state-layer-off-color, var(--_state-layer-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:var(--_switch-direction);flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:var(--_switch-justify);justify-content:var(--_switch-justify);gap:var(--_switch-gap);display:-webkit-box;display:flex;--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{-webkit-transition-property:background-color,border-color,border-width;transition-property:background-color,border-color,border-width;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);-webkit-box-sizing:border-box;box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;-webkit-transition-property:translate;transition-property:translate;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:\"\";position:relative;display:block;scale:var(--_switch-handle-off-scale);-webkit-transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);-webkit-box-shadow:var(--_switch-handle-off-elevation);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;display:-webkit-box;display:flex;-webkit-transition-property:opacity,scale;transition-property:opacity,scale;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label-font-weight,400);line-height:var(--forge-typography-label-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label-text-decoration,inherit);text-decoration:var(--forge-typography-label-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([on]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([on]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([on]) .handle::before{scale:var(--_switch-handle-on-scale);-webkit-box-shadow:var(--_switch-handle-on-elevation);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([on]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([on]) .handle .icon__off{opacity:0;scale:0.4}:host([on]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);-webkit-box-shadow:var(--_switch-handle-active-off-elevation);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);-webkit-box-shadow:var(--_switch-handle-active-on-elevation);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch{opacity:var(--_switch-disabled-opacity)}:host([disabled]) .forge-switch .container{cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{-webkit-box-shadow:none;box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}';
|
|
45
17
|
/**
|
|
46
|
-
* The custom element class behind the `<forge-switch>` element.
|
|
47
|
-
*
|
|
48
18
|
* @tag forge-switch
|
|
19
|
+
*
|
|
20
|
+
* @summary Switches toggle the state of a single setting on or off.
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* Use switches to:
|
|
24
|
+
* - Toggle a single item on or off, on mobile and tablet
|
|
25
|
+
* - Immediately activate or deactivate something
|
|
26
|
+
*
|
|
27
|
+
* @property {boolean} on - Whether the switch is on the on or off state.
|
|
28
|
+
* @property {boolean} selected - Deprecated. Alias for `on`.
|
|
29
|
+
* @property {boolean} defaultOn - Whether the switch is on or off by default.
|
|
30
|
+
* @property {string} value - The value of the switch.
|
|
31
|
+
* @property {boolean} dense - The density state.
|
|
32
|
+
* @property {boolean} disabled - Controls if the switch is disabled.
|
|
33
|
+
* @property {boolean} required = Controls if the switch is required.
|
|
34
|
+
* @property {boolean} readonly - Controls if the switch is readonly.
|
|
35
|
+
* @property {SwitchIconVisibility} icon - Controls the presence of the off and on icons.
|
|
36
|
+
* @property {SwitchLabelPosition} labelPosition - Whether the label appears before or after the switch.
|
|
37
|
+
*
|
|
38
|
+
* @attribute {string} on - Controls whether the switch is in the on or off state.
|
|
39
|
+
* @attribute {string} selected - Deprecated. Alias for `on`.
|
|
40
|
+
* @attribute {string} default-on - Controls whether the switch is in the on or off state by default.
|
|
41
|
+
* @attribute {string} value - The value of the switch.
|
|
42
|
+
* @attribute {string} dense - Sets the density state.
|
|
43
|
+
* @attribute {string} disabled - Controls if the switch is disabled.
|
|
44
|
+
* @attribute {string} required - Controls if the switch is required.
|
|
45
|
+
* @attribute {string} readonly - Controls if the switch is readonly.
|
|
46
|
+
* @attribute {string} icon - Controls the presence of the off and on icons.
|
|
47
|
+
* @attribute {string} label-position - Sets whether the label appears before or after the switch.
|
|
48
|
+
*
|
|
49
|
+
* @method {(force?: boolean) => void} toggle - Toggles whether the switch is selected or forces a selected state.
|
|
50
|
+
*
|
|
51
|
+
* @event {CustomEvent} forge-switch-change - Dispatches when the switch's value changes.
|
|
52
|
+
*
|
|
53
|
+
* @cssproperty --forge-theme-primary - The primary color of the switch.
|
|
54
|
+
* @cssproperty --forge-theme-on-primary - The color of elements placed on top of the primary color (the handle icons for example).
|
|
55
|
+
* @cssproperty --forge-switch-handle-on-color - The color of the handle in the switch's on state.
|
|
56
|
+
* @cssproperty --forge-switch-handle-off-color - The color of the handle in the switch's off state.
|
|
57
|
+
* @cssproperty --forge-switch-handle-active-on-color - The color of the handle when the switch is active (pressed) in its on state.
|
|
58
|
+
* @cssproperty --forge-switch-handle-active-off-color - The color of the handle when the switch is active (pressed) in its off state.
|
|
59
|
+
* @cssproperty --forge-switch-handle-size - The inline and block size of the handle.
|
|
60
|
+
* @cssproperty --forge-switch-handle-width - The inline size of the handle.
|
|
61
|
+
* @cssproperty --forge-switch-handle-height - The block size of the handle.
|
|
62
|
+
* @cssproperty --forge-switch-handle-scale - The scale transformation applied to the handle.
|
|
63
|
+
* @cssproperty --forge-switch-handle-on-scale - The scale transformation applied to the handle in the switch's on state.
|
|
64
|
+
* @cssproperty --forge-switch-handle-off-scale - The scale transformation applied to the handle in the switch's off state.
|
|
65
|
+
* @cssproperty --forge-switch-handle-active-scale - The scale transformation applied to the handle when the switch is active (pressed).
|
|
66
|
+
* @cssproperty --forge-switch-handle-active-on-scale - The scale transformation applied to the handle when the switch is active (pressed) in its on state.
|
|
67
|
+
* @cssproperty --forge-switch-handle-active-off-scale - The scale transformation applied to the handle when the switch is active (pressed) in its off state.
|
|
68
|
+
* @cssproperty --forge-switch-handle-shape - The shape of the handle.
|
|
69
|
+
* @cssproperty --forge-switch-handle-elevation - The handle's shadow.
|
|
70
|
+
* @cssproperty --forge-switch-handle-on-elevation - The handle's shadow in the switch's on state.
|
|
71
|
+
* @cssproperty --forge-switch-handle-off-elevation - The handle's shadow in the switch's off state.
|
|
72
|
+
* @cssproperty --forge-switch-handle-active-elevation - The handle's shadow when the switch is active (pressed).
|
|
73
|
+
* @cssproperty --forge-switch-handle-active-on-elevation - The handle's shadow when the switch is active (pressed) in its on state.
|
|
74
|
+
* @cssproperty --forge-switch-handle-active-off-elevation - The handle's shadow when the switch is active (pressed) in its off state.
|
|
75
|
+
* @cssproperty --forge-switch-track-on-color - The color of the track in the switch's on state.
|
|
76
|
+
* @cssproperty --forge-switch-track-off-color - The color fo the track in the switch's off state.
|
|
77
|
+
* @cssproperty --forge-switch-track-active-on-color - The color of the track when the switch is active (pressed) in its on state.
|
|
78
|
+
* @cssproperty --forge-switch-track-active-off-color - The color fo the track when the switch is active (pressed) in its off state.
|
|
79
|
+
* @cssproperty --forge-switch-track-width - The inline size of the track.
|
|
80
|
+
* @cssproperty --forge-switch-track-height - The block size of the track.
|
|
81
|
+
* @cssproperty --forge-switch-track-shape - The shape of the track.
|
|
82
|
+
* @cssproperty --forge-switch-track-border-width - The width of the track border.
|
|
83
|
+
* @cssproperty --forge-switch-track-on-border-width - The width of the track border in the switch's on state.
|
|
84
|
+
* @cssproperty --forge-switch-track-off-border-width - The width of the track border in the switch's off state.
|
|
85
|
+
* @cssproperty --forge-switch-track-active-on-border-width - The width of the track border when the switch is active (pressed) in its on state.
|
|
86
|
+
* @cssproperty --forge-switch-track-active-off-border-width - The width of the track border when the switch is active (pressed) in its off state.
|
|
87
|
+
* @cssproperty --forge-switch-track-border-color - The color of the track border.
|
|
88
|
+
* @cssproperty --forge-switch-track-on-border-color - The color of the track border in the switch's on state.
|
|
89
|
+
* @cssproperty --forge-switch-track-off-border-color - The color of the track border in the switch's off state.
|
|
90
|
+
* @cssproperty --forge-switch-track-active-on-border-color - The color of the track border when the switch is active (pressed) in its on state.
|
|
91
|
+
* @cssproperty --forge-switch-track-active-off-border-color - The color of the track border when the switch is active (pressed) in its off state.
|
|
92
|
+
* @cssproperty --forge-switch-icon-color - The color of the handle icons.
|
|
93
|
+
* @cssproperty --forge-switch-icon-on-color - The color of the handle icon in the switch's on state.
|
|
94
|
+
* @cssproperty --forge-switch-icon-off-color - The color of the handle icon in the switch's off state.
|
|
95
|
+
* @cssproperty --forge-switch-icon-active-on-color - The color of the handle icon when the switch is active (pressed) in its on state.
|
|
96
|
+
* @cssproperty --forge-switch-icon-active-off-color - The color of the handle icon when the switch is active (pressed) in its off state.
|
|
97
|
+
* @cssproperty --forge-switch-icon-size - The size of the handle icon.
|
|
98
|
+
* @cssproperty --forge-switch-icon-on-size - The size of the handle icon in the switch's on state.
|
|
99
|
+
* @cssproperty --forge-switch-icon-off-size - The size of the handle icon in the switch's off state.
|
|
100
|
+
* @cssproperty --forge-switch-icon-scale - The scale transformation applied to the handle icons.
|
|
101
|
+
* @cssproperty --forge-switch-icon-on-scale - The scale transformation applied to the handle icons in the switch's on state.
|
|
102
|
+
* @cssproperty --forge-switch-icon-off-scale - The scale transformation applied to the handle icons in the switch's off state.
|
|
103
|
+
* @cssproperty --forge-switch-icon-active-on-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its on state.
|
|
104
|
+
* @cssproperty --forge-switch-icon-active-off-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its off state.
|
|
105
|
+
* @cssproperty --forge-switch-gap - The space between the switch and label.
|
|
106
|
+
* @cssproperty --forge-switch-justify - How the switch and label are distributed along their main axis.
|
|
107
|
+
* @cssproperty --forge-switch-direction - Whether the switch and label are arranged along the inline or block axis.
|
|
108
|
+
* @cssproperty --forge-switch-state-layer-size - The inline and block size of the handle's state layer.
|
|
109
|
+
* @cssproperty --forge-switch-state-layer-width - The inline size of the handle's state layer.
|
|
110
|
+
* @cssproperty --forge-switch-state-layer-height - The block size of the handle's state layer.
|
|
111
|
+
* @cssproperty --forge-switch-state-layer-on-color - The color of the handle's state layer when the switch is in its on state.
|
|
112
|
+
* @cssproperty --forge-switch-state-layer-off-color - The color of the handle's state layer when the switch is in its off state.
|
|
113
|
+
* @cssproperty --forge-switch-state-layer-dense-size - The inline and block size of the handle's state layer when the dense switch is used.
|
|
114
|
+
* @cssproperty --forge-switch-state-layer-dense-width - The inline size of the handle's state layer when the dense switch is used.
|
|
115
|
+
* @cssproperty --forge-switch-state-layer-dense-height - The block size of the handle's state layer when the dense switch is used.
|
|
116
|
+
* @cssproperty --forge-switch-disabled-opacity - The opacity of the switch when disabled.
|
|
117
|
+
* @cssproperty --forge-switch-animation-duration - The duration of animations.
|
|
118
|
+
* @cssproperty --forge-switch-animation-timing - The timing function used in most animations.
|
|
119
|
+
* @cssproperty --forge-switch-active-animation-timing - The timing function used in active state animations.
|
|
120
|
+
*
|
|
121
|
+
* @csspart switch - Styles the switch container element.
|
|
122
|
+
* @csspart track - Styles the track element.
|
|
123
|
+
* @csspart handle - Styles the handle element.
|
|
124
|
+
* @csspart icon-on - Styles the on icon element.
|
|
125
|
+
* @csspart icon-off - Styles the off icon element.
|
|
126
|
+
* @csspart label - Styles the label element.
|
|
127
|
+
* @csspart state-layer - Styles the state layer root element.
|
|
128
|
+
* @csspart focus-indicator - Styles the focus indicator root element.
|
|
49
129
|
*/
|
|
50
|
-
let SwitchComponent = class SwitchComponent extends
|
|
130
|
+
let SwitchComponent = class SwitchComponent extends BaseNullableFormComponent {
|
|
51
131
|
static get observedAttributes() {
|
|
52
132
|
return [
|
|
133
|
+
SWITCH_CONSTANTS.attributes.ON,
|
|
134
|
+
SWITCH_CONSTANTS.attributes.SELECTED,
|
|
135
|
+
SWITCH_CONSTANTS.attributes.DEFAULT_ON,
|
|
136
|
+
SWITCH_CONSTANTS.attributes.VALUE,
|
|
53
137
|
SWITCH_CONSTANTS.attributes.DENSE,
|
|
54
138
|
SWITCH_CONSTANTS.attributes.DISABLED,
|
|
55
|
-
SWITCH_CONSTANTS.attributes.
|
|
56
|
-
SWITCH_CONSTANTS.attributes.
|
|
57
|
-
SWITCH_CONSTANTS.attributes.
|
|
139
|
+
SWITCH_CONSTANTS.attributes.REQUIRED,
|
|
140
|
+
SWITCH_CONSTANTS.attributes.READONLY,
|
|
141
|
+
SWITCH_CONSTANTS.attributes.ICON,
|
|
142
|
+
SWITCH_CONSTANTS.attributes.LABEL_POSITION
|
|
58
143
|
];
|
|
59
144
|
}
|
|
145
|
+
get form() {
|
|
146
|
+
return this[internals].form;
|
|
147
|
+
}
|
|
148
|
+
get labels() {
|
|
149
|
+
return this[internals].labels;
|
|
150
|
+
}
|
|
151
|
+
get name() {
|
|
152
|
+
var _a;
|
|
153
|
+
return (_a = this.getAttribute('name')) !== null && _a !== void 0 ? _a : '';
|
|
154
|
+
}
|
|
155
|
+
set name(value) {
|
|
156
|
+
toggleAttribute(this, !!value, 'name', value !== null && value !== void 0 ? value : '');
|
|
157
|
+
}
|
|
158
|
+
get validity() {
|
|
159
|
+
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
160
|
+
return this[internals].validity;
|
|
161
|
+
}
|
|
162
|
+
get validationMessage() {
|
|
163
|
+
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
164
|
+
return this[internals].validationMessage;
|
|
165
|
+
}
|
|
166
|
+
get willValidate() {
|
|
167
|
+
return this[internals].willValidate;
|
|
168
|
+
}
|
|
60
169
|
constructor() {
|
|
61
170
|
super();
|
|
62
|
-
this
|
|
63
|
-
this
|
|
64
|
-
this.
|
|
65
|
-
this._labelPosition = 'end';
|
|
66
|
-
attachShadowTemplate(this, template, styles);
|
|
67
|
-
this._initialize();
|
|
68
|
-
}
|
|
69
|
-
_initialize() {
|
|
70
|
-
this._buttonElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.BUTTON);
|
|
71
|
-
this._containerElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.CONTAINER);
|
|
72
|
-
this._clickListener = evt => this._onClick(evt);
|
|
171
|
+
attachShadowTemplate(this, template, styles, true);
|
|
172
|
+
this[internals] = this.attachInternals();
|
|
173
|
+
this._foundation = new SwitchFoundation(new SwitchAdapter(this));
|
|
73
174
|
}
|
|
74
175
|
connectedCallback() {
|
|
75
|
-
|
|
76
|
-
this._buttonElement.addEventListener('click', this._clickListener);
|
|
77
|
-
this._mdcSwitch = new ForgeMDCSwitch(this._buttonElement);
|
|
78
|
-
this._applyInitialState();
|
|
79
|
-
}
|
|
80
|
-
disconnectedCallback() {
|
|
81
|
-
var _a;
|
|
82
|
-
(_a = this._mdcSwitch) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
176
|
+
this._foundation.initialize();
|
|
83
177
|
}
|
|
84
178
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
85
179
|
switch (name) {
|
|
180
|
+
case SWITCH_CONSTANTS.attributes.ON:
|
|
181
|
+
case SWITCH_CONSTANTS.attributes.SELECTED:
|
|
182
|
+
this.on = coerceBoolean(newValue);
|
|
183
|
+
break;
|
|
184
|
+
case SWITCH_CONSTANTS.attributes.DEFAULT_ON:
|
|
185
|
+
this.defaultOn = coerceBoolean(newValue);
|
|
186
|
+
break;
|
|
187
|
+
case SWITCH_CONSTANTS.attributes.VALUE:
|
|
188
|
+
this.value = newValue;
|
|
189
|
+
break;
|
|
86
190
|
case SWITCH_CONSTANTS.attributes.DENSE:
|
|
87
191
|
this.dense = coerceBoolean(newValue);
|
|
88
192
|
break;
|
|
89
193
|
case SWITCH_CONSTANTS.attributes.DISABLED:
|
|
90
194
|
this.disabled = coerceBoolean(newValue);
|
|
91
195
|
break;
|
|
92
|
-
case SWITCH_CONSTANTS.attributes.
|
|
93
|
-
this.
|
|
196
|
+
case SWITCH_CONSTANTS.attributes.REQUIRED:
|
|
197
|
+
this.required = coerceBoolean(newValue);
|
|
198
|
+
break;
|
|
199
|
+
case SWITCH_CONSTANTS.attributes.READONLY:
|
|
200
|
+
this.readonly = coerceBoolean(newValue);
|
|
201
|
+
break;
|
|
202
|
+
case SWITCH_CONSTANTS.attributes.ICON:
|
|
203
|
+
this.icon = newValue;
|
|
94
204
|
break;
|
|
95
205
|
case SWITCH_CONSTANTS.attributes.LABEL_POSITION:
|
|
96
206
|
this.labelPosition = newValue;
|
|
97
207
|
break;
|
|
98
|
-
case SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL:
|
|
99
|
-
this._applyButtonLabel(newValue);
|
|
100
|
-
break;
|
|
101
208
|
}
|
|
102
209
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
-
}
|
|
109
|
-
this._applyDense();
|
|
110
|
-
this._applyLabelPosition();
|
|
111
|
-
this._applyButtonLabel((_a = this.getAttribute(SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL)) !== null && _a !== void 0 ? _a : '');
|
|
112
|
-
}
|
|
113
|
-
_onClick(evt) {
|
|
114
|
-
var _a;
|
|
115
|
-
if ((_a = this._mdcSwitch) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
210
|
+
setFormValue(value, state) {
|
|
211
|
+
this[internals].setFormValue(value, state);
|
|
212
|
+
if (state) {
|
|
213
|
+
const stateValue = isString(state) ? state : state[this.name];
|
|
214
|
+
this.on = stateValue === SWITCH_CONSTANTS.state.ON;
|
|
116
215
|
return;
|
|
117
216
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
evt.stopImmediatePropagation();
|
|
121
|
-
const newValue = !this._selected;
|
|
122
|
-
const isCancelled = !emitEvent(this, SWITCH_CONSTANTS.events.SELECT, newValue, true, true);
|
|
123
|
-
if (!isCancelled) {
|
|
124
|
-
this._applySelected(newValue);
|
|
217
|
+
if (isString(value)) {
|
|
218
|
+
this.on = !!value;
|
|
125
219
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.
|
|
220
|
+
else if (value === null || value === void 0 ? void 0 : value[this.name]) {
|
|
221
|
+
this.on = !!value[this.name];
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
this.on = false;
|
|
131
225
|
}
|
|
132
226
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
(_b = (_a = this._mdcSwitch) === null || _a === void 0 ? void 0 : _a.ripple) === null || _b === void 0 ? void 0 : _b.layout();
|
|
227
|
+
checkValidity() {
|
|
228
|
+
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
229
|
+
return this[internals].checkValidity();
|
|
137
230
|
}
|
|
138
|
-
|
|
139
|
-
|
|
231
|
+
reportValidity() {
|
|
232
|
+
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
233
|
+
return this[internals].reportValidity();
|
|
140
234
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
toggleAttribute(this._buttonElement, !!value, 'aria-label', value);
|
|
235
|
+
setCustomValidity(error) {
|
|
236
|
+
this._hasCustomValidityError = !!error;
|
|
237
|
+
this._foundation.setValidity({ customError: !!error }, error);
|
|
146
238
|
}
|
|
147
|
-
|
|
148
|
-
|
|
239
|
+
formResetCallback() {
|
|
240
|
+
this.on = this.defaultOn;
|
|
149
241
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this._dense = value;
|
|
153
|
-
this._applyDense();
|
|
154
|
-
}
|
|
242
|
+
formStateRestoreCallback(state) {
|
|
243
|
+
this.on = state === SWITCH_CONSTANTS.state.ON;
|
|
155
244
|
}
|
|
156
|
-
|
|
157
|
-
|
|
245
|
+
formDisabledCallback(isDisabled) {
|
|
246
|
+
this.disabled = isDisabled;
|
|
158
247
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
this._disabled = value;
|
|
162
|
-
if (this._mdcSwitch) {
|
|
163
|
-
this._mdcSwitch.disabled = this._disabled;
|
|
164
|
-
}
|
|
165
|
-
toggleAttribute(this, this._disabled, SWITCH_CONSTANTS.attributes.DISABLED);
|
|
166
|
-
}
|
|
248
|
+
labelClickedCallback() {
|
|
249
|
+
this._foundation.proxyClick();
|
|
167
250
|
}
|
|
168
|
-
|
|
169
|
-
|
|
251
|
+
labelChangedCallback(value) {
|
|
252
|
+
this._foundation.proxyLabel(value);
|
|
170
253
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Toggles the switch on or off.
|
|
256
|
+
* @param force Whether to set the switch on or off.
|
|
257
|
+
*/
|
|
258
|
+
toggle(force) {
|
|
259
|
+
if (isDefined(force)) {
|
|
260
|
+
this._foundation.on = force;
|
|
175
261
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
return this._labelPosition;
|
|
179
|
-
}
|
|
180
|
-
set labelPosition(value) {
|
|
181
|
-
if (this._labelPosition !== value) {
|
|
182
|
-
this._labelPosition = value;
|
|
183
|
-
this._applyLabelPosition();
|
|
184
|
-
this.setAttribute(SWITCH_CONSTANTS.attributes.LABEL_POSITION, this._labelPosition);
|
|
262
|
+
else {
|
|
263
|
+
this._foundation.on = !this._foundation.on;
|
|
185
264
|
}
|
|
186
265
|
}
|
|
187
266
|
};
|
|
267
|
+
__decorate([
|
|
268
|
+
FoundationProperty()
|
|
269
|
+
], SwitchComponent.prototype, "on", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
FoundationProperty({ name: 'on' })
|
|
272
|
+
], SwitchComponent.prototype, "selected", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
FoundationProperty()
|
|
275
|
+
], SwitchComponent.prototype, "defaultOn", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
FoundationProperty()
|
|
278
|
+
], SwitchComponent.prototype, "value", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
FoundationProperty()
|
|
281
|
+
], SwitchComponent.prototype, "dense", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
FoundationProperty()
|
|
284
|
+
], SwitchComponent.prototype, "disabled", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
FoundationProperty()
|
|
287
|
+
], SwitchComponent.prototype, "required", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
FoundationProperty()
|
|
290
|
+
], SwitchComponent.prototype, "readonly", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
FoundationProperty()
|
|
293
|
+
], SwitchComponent.prototype, "icon", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
FoundationProperty()
|
|
296
|
+
], SwitchComponent.prototype, "labelPosition", void 0);
|
|
188
297
|
SwitchComponent = __decorate([
|
|
189
298
|
CustomElement({
|
|
190
|
-
name: SWITCH_CONSTANTS.elementName
|
|
299
|
+
name: SWITCH_CONSTANTS.elementName,
|
|
300
|
+
dependencies: [
|
|
301
|
+
FocusIndicatorComponent,
|
|
302
|
+
StateLayerComponent
|
|
303
|
+
]
|
|
191
304
|
})
|
|
192
305
|
], SwitchComponent);
|
|
193
306
|
export { SwitchComponent };
|
|
@@ -76,6 +76,7 @@ export declare class TableFoundation implements ITableFoundation {
|
|
|
76
76
|
private _rowDoubleClickListener;
|
|
77
77
|
private _selectRowListener;
|
|
78
78
|
private _selectAllListener;
|
|
79
|
+
private _sortableHeadCellKeydownListener;
|
|
79
80
|
private _headRowMouseDownListener;
|
|
80
81
|
private _headRowContextMenuListener;
|
|
81
82
|
private _documentMouseMoveListener;
|
|
@@ -259,6 +260,7 @@ export declare class TableFoundation implements ITableFoundation {
|
|
|
259
260
|
private _onHeadRowMouseDown;
|
|
260
261
|
private _onMouseMove;
|
|
261
262
|
private _onMouseUp;
|
|
263
|
+
private _onSortableHeadCellKeydown;
|
|
262
264
|
/**
|
|
263
265
|
* Called when a click event is triggered on the table header row.
|
|
264
266
|
* We use this to capture all click events on the row, and determine which
|
|
@@ -42,6 +42,7 @@ export class TableFoundation {
|
|
|
42
42
|
this._rowDoubleClickListener = evt => this._onRowDoubleClick(evt);
|
|
43
43
|
this._selectRowListener = evt => this._onRowSelected(evt);
|
|
44
44
|
this._selectAllListener = evt => this._onSelectAll(evt);
|
|
45
|
+
this._sortableHeadCellKeydownListener = (evt) => this._onSortableHeadCellKeydown(evt);
|
|
45
46
|
this._headRowMouseDownListener = evt => this._onHeadRowMouseDown(evt);
|
|
46
47
|
this._headRowContextMenuListener = evt => this._onHeadRowContextMenu(evt);
|
|
47
48
|
this._documentMouseMoveListener = evt => this._onMouseMove(evt);
|
|
@@ -86,13 +87,11 @@ export class TableFoundation {
|
|
|
86
87
|
this._renderBody();
|
|
87
88
|
}
|
|
88
89
|
get data() {
|
|
89
|
-
return
|
|
90
|
+
return this._data.map(o => (Object.assign({}, o))); // Shallow clone
|
|
90
91
|
}
|
|
91
92
|
/** The column configuration options. */
|
|
92
93
|
set columnConfigurations(value) {
|
|
93
94
|
// Intentional shallow copy of member properties. These member objects have properties that are references to functions.
|
|
94
|
-
// The typical JSON.parse(JSON.stringify(object)) will not work here. If this becomes an issue we'll add a deepClone
|
|
95
|
-
// function to the core library.
|
|
96
95
|
this._columnConfigurations = value.map(cc => (Object.assign({}, cc)));
|
|
97
96
|
// Update hidden column manager
|
|
98
97
|
this._hiddenColumnManager.clear();
|
|
@@ -106,8 +105,6 @@ export class TableFoundation {
|
|
|
106
105
|
}
|
|
107
106
|
get columnConfigurations() {
|
|
108
107
|
// Intentional shallow copy of member properties. These member objects have properties that are references to functions.
|
|
109
|
-
// The typical JSON.parse(JSON.stringify(object)) will not work here. If this becomes an issue we'll add a deepClone
|
|
110
|
-
// function to the core library.
|
|
111
108
|
return this._columnConfigurations.map(cc => (Object.assign({}, cc)));
|
|
112
109
|
}
|
|
113
110
|
/** Gets the visible column configurations. */
|
|
@@ -124,6 +121,7 @@ export class TableFoundation {
|
|
|
124
121
|
doubleClickListener: this._allowRowClick ? this._rowDoubleClickListener : null,
|
|
125
122
|
selectListener: this._select ? this._selectRowListener : null,
|
|
126
123
|
selectAllListener: this._multiselect ? this._selectAllListener : null,
|
|
124
|
+
sortableHeadCellKeydownListener: this._sortableHeadCellKeydownListener,
|
|
127
125
|
headRowMouseDownListener: this._headRowMouseDownListener,
|
|
128
126
|
headRowContextMenuListener: this._headRowContextMenuListener,
|
|
129
127
|
filterListener: this._filter ? this._filterListener : null,
|
|
@@ -699,7 +697,11 @@ export class TableFoundation {
|
|
|
699
697
|
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SELECT_ALL, data, true, false);
|
|
700
698
|
}
|
|
701
699
|
_onHeadRowContextMenu(evt) {
|
|
702
|
-
|
|
700
|
+
// We only handle this event on MacOS due to the `ctrl+click` combination triggering the contextmenu event...
|
|
701
|
+
// So we only detect that scenario here to still allow for the default context menu on Mac when right-clicking
|
|
702
|
+
if (evt.ctrlKey) {
|
|
703
|
+
evt.preventDefault();
|
|
704
|
+
}
|
|
703
705
|
}
|
|
704
706
|
_onHeadRowMouseDown(evt) {
|
|
705
707
|
if (evt.button !== 0) {
|
|
@@ -764,6 +766,15 @@ export class TableFoundation {
|
|
|
764
766
|
}
|
|
765
767
|
this._headCellMouseDownIndex = undefined;
|
|
766
768
|
}
|
|
769
|
+
_onSortableHeadCellKeydown(evt) {
|
|
770
|
+
if (evt.key === ' ' || evt.key === 'Enter') {
|
|
771
|
+
const composedPath = getEventPath(evt);
|
|
772
|
+
const rowElement = composedPath.find(el => el.tagName === 'TR');
|
|
773
|
+
const thElement = composedPath.find(el => el.tagName === 'TH');
|
|
774
|
+
const cellIndex = Array.from(rowElement.cells).findIndex(c => c === thElement);
|
|
775
|
+
this._onSort(cellIndex);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
767
778
|
/**
|
|
768
779
|
* Called when a click event is triggered on the table header row.
|
|
769
780
|
* We use this to capture all click events on the row, and determine which
|