@tylertech/forge 3.0.0-next.12 → 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 +53072 -38831
- 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 +1 -1
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.4USQ2AP6.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.OXGOCF4L.js → chunk.36C6SIPW.js} +2 -2
- package/dist/esm/chunks/{chunk.OXGOCF4L.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.HDO3WRH7.js → chunk.3HCYRDRI.js} +2 -2
- package/dist/esm/chunks/{chunk.UVJFHSMF.js → chunk.3R4BUIQP.js} +2 -2
- package/dist/esm/chunks/{chunk.37JFBP4X.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.Q7BWJCT5.js.map → chunk.5LVZVQXB.js.map} +2 -2
- package/dist/esm/chunks/{chunk.HKSXC5VK.js → chunk.5N4N6DL6.js} +2 -2
- package/dist/esm/chunks/{chunk.AQ7ROWO4.js → chunk.5PG6WIIX.js} +2 -2
- package/dist/esm/chunks/{chunk.CLD75EBJ.js → chunk.5RM65QPN.js} +2 -2
- package/dist/esm/chunks/{chunk.CLD75EBJ.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.C7VEJINB.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.5ASOX23Q.js → chunk.72JVXGHF.js} +2 -2
- package/dist/esm/chunks/{chunk.5ASOX23Q.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.OQAD6MFL.js → chunk.7ZROQ6D3.js} +2 -2
- package/dist/esm/chunks/{chunk.W7H2ZYNR.js → chunk.AMLT6XJP.js} +2 -2
- package/dist/esm/chunks/{chunk.TCFKFKZW.js → chunk.AMZZKEAE.js} +2 -2
- package/dist/esm/chunks/{chunk.DH76CMUT.js → chunk.APPY5AYL.js} +2 -2
- package/dist/esm/chunks/{chunk.7M4HRJYP.js → chunk.ARQMMZJL.js} +2 -2
- package/dist/esm/chunks/{chunk.QNVVUUNQ.js → chunk.AUBOJZQ7.js} +2 -2
- package/dist/esm/chunks/chunk.AUCBR6CC.js +7 -0
- package/dist/esm/chunks/{chunk.UAVC4YLD.js.map → chunk.AUCBR6CC.js.map} +2 -2
- package/dist/esm/chunks/{chunk.RXLORASN.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.TSH7BTC3.js.map → chunk.BQ2X5SBP.js.map} +2 -2
- package/dist/esm/chunks/{chunk.NDJZYFRT.js → chunk.BTXY3XMJ.js} +2 -2
- package/dist/esm/chunks/{chunk.AY43NTAK.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.PLNLLKP2.js → chunk.FLWNOP42.js} +2 -2
- package/dist/esm/chunks/{chunk.IJ2I25V3.js → chunk.FXIWCHLW.js} +2 -2
- package/dist/esm/chunks/chunk.FYVDTZLF.js +7 -0
- package/dist/esm/chunks/{chunk.YP2NHWIW.js.map → chunk.FYVDTZLF.js.map} +2 -2
- package/dist/esm/chunks/{chunk.6VSFLBZF.js → chunk.G73KL7P2.js} +2 -2
- package/dist/esm/chunks/chunk.G7SMCLHQ.js +7 -0
- package/dist/esm/chunks/chunk.G7SMCLHQ.js.map +7 -0
- package/dist/esm/chunks/{chunk.PDSOXEMY.js → chunk.GNDKQPDV.js} +2 -2
- package/dist/esm/chunks/{chunk.RWUJGZ3R.js → chunk.HAKF2T2D.js} +2 -2
- package/dist/esm/chunks/{chunk.ZYVXIP42.js → chunk.HDG2GHKC.js} +2 -2
- package/dist/esm/chunks/{chunk.EY37FYZ4.js → chunk.HOLCNJXC.js} +2 -2
- package/dist/esm/chunks/{chunk.DQVYB55P.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.WK2L7BPJ.js → chunk.IDMDBMBR.js} +2 -2
- package/dist/esm/chunks/{chunk.WJXDDQUK.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.DABGA7I6.js → chunk.IMLJD35R.js} +2 -2
- package/dist/esm/chunks/{chunk.66X366TV.js → chunk.IT7XPDAV.js} +2 -2
- package/dist/esm/chunks/chunk.JAWV5Y5T.js +7 -0
- package/dist/esm/chunks/{chunk.I5SFCLDD.js.map → chunk.JAWV5Y5T.js.map} +3 -3
- package/dist/esm/chunks/{chunk.RNUGVHZF.js → chunk.JVLJH6PR.js} +2 -2
- package/dist/esm/chunks/chunk.KPJWP77R.js +7 -0
- package/dist/esm/chunks/{chunk.Z6AFASMO.js → chunk.KV5IKYG2.js} +2 -2
- package/dist/esm/chunks/chunk.KV67JXOC.js +7 -0
- package/dist/esm/chunks/{chunk.OQ75YGB6.js.map → chunk.KV67JXOC.js.map} +2 -2
- package/dist/esm/chunks/{chunk.7UJAI6P2.js → chunk.LCR4YH3O.js} +2 -2
- package/dist/esm/chunks/{chunk.2WSXSOYB.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.VDGJ4UDL.js → chunk.MKJCHUJH.js} +2 -2
- package/dist/esm/chunks/{chunk.IXGXASHQ.js → chunk.MWYQRG5W.js} +2 -2
- package/dist/esm/chunks/{chunk.CBIHNCT5.js → chunk.NUMKGUCK.js} +2 -2
- package/dist/esm/chunks/{chunk.R6NA7SV2.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.LNLO36U6.js.map → chunk.PYR2OCCH.js.map} +2 -2
- package/dist/esm/chunks/chunk.QJCNMYD3.js +7 -0
- package/dist/esm/chunks/{chunk.URFSXQKR.js.map → chunk.QJCNMYD3.js.map} +2 -2
- package/dist/esm/chunks/{chunk.CQQSOTZ5.js → chunk.QLCVRJ3Q.js} +2 -2
- package/dist/esm/chunks/chunk.QLOYOZN3.js +7 -0
- package/dist/esm/chunks/{chunk.JCO4M4PF.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.YXXKPT6P.js.map → chunk.QQRPV4RN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.E4TAHUQO.js → chunk.R6LQBI42.js} +2 -2
- package/dist/esm/chunks/{chunk.FK6NNHXH.js → chunk.RES7WDKH.js} +2 -2
- 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.SEWAMWO6.js → chunk.SIRXAA3O.js} +2 -2
- package/dist/esm/chunks/{chunk.WWTQAN4G.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.RBFGJH3C.js → chunk.TU74SREL.js} +2 -2
- package/dist/esm/chunks/{chunk.4JF54GDJ.js → chunk.URJQNB3S.js} +2 -2
- package/dist/esm/chunks/{chunk.C2MQN7MI.js → chunk.V24M62MC.js} +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.R2KOYHIZ.js → chunk.VO6YJCEU.js} +2 -2
- package/dist/esm/chunks/{chunk.C5ZUGOOC.js → chunk.W2LN45WY.js} +2 -2
- package/dist/esm/chunks/{chunk.4XJYS5WH.js → chunk.WMVYRDUJ.js} +2 -2
- package/dist/esm/chunks/{chunk.4XJYS5WH.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.HBCDD25D.js → chunk.XEFWZKHQ.js} +2 -2
- package/dist/esm/chunks/{chunk.MHU452GM.js → chunk.XLL7L2UB.js} +2 -2
- package/dist/esm/chunks/{chunk.UZPZ6KUN.js → chunk.XNFS7YIB.js} +2 -2
- package/dist/esm/chunks/{chunk.UZPZ6KUN.js.map → chunk.XNFS7YIB.js.map} +2 -2
- package/dist/esm/chunks/chunk.XYAZVLPR.js +7 -0
- package/dist/esm/chunks/{chunk.AHAARGYM.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.YWAUEUAH.js +7 -0
- package/dist/esm/chunks/chunk.YWAUEUAH.js.map +7 -0
- package/dist/esm/chunks/{chunk.YIFI5D2X.js → chunk.Z5RROENA.js} +2 -2
- package/dist/esm/chunks/{chunk.YIFI5D2X.js.map → chunk.Z5RROENA.js.map} +3 -3
- package/dist/esm/chunks/{chunk.ZREXLSAJ.js → chunk.Z5ZLKM7W.js} +2 -2
- package/dist/esm/chunks/chunk.ZGRQDDHO.js +7 -0
- package/dist/esm/chunks/{chunk.U5XNDTSZ.js.map → chunk.ZGRQDDHO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.TGVLYX5F.js → chunk.ZKM667OT.js} +2 -2
- package/dist/esm/chunks/{chunk.TGVLYX5F.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/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.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-foundation.js +2 -2
- 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-toggle/button-toggle/button-toggle.js +1 -1
- package/esm/calendar/calendar-dom-utils.js +18 -30
- 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-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 +19 -1
- 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 +13 -1
- package/esm/core/base/base-adapter.js +17 -0
- package/esm/core/base/base-component.d.ts +0 -38
- package/esm/core/base/base-component.js +0 -4
- 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/utils/feature-detection.d.ts +10 -0
- package/esm/core/utils/feature-detection.js +12 -0
- package/esm/core/utils/index.d.ts +2 -1
- package/esm/core/utils/index.js +2 -1
- package/esm/core/utils/reflect-utils.d.ts +107 -0
- package/esm/core/utils/reflect-utils.js +227 -0
- package/esm/date-picker/base/base-date-picker-utils.js +5 -8
- package/esm/field/field-constants.d.ts +8 -0
- package/esm/field/field-constants.js +10 -8
- package/esm/file-picker/file-picker-component-delegate.js +1 -1
- package/esm/file-picker/file-picker.js +1 -1
- 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 +3 -2
- package/esm/focus-indicator/focus-indicator.js +1 -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 +2 -0
- package/esm/index.js +4 -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.js +0 -1
- package/esm/list/list/list.js +1 -1
- package/esm/list/list-item/list-item-adapter.d.ts +12 -4
- package/esm/list/list-item/list-item-adapter.js +36 -5
- package/esm/list/list-item/list-item-constants.d.ts +4 -0
- package/esm/list/list-item/list-item-constants.js +3 -1
- package/esm/list/list-item/list-item-foundation.d.ts +9 -0
- package/esm/list/list-item/list-item-foundation.js +34 -4
- package/esm/list/list-item/list-item.d.ts +15 -4
- package/esm/list/list-item/list-item.js +29 -6
- 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 +4 -2
- package/esm/paginator/paginator-adapter.js +21 -8
- package/esm/paginator/paginator-constants.js +4 -4
- package/esm/paginator/paginator-foundation.d.ts +2 -0
- package/esm/paginator/paginator-foundation.js +19 -16
- package/esm/paginator/paginator.d.ts +1 -0
- package/esm/paginator/paginator.js +5 -2
- 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-foundation.js +3 -1
- 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 +30 -4
- package/esm/switch/switch-adapter.js +100 -18
- package/esm/switch/switch-component-delegate.d.ts +22 -7
- package/esm/switch/switch-component-delegate.js +63 -28
- package/esm/switch/switch-constants.d.ts +12 -2
- package/esm/switch/switch-constants.js +22 -11
- package/esm/switch/switch-foundation.d.ts +23 -4
- package/esm/switch/switch-foundation.js +63 -11
- package/esm/switch/switch.d.ts +28 -16
- package/esm/switch/switch.js +65 -36
- 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/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 -2
- 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-toggle/button-toggle/_mixins.scss +26 -7
- 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/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 +67 -4
- package/styles/core/styles/spacing/index.scss +7 -0
- 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/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 +14 -3
- package/styles/core/styles/tokens/spacing/_tokens.scss +15 -1
- package/styles/core/styles/tokens/split-button/_tokens.scss +21 -0
- package/styles/core/styles/tokens/switch/_tokens.scss +4 -4
- package/styles/core/styles/tokens/tabs/tab/_tokens.scss +1 -1
- package/styles/core/styles/tokens/tabs/tab-bar/_tokens.scss +2 -2
- package/styles/core/styles/tokens/theme/_token-utils.scss +8 -4
- package/styles/core/styles/tokens/typography/_tokens.label.scss +0 -1
- package/styles/core/styles/typography/index.scss +26 -1
- 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 +2 -4
- package/styles/list/list/_core.scss +3 -8
- package/styles/list/list/_token-utils.scss +30 -0
- package/styles/list/list/index.scss +1 -0
- package/styles/list/list/list.scss +11 -0
- package/styles/list/list-item/_configuration.scss +5 -61
- package/styles/list/list-item/_core.scss +51 -56
- package/styles/list/list-item/_token-utils.scss +30 -0
- package/styles/list/list-item/index.scss +1 -0
- package/styles/list/list-item/list-item.scss +10 -3
- 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 +58 -63
- package/styles/slider/_token-utils.scss +30 -0
- package/styles/slider/index.scss +1 -0
- package/styles/slider/slider.scss +26 -3
- 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 +2 -87
- package/styles/switch/_core.scss +83 -86
- package/styles/switch/_token-utils.scss +30 -0
- package/styles/switch/index.scss +1 -0
- package/styles/switch/switch.scss +118 -84
- package/styles/table/_mixins.scss +20 -2
- package/styles/tabs/tab/_configuration.scss +7 -49
- package/styles/tabs/tab/_core.scss +27 -32
- package/styles/tabs/tab/_token-utils.scss +30 -0
- package/styles/tabs/tab/index.scss +1 -0
- package/styles/tabs/tab/tab.scss +87 -44
- 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/toast/_mixins.scss +1 -1
- package/styles/toast/toast.scss +0 -2
- package/styles/typography/forge-typography.scss +5 -2
- package/dist/button/forge-button.css +0 -6
- package/dist/esm/chunks/chunk.2LIWNFQK.js +0 -7
- package/dist/esm/chunks/chunk.3X4N4ZPY.js +0 -7
- package/dist/esm/chunks/chunk.3X4N4ZPY.js.map +0 -7
- package/dist/esm/chunks/chunk.436MTO6R.js +0 -7
- package/dist/esm/chunks/chunk.436MTO6R.js.map +0 -7
- package/dist/esm/chunks/chunk.4CXLGEJO.js +0 -7
- package/dist/esm/chunks/chunk.4CXLGEJO.js.map +0 -7
- package/dist/esm/chunks/chunk.7L66GZDN.js +0 -7
- package/dist/esm/chunks/chunk.7PPBXNAD.js +0 -7
- package/dist/esm/chunks/chunk.7PPBXNAD.js.map +0 -7
- package/dist/esm/chunks/chunk.A3ZDCBLA.js +0 -7
- package/dist/esm/chunks/chunk.A3ZDCBLA.js.map +0 -7
- package/dist/esm/chunks/chunk.CMRVP4EA.js +0 -7
- package/dist/esm/chunks/chunk.CZEF72BG.js +0 -12
- package/dist/esm/chunks/chunk.CZEF72BG.js.map +0 -7
- package/dist/esm/chunks/chunk.D5ZHKPCL.js +0 -7
- package/dist/esm/chunks/chunk.D5ZHKPCL.js.map +0 -7
- package/dist/esm/chunks/chunk.DLQSINSS.js +0 -7
- package/dist/esm/chunks/chunk.DLQSINSS.js.map +0 -7
- package/dist/esm/chunks/chunk.G6JWSERI.js +0 -7
- package/dist/esm/chunks/chunk.G6JWSERI.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.GWIXDVIA.js +0 -7
- package/dist/esm/chunks/chunk.GWIXDVIA.js.map +0 -7
- package/dist/esm/chunks/chunk.HGH6SSHZ.js +0 -7
- package/dist/esm/chunks/chunk.HGH6SSHZ.js.map +0 -7
- package/dist/esm/chunks/chunk.HJ23XQDJ.js +0 -7
- package/dist/esm/chunks/chunk.HJ23XQDJ.js.map +0 -7
- package/dist/esm/chunks/chunk.I5SFCLDD.js +0 -7
- package/dist/esm/chunks/chunk.IURDWGLD.js +0 -7
- package/dist/esm/chunks/chunk.IURDWGLD.js.map +0 -7
- package/dist/esm/chunks/chunk.JCO4M4PF.js +0 -7
- package/dist/esm/chunks/chunk.LNLO36U6.js +0 -7
- package/dist/esm/chunks/chunk.LV7XF22P.js +0 -7
- package/dist/esm/chunks/chunk.LV7XF22P.js.map +0 -7
- package/dist/esm/chunks/chunk.MLTEGJH6.js +0 -7
- package/dist/esm/chunks/chunk.MWWY5TX5.js +0 -7
- package/dist/esm/chunks/chunk.MWWY5TX5.js.map +0 -7
- package/dist/esm/chunks/chunk.O5GE3FFV.js +0 -7
- package/dist/esm/chunks/chunk.O5GE3FFV.js.map +0 -7
- package/dist/esm/chunks/chunk.OQ75YGB6.js +0 -7
- package/dist/esm/chunks/chunk.PCOOIP2H.js +0 -7
- package/dist/esm/chunks/chunk.PCOOIP2H.js.map +0 -7
- package/dist/esm/chunks/chunk.PDICDA2V.js +0 -7
- package/dist/esm/chunks/chunk.PDICDA2V.js.map +0 -7
- package/dist/esm/chunks/chunk.Q7BWJCT5.js +0 -7
- package/dist/esm/chunks/chunk.TSH7BTC3.js +0 -7
- package/dist/esm/chunks/chunk.U5XNDTSZ.js +0 -7
- package/dist/esm/chunks/chunk.UAKQY7QB.js +0 -7
- package/dist/esm/chunks/chunk.UAKQY7QB.js.map +0 -7
- package/dist/esm/chunks/chunk.UAVC4YLD.js +0 -7
- package/dist/esm/chunks/chunk.URFSXQKR.js +0 -7
- package/dist/esm/chunks/chunk.V6443MP3.js +0 -7
- package/dist/esm/chunks/chunk.V6443MP3.js.map +0 -7
- package/dist/esm/chunks/chunk.VAAID3SH.js +0 -7
- package/dist/esm/chunks/chunk.VAAID3SH.js.map +0 -7
- package/dist/esm/chunks/chunk.VPNDAKM3.js +0 -7
- package/dist/esm/chunks/chunk.VPNDAKM3.js.map +0 -7
- package/dist/esm/chunks/chunk.WCTSXMGU.js +0 -7
- package/dist/esm/chunks/chunk.WCTSXMGU.js.map +0 -7
- package/dist/esm/chunks/chunk.WOMYKBUG.js +0 -12
- package/dist/esm/chunks/chunk.WOMYKBUG.js.map +0 -7
- package/dist/esm/chunks/chunk.WVGIT7F7.js +0 -7
- package/dist/esm/chunks/chunk.WVGIT7F7.js.map +0 -7
- package/dist/esm/chunks/chunk.YOXZOPAC.js +0 -7
- package/dist/esm/chunks/chunk.YOXZOPAC.js.map +0 -7
- package/dist/esm/chunks/chunk.YP2NHWIW.js +0 -7
- package/dist/esm/chunks/chunk.YPA27RX7.js +0 -7
- package/dist/esm/chunks/chunk.YXXKPT6P.js +0 -7
- package/dist/esm/chunks/chunk.ZMUDT5UK.js +0 -7
- package/dist/esm/chunks/chunk.ZMUDT5UK.js.map +0 -7
- package/dist/icon-button/forge-icon-button.css +0 -6
- package/esm/core/utils/a11y-utils.d.ts +0 -32
- package/esm/core/utils/a11y-utils.js +0 -111
- 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/dist/esm/chunks/{chunk.4USQ2AP6.js.map → chunk.2MSL7CYM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HDO3WRH7.js.map → chunk.3HCYRDRI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UVJFHSMF.js.map → chunk.3R4BUIQP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.37JFBP4X.js.map → chunk.3ZPSN2QG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HKSXC5VK.js.map → chunk.5N4N6DL6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AQ7ROWO4.js.map → chunk.5PG6WIIX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C7VEJINB.js.map → chunk.675V42JS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OQAD6MFL.js.map → chunk.7ZROQ6D3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W7H2ZYNR.js.map → chunk.AMLT6XJP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TCFKFKZW.js.map → chunk.AMZZKEAE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DH76CMUT.js.map → chunk.APPY5AYL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7M4HRJYP.js.map → chunk.ARQMMZJL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QNVVUUNQ.js.map → chunk.AUBOJZQ7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RXLORASN.js.map → chunk.BB4UF5RX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NDJZYFRT.js.map → chunk.BTXY3XMJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AY43NTAK.js.map → chunk.DTLZOIUQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PLNLLKP2.js.map → chunk.FLWNOP42.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IJ2I25V3.js.map → chunk.FXIWCHLW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6VSFLBZF.js.map → chunk.G73KL7P2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PDSOXEMY.js.map → chunk.GNDKQPDV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RWUJGZ3R.js.map → chunk.HAKF2T2D.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZYVXIP42.js.map → chunk.HDG2GHKC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EY37FYZ4.js.map → chunk.HOLCNJXC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DQVYB55P.js.map → chunk.HRRJIFC5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WK2L7BPJ.js.map → chunk.IDMDBMBR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WJXDDQUK.js.map → chunk.IHAHJPMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DABGA7I6.js.map → chunk.IMLJD35R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.66X366TV.js.map → chunk.IT7XPDAV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RNUGVHZF.js.map → chunk.JVLJH6PR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MLTEGJH6.js.map → chunk.KPJWP77R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z6AFASMO.js.map → chunk.KV5IKYG2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7UJAI6P2.js.map → chunk.LCR4YH3O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2WSXSOYB.js.map → chunk.LOG6GQOK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VDGJ4UDL.js.map → chunk.MKJCHUJH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IXGXASHQ.js.map → chunk.MWYQRG5W.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CBIHNCT5.js.map → chunk.NUMKGUCK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R6NA7SV2.js.map → chunk.O6V3YNMO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CQQSOTZ5.js.map → chunk.QLCVRJ3Q.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.E4TAHUQO.js.map → chunk.R6LQBI42.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FK6NNHXH.js.map → chunk.RES7WDKH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2LIWNFQK.js.map → chunk.RP674CRC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SEWAMWO6.js.map → chunk.SIRXAA3O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WWTQAN4G.js.map → chunk.SLJ6HDK7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RBFGJH3C.js.map → chunk.TU74SREL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4JF54GDJ.js.map → chunk.URJQNB3S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C2MQN7MI.js.map → chunk.V24M62MC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R2KOYHIZ.js.map → chunk.VO6YJCEU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C5ZUGOOC.js.map → chunk.W2LN45WY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HBCDD25D.js.map → chunk.XEFWZKHQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MHU452GM.js.map → chunk.XLL7L2UB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YPA27RX7.js.map → chunk.XYAZVLPR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AHAARGYM.js.map → chunk.YAERJVPL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7L66GZDN.js.map → chunk.YBZK6LJZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CMRVP4EA.js.map → chunk.YKIBREM5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZREXLSAJ.js.map → chunk.Z5ZLKM7W.js.map} +0 -0
package/esm/switch/switch.d.ts
CHANGED
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { BaseNullableFormComponent, IBaseNullableFormComponent } from '../core/base/base-nullable-form-component';
|
|
7
7
|
import { SwitchIconVisibility, SwitchLabelPosition } from './switch-constants';
|
|
8
|
-
|
|
8
|
+
import { ILabelAware } from '../label/label-aware';
|
|
9
|
+
import { internals } from '../constants';
|
|
10
|
+
export interface ISwitchComponent extends IBaseNullableFormComponent, ILabelAware {
|
|
9
11
|
on: boolean;
|
|
10
12
|
/**
|
|
11
13
|
* @deprecated use `on` instead
|
|
12
14
|
*/
|
|
13
15
|
selected: boolean;
|
|
16
|
+
defaultOn: boolean;
|
|
14
17
|
dense: boolean;
|
|
15
18
|
icon: SwitchIconVisibility;
|
|
16
19
|
labelPosition: SwitchLabelPosition;
|
|
17
20
|
toggle(force?: boolean): void;
|
|
21
|
+
setFormValue(value: string | File | FormData | null, state?: string | File | FormData | null | undefined): void;
|
|
18
22
|
}
|
|
19
23
|
declare global {
|
|
20
24
|
interface HTMLElementTagNameMap {
|
|
@@ -36,17 +40,23 @@ declare global {
|
|
|
36
40
|
*
|
|
37
41
|
* @property {boolean} on - Whether the switch is on the on or off state.
|
|
38
42
|
* @property {boolean} selected - Deprecated. Alias for `on`.
|
|
43
|
+
* @property {boolean} defaultOn - Whether the switch is on or off by default.
|
|
44
|
+
* @property {string} value - The value of the switch.
|
|
45
|
+
* @property {boolean} dense - The density state.
|
|
39
46
|
* @property {boolean} disabled - Controls if the switch is disabled.
|
|
40
47
|
* @property {boolean} required = Controls if the switch is required.
|
|
41
|
-
* @property {boolean}
|
|
48
|
+
* @property {boolean} readonly - Controls if the switch is readonly.
|
|
42
49
|
* @property {SwitchIconVisibility} icon - Controls the presence of the off and on icons.
|
|
43
50
|
* @property {SwitchLabelPosition} labelPosition - Whether the label appears before or after the switch.
|
|
44
51
|
*
|
|
45
52
|
* @attribute {string} on - Controls whether the switch is in the on or off state.
|
|
46
|
-
* @attribute {string} selected - Alias for `on`.
|
|
53
|
+
* @attribute {string} selected - Deprecated. Alias for `on`.
|
|
54
|
+
* @attribute {string} default-on - Controls whether the switch is in the on or off state by default.
|
|
55
|
+
* @attribute {string} value - The value of the switch.
|
|
56
|
+
* @attribute {string} dense - Sets the density state.
|
|
47
57
|
* @attribute {string} disabled - Controls if the switch is disabled.
|
|
48
58
|
* @attribute {string} required - Controls if the switch is required.
|
|
49
|
-
* @attribute {string}
|
|
59
|
+
* @attribute {string} readonly - Controls if the switch is readonly.
|
|
50
60
|
* @attribute {string} icon - Controls the presence of the off and on icons.
|
|
51
61
|
* @attribute {string} label-position - Sets whether the label appears before or after the switch.
|
|
52
62
|
*
|
|
@@ -98,10 +108,10 @@ declare global {
|
|
|
98
108
|
* @cssproperty --forge-switch-icon-off-color - The color of the handle icon in the switch's off state.
|
|
99
109
|
* @cssproperty --forge-switch-icon-active-on-color - The color of the handle icon when the switch is active (pressed) in its on state.
|
|
100
110
|
* @cssproperty --forge-switch-icon-active-off-color - The color of the handle icon when the switch is active (pressed) in its off state.
|
|
111
|
+
* @cssproperty --forge-switch-icon-size - The size of the handle icon.
|
|
101
112
|
* @cssproperty --forge-switch-icon-on-size - The size of the handle icon in the switch's on state.
|
|
102
113
|
* @cssproperty --forge-switch-icon-off-size - The size of the handle icon in the switch's off state.
|
|
103
114
|
* @cssproperty --forge-switch-icon-scale - The scale transformation applied to the handle icons.
|
|
104
|
-
* @cssproperty --forge-switch-icon-active-scale - The scale transformation applied to the handle icons when the switch is active (pressed).
|
|
105
115
|
* @cssproperty --forge-switch-icon-on-scale - The scale transformation applied to the handle icons in the switch's on state.
|
|
106
116
|
* @cssproperty --forge-switch-icon-off-scale - The scale transformation applied to the handle icons in the switch's off state.
|
|
107
117
|
* @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.
|
|
@@ -123,21 +133,16 @@ declare global {
|
|
|
123
133
|
* @cssproperty --forge-switch-active-animation-timing - The timing function used in active state animations.
|
|
124
134
|
*
|
|
125
135
|
* @csspart switch - Styles the switch container element.
|
|
126
|
-
* @csspart input-container - Styles the wrapper element of the input, track and handle.
|
|
127
|
-
* @csspart input - Styles the input element.
|
|
128
136
|
* @csspart track - Styles the track element.
|
|
129
137
|
* @csspart handle - Styles the handle element.
|
|
130
138
|
* @csspart icon-on - Styles the on icon element.
|
|
131
139
|
* @csspart icon-off - Styles the off icon element.
|
|
132
|
-
* @csspart icon-on-path - Styles the default on icon path.
|
|
133
|
-
* @csspart icon-off-path - Styles the default off icon path.
|
|
134
140
|
* @csspart label - Styles the label element.
|
|
135
|
-
* @csspart state-layer - Styles the state layer element.
|
|
136
|
-
* @csspart focus-indicator - Styles the focus indicator element.
|
|
141
|
+
* @csspart state-layer - Styles the state layer root element.
|
|
142
|
+
* @csspart focus-indicator - Styles the focus indicator root element.
|
|
137
143
|
*/
|
|
138
|
-
export declare class SwitchComponent extends
|
|
144
|
+
export declare class SwitchComponent extends BaseNullableFormComponent implements ISwitchComponent {
|
|
139
145
|
static get observedAttributes(): string[];
|
|
140
|
-
static formAssociated: boolean;
|
|
141
146
|
get form(): HTMLFormElement | null;
|
|
142
147
|
get labels(): NodeList;
|
|
143
148
|
get name(): string;
|
|
@@ -145,8 +150,7 @@ export declare class SwitchComponent extends BaseFormComponent implements ISwitc
|
|
|
145
150
|
get validity(): ValidityState;
|
|
146
151
|
get validationMessage(): string;
|
|
147
152
|
get willValidate(): boolean;
|
|
148
|
-
|
|
149
|
-
readonly internals: ElementInternals;
|
|
153
|
+
readonly [internals]: ElementInternals;
|
|
150
154
|
private readonly _foundation;
|
|
151
155
|
constructor();
|
|
152
156
|
connectedCallback(): void;
|
|
@@ -158,11 +162,19 @@ export declare class SwitchComponent extends BaseFormComponent implements ISwitc
|
|
|
158
162
|
formResetCallback(): void;
|
|
159
163
|
formStateRestoreCallback(state: string): void;
|
|
160
164
|
formDisabledCallback(isDisabled: boolean): void;
|
|
165
|
+
labelClickedCallback(): void;
|
|
166
|
+
labelChangedCallback(value: string | null): void;
|
|
161
167
|
on: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* @deprecated use `on` instead
|
|
170
|
+
*/
|
|
162
171
|
selected: boolean;
|
|
172
|
+
defaultOn: boolean;
|
|
173
|
+
value: string;
|
|
163
174
|
dense: boolean;
|
|
164
175
|
disabled: boolean;
|
|
165
176
|
required: boolean;
|
|
177
|
+
readonly: boolean;
|
|
166
178
|
icon: SwitchIconVisibility;
|
|
167
179
|
labelPosition: SwitchLabelPosition;
|
|
168
180
|
/**
|
package/esm/switch/switch.js
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { __decorate } from "tslib";
|
|
7
7
|
import { CustomElement, FoundationProperty, attachShadowTemplate, coerceBoolean, isDefined, isString, toggleAttribute } from '@tylertech/forge-core';
|
|
8
|
-
import {
|
|
8
|
+
import { BaseNullableFormComponent } from '../core/base/base-nullable-form-component';
|
|
9
9
|
import { FocusIndicatorComponent } from '../focus-indicator/focus-indicator';
|
|
10
10
|
import { StateLayerComponent } from '../state-layer/state-layer';
|
|
11
11
|
import { SwitchAdapter } from './switch-adapter';
|
|
12
12
|
import { SWITCH_CONSTANTS } from './switch-constants';
|
|
13
13
|
import { SwitchFoundation } from './switch-foundation';
|
|
14
|
-
|
|
15
|
-
const styles = ':host{display:inline-block;cursor:pointer}:host([hidden]){display:none}:host([disabled]){opacity:var(--_disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch{pointer-events:none}:host([disabled]) .handle::before{-webkit-box-shadow:none;box-shadow:none}.forge-switch{--_handle-size:var(--forge-switch-handle-size, 20px);--_handle-scale:var(--forge-switch-handle-scale, 1);--_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));--_track-border-width:var(--forge-switch-track-border-width, 0);--_track-border-color:var(--forge-switch-track-border-color, transparent);--_icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_icon-scale:var(--forge-switch-icon-scale, 1);--_state-layer-size:var(--forge-switch-state-layer-size, 40px);--_state-layer-dense-size:var(--forge-switch-handle-dense-size, 28px);--_handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_handle-width:var(--forge-switch-handle-width, var(--_handle-size));--_handle-height:var(--forge-switch-handle-height, var(--_handle-size));--_handle-on-scale:var(--forge-switch-handle-on-scale, var(--_handle-scale));--_handle-off-scale:var(--forge-switch-handle-off-scale, var(--_handle-scale));--_handle-shape:var(--forge-switch-handle-shape, var(--forge-shape-round, 50%));--_handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_handle-elevation));--_handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_handle-elevation));--_track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_track-width:var(--forge-switch-track-width, 36px);--_track-height:var(--forge-switch-track-height, 14px);--_track-shape:var(--forge-switch-track-shape, var(--forge-shape-full, 9999px));--_track-on-border-width:var(--forge-switch-track-on-border-width, var(--_track-border-width));--_track-off-border-width:var(--forge-switch-track-off-border-width, var(--_track-border-width));--_track-on-border-color:var(--forge-switch-track-on-border-color, var(--_track-border-color));--_track-off-border-color:var(--forge-switch-track-off-border-color, var(--_track-border-color));--_icon-on-color:var(--forge-switch-icon-on-color, var(--_icon-color));--_icon-off-color:var(--forge-switch-icon-off-color, var(--_icon-color));--_icon-on-size:var(--forge-switch-icon-on-size, var(--_handle-size));--_icon-off-size:var(--forge-switch-icon-off-size, var(--_handle-size));--_icon-on-scale:var(--forge-switch-icon-on-scale, var(--_icon-scale));--_icon-off-scale:var(--forge-switch-icon-off-scale, var(--_icon-scale));--_gap:var(--forge-switch-gap, 0);--_justify:var(--forge-switch-justify, space-between);--_direction:var(--forge-switch-direction, initial);--_state-layer-width:var(--forge-switch-state-layer-width, var(--_state-layer-size));--_state-layer-height:var(--forge-switch-state-layer-height, var(--_state-layer-size));--_state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_handle-on-color));--_state-layer-off-color:var(--forge-state-layer-state-layer-off-color, var(--_color));--_state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_state-layer-dense-size));--_state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_state-layer-dense-size));--_disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_handle-on-color));--_handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_handle-off-color));--_handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_handle-active-scale));--_handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_handle-active-scale));--_handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_handle-elevation));--_handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_handle-active-elevation));--_handle-active-off-elevation:var(--forge-switch-handle-active-on-elevation, var(--_handle-active-elevation));--_track-active-on-color:var(--forge-switch-track-active-on-color, var(--_track-on-color));--_track-active-off-color:var(--forge-switch-track-active-off-color, var(--_track-off-color));--_track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_track-on-border-width));--_track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_track-off-border-width));--_track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_track-on-border-color));--_track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_track-off-border-color));--_icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_icon-on-color));--_icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_icon-off-color));--_icon-active-scale: ;--_icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_icon-on-scale));--_icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_icon-off-scale));--_animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)));position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:var(--_direction);flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:var(--_justify);justify-content:var(--_justify);gap:var(--_gap);display:-webkit-box;display:flex;cursor:unset;--_current-state-layer-width:var(--_state-layer-width);--_current-state-layer-height:var(--_state-layer-height)}.forge-switch .container{position:relative;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;block-size:max(var(--_handle-height),var(--_track-height),var(--_current-state-layer-height))}.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 .input:checked~.track{border-width:var(--_track-on-border-width);border-color:var(--_track-on-border-color);background-color:var(--_track-on-color)}.forge-switch .input:checked~.handle{translate:calc(var(--_track-width) - calc(var(--_track-height)/ 2) * 2)}.forge-switch .input:checked~.handle::before{scale:var(--_handle-on-scale);-webkit-box-shadow:var(--_handle-on-elevation);box-shadow:var(--_handle-on-elevation);background-color:var(--_handle-on-color)}.forge-switch .input:checked~.handle .icon__on{opacity:1;scale:var(--_icon-on-scale)}.forge-switch .input:checked~.handle .icon__off{opacity:0;scale:0.4}.forge-switch .input:checked~.handle forge-state-layer{--forge-state-layer-color:var(--_state-layer-on-color)}.forge-switch .input:active~.track{border-width:var(--_track-active-off-border-width);border-color:var(--_track-active-off-border-color);background-color:var(--_track-active-off-color)}.forge-switch .input:active~.handle::before{scale:var(--_handle-active-off-scale);-webkit-box-shadow:var(--_handle-active-off-elevation);box-shadow:var(--_handle-active-off-elevation);background-color:var(--_handle-active-off-color)}.forge-switch .input:active~.handle .icon{scale:var(--_icon-active-off-scale);color:var(--_icon-active-off-color);fill:var(--_icon-active-off-color)}.forge-switch .input:active:checked~.track{border-width:var(--_track-active-on-border-width);border-color:var(--_track-active-on-border-color);background-color:var(--_track-active-on-color)}.forge-switch .input:active:checked~.handle::before{scale:var(--_handle-active-on-scale);-webkit-box-shadow:var(--_handle-active-on-elevation);box-shadow:var(--_handle-active-on-elevation);background-color:var(--_handle-active-on-color)}.forge-switch .input:active:checked~.handle .icon{scale:var(--_icon-active-on-scale);color:var(--_icon-active-on-color);fill:var(--_icon-active-on-color)}.forge-switch .track{-webkit-transition-property:background-color,border-color,border-width;transition-property:background-color,border-color,border-width;-webkit-transition-duration:var(--_animation-duration);transition-duration:var(--_animation-duration);-webkit-transition-timing-function:var(--_animation-timing);transition-timing-function:var(--_animation-timing);-webkit-box-sizing:border-box;box-sizing:border-box;margin-inline:calc(max(var(--_handle-width),var(--_current-state-layer-width))/ 2 - calc(var(--_track-height)/ 2));border-width:var(--_track-off-border-width);border-color:var(--_track-off-border-color);border-style:solid;border-radius:var(--_track-shape);inline-size:var(--_track-width);block-size:var(--_track-height);background-color:var(--_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(--_animation-duration);transition-duration:var(--_animation-duration);-webkit-transition-timing-function:var(--_animation-timing);transition-timing-function:var(--_animation-timing);border-radius:var(--_handle-shape);inline-size:var(--_current-state-layer-width);block-size:var(--_current-state-layer-height)}.forge-switch .handle::before{content:\"\";position:relative;display:block;scale:var(--_handle-off-scale);-webkit-transition:background-color var(--_animation-duration) var(--_animation-timing),scale var(--_animation-duration) var(--_active-animation-timing),-webkit-box-shadow var(--_animation-duration) var(--_animation-timing);transition:background-color var(--_animation-duration) var(--_animation-timing),scale var(--_animation-duration) var(--_active-animation-timing),-webkit-box-shadow var(--_animation-duration) var(--_animation-timing);transition:background-color var(--_animation-duration) var(--_animation-timing),box-shadow var(--_animation-duration) var(--_animation-timing),scale var(--_animation-duration) var(--_active-animation-timing);transition:background-color var(--_animation-duration) var(--_animation-timing),box-shadow var(--_animation-duration) var(--_animation-timing),scale var(--_animation-duration) var(--_active-animation-timing),-webkit-box-shadow var(--_animation-duration) var(--_animation-timing);-webkit-box-shadow:var(--_handle-off-elevation);box-shadow:var(--_handle-off-elevation);border-radius:var(--_handle-shape);inline-size:var(--_handle-width);block-size:var(--_handle-height);background-color:var(--_handle-off-color)}.forge-switch .icon{--forge-icon-font-size:var(--_icon-off-size);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(--_animation-duration);transition-duration:var(--_animation-duration);-webkit-transition-timing-function:var(--_animation-timing);transition-timing-function:var(--_animation-timing);inline-size:var(--_icon-off-size);block-size:var(--_icon-off-size);color:var(--_icon-off-color);fill:var(--_icon-off-color);font-size:var(--_icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_icon-on-size);inline-size:var(--_icon-on-size);block-size:var(--_icon-on-size);color:var(--_icon-on-color);fill:var(--_icon-on-color);font-size:var(--_icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_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}:host([dense]) .forge-switch{--_current-state-layer-width:var(--_state-layer-dense-width);--_current-state-layer-height:var(--_state-layer-dense-height)}@media (prefers-reduced-motion){.switch{--_animation-duration:0s}}forge-state-layer{--forge-state-layer-color:var(--_state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_track-shape);--forge-focus-indicator-outward-offset:0px}';
|
|
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}';
|
|
16
17
|
/**
|
|
17
18
|
* @tag forge-switch
|
|
18
19
|
*
|
|
@@ -25,17 +26,23 @@ const styles = ':host{display:inline-block;cursor:pointer}:host([hidden]){displa
|
|
|
25
26
|
*
|
|
26
27
|
* @property {boolean} on - Whether the switch is on the on or off state.
|
|
27
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.
|
|
28
32
|
* @property {boolean} disabled - Controls if the switch is disabled.
|
|
29
33
|
* @property {boolean} required = Controls if the switch is required.
|
|
30
|
-
* @property {boolean}
|
|
34
|
+
* @property {boolean} readonly - Controls if the switch is readonly.
|
|
31
35
|
* @property {SwitchIconVisibility} icon - Controls the presence of the off and on icons.
|
|
32
36
|
* @property {SwitchLabelPosition} labelPosition - Whether the label appears before or after the switch.
|
|
33
37
|
*
|
|
34
38
|
* @attribute {string} on - Controls whether the switch is in the on or off state.
|
|
35
|
-
* @attribute {string} selected - Alias for `on`.
|
|
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.
|
|
36
43
|
* @attribute {string} disabled - Controls if the switch is disabled.
|
|
37
44
|
* @attribute {string} required - Controls if the switch is required.
|
|
38
|
-
* @attribute {string}
|
|
45
|
+
* @attribute {string} readonly - Controls if the switch is readonly.
|
|
39
46
|
* @attribute {string} icon - Controls the presence of the off and on icons.
|
|
40
47
|
* @attribute {string} label-position - Sets whether the label appears before or after the switch.
|
|
41
48
|
*
|
|
@@ -87,10 +94,10 @@ const styles = ':host{display:inline-block;cursor:pointer}:host([hidden]){displa
|
|
|
87
94
|
* @cssproperty --forge-switch-icon-off-color - The color of the handle icon in the switch's off state.
|
|
88
95
|
* @cssproperty --forge-switch-icon-active-on-color - The color of the handle icon when the switch is active (pressed) in its on state.
|
|
89
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.
|
|
90
98
|
* @cssproperty --forge-switch-icon-on-size - The size of the handle icon in the switch's on state.
|
|
91
99
|
* @cssproperty --forge-switch-icon-off-size - The size of the handle icon in the switch's off state.
|
|
92
100
|
* @cssproperty --forge-switch-icon-scale - The scale transformation applied to the handle icons.
|
|
93
|
-
* @cssproperty --forge-switch-icon-active-scale - The scale transformation applied to the handle icons when the switch is active (pressed).
|
|
94
101
|
* @cssproperty --forge-switch-icon-on-scale - The scale transformation applied to the handle icons in the switch's on state.
|
|
95
102
|
* @cssproperty --forge-switch-icon-off-scale - The scale transformation applied to the handle icons in the switch's off state.
|
|
96
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.
|
|
@@ -112,35 +119,34 @@ const styles = ':host{display:inline-block;cursor:pointer}:host([hidden]){displa
|
|
|
112
119
|
* @cssproperty --forge-switch-active-animation-timing - The timing function used in active state animations.
|
|
113
120
|
*
|
|
114
121
|
* @csspart switch - Styles the switch container element.
|
|
115
|
-
* @csspart input-container - Styles the wrapper element of the input, track and handle.
|
|
116
|
-
* @csspart input - Styles the input element.
|
|
117
122
|
* @csspart track - Styles the track element.
|
|
118
123
|
* @csspart handle - Styles the handle element.
|
|
119
124
|
* @csspart icon-on - Styles the on icon element.
|
|
120
125
|
* @csspart icon-off - Styles the off icon element.
|
|
121
|
-
* @csspart icon-on-path - Styles the default on icon path.
|
|
122
|
-
* @csspart icon-off-path - Styles the default off icon path.
|
|
123
126
|
* @csspart label - Styles the label element.
|
|
124
|
-
* @csspart state-layer - Styles the state layer element.
|
|
125
|
-
* @csspart focus-indicator - Styles the focus indicator element.
|
|
127
|
+
* @csspart state-layer - Styles the state layer root element.
|
|
128
|
+
* @csspart focus-indicator - Styles the focus indicator root element.
|
|
126
129
|
*/
|
|
127
|
-
let SwitchComponent = class SwitchComponent extends
|
|
130
|
+
let SwitchComponent = class SwitchComponent extends BaseNullableFormComponent {
|
|
128
131
|
static get observedAttributes() {
|
|
129
132
|
return [
|
|
130
133
|
SWITCH_CONSTANTS.attributes.ON,
|
|
131
134
|
SWITCH_CONSTANTS.attributes.SELECTED,
|
|
135
|
+
SWITCH_CONSTANTS.attributes.DEFAULT_ON,
|
|
136
|
+
SWITCH_CONSTANTS.attributes.VALUE,
|
|
137
|
+
SWITCH_CONSTANTS.attributes.DENSE,
|
|
132
138
|
SWITCH_CONSTANTS.attributes.DISABLED,
|
|
133
139
|
SWITCH_CONSTANTS.attributes.REQUIRED,
|
|
134
|
-
SWITCH_CONSTANTS.attributes.
|
|
140
|
+
SWITCH_CONSTANTS.attributes.READONLY,
|
|
135
141
|
SWITCH_CONSTANTS.attributes.ICON,
|
|
136
142
|
SWITCH_CONSTANTS.attributes.LABEL_POSITION
|
|
137
143
|
];
|
|
138
144
|
}
|
|
139
145
|
get form() {
|
|
140
|
-
return this
|
|
146
|
+
return this[internals].form;
|
|
141
147
|
}
|
|
142
148
|
get labels() {
|
|
143
|
-
return this
|
|
149
|
+
return this[internals].labels;
|
|
144
150
|
}
|
|
145
151
|
get name() {
|
|
146
152
|
var _a;
|
|
@@ -151,22 +157,19 @@ let SwitchComponent = class SwitchComponent extends BaseFormComponent {
|
|
|
151
157
|
}
|
|
152
158
|
get validity() {
|
|
153
159
|
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
154
|
-
return this
|
|
160
|
+
return this[internals].validity;
|
|
155
161
|
}
|
|
156
162
|
get validationMessage() {
|
|
157
163
|
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
158
|
-
return this
|
|
164
|
+
return this[internals].validationMessage;
|
|
159
165
|
}
|
|
160
166
|
get willValidate() {
|
|
161
|
-
return this
|
|
167
|
+
return this[internals].willValidate;
|
|
162
168
|
}
|
|
163
169
|
constructor() {
|
|
164
170
|
super();
|
|
165
|
-
// Needed for Safari, see https://bugs.webkit.org/show_bug.cgi?id=261432
|
|
166
|
-
// Replace with this.internals.validity.customError when resolved.
|
|
167
|
-
this._hasCustomValidityError = false;
|
|
168
171
|
attachShadowTemplate(this, template, styles, true);
|
|
169
|
-
this
|
|
172
|
+
this[internals] = this.attachInternals();
|
|
170
173
|
this._foundation = new SwitchFoundation(new SwitchAdapter(this));
|
|
171
174
|
}
|
|
172
175
|
connectedCallback() {
|
|
@@ -175,10 +178,17 @@ let SwitchComponent = class SwitchComponent extends BaseFormComponent {
|
|
|
175
178
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
176
179
|
switch (name) {
|
|
177
180
|
case SWITCH_CONSTANTS.attributes.ON:
|
|
181
|
+
case SWITCH_CONSTANTS.attributes.SELECTED:
|
|
178
182
|
this.on = coerceBoolean(newValue);
|
|
179
183
|
break;
|
|
180
|
-
case SWITCH_CONSTANTS.attributes.
|
|
181
|
-
this.
|
|
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;
|
|
190
|
+
case SWITCH_CONSTANTS.attributes.DENSE:
|
|
191
|
+
this.dense = coerceBoolean(newValue);
|
|
182
192
|
break;
|
|
183
193
|
case SWITCH_CONSTANTS.attributes.DISABLED:
|
|
184
194
|
this.disabled = coerceBoolean(newValue);
|
|
@@ -186,8 +196,8 @@ let SwitchComponent = class SwitchComponent extends BaseFormComponent {
|
|
|
186
196
|
case SWITCH_CONSTANTS.attributes.REQUIRED:
|
|
187
197
|
this.required = coerceBoolean(newValue);
|
|
188
198
|
break;
|
|
189
|
-
case SWITCH_CONSTANTS.attributes.
|
|
190
|
-
this.
|
|
199
|
+
case SWITCH_CONSTANTS.attributes.READONLY:
|
|
200
|
+
this.readonly = coerceBoolean(newValue);
|
|
191
201
|
break;
|
|
192
202
|
case SWITCH_CONSTANTS.attributes.ICON:
|
|
193
203
|
this.icon = newValue;
|
|
@@ -198,12 +208,17 @@ let SwitchComponent = class SwitchComponent extends BaseFormComponent {
|
|
|
198
208
|
}
|
|
199
209
|
}
|
|
200
210
|
setFormValue(value, state) {
|
|
201
|
-
this
|
|
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;
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
202
217
|
if (isString(value)) {
|
|
203
|
-
this.on =
|
|
218
|
+
this.on = !!value;
|
|
204
219
|
}
|
|
205
220
|
else if (value === null || value === void 0 ? void 0 : value[this.name]) {
|
|
206
|
-
this.on =
|
|
221
|
+
this.on = !!value[this.name];
|
|
207
222
|
}
|
|
208
223
|
else {
|
|
209
224
|
this.on = false;
|
|
@@ -211,25 +226,31 @@ let SwitchComponent = class SwitchComponent extends BaseFormComponent {
|
|
|
211
226
|
}
|
|
212
227
|
checkValidity() {
|
|
213
228
|
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
214
|
-
return this
|
|
229
|
+
return this[internals].checkValidity();
|
|
215
230
|
}
|
|
216
231
|
reportValidity() {
|
|
217
232
|
this._foundation.syncValidity(this._hasCustomValidityError);
|
|
218
|
-
return this
|
|
233
|
+
return this[internals].reportValidity();
|
|
219
234
|
}
|
|
220
235
|
setCustomValidity(error) {
|
|
221
236
|
this._hasCustomValidityError = !!error;
|
|
222
237
|
this._foundation.setValidity({ customError: !!error }, error);
|
|
223
238
|
}
|
|
224
239
|
formResetCallback() {
|
|
225
|
-
this.on =
|
|
240
|
+
this.on = this.defaultOn;
|
|
226
241
|
}
|
|
227
242
|
formStateRestoreCallback(state) {
|
|
228
|
-
this.on =
|
|
243
|
+
this.on = state === SWITCH_CONSTANTS.state.ON;
|
|
229
244
|
}
|
|
230
245
|
formDisabledCallback(isDisabled) {
|
|
231
246
|
this.disabled = isDisabled;
|
|
232
247
|
}
|
|
248
|
+
labelClickedCallback() {
|
|
249
|
+
this._foundation.proxyClick();
|
|
250
|
+
}
|
|
251
|
+
labelChangedCallback(value) {
|
|
252
|
+
this._foundation.proxyLabel(value);
|
|
253
|
+
}
|
|
233
254
|
/**
|
|
234
255
|
* Toggles the switch on or off.
|
|
235
256
|
* @param force Whether to set the switch on or off.
|
|
@@ -243,13 +264,18 @@ let SwitchComponent = class SwitchComponent extends BaseFormComponent {
|
|
|
243
264
|
}
|
|
244
265
|
}
|
|
245
266
|
};
|
|
246
|
-
SwitchComponent.formAssociated = true;
|
|
247
267
|
__decorate([
|
|
248
268
|
FoundationProperty()
|
|
249
269
|
], SwitchComponent.prototype, "on", void 0);
|
|
250
270
|
__decorate([
|
|
251
271
|
FoundationProperty({ name: 'on' })
|
|
252
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);
|
|
253
279
|
__decorate([
|
|
254
280
|
FoundationProperty()
|
|
255
281
|
], SwitchComponent.prototype, "dense", void 0);
|
|
@@ -259,6 +285,9 @@ __decorate([
|
|
|
259
285
|
__decorate([
|
|
260
286
|
FoundationProperty()
|
|
261
287
|
], SwitchComponent.prototype, "required", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
FoundationProperty()
|
|
290
|
+
], SwitchComponent.prototype, "readonly", void 0);
|
|
262
291
|
__decorate([
|
|
263
292
|
FoundationProperty()
|
|
264
293
|
], SwitchComponent.prototype, "icon", void 0);
|
|
@@ -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
|
package/esm/table/table-utils.js
CHANGED
|
@@ -141,7 +141,15 @@ export class TableUtils {
|
|
|
141
141
|
th.scope = 'col';
|
|
142
142
|
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL], th);
|
|
143
143
|
// We wrap the header text in a div for ease of alignment
|
|
144
|
-
|
|
144
|
+
let cellContainer;
|
|
145
|
+
if (columnConfig.sortable) {
|
|
146
|
+
cellContainer = document.createElement('button');
|
|
147
|
+
cellContainer.type = 'button';
|
|
148
|
+
cellContainer.addEventListener('keydown', tableConfiguration.sortableHeadCellKeydownListener);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
cellContainer = document.createElement('div');
|
|
152
|
+
}
|
|
145
153
|
cellContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_CONTAINER);
|
|
146
154
|
// Add tooltip for multisort
|
|
147
155
|
if (tableConfiguration.multiColumnSort) {
|
|
@@ -236,6 +244,7 @@ export class TableUtils {
|
|
|
236
244
|
*/
|
|
237
245
|
static setSortDirection(tableElement, columnIndex, sortDirection) {
|
|
238
246
|
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
247
|
+
tableElement.querySelectorAll('th[aria-sort]').forEach(th => th.removeAttribute('aria-sort'));
|
|
239
248
|
TableUtils._setColumnSortDirection(cell, sortDirection);
|
|
240
249
|
}
|
|
241
250
|
/**
|
|
@@ -251,9 +260,11 @@ export class TableUtils {
|
|
|
251
260
|
thElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
252
261
|
}
|
|
253
262
|
if (!sortDirection || sortDirection === SortDirection.Descending) {
|
|
263
|
+
thElement.setAttribute('aria-sort', 'descending');
|
|
254
264
|
thElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
255
265
|
}
|
|
256
266
|
else {
|
|
267
|
+
thElement.setAttribute('aria-sort', 'ascending');
|
|
257
268
|
thElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
|
258
269
|
}
|
|
259
270
|
}
|
|
@@ -885,6 +896,7 @@ export class TableUtils {
|
|
|
885
896
|
*/
|
|
886
897
|
static removeColumnSort(tableElement, columnIndex) {
|
|
887
898
|
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
899
|
+
cell.removeAttribute('aria-sort');
|
|
888
900
|
// Remove any existing sort direction classes from the existing th element
|
|
889
901
|
if (cell.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)) {
|
|
890
902
|
cell.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
package/esm/table/types.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface ITableConfiguration {
|
|
|
38
38
|
doubleClickListener: ((evt: Event) => void) | null;
|
|
39
39
|
selectListener: ((evt: Event) => void) | null;
|
|
40
40
|
selectAllListener: ((evt: Event) => void) | null;
|
|
41
|
+
sortableHeadCellKeydownListener: EventListener;
|
|
41
42
|
headRowMouseDownListener: (evt: Event) => void;
|
|
42
43
|
headRowContextMenuListener: (evt: Event) => void;
|
|
43
44
|
filterListener: ((value: any, columnIndex: number) => void) | null;
|
package/esm/tabs/tab/tab.js
CHANGED
|
@@ -11,8 +11,8 @@ import { TAB_CONSTANTS } from './tab-constants';
|
|
|
11
11
|
import { BaseComponent } from '../../core/base/base-component';
|
|
12
12
|
import { FocusIndicatorComponent } from '../../focus-indicator/focus-indicator';
|
|
13
13
|
import { StateLayerComponent } from '../../state-layer/state-layer';
|
|
14
|
-
const template = '<template><div class=\"forge-tab\" part=\"container\"><span class=\"content\" part=\"content\"><slot name=\"leading\"></slot><span class=\"label\" part=\"label\"><slot></slot></span><slot name=\"trailing\"></slot><span class=\"indicator\" part=\"indicator\"></span></span><forge-state-layer exportparts=\"surface:state-
|
|
15
|
-
const styles = ':host{display:-webkit-inline-box;display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}
|
|
14
|
+
const template = '<template><div class=\"forge-tab\" part=\"container\"><span class=\"content\" part=\"content\"><slot name=\"leading\"></slot><span class=\"label\" part=\"label\"><slot></slot></span><slot name=\"trailing\"></slot><span class=\"indicator\" part=\"indicator\"></span></span><forge-state-layer exportparts=\"surface:state-layer\" target=\":host\"></forge-state-layer><forge-focus-indicator exportparts=\"indicator:focus-indicator\" target=\":host\" inward></forge-focus-indicator></div></template>';
|
|
15
|
+
const styles = ':host{display:-webkit-inline-box;display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.54)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-button-text-decoration,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding:0;margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:-webkit-inline-box;display:inline-flex;position:relative;-webkit-writing-mode:horizontal-tb;-ms-writing-mode:lr-tb;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;white-space:nowrap;-webkit-transition:150ms color linear;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding));min-height:var(--_tab-content-height);padding:var(--_tab-content-padding) calc(2 * var(--_tab-content-padding));gap:var(--_tab-content-padding)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:-1;-webkit-transform-origin:bottom left;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([secondary]) .forge-tab{--_tab-indicator-height:var(--_tab-secondary-indicator-height);--_tab-indicator-shape:var(--_tab-secondary-indicator-shape)}:host([secondary]) .content{width:100%}:host([secondary]) .indicator{min-width:100%}:host([vertical]) .forge-tab{width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical][secondary]) .content{min-height:100%}:host([vertical]:not([secondary])) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;-webkit-transform-origin:top left;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}';
|
|
16
16
|
/**
|
|
17
17
|
* @tag forge-tab
|
|
18
18
|
*
|