@tylertech/forge 3.0.0-next.11 → 3.0.0-next.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (849) hide show
  1. package/README.md +1 -6
  2. package/custom-elements.json +63803 -41782
  3. package/dist/esm/accordion/index.js +1 -1
  4. package/dist/esm/app-bar/help-button/index.js +1 -1
  5. package/dist/esm/app-bar/index.js +1 -1
  6. package/dist/esm/app-bar/menu-button/index.js +1 -1
  7. package/dist/esm/app-bar/notification-button/index.js +1 -1
  8. package/dist/esm/app-bar/profile-button/index.js +1 -1
  9. package/dist/esm/app-bar/search/index.js +1 -1
  10. package/dist/esm/autocomplete/index.js +1 -1
  11. package/dist/esm/avatar/index.js +1 -1
  12. package/dist/esm/backdrop/index.js +1 -1
  13. package/dist/esm/badge/index.js +1 -1
  14. package/dist/esm/banner/index.js +1 -1
  15. package/dist/esm/bottom-sheet/index.js +1 -1
  16. package/dist/esm/busy-indicator/index.js +1 -1
  17. package/dist/esm/button/index.js +1 -1
  18. package/dist/esm/button-area/index.js +7 -0
  19. package/dist/esm/button-area/index.js.map +7 -0
  20. package/dist/esm/button-toggle/button-toggle/index.js +1 -1
  21. package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
  22. package/dist/esm/button-toggle/index.js +1 -1
  23. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  24. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  25. package/dist/esm/calendar/index.js +1 -1
  26. package/dist/esm/card/index.js +1 -1
  27. package/dist/esm/checkbox/index.js +1 -1
  28. package/dist/esm/chip-field/index.js +1 -1
  29. package/dist/esm/chips/chip/index.js +1 -1
  30. package/dist/esm/chips/chip-set/index.js +1 -1
  31. package/dist/esm/chips/index.js +1 -1
  32. package/dist/esm/chunks/{chunk.SMGXXR6K.js → chunk.2MSL7CYM.js} +2 -2
  33. package/dist/esm/chunks/chunk.2ZU6LWHE.js +7 -0
  34. package/dist/esm/chunks/chunk.2ZU6LWHE.js.map +7 -0
  35. package/dist/esm/chunks/{chunk.COVTBIQQ.js → chunk.36C6SIPW.js} +2 -2
  36. package/dist/esm/chunks/{chunk.COVTBIQQ.js.map → chunk.36C6SIPW.js.map} +2 -2
  37. package/dist/esm/chunks/chunk.36F2GVWS.js +7 -0
  38. package/dist/esm/chunks/chunk.36F2GVWS.js.map +7 -0
  39. package/dist/esm/chunks/{chunk.M56LSSPW.js → chunk.3HCYRDRI.js} +2 -2
  40. package/dist/esm/chunks/{chunk.4ZKX3SO5.js → chunk.3R4BUIQP.js} +2 -2
  41. package/dist/esm/chunks/{chunk.YWNCJ7XP.js → chunk.3ZPSN2QG.js} +2 -2
  42. package/dist/esm/chunks/chunk.4SPEX2GJ.js +7 -0
  43. package/dist/esm/chunks/chunk.4SPEX2GJ.js.map +7 -0
  44. package/dist/esm/chunks/chunk.4YFJVHXN.js +7 -0
  45. package/dist/esm/chunks/chunk.4YFJVHXN.js.map +7 -0
  46. package/dist/esm/chunks/chunk.5A2PA7TL.js +7 -0
  47. package/dist/esm/chunks/chunk.5A2PA7TL.js.map +7 -0
  48. package/dist/esm/chunks/chunk.5CSXPRL3.js +7 -0
  49. package/dist/esm/chunks/chunk.5CSXPRL3.js.map +7 -0
  50. package/dist/esm/chunks/chunk.5LVZVQXB.js +7 -0
  51. package/dist/esm/chunks/{chunk.MGLL67VO.js.map → chunk.5LVZVQXB.js.map} +2 -2
  52. package/dist/esm/chunks/{chunk.LFODKHUO.js → chunk.5N4N6DL6.js} +2 -2
  53. package/dist/esm/chunks/chunk.5PG6WIIX.js +7 -0
  54. package/dist/esm/chunks/chunk.5PG6WIIX.js.map +7 -0
  55. package/dist/esm/chunks/{chunk.JIKSKUDW.js → chunk.5RM65QPN.js} +2 -2
  56. package/dist/esm/chunks/{chunk.JIKSKUDW.js.map → chunk.5RM65QPN.js.map} +3 -3
  57. package/dist/esm/chunks/chunk.5WMYF27O.js +7 -0
  58. package/dist/esm/chunks/chunk.5WMYF27O.js.map +7 -0
  59. package/dist/esm/chunks/{chunk.QOJESHEV.js → chunk.675V42JS.js} +2 -2
  60. package/dist/esm/chunks/chunk.6M27ERWW.js +12 -0
  61. package/dist/esm/chunks/chunk.6M27ERWW.js.map +7 -0
  62. package/dist/esm/chunks/chunk.6NTYTHAL.js +7 -0
  63. package/dist/esm/chunks/chunk.6NTYTHAL.js.map +7 -0
  64. package/dist/esm/chunks/chunk.6ZNBFKNP.js +7 -0
  65. package/dist/esm/chunks/chunk.6ZNBFKNP.js.map +7 -0
  66. package/dist/esm/chunks/{chunk.7TMLILLW.js → chunk.72JVXGHF.js} +2 -2
  67. package/dist/esm/chunks/{chunk.7TMLILLW.js.map → chunk.72JVXGHF.js.map} +1 -1
  68. package/dist/esm/chunks/chunk.7V4BDSA5.js +7 -0
  69. package/dist/esm/chunks/chunk.7V4BDSA5.js.map +7 -0
  70. package/dist/esm/chunks/chunk.7VMJLHQY.js +7 -0
  71. package/dist/esm/chunks/chunk.7VMJLHQY.js.map +7 -0
  72. package/dist/esm/chunks/chunk.7ZROQ6D3.js +7 -0
  73. package/dist/esm/chunks/chunk.7ZROQ6D3.js.map +7 -0
  74. package/dist/esm/chunks/{chunk.DG4ZM3AW.js → chunk.AMLT6XJP.js} +2 -2
  75. package/dist/esm/chunks/chunk.AMZZKEAE.js +7 -0
  76. package/dist/esm/chunks/chunk.AMZZKEAE.js.map +7 -0
  77. package/dist/esm/chunks/{chunk.MTKSU2BV.js → chunk.APPY5AYL.js} +2 -2
  78. package/dist/esm/chunks/{chunk.4YFVG4KP.js → chunk.ARQMMZJL.js} +2 -2
  79. package/dist/esm/chunks/chunk.AUBOJZQ7.js +7 -0
  80. package/dist/esm/chunks/chunk.AUBOJZQ7.js.map +7 -0
  81. package/dist/esm/chunks/chunk.AUCBR6CC.js +7 -0
  82. package/dist/esm/chunks/{chunk.SFCGOCQK.js.map → chunk.AUCBR6CC.js.map} +2 -2
  83. package/dist/esm/chunks/{chunk.5MZ5SGMO.js → chunk.BB4UF5RX.js} +2 -2
  84. package/dist/esm/chunks/chunk.BBCZNGT3.js +7 -0
  85. package/dist/esm/chunks/chunk.BBCZNGT3.js.map +7 -0
  86. package/dist/esm/chunks/chunk.BQ2X5SBP.js +7 -0
  87. package/dist/esm/chunks/{chunk.TYLOAD7R.js.map → chunk.BQ2X5SBP.js.map} +2 -2
  88. package/dist/esm/chunks/chunk.BTXY3XMJ.js +7 -0
  89. package/dist/esm/chunks/chunk.BTXY3XMJ.js.map +7 -0
  90. package/dist/esm/chunks/{chunk.Q7Z3SJ5F.js → chunk.DTLZOIUQ.js} +2 -2
  91. package/dist/esm/chunks/chunk.EJX6RI4I.js +7 -0
  92. package/dist/esm/chunks/chunk.EJX6RI4I.js.map +7 -0
  93. package/dist/esm/chunks/chunk.EWK76SPH.js +7 -0
  94. package/dist/esm/chunks/chunk.EWK76SPH.js.map +7 -0
  95. package/dist/esm/chunks/chunk.FAXYCG55.js +7 -0
  96. package/dist/esm/chunks/chunk.FAXYCG55.js.map +7 -0
  97. package/dist/esm/chunks/chunk.FFHSUJFM.js +7 -0
  98. package/dist/esm/chunks/chunk.FFHSUJFM.js.map +7 -0
  99. package/dist/esm/chunks/{chunk.OWCYRSI3.js → chunk.FLWNOP42.js} +2 -2
  100. package/dist/esm/chunks/{chunk.S3JMOOWC.js → chunk.FXIWCHLW.js} +2 -2
  101. package/dist/esm/chunks/chunk.FYVDTZLF.js +7 -0
  102. package/dist/esm/chunks/{chunk.CDGZYUQS.js.map → chunk.FYVDTZLF.js.map} +2 -2
  103. package/dist/esm/chunks/chunk.G73KL7P2.js +7 -0
  104. package/dist/esm/chunks/{chunk.7DB3XVPI.js.map → chunk.G73KL7P2.js.map} +3 -3
  105. package/dist/esm/chunks/chunk.G7SMCLHQ.js +7 -0
  106. package/dist/esm/chunks/chunk.G7SMCLHQ.js.map +7 -0
  107. package/dist/esm/chunks/chunk.GHR7T6U2.js +7 -0
  108. package/dist/esm/chunks/chunk.GHR7T6U2.js.map +7 -0
  109. package/dist/esm/chunks/{chunk.CWTV3TB3.js → chunk.GNDKQPDV.js} +2 -2
  110. package/dist/esm/chunks/{chunk.ULY4H76N.js → chunk.HAKF2T2D.js} +2 -2
  111. package/dist/esm/chunks/chunk.HDG2GHKC.js +7 -0
  112. package/dist/esm/chunks/{chunk.SBYX7VZ4.js.map → chunk.HDG2GHKC.js.map} +2 -2
  113. package/dist/esm/chunks/{chunk.WPG7NNQX.js → chunk.HOLCNJXC.js} +2 -2
  114. package/dist/esm/chunks/{chunk.W4247Q2P.js → chunk.HRRJIFC5.js} +2 -2
  115. package/dist/esm/chunks/chunk.HSI7B43D.js +7 -0
  116. package/dist/esm/chunks/chunk.HSI7B43D.js.map +7 -0
  117. package/dist/esm/chunks/chunk.IAWYYNUU.js +7 -0
  118. package/dist/esm/chunks/chunk.IAWYYNUU.js.map +7 -0
  119. package/dist/esm/chunks/{chunk.SU4FU7GK.js → chunk.IDMDBMBR.js} +2 -2
  120. package/dist/esm/chunks/{chunk.FCATJM34.js → chunk.IHAHJPMB.js} +2 -2
  121. package/dist/esm/chunks/chunk.IISWKFCX.js +7 -0
  122. package/dist/esm/chunks/chunk.IISWKFCX.js.map +7 -0
  123. package/dist/esm/chunks/{chunk.XKI46BH2.js → chunk.IMLJD35R.js} +2 -2
  124. package/dist/esm/chunks/{chunk.624UKZFU.js → chunk.IT7XPDAV.js} +2 -2
  125. package/dist/esm/chunks/{chunk.MVTBJPO2.js → chunk.JAWV5Y5T.js} +1 -1
  126. package/dist/esm/chunks/{chunk.MVTBJPO2.js.map → chunk.JAWV5Y5T.js.map} +2 -2
  127. package/dist/esm/chunks/{chunk.JLLHDJSO.js → chunk.JVLJH6PR.js} +2 -2
  128. package/dist/esm/chunks/chunk.KPJWP77R.js +7 -0
  129. package/dist/esm/chunks/{chunk.2EWV2XBP.js → chunk.KV5IKYG2.js} +2 -2
  130. package/dist/esm/chunks/chunk.KV67JXOC.js +7 -0
  131. package/dist/esm/chunks/{chunk.B4T3R53C.js.map → chunk.KV67JXOC.js.map} +2 -2
  132. package/dist/esm/chunks/{chunk.A62DE5PD.js → chunk.LCR4YH3O.js} +2 -2
  133. package/dist/esm/chunks/{chunk.FWFOOQMA.js → chunk.LOG6GQOK.js} +2 -2
  134. package/dist/esm/chunks/chunk.LUIKMPQR.js +7 -0
  135. package/dist/esm/chunks/chunk.LUIKMPQR.js.map +7 -0
  136. package/dist/esm/chunks/chunk.LUNKNRRH.js +7 -0
  137. package/dist/esm/chunks/chunk.LUNKNRRH.js.map +7 -0
  138. package/dist/esm/chunks/chunk.MKJCHUJH.js +7 -0
  139. package/dist/esm/chunks/chunk.MKJCHUJH.js.map +7 -0
  140. package/dist/esm/chunks/chunk.MWYQRG5W.js +7 -0
  141. package/dist/esm/chunks/{chunk.YX7WLO5Y.js.map → chunk.MWYQRG5W.js.map} +2 -2
  142. package/dist/esm/chunks/{chunk.YLG6ZC5K.js → chunk.NUMKGUCK.js} +2 -2
  143. package/dist/esm/chunks/{chunk.XI3MJSIS.js → chunk.O6V3YNMO.js} +2 -2
  144. package/dist/esm/chunks/chunk.OWZREAT6.js +15 -0
  145. package/dist/esm/chunks/chunk.OWZREAT6.js.map +7 -0
  146. package/dist/esm/chunks/chunk.PMYQY3D3.js +7 -0
  147. package/dist/esm/chunks/chunk.PMYQY3D3.js.map +7 -0
  148. package/dist/esm/chunks/chunk.PYR2OCCH.js +7 -0
  149. package/dist/esm/chunks/{chunk.5565ZSTH.js.map → chunk.PYR2OCCH.js.map} +2 -2
  150. package/dist/esm/chunks/chunk.QJCNMYD3.js +7 -0
  151. package/dist/esm/chunks/{chunk.SJJS4LYN.js.map → chunk.QJCNMYD3.js.map} +2 -2
  152. package/dist/esm/chunks/{chunk.TK5I4RHF.js → chunk.QLCVRJ3Q.js} +2 -2
  153. package/dist/esm/chunks/chunk.QLOYOZN3.js +7 -0
  154. package/dist/esm/chunks/{chunk.F5SY2D4B.js.map → chunk.QLOYOZN3.js.map} +3 -3
  155. package/dist/esm/chunks/chunk.QN5T26HH.js +7 -0
  156. package/dist/esm/chunks/chunk.QN5T26HH.js.map +7 -0
  157. package/dist/esm/chunks/chunk.QQRPV4RN.js +7 -0
  158. package/dist/esm/chunks/{chunk.PEBT47AU.js.map → chunk.QQRPV4RN.js.map} +2 -2
  159. package/dist/esm/chunks/chunk.R6LQBI42.js +177 -0
  160. package/dist/esm/chunks/chunk.R6LQBI42.js.map +7 -0
  161. package/dist/esm/chunks/chunk.RES7WDKH.js +7 -0
  162. package/dist/esm/chunks/chunk.RES7WDKH.js.map +7 -0
  163. package/dist/esm/chunks/chunk.RP674CRC.js +7 -0
  164. package/dist/esm/chunks/chunk.S5QL4SPT.js +7 -0
  165. package/dist/esm/chunks/chunk.S5QL4SPT.js.map +7 -0
  166. package/dist/esm/chunks/chunk.SIRXAA3O.js +7 -0
  167. package/dist/esm/chunks/chunk.SIRXAA3O.js.map +7 -0
  168. package/dist/esm/chunks/{chunk.LTT67HTW.js → chunk.SLJ6HDK7.js} +2 -2
  169. package/dist/esm/chunks/chunk.STB2FEUA.js +7 -0
  170. package/dist/esm/chunks/chunk.STB2FEUA.js.map +7 -0
  171. package/dist/esm/chunks/chunk.TBGMJQYJ.js +7 -0
  172. package/dist/esm/chunks/chunk.TBGMJQYJ.js.map +7 -0
  173. package/dist/esm/chunks/{chunk.6OW6Q3EW.js → chunk.TU74SREL.js} +2 -2
  174. package/dist/esm/chunks/{chunk.EK24Y56W.js → chunk.URJQNB3S.js} +2 -2
  175. package/dist/esm/chunks/{chunk.AEKOP3XT.js → chunk.V24M62MC.js} +2 -2
  176. package/dist/esm/chunks/{chunk.AEKOP3XT.js.map → chunk.V24M62MC.js.map} +2 -2
  177. package/dist/esm/chunks/chunk.VFKHRAWD.js +7 -0
  178. package/dist/esm/chunks/chunk.VFKHRAWD.js.map +7 -0
  179. package/dist/esm/chunks/chunk.VO6YJCEU.js +7 -0
  180. package/dist/esm/chunks/chunk.VO6YJCEU.js.map +7 -0
  181. package/dist/esm/chunks/{chunk.K3KAM2PL.js → chunk.W2LN45WY.js} +2 -2
  182. package/dist/esm/chunks/{chunk.MHBBMC6O.js → chunk.WMVYRDUJ.js} +2 -2
  183. package/dist/esm/chunks/{chunk.MHBBMC6O.js.map → chunk.WMVYRDUJ.js.map} +2 -2
  184. package/dist/esm/chunks/chunk.WY3E33CW.js +7 -0
  185. package/dist/esm/chunks/chunk.WY3E33CW.js.map +7 -0
  186. package/dist/esm/chunks/{chunk.Z6FCL3G3.js → chunk.XEFWZKHQ.js} +2 -2
  187. package/dist/esm/chunks/{chunk.NR3MLTXF.js → chunk.XLL7L2UB.js} +2 -2
  188. package/dist/esm/chunks/chunk.XNFS7YIB.js +7 -0
  189. package/dist/esm/chunks/chunk.XNFS7YIB.js.map +7 -0
  190. package/dist/esm/chunks/chunk.XYAZVLPR.js +7 -0
  191. package/dist/esm/chunks/chunk.YA3RDJCV.js +7 -0
  192. package/dist/esm/chunks/chunk.YA3RDJCV.js.map +7 -0
  193. package/dist/esm/chunks/{chunk.2QHD3DCR.js → chunk.YAERJVPL.js} +2 -2
  194. package/dist/esm/chunks/chunk.YBZK6LJZ.js +7 -0
  195. package/dist/esm/chunks/chunk.YKIBREM5.js +7 -0
  196. package/dist/esm/chunks/chunk.YKIBREM5.js.map +7 -0
  197. package/dist/esm/chunks/chunk.YWAUEUAH.js +7 -0
  198. package/dist/esm/chunks/chunk.YWAUEUAH.js.map +7 -0
  199. package/dist/esm/chunks/chunk.Z5RROENA.js +7 -0
  200. package/dist/esm/chunks/{chunk.6OUJSOJY.js.map → chunk.Z5RROENA.js.map} +3 -3
  201. package/dist/esm/chunks/{chunk.ZJC2DSNM.js → chunk.Z5ZLKM7W.js} +2 -2
  202. package/dist/esm/chunks/chunk.ZGRQDDHO.js +7 -0
  203. package/dist/esm/chunks/{chunk.BY25RT52.js.map → chunk.ZGRQDDHO.js.map} +2 -2
  204. package/dist/esm/chunks/{chunk.VSQOTSAO.js → chunk.ZKM667OT.js} +2 -2
  205. package/dist/esm/chunks/{chunk.VSQOTSAO.js.map → chunk.ZKM667OT.js.map} +2 -2
  206. package/dist/esm/chunks/chunk.ZRSDTCSD.js +7 -0
  207. package/dist/esm/chunks/chunk.ZRSDTCSD.js.map +7 -0
  208. package/dist/esm/chunks/chunk.ZSZFWZAI.js +7 -0
  209. package/dist/esm/chunks/chunk.ZSZFWZAI.js.map +7 -0
  210. package/dist/esm/circular-progress/index.js +1 -1
  211. package/dist/esm/color-picker/index.js +1 -1
  212. package/dist/esm/core/base/index.js +1 -1
  213. package/dist/esm/core/index.js +1 -1
  214. package/dist/esm/core/utils/index.js +1 -1
  215. package/dist/esm/date-picker/index.js +1 -1
  216. package/dist/esm/date-range-picker/index.js +1 -1
  217. package/dist/esm/dialog/index.js +1 -1
  218. package/dist/esm/divider/index.js +1 -1
  219. package/dist/esm/drawer/base/index.js +1 -1
  220. package/dist/esm/drawer/drawer/index.js +1 -1
  221. package/dist/esm/drawer/index.js +1 -1
  222. package/dist/esm/drawer/mini-drawer/index.js +1 -1
  223. package/dist/esm/drawer/modal-drawer/index.js +1 -1
  224. package/dist/esm/expansion-panel/index.js +1 -1
  225. package/dist/esm/file-picker/index.js +1 -1
  226. package/dist/esm/floating-action-button/index.js +1 -1
  227. package/dist/esm/floating-label/index.js +1 -1
  228. package/dist/esm/focus-indicator/index.js +1 -1
  229. package/dist/esm/icon/index.js +1 -1
  230. package/dist/esm/icon-button/index.js +1 -1
  231. package/dist/esm/index.js +1 -1
  232. package/dist/esm/inline-message/index.js +1 -1
  233. package/dist/esm/keyboard-shortcut/index.js +1 -1
  234. package/dist/esm/label/index.js +7 -0
  235. package/dist/esm/label/index.js.map +7 -0
  236. package/dist/esm/label-value/index.js +1 -1
  237. package/dist/esm/linear-progress/index.js +1 -1
  238. package/dist/esm/list/index.js +1 -1
  239. package/dist/esm/list/list/index.js +1 -1
  240. package/dist/esm/list/list-item/index.js +1 -1
  241. package/dist/esm/list-dropdown/index.js +1 -1
  242. package/dist/esm/menu/index.js +1 -1
  243. package/dist/esm/open-icon/index.js +1 -1
  244. package/dist/esm/page-state/index.js +1 -1
  245. package/dist/esm/paginator/index.js +1 -1
  246. package/dist/esm/popup/index.js +1 -1
  247. package/dist/esm/product-icon/index.js +1 -1
  248. package/dist/esm/profile-card/index.js +1 -1
  249. package/dist/esm/quantity-field/index.js +1 -1
  250. package/dist/esm/radio/index.js +1 -1
  251. package/dist/esm/ripple/index.js +1 -1
  252. package/dist/esm/scaffold/index.js +1 -1
  253. package/dist/esm/select/core/index.js +1 -1
  254. package/dist/esm/select/index.js +1 -1
  255. package/dist/esm/select/option/index.js +1 -1
  256. package/dist/esm/select/option-group/index.js +1 -1
  257. package/dist/esm/select/select/index.js +1 -1
  258. package/dist/esm/select/select-dropdown/index.js +1 -1
  259. package/dist/esm/skeleton/index.js +1 -1
  260. package/dist/esm/slider/index.js +1 -1
  261. package/dist/esm/split-button/index.js +7 -0
  262. package/dist/esm/split-button/index.js.map +7 -0
  263. package/dist/esm/split-view/index.js +1 -1
  264. package/dist/esm/split-view/split-view/index.js +1 -1
  265. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  266. package/dist/esm/stack/index.js +1 -1
  267. package/dist/esm/state-layer/index.js +1 -1
  268. package/dist/esm/stepper/index.js +1 -1
  269. package/dist/esm/stepper/step/index.js +1 -1
  270. package/dist/esm/stepper/stepper/index.js +1 -1
  271. package/dist/esm/switch/index.js +1 -1
  272. package/dist/esm/table/index.js +1 -1
  273. package/dist/esm/tabs/index.js +1 -1
  274. package/dist/esm/tabs/tab/index.js +1 -1
  275. package/dist/esm/tabs/tab-bar/index.js +1 -1
  276. package/dist/esm/text-field/index.js +1 -1
  277. package/dist/esm/time-picker/index.js +1 -1
  278. package/dist/esm/toast/index.js +1 -1
  279. package/dist/esm/toolbar/index.js +1 -1
  280. package/dist/esm/tooltip/index.js +1 -1
  281. package/dist/esm/view-switcher/index.js +1 -1
  282. package/dist/esm/view-switcher/view/index.js +1 -1
  283. package/dist/forge-dark.css +1 -1
  284. package/dist/forge.css +1 -1
  285. package/dist/table/forge-table.css +1 -1
  286. package/dist/theme/forge-theme.css +1 -1
  287. package/dist/typography/forge-typography-legacy.css +1 -1
  288. package/dist/typography/forge-typography.css +1 -1
  289. package/esm/app-bar/app-bar.js +1 -1
  290. package/esm/app-bar/help-button/app-bar-help-button.js +1 -1
  291. package/esm/app-bar/menu-button/app-bar-menu-button.js +1 -1
  292. package/esm/app-bar/notification-button/app-bar-notification-button.js +1 -1
  293. package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +1 -1
  294. package/esm/app-bar/profile-button/app-bar-profile-button.js +1 -1
  295. package/esm/autocomplete/autocomplete-constants.d.ts +3 -0
  296. package/esm/autocomplete/autocomplete-foundation.d.ts +3 -1
  297. package/esm/autocomplete/autocomplete-foundation.js +16 -2
  298. package/esm/autocomplete/autocomplete.d.ts +7 -1
  299. package/esm/autocomplete/autocomplete.js +7 -0
  300. package/esm/banner/banner-constants.js +1 -1
  301. package/esm/banner/banner.js +2 -2
  302. package/esm/bottom-sheet/bottom-sheet.js +1 -1
  303. package/esm/busy-indicator/busy-indicator.js +2 -2
  304. package/esm/button/base/base-button-adapter.d.ts +72 -0
  305. package/esm/button/base/base-button-adapter.js +250 -0
  306. package/esm/button/base/base-button-constants.d.ts +41 -0
  307. package/esm/button/base/base-button-constants.js +32 -0
  308. package/esm/button/base/base-button-foundation.d.ts +75 -0
  309. package/esm/button/base/base-button-foundation.js +234 -0
  310. package/esm/button/base/base-button.d.ts +51 -0
  311. package/esm/button/base/base-button.js +106 -0
  312. package/esm/button/button-adapter.d.ts +14 -0
  313. package/esm/button/button-adapter.js +14 -0
  314. package/esm/button/button-component-delegate.d.ts +4 -4
  315. package/esm/button/button-component-delegate.js +13 -17
  316. package/esm/button/button-constants.d.ts +10 -18
  317. package/esm/button/button-constants.js +6 -22
  318. package/esm/button/button-foundation.d.ts +25 -0
  319. package/esm/button/button-foundation.js +49 -0
  320. package/esm/button/button.d.ts +126 -30
  321. package/esm/button/button.js +160 -159
  322. package/esm/button/index.d.ts +3 -1
  323. package/esm/button/index.js +3 -1
  324. package/esm/button-area/button-area-adapter.d.ts +48 -0
  325. package/esm/button-area/button-area-adapter.js +121 -0
  326. package/esm/button-area/button-area-constants.d.ts +24 -0
  327. package/esm/button-area/button-area-constants.js +30 -0
  328. package/esm/button-area/button-area-foundation.d.ts +29 -0
  329. package/esm/button-area/button-area-foundation.js +94 -0
  330. package/esm/button-area/button-area.d.ts +29 -0
  331. package/esm/button-area/button-area.js +55 -0
  332. package/esm/button-area/index.d.ts +10 -0
  333. package/esm/button-area/index.js +14 -0
  334. package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
  335. package/esm/calendar/calendar-dom-utils.js +18 -30
  336. package/esm/calendar/calendar-foundation.js +6 -0
  337. package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
  338. package/esm/calendar/calendar.js +1 -1
  339. package/esm/checkbox/checkbox-adapter.d.ts +50 -59
  340. package/esm/checkbox/checkbox-adapter.js +104 -186
  341. package/esm/checkbox/checkbox-component-delegate.d.ts +18 -9
  342. package/esm/checkbox/checkbox-component-delegate.js +58 -51
  343. package/esm/checkbox/checkbox-constants.d.ts +14 -56
  344. package/esm/checkbox/checkbox-constants.js +17 -50
  345. package/esm/checkbox/checkbox-foundation.d.ts +48 -18
  346. package/esm/checkbox/checkbox-foundation.js +139 -139
  347. package/esm/checkbox/checkbox.d.ts +120 -9
  348. package/esm/checkbox/checkbox.js +235 -36
  349. package/esm/checkbox/index.d.ts +1 -1
  350. package/esm/checkbox/index.js +1 -1
  351. package/esm/chip-field/chip-field-adapter.js +1 -1
  352. package/esm/chip-field/chip-field-constants.d.ts +3 -0
  353. package/esm/chip-field/chip-field-constants.js +4 -0
  354. package/esm/chip-field/chip-field-foundation.d.ts +5 -0
  355. package/esm/chip-field/chip-field-foundation.js +20 -1
  356. package/esm/chip-field/chip-field.d.ts +5 -0
  357. package/esm/chip-field/chip-field.js +21 -3
  358. package/esm/chips/chip/chip.js +1 -1
  359. package/esm/circular-progress/circular-progress-constants.d.ts +4 -0
  360. package/esm/circular-progress/circular-progress-constants.js +2 -0
  361. package/esm/circular-progress/circular-progress-foundation.d.ts +9 -0
  362. package/esm/circular-progress/circular-progress-foundation.js +21 -0
  363. package/esm/circular-progress/circular-progress.d.ts +15 -2
  364. package/esm/circular-progress/circular-progress.js +25 -3
  365. package/esm/color-picker/color-picker.js +2 -2
  366. package/esm/constants.d.ts +7 -0
  367. package/esm/constants.js +4 -0
  368. package/esm/core/base/base-adapter.d.ts +18 -3
  369. package/esm/core/base/base-adapter.js +30 -2
  370. package/esm/core/base/base-component.d.ts +0 -1
  371. package/esm/core/base/base-component.js +0 -1
  372. package/esm/core/base/base-focusable-component.d.ts +49 -0
  373. package/esm/core/base/base-focusable-component.js +90 -0
  374. package/esm/core/base/base-form-component.d.ts +45 -0
  375. package/esm/core/base/base-form-component.js +19 -0
  376. package/esm/core/base/base-nullable-form-component.d.ts +35 -0
  377. package/esm/core/base/base-nullable-form-component.js +20 -0
  378. package/esm/core/keyboard/key-manager.d.ts +18 -0
  379. package/esm/core/keyboard/key-manager.js +47 -0
  380. package/esm/core/utils/feature-detection.d.ts +10 -0
  381. package/esm/core/utils/feature-detection.js +12 -0
  382. package/esm/core/utils/index.d.ts +2 -0
  383. package/esm/core/utils/index.js +2 -0
  384. package/esm/core/utils/reflect-utils.d.ts +107 -0
  385. package/esm/core/utils/reflect-utils.js +227 -0
  386. package/esm/core/utils/utils.d.ts +8 -0
  387. package/esm/core/utils/utils.js +15 -0
  388. package/esm/date-picker/base/base-date-picker-foundation.js +1 -1
  389. package/esm/date-picker/base/base-date-picker-utils.js +5 -8
  390. package/esm/date-range-picker/date-range-picker-foundation.js +2 -2
  391. package/esm/drawer/drawer/drawer.js +1 -1
  392. package/esm/drawer/mini-drawer/mini-drawer.js +1 -1
  393. package/esm/drawer/modal-drawer/modal-drawer.js +1 -1
  394. package/esm/expansion-panel/expansion-panel-adapter.d.ts +1 -0
  395. package/esm/expansion-panel/expansion-panel-adapter.js +7 -2
  396. package/esm/expansion-panel/expansion-panel.js +1 -1
  397. package/esm/field/field-constants.d.ts +8 -0
  398. package/esm/field/field-constants.js +10 -8
  399. package/esm/field/field-foundation.d.ts +1 -0
  400. package/esm/field/field-foundation.js +17 -7
  401. package/esm/file-picker/file-picker-component-delegate.js +1 -1
  402. package/esm/file-picker/file-picker.js +1 -1
  403. package/esm/floating-label/floating-label-foundation.d.ts +4 -1
  404. package/esm/floating-label/floating-label-foundation.js +9 -6
  405. package/esm/floating-label/floating-label.d.ts +6 -2
  406. package/esm/floating-label/floating-label.js +2 -2
  407. package/esm/focus-indicator/focus-indicator-adapter.d.ts +2 -2
  408. package/esm/focus-indicator/focus-indicator-adapter.js +3 -3
  409. package/esm/focus-indicator/focus-indicator-foundation.js +4 -3
  410. package/esm/focus-indicator/focus-indicator.js +1 -1
  411. package/esm/icon/icon-adapter.d.ts +0 -2
  412. package/esm/icon/icon-adapter.js +4 -5
  413. package/esm/icon/icon-foundation.js +0 -1
  414. package/esm/icon-button/icon-button-adapter.d.ts +12 -0
  415. package/esm/icon-button/icon-button-adapter.js +11 -0
  416. package/esm/icon-button/icon-button-component-delegate.d.ts +0 -4
  417. package/esm/icon-button/icon-button-component-delegate.js +8 -18
  418. package/esm/icon-button/icon-button-constants.d.ts +26 -17
  419. package/esm/icon-button/icon-button-constants.js +17 -28
  420. package/esm/icon-button/icon-button-foundation.d.ts +39 -0
  421. package/esm/icon-button/icon-button-foundation.js +122 -0
  422. package/esm/icon-button/icon-button.d.ts +69 -41
  423. package/esm/icon-button/icon-button.js +107 -213
  424. package/esm/index.d.ts +3 -0
  425. package/esm/index.js +8 -1
  426. package/esm/keyboard-shortcut/keyboard-shortcut-constants.d.ts +1 -0
  427. package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +6 -0
  428. package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +9 -0
  429. package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +4 -0
  430. package/esm/keyboard-shortcut/keyboard-shortcut.js +3 -0
  431. package/esm/label/index.d.ts +11 -0
  432. package/esm/label/index.js +15 -0
  433. package/esm/label/label-adapter.d.ts +51 -0
  434. package/esm/label/label-adapter.js +102 -0
  435. package/esm/label/label-aware.d.ts +15 -0
  436. package/esm/label/label-aware.js +13 -0
  437. package/esm/label/label-constants.d.ts +17 -0
  438. package/esm/label/label-constants.js +31 -0
  439. package/esm/label/label-foundation.d.ts +40 -0
  440. package/esm/label/label-foundation.js +106 -0
  441. package/esm/label/label.d.ts +49 -0
  442. package/esm/label/label.js +80 -0
  443. package/esm/linear-progress/linear-progress-constants.d.ts +3 -0
  444. package/esm/linear-progress/linear-progress-constants.js +1 -0
  445. package/esm/linear-progress/linear-progress-foundation.d.ts +5 -0
  446. package/esm/linear-progress/linear-progress-foundation.js +13 -3
  447. package/esm/linear-progress/linear-progress.d.ts +8 -1
  448. package/esm/linear-progress/linear-progress.js +13 -2
  449. package/esm/list/list/list-adapter.d.ts +17 -41
  450. package/esm/list/list/list-adapter.js +42 -60
  451. package/esm/list/list/list-constants.d.ts +13 -5
  452. package/esm/list/list/list-constants.js +15 -7
  453. package/esm/list/list/list-foundation.d.ts +24 -16
  454. package/esm/list/list/list-foundation.js +84 -75
  455. package/esm/list/list/list.d.ts +47 -8
  456. package/esm/list/list/list.js +83 -11
  457. package/esm/list/list-item/list-item-adapter.d.ts +39 -90
  458. package/esm/list/list-item/list-item-adapter.js +147 -127
  459. package/esm/list/list-item/list-item-constants.d.ts +31 -27
  460. package/esm/list/list-item/list-item-constants.js +19 -32
  461. package/esm/list/list-item/list-item-foundation.d.ts +41 -56
  462. package/esm/list/list-item/list-item-foundation.js +139 -204
  463. package/esm/list/list-item/list-item.d.ts +120 -37
  464. package/esm/list/list-item/list-item.js +171 -84
  465. package/esm/list-dropdown/list-dropdown-adapter.js +1 -6
  466. package/esm/list-dropdown/list-dropdown-constants.d.ts +4 -0
  467. package/esm/list-dropdown/list-dropdown-utils.js +23 -24
  468. package/esm/menu/menu-constants.js +1 -1
  469. package/esm/menu/menu-foundation.js +0 -4
  470. package/esm/menu/menu.js +1 -1
  471. package/esm/paginator/paginator-adapter.d.ts +30 -24
  472. package/esm/paginator/paginator-adapter.js +68 -0
  473. package/esm/paginator/paginator-constants.js +4 -4
  474. package/esm/paginator/paginator-foundation.d.ts +35 -80
  475. package/esm/paginator/paginator-foundation.js +221 -255
  476. package/esm/paginator/paginator.d.ts +1 -2
  477. package/esm/paginator/paginator.js +5 -4
  478. package/esm/popup/popup-adapter.d.ts +3 -1
  479. package/esm/popup/popup-adapter.js +3 -0
  480. package/esm/popup/popup-foundation.js +5 -3
  481. package/esm/popup/popup.d.ts +4 -1
  482. package/esm/popup/popup.js +1 -1
  483. package/esm/profile-card/profile-card.js +2 -2
  484. package/esm/quantity-field/quantity-field-constants.js +2 -2
  485. package/esm/select/core/base-select-adapter.js +3 -0
  486. package/esm/select/core/base-select-foundation.js +3 -1
  487. package/esm/select/option/option-constants.d.ts +1 -0
  488. package/esm/select/option/option-constants.js +1 -0
  489. package/esm/select/option/option-foundation.d.ts +13 -0
  490. package/esm/select/option/option-foundation.js +28 -0
  491. package/esm/select/option/option.d.ts +7 -0
  492. package/esm/select/option/option.js +13 -0
  493. package/esm/slider/slider-adapter.d.ts +1 -1
  494. package/esm/slider/slider-adapter.js +3 -2
  495. package/esm/slider/slider-constants.js +3 -3
  496. package/esm/slider/slider.d.ts +6 -11
  497. package/esm/slider/slider.js +11 -7
  498. package/esm/split-button/index.d.ts +10 -0
  499. package/esm/split-button/index.js +14 -0
  500. package/esm/split-button/split-button-adapter.d.ts +30 -0
  501. package/esm/split-button/split-button-adapter.js +84 -0
  502. package/esm/split-button/split-button-constants.d.ts +21 -0
  503. package/esm/split-button/split-button-constants.js +23 -0
  504. package/esm/split-button/split-button-foundation.d.ts +37 -0
  505. package/esm/split-button/split-button-foundation.js +77 -0
  506. package/esm/split-button/split-button.d.ts +57 -0
  507. package/esm/split-button/split-button.js +103 -0
  508. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  509. package/esm/state-layer/state-layer-adapter.js +1 -0
  510. package/esm/state-layer/state-layer-foundation.js +10 -1
  511. package/esm/state-layer/state-layer.js +1 -1
  512. package/esm/stepper/stepper/stepper-foundation.js +1 -1
  513. package/esm/switch/index.d.ts +2 -0
  514. package/esm/switch/index.js +2 -0
  515. package/esm/switch/switch-adapter.d.ts +64 -0
  516. package/esm/switch/switch-adapter.js +151 -0
  517. package/esm/switch/switch-component-delegate.d.ts +22 -6
  518. package/esm/switch/switch-component-delegate.js +64 -29
  519. package/esm/switch/switch-constants.d.ts +23 -6
  520. package/esm/switch/switch-constants.js +29 -10
  521. package/esm/switch/switch-foundation.d.ts +65 -0
  522. package/esm/switch/switch-foundation.js +162 -0
  523. package/esm/switch/switch.d.ts +162 -33
  524. package/esm/switch/switch.js +249 -136
  525. package/esm/table/table-foundation.d.ts +2 -0
  526. package/esm/table/table-foundation.js +17 -6
  527. package/esm/table/table-utils.js +13 -1
  528. package/esm/table/types.d.ts +1 -0
  529. package/esm/tabs/tab/tab.js +2 -2
  530. package/esm/tabs/tab-bar/tab-bar-adapter.js +17 -20
  531. package/esm/tabs/tab-bar/tab-bar.js +1 -1
  532. package/esm/time-picker/time-picker-adapter.js +5 -8
  533. package/esm/time-picker/time-picker-foundation.js +3 -3
  534. package/esm/toast/toast-adapter.d.ts +1 -1
  535. package/esm/toast/toast-adapter.js +1 -1
  536. package/esm/toast/toast.js +2 -2
  537. package/package.json +1 -7
  538. package/styles/app-bar/_mixins.scss +9 -4
  539. package/styles/banner/banner.scss +0 -1
  540. package/styles/bottom-sheet/bottom-sheet.scss +0 -1
  541. package/styles/busy-indicator/_mixins.scss +1 -1
  542. package/styles/busy-indicator/busy-indicator.scss +0 -1
  543. package/styles/button/_configuration.scss +16 -0
  544. package/styles/button/_core.scss +183 -0
  545. package/styles/button/_token-utils.scss +30 -0
  546. package/styles/button/button.scss +208 -0
  547. package/styles/button/index.scss +8 -0
  548. package/styles/button-area/_mixins.scss +47 -0
  549. package/styles/button-area/button-area.scss +16 -0
  550. package/styles/button-toggle/button-toggle/_mixins.scss +26 -7
  551. package/styles/calendar/calendar-menu/_mixins.scss +48 -2
  552. package/styles/calendar/calendar.scss +0 -4
  553. package/styles/{button/forge-button.scss → checkbox/_configuration.scss} +4 -3
  554. package/styles/checkbox/_core.scss +157 -0
  555. package/styles/checkbox/_token-utils.scss +30 -0
  556. package/styles/checkbox/checkbox.scss +143 -7
  557. package/styles/checkbox/index.scss +8 -0
  558. package/styles/chip-field/_base.scss +1 -0
  559. package/styles/chip-field/_selector.scss +2 -2
  560. package/styles/chips/chip/_mixins.scss +21 -7
  561. package/styles/circular-progress/_configuration.scss +8 -15
  562. package/styles/circular-progress/_core.scss +19 -19
  563. package/styles/circular-progress/_token-utils.scss +30 -0
  564. package/styles/circular-progress/circular-progress.scss +51 -4
  565. package/styles/circular-progress/index.scss +1 -0
  566. package/styles/color-picker/color-picker.scss +0 -3
  567. package/styles/core/styles/_utils.scss +148 -11
  568. package/styles/core/styles/scrollbar/index.scss +45 -0
  569. package/styles/core/styles/spacing/index.scss +8 -1
  570. package/styles/core/styles/theme/_color-utils.scss +63 -0
  571. package/styles/core/styles/theme/_utils.scss +82 -0
  572. package/styles/core/styles/theme/index.scss +39 -13
  573. package/styles/core/styles/tokens/_token-utils.scss +118 -0
  574. package/styles/core/styles/tokens/button/_tokens.scss +115 -0
  575. package/styles/core/styles/tokens/checkbox/_tokens.scss +69 -0
  576. package/styles/core/styles/tokens/circular-progress/_tokens.scss +13 -3
  577. package/styles/core/styles/tokens/color-palette/_extended-color-palette.scss +88 -0
  578. package/styles/core/styles/tokens/color-palette/index.scss +7 -0
  579. package/styles/core/styles/tokens/focus-indicator/_tokens.scss +8 -5
  580. package/styles/core/styles/tokens/icon-button/_tokens.scss +106 -0
  581. package/styles/core/styles/tokens/index.scss +0 -1
  582. package/styles/core/styles/tokens/linear-progress/_tokens.scss +15 -4
  583. package/styles/core/styles/tokens/list/list/_tokens.scss +16 -0
  584. package/styles/core/styles/tokens/list/list-item/_tokens.scss +77 -0
  585. package/styles/core/styles/tokens/scrollbar/_tokens.scss +26 -0
  586. package/styles/core/styles/tokens/slider/_tokens.scss +9 -11
  587. package/styles/core/styles/tokens/spacing/_tokens.scss +25 -11
  588. package/styles/core/styles/tokens/split-button/_tokens.scss +21 -0
  589. package/styles/core/styles/tokens/state-layer/_tokens.scss +5 -5
  590. package/styles/core/styles/tokens/switch/_tokens.scss +108 -0
  591. package/styles/core/styles/tokens/tabs/tab/_tokens.scss +3 -1
  592. package/styles/core/styles/tokens/tabs/tab-bar/_tokens.scss +3 -3
  593. package/styles/core/styles/tokens/theme/_color-emphasis.scss +38 -0
  594. package/styles/core/styles/tokens/theme/_token-utils.scss +50 -0
  595. package/styles/core/styles/tokens/theme/_tokens.core.scss +45 -0
  596. package/styles/core/styles/tokens/theme/_tokens.scss +62 -117
  597. package/styles/core/styles/tokens/theme/_tokens.status.scss +49 -0
  598. package/styles/core/styles/tokens/theme/_tokens.surface.scss +65 -0
  599. package/styles/core/styles/tokens/theme/_tokens.text.scss +38 -0
  600. package/styles/core/styles/tokens/theme/_tokens.utilities.scss +30 -0
  601. package/styles/core/styles/tokens/typography/_scale.scss +39 -0
  602. package/styles/core/styles/tokens/typography/_tokens.body.scss +41 -0
  603. package/styles/core/styles/tokens/typography/_tokens.core.scss +31 -0
  604. package/styles/core/styles/tokens/typography/_tokens.display.scss +67 -0
  605. package/styles/core/styles/tokens/typography/_tokens.heading.scss +70 -0
  606. package/styles/core/styles/tokens/typography/_tokens.label.scss +36 -0
  607. package/styles/core/styles/tokens/typography/_tokens.scss +16 -211
  608. package/styles/core/styles/tokens/typography/_tokens.subheading.scss +66 -0
  609. package/styles/core/styles/tokens/typography/_type-utils.scss +37 -0
  610. package/styles/core/styles/tokens/typography/_weight.scss +20 -0
  611. package/styles/core/styles/typography/index.scss +56 -6
  612. package/styles/file-picker/_mixins.scss +1 -1
  613. package/styles/focus-indicator/_animations.scss +6 -4
  614. package/styles/focus-indicator/_configuration.scss +2 -15
  615. package/styles/focus-indicator/_core.scss +20 -25
  616. package/styles/focus-indicator/_token-utils.scss +31 -0
  617. package/styles/focus-indicator/focus-indicator.scss +28 -6
  618. package/styles/focus-indicator/index.scss +1 -0
  619. package/styles/forge.scss +0 -2
  620. package/styles/icon-button/_configuration.scss +16 -0
  621. package/styles/icon-button/_core.scss +145 -0
  622. package/styles/icon-button/_token-utils.scss +30 -0
  623. package/styles/icon-button/icon-button.scss +315 -0
  624. package/styles/icon-button/index.scss +8 -0
  625. package/styles/label/_core.scss +17 -0
  626. package/styles/{icon-button/forge-icon-button.scss → label/index.scss} +1 -3
  627. package/styles/label/label.scss +18 -0
  628. package/styles/linear-progress/_animations.scss +3 -1
  629. package/styles/linear-progress/_configuration.scss +15 -16
  630. package/styles/linear-progress/_core.scss +17 -19
  631. package/styles/linear-progress/_token-utils.scss +31 -0
  632. package/styles/linear-progress/index.scss +1 -0
  633. package/styles/linear-progress/linear-progress.scss +42 -6
  634. package/styles/list/list/_configuration.scss +10 -0
  635. package/styles/list/list/_core.scss +16 -0
  636. package/styles/list/list/_token-utils.scss +30 -0
  637. package/styles/list/list/index.scss +8 -0
  638. package/styles/list/list/list.scss +29 -3
  639. package/styles/list/list-item/_configuration.scss +16 -0
  640. package/styles/list/list-item/_core.scss +195 -0
  641. package/styles/list/list-item/_token-utils.scss +30 -0
  642. package/styles/list/list-item/index.scss +8 -0
  643. package/styles/list/list-item/list-item.scss +199 -12
  644. package/styles/menu/menu.scss +1 -1
  645. package/styles/paginator/paginator.scss +0 -1
  646. package/styles/profile-card/profile-card.scss +0 -1
  647. package/styles/slider/_configuration.scss +5 -50
  648. package/styles/slider/_core.scss +59 -70
  649. package/styles/slider/_token-utils.scss +30 -0
  650. package/styles/slider/index.scss +1 -0
  651. package/styles/slider/slider.scss +28 -5
  652. package/styles/split-button/_configuration.scss +12 -0
  653. package/styles/split-button/_token-utils.scss +30 -0
  654. package/styles/split-button/index.scss +7 -0
  655. package/styles/split-button/split-button.scss +97 -0
  656. package/styles/state-layer/_configuration.scss +2 -9
  657. package/styles/state-layer/_core.scss +11 -16
  658. package/styles/state-layer/_token-utils.scss +31 -0
  659. package/styles/state-layer/index.scss +1 -0
  660. package/styles/state-layer/state-layer.scss +7 -0
  661. package/styles/switch/_configuration.scss +10 -0
  662. package/styles/switch/_core.scss +252 -0
  663. package/styles/switch/_token-utils.scss +30 -0
  664. package/styles/switch/index.scss +8 -0
  665. package/styles/switch/switch.scss +167 -47
  666. package/styles/table/_mixins.scss +20 -2
  667. package/styles/tabs/tab/_configuration.scss +7 -44
  668. package/styles/tabs/tab/_core.scss +30 -35
  669. package/styles/tabs/tab/_token-utils.scss +30 -0
  670. package/styles/tabs/tab/index.scss +1 -0
  671. package/styles/tabs/tab/tab.scss +89 -45
  672. package/styles/tabs/tab-bar/_configuration.scss +2 -5
  673. package/styles/tabs/tab-bar/_core.scss +26 -9
  674. package/styles/tabs/tab-bar/_token-utils.scss +30 -0
  675. package/styles/tabs/tab-bar/index.scss +2 -1
  676. package/styles/tabs/tab-bar/tab-bar.scss +68 -34
  677. package/styles/theme/_theme-dark.scss +0 -2
  678. package/styles/theme/_theme.scss +3 -45
  679. package/styles/theme/forge-theme.scss +21 -3
  680. package/styles/toast/_mixins.scss +1 -1
  681. package/styles/toast/toast.scss +0 -2
  682. package/styles/typography/_mixins.scss +0 -20
  683. package/styles/typography/forge-typography.scss +5 -2
  684. package/dist/button/forge-button.css +0 -6
  685. package/dist/esm/chunks/chunk.2AJ7FFI6.js +0 -7
  686. package/dist/esm/chunks/chunk.2AJ7FFI6.js.map +0 -7
  687. package/dist/esm/chunks/chunk.3HB22HCX.js +0 -7
  688. package/dist/esm/chunks/chunk.4C6KHYUO.js +0 -7
  689. package/dist/esm/chunks/chunk.54OOOQ4R.js +0 -7
  690. package/dist/esm/chunks/chunk.54OOOQ4R.js.map +0 -7
  691. package/dist/esm/chunks/chunk.5565ZSTH.js +0 -7
  692. package/dist/esm/chunks/chunk.6GC5AJPE.js +0 -7
  693. package/dist/esm/chunks/chunk.6GC5AJPE.js.map +0 -7
  694. package/dist/esm/chunks/chunk.6OUJSOJY.js +0 -7
  695. package/dist/esm/chunks/chunk.7CGKFRBK.js +0 -7
  696. package/dist/esm/chunks/chunk.7CGKFRBK.js.map +0 -7
  697. package/dist/esm/chunks/chunk.7DB3XVPI.js +0 -7
  698. package/dist/esm/chunks/chunk.ALIYGJXA.js +0 -129
  699. package/dist/esm/chunks/chunk.ALIYGJXA.js.map +0 -7
  700. package/dist/esm/chunks/chunk.B4T3R53C.js +0 -7
  701. package/dist/esm/chunks/chunk.BH2TUG2V.js +0 -7
  702. package/dist/esm/chunks/chunk.BH2TUG2V.js.map +0 -7
  703. package/dist/esm/chunks/chunk.BKL2BAYW.js +0 -7
  704. package/dist/esm/chunks/chunk.BKL2BAYW.js.map +0 -7
  705. package/dist/esm/chunks/chunk.BY25RT52.js +0 -7
  706. package/dist/esm/chunks/chunk.CDGZYUQS.js +0 -7
  707. package/dist/esm/chunks/chunk.CKW7KKDW.js +0 -7
  708. package/dist/esm/chunks/chunk.CKW7KKDW.js.map +0 -7
  709. package/dist/esm/chunks/chunk.CXY6K7EI.js +0 -7
  710. package/dist/esm/chunks/chunk.CXY6K7EI.js.map +0 -7
  711. package/dist/esm/chunks/chunk.D5TAI6Q7.js +0 -7
  712. package/dist/esm/chunks/chunk.D5TAI6Q7.js.map +0 -7
  713. package/dist/esm/chunks/chunk.DBNJHUYY.js +0 -7
  714. package/dist/esm/chunks/chunk.DBNJHUYY.js.map +0 -7
  715. package/dist/esm/chunks/chunk.DMCBAYQX.js +0 -7
  716. package/dist/esm/chunks/chunk.DMCBAYQX.js.map +0 -7
  717. package/dist/esm/chunks/chunk.DXN7ZOH3.js +0 -7
  718. package/dist/esm/chunks/chunk.DXN7ZOH3.js.map +0 -7
  719. package/dist/esm/chunks/chunk.F4VXEE76.js +0 -7
  720. package/dist/esm/chunks/chunk.F4VXEE76.js.map +0 -7
  721. package/dist/esm/chunks/chunk.F5SY2D4B.js +0 -7
  722. package/dist/esm/chunks/chunk.F74YURLV.js +0 -7
  723. package/dist/esm/chunks/chunk.F74YURLV.js.map +0 -7
  724. package/dist/esm/chunks/chunk.FG2GNAM2.js +0 -7
  725. package/dist/esm/chunks/chunk.FG2GNAM2.js.map +0 -7
  726. package/dist/esm/chunks/chunk.GNG64TXK.js +0 -7
  727. package/dist/esm/chunks/chunk.GNG64TXK.js.map +0 -7
  728. package/dist/esm/chunks/chunk.GO5A4GKZ.js +0 -7
  729. package/dist/esm/chunks/chunk.GO5A4GKZ.js.map +0 -7
  730. package/dist/esm/chunks/chunk.HHCO64F3.js +0 -7
  731. package/dist/esm/chunks/chunk.HHCO64F3.js.map +0 -7
  732. package/dist/esm/chunks/chunk.ISC7SZSP.js +0 -7
  733. package/dist/esm/chunks/chunk.ISC7SZSP.js.map +0 -7
  734. package/dist/esm/chunks/chunk.IX25DYIM.js +0 -7
  735. package/dist/esm/chunks/chunk.IX25DYIM.js.map +0 -7
  736. package/dist/esm/chunks/chunk.JUJGROHA.js +0 -7
  737. package/dist/esm/chunks/chunk.JUJGROHA.js.map +0 -7
  738. package/dist/esm/chunks/chunk.KJP2VA6Q.js +0 -7
  739. package/dist/esm/chunks/chunk.KJP2VA6Q.js.map +0 -7
  740. package/dist/esm/chunks/chunk.LK4AAUOP.js +0 -7
  741. package/dist/esm/chunks/chunk.LK4AAUOP.js.map +0 -7
  742. package/dist/esm/chunks/chunk.LXPFG7MW.js +0 -7
  743. package/dist/esm/chunks/chunk.LXPFG7MW.js.map +0 -7
  744. package/dist/esm/chunks/chunk.MACPUZC2.js +0 -7
  745. package/dist/esm/chunks/chunk.MACPUZC2.js.map +0 -7
  746. package/dist/esm/chunks/chunk.MGLL67VO.js +0 -7
  747. package/dist/esm/chunks/chunk.MXEKIEJA.js +0 -7
  748. package/dist/esm/chunks/chunk.MXEKIEJA.js.map +0 -7
  749. package/dist/esm/chunks/chunk.N43BCJHN.js +0 -7
  750. package/dist/esm/chunks/chunk.N43BCJHN.js.map +0 -7
  751. package/dist/esm/chunks/chunk.P2CW5MQO.js +0 -12
  752. package/dist/esm/chunks/chunk.P2CW5MQO.js.map +0 -7
  753. package/dist/esm/chunks/chunk.P2ZCNO63.js +0 -7
  754. package/dist/esm/chunks/chunk.P2ZCNO63.js.map +0 -7
  755. package/dist/esm/chunks/chunk.PEBT47AU.js +0 -7
  756. package/dist/esm/chunks/chunk.PH3HUFJJ.js +0 -7
  757. package/dist/esm/chunks/chunk.PH3HUFJJ.js.map +0 -7
  758. package/dist/esm/chunks/chunk.Q7JUJNYD.js +0 -7
  759. package/dist/esm/chunks/chunk.QCRRHGBA.js +0 -7
  760. package/dist/esm/chunks/chunk.QCRRHGBA.js.map +0 -7
  761. package/dist/esm/chunks/chunk.SBYX7VZ4.js +0 -7
  762. package/dist/esm/chunks/chunk.SFCGOCQK.js +0 -7
  763. package/dist/esm/chunks/chunk.SJJS4LYN.js +0 -7
  764. package/dist/esm/chunks/chunk.TYLOAD7R.js +0 -7
  765. package/dist/esm/chunks/chunk.UJ2WQOLO.js +0 -7
  766. package/dist/esm/chunks/chunk.UJ2WQOLO.js.map +0 -7
  767. package/dist/esm/chunks/chunk.VVXSELXX.js +0 -7
  768. package/dist/esm/chunks/chunk.VVXSELXX.js.map +0 -7
  769. package/dist/esm/chunks/chunk.VZWNNK7A.js +0 -7
  770. package/dist/esm/chunks/chunk.VZWNNK7A.js.map +0 -7
  771. package/dist/esm/chunks/chunk.X3C3J5MH.js +0 -7
  772. package/dist/esm/chunks/chunk.X3C3J5MH.js.map +0 -7
  773. package/dist/esm/chunks/chunk.XGOAYMK2.js +0 -7
  774. package/dist/esm/chunks/chunk.XGOAYMK2.js.map +0 -7
  775. package/dist/esm/chunks/chunk.YRMR7IOS.js +0 -7
  776. package/dist/esm/chunks/chunk.YRMR7IOS.js.map +0 -7
  777. package/dist/esm/chunks/chunk.YX7WLO5Y.js +0 -7
  778. package/dist/esm/chunks/chunk.YZLASVCK.js +0 -177
  779. package/dist/esm/chunks/chunk.YZLASVCK.js.map +0 -7
  780. package/dist/esm/chunks/chunk.ZDD2NLGP.js +0 -7
  781. package/dist/esm/chunks/chunk.ZKGSQQGU.js +0 -12
  782. package/dist/esm/chunks/chunk.ZKGSQQGU.js.map +0 -7
  783. package/dist/esm/chunks/chunk.ZVBZ3LGP.js +0 -7
  784. package/dist/esm/chunks/chunk.ZVBZ3LGP.js.map +0 -7
  785. package/dist/icon-button/forge-icon-button.css +0 -6
  786. package/styles/button/_button-base.scss +0 -183
  787. package/styles/button/_button-filled-theme.scss +0 -60
  788. package/styles/button/_button-filled.scss +0 -71
  789. package/styles/button/_button-outlined-theme.scss +0 -175
  790. package/styles/button/_button-outlined.scss +0 -76
  791. package/styles/button/_button-protected-theme.scss +0 -60
  792. package/styles/button/_button-protected.scss +0 -88
  793. package/styles/button/_button-ripple.scss +0 -69
  794. package/styles/button/_button-shared-theme.scss +0 -447
  795. package/styles/button/_button-text-theme.scss +0 -60
  796. package/styles/button/_button-text.scss +0 -57
  797. package/styles/button/_button.mixins.scss +0 -148
  798. package/styles/button/_mixins.scss +0 -183
  799. package/styles/checkbox/_checkbox-custom-properties.scss +0 -11
  800. package/styles/checkbox/_checkbox-theme.scss +0 -577
  801. package/styles/checkbox/_checkbox.mixins.scss +0 -595
  802. package/styles/icon-button/_mixins.scss +0 -345
  803. package/styles/icon-button/_variables.scss +0 -42
  804. package/styles/list/list/_mixins.scss +0 -45
  805. package/styles/list/list-item/_mixins.scss +0 -413
  806. package/styles/list/list-item/_variables.scss +0 -43
  807. package/styles/switch/_switch-mixins.scss +0 -301
  808. package/styles/switch/_switch-theme.scss +0 -701
  809. /package/dist/esm/chunks/{chunk.SMGXXR6K.js.map → chunk.2MSL7CYM.js.map} +0 -0
  810. /package/dist/esm/chunks/{chunk.M56LSSPW.js.map → chunk.3HCYRDRI.js.map} +0 -0
  811. /package/dist/esm/chunks/{chunk.4ZKX3SO5.js.map → chunk.3R4BUIQP.js.map} +0 -0
  812. /package/dist/esm/chunks/{chunk.YWNCJ7XP.js.map → chunk.3ZPSN2QG.js.map} +0 -0
  813. /package/dist/esm/chunks/{chunk.LFODKHUO.js.map → chunk.5N4N6DL6.js.map} +0 -0
  814. /package/dist/esm/chunks/{chunk.QOJESHEV.js.map → chunk.675V42JS.js.map} +0 -0
  815. /package/dist/esm/chunks/{chunk.DG4ZM3AW.js.map → chunk.AMLT6XJP.js.map} +0 -0
  816. /package/dist/esm/chunks/{chunk.MTKSU2BV.js.map → chunk.APPY5AYL.js.map} +0 -0
  817. /package/dist/esm/chunks/{chunk.4YFVG4KP.js.map → chunk.ARQMMZJL.js.map} +0 -0
  818. /package/dist/esm/chunks/{chunk.5MZ5SGMO.js.map → chunk.BB4UF5RX.js.map} +0 -0
  819. /package/dist/esm/chunks/{chunk.Q7Z3SJ5F.js.map → chunk.DTLZOIUQ.js.map} +0 -0
  820. /package/dist/esm/chunks/{chunk.OWCYRSI3.js.map → chunk.FLWNOP42.js.map} +0 -0
  821. /package/dist/esm/chunks/{chunk.S3JMOOWC.js.map → chunk.FXIWCHLW.js.map} +0 -0
  822. /package/dist/esm/chunks/{chunk.CWTV3TB3.js.map → chunk.GNDKQPDV.js.map} +0 -0
  823. /package/dist/esm/chunks/{chunk.ULY4H76N.js.map → chunk.HAKF2T2D.js.map} +0 -0
  824. /package/dist/esm/chunks/{chunk.WPG7NNQX.js.map → chunk.HOLCNJXC.js.map} +0 -0
  825. /package/dist/esm/chunks/{chunk.W4247Q2P.js.map → chunk.HRRJIFC5.js.map} +0 -0
  826. /package/dist/esm/chunks/{chunk.SU4FU7GK.js.map → chunk.IDMDBMBR.js.map} +0 -0
  827. /package/dist/esm/chunks/{chunk.FCATJM34.js.map → chunk.IHAHJPMB.js.map} +0 -0
  828. /package/dist/esm/chunks/{chunk.XKI46BH2.js.map → chunk.IMLJD35R.js.map} +0 -0
  829. /package/dist/esm/chunks/{chunk.624UKZFU.js.map → chunk.IT7XPDAV.js.map} +0 -0
  830. /package/dist/esm/chunks/{chunk.JLLHDJSO.js.map → chunk.JVLJH6PR.js.map} +0 -0
  831. /package/dist/esm/chunks/{chunk.4C6KHYUO.js.map → chunk.KPJWP77R.js.map} +0 -0
  832. /package/dist/esm/chunks/{chunk.2EWV2XBP.js.map → chunk.KV5IKYG2.js.map} +0 -0
  833. /package/dist/esm/chunks/{chunk.A62DE5PD.js.map → chunk.LCR4YH3O.js.map} +0 -0
  834. /package/dist/esm/chunks/{chunk.FWFOOQMA.js.map → chunk.LOG6GQOK.js.map} +0 -0
  835. /package/dist/esm/chunks/{chunk.YLG6ZC5K.js.map → chunk.NUMKGUCK.js.map} +0 -0
  836. /package/dist/esm/chunks/{chunk.XI3MJSIS.js.map → chunk.O6V3YNMO.js.map} +0 -0
  837. /package/dist/esm/chunks/{chunk.TK5I4RHF.js.map → chunk.QLCVRJ3Q.js.map} +0 -0
  838. /package/dist/esm/chunks/{chunk.Q7JUJNYD.js.map → chunk.RP674CRC.js.map} +0 -0
  839. /package/dist/esm/chunks/{chunk.LTT67HTW.js.map → chunk.SLJ6HDK7.js.map} +0 -0
  840. /package/dist/esm/chunks/{chunk.6OW6Q3EW.js.map → chunk.TU74SREL.js.map} +0 -0
  841. /package/dist/esm/chunks/{chunk.EK24Y56W.js.map → chunk.URJQNB3S.js.map} +0 -0
  842. /package/dist/esm/chunks/{chunk.K3KAM2PL.js.map → chunk.W2LN45WY.js.map} +0 -0
  843. /package/dist/esm/chunks/{chunk.Z6FCL3G3.js.map → chunk.XEFWZKHQ.js.map} +0 -0
  844. /package/dist/esm/chunks/{chunk.NR3MLTXF.js.map → chunk.XLL7L2UB.js.map} +0 -0
  845. /package/dist/esm/chunks/{chunk.3HB22HCX.js.map → chunk.XYAZVLPR.js.map} +0 -0
  846. /package/dist/esm/chunks/{chunk.2QHD3DCR.js.map → chunk.YAERJVPL.js.map} +0 -0
  847. /package/dist/esm/chunks/{chunk.ZDD2NLGP.js.map → chunk.YBZK6LJZ.js.map} +0 -0
  848. /package/dist/esm/chunks/{chunk.ZJC2DSNM.js.map → chunk.Z5ZLKM7W.js.map} +0 -0
  849. /package/styles/core/styles/tokens/{_color-palette.scss → color-palette/_material-color-palette.scss} +0 -0
@@ -4,190 +4,303 @@
4
4
  * License: Apache-2.0
5
5
  */
6
6
  import { __decorate } from "tslib";
7
- import { CustomElement, attachShadowTemplate, coerceBoolean, getShadowElement, emitEvent, toggleAttribute, toggleClass } from '@tylertech/forge-core';
8
- import { MDCSwitch } from '@material/switch';
9
- import { MDCRipple } from '@material/ripple';
7
+ import { CustomElement, FoundationProperty, attachShadowTemplate, coerceBoolean, isDefined, isString, toggleAttribute } from '@tylertech/forge-core';
8
+ import { BaseNullableFormComponent } from '../core/base/base-nullable-form-component';
9
+ import { FocusIndicatorComponent } from '../focus-indicator/focus-indicator';
10
+ import { StateLayerComponent } from '../state-layer/state-layer';
11
+ import { SwitchAdapter } from './switch-adapter';
10
12
  import { SWITCH_CONSTANTS } from './switch-constants';
11
- import { BaseComponent } from '../core/base/base-component';
12
- const template = '<template><div class=\"forge-switch__container\" part=\"root\"><button id=\"switch-btn\" class=\"mdc-switch\" type=\"button\" role=\"switch\" aria-checked=\"false\" aria-labelledby=\"switch-label\" part=\"button\"><div class=\"mdc-switch__track\" part=\"track\"></div><div class=\"mdc-switch__handle-track\" part=\"handle-track\"><div class=\"mdc-switch__handle\" part=\"handle\"><div class=\"mdc-switch__shadow\" part=\"shadow\"><div class=\"mdc-elevation-overlay\" part=\"overlay\"></div></div><div class=\"mdc-switch__ripple\" part=\"ripple\"></div><div class=\"mdc-switch__icons\" part=\"icons\"><svg class=\"mdc-switch__icon mdc-switch__icon--on\" viewBox=\"0 0 24 24\" part=\"icon-on\"><path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\" part=\"icon-on-path\"/></svg> <svg class=\"mdc-switch__icon mdc-switch__icon--off\" viewBox=\"0 0 24 24\" part=\"icon-off\"><path d=\"M20 13H4v-2h16v2z\" part=\"icon-off-path\"/></svg></div></div></div></button> <label id=\"switch-label\" class=\"forge-switch__label\" for=\"switch-btn\" part=\"label\"><slot></slot></label></div></template>';
13
- const styles = '.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.mdc-switch{-webkit-box-align:center;align-items:center;background:0 0;border:none;display:-webkit-inline-box;display:inline-flex;flex-shrink:0;margin:0;outline:0;overflow:visible;padding:0;position:relative}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::after,.mdc-switch__track::before{border:1px solid transparent;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;content:\"\";height:100%;left:0;position:absolute;width:100%}.mdc-switch__track::before{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__track::after{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch__track[dir=rtl]::after,[dir=rtl] .mdc-switch__track::after{-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track[dir=rtl]::before,[dir=rtl] .mdc-switch--selected .mdc-switch__track::before{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);left:0;right:auto;-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__handle-track[dir=rtl],[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__handle-track[dir=rtl],[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch__handle{display:-webkit-box;display:flex;pointer-events:auto;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;right:auto}.mdc-switch__handle[dir=rtl],[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mdc-switch__handle::after,.mdc-switch__handle::before{border:1px solid transparent;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;content:\"\";width:100%;height:100%;left:0;position:absolute;top:0;-webkit-transition:background-color 75ms 0s cubic-bezier(.4, 0, .2, 1),border-color 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:background-color 75ms 0s cubic-bezier(.4, 0, .2, 1),border-color 75ms 0s cubic-bezier(.4, 0, .2, 1);z-index:-1}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;-webkit-transition:opacity 30ms 0s cubic-bezier(.4, 0, 1, 1);transition:opacity 30ms 0s cubic-bezier(.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;-webkit-transition:opacity 45ms 30ms cubic-bezier(0, 0, .2, 1);transition:opacity 45ms 30ms cubic-bezier(0, 0, .2, 1)}.mdc-switch{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-switch .mdc-switch__ripple::after,.mdc-switch .mdc-switch__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-switch .mdc-switch__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-switch .mdc-switch__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-switch.mdc-ripple-upgraded--unbounded .mdc-switch__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-switch.mdc-ripple-upgraded--foreground-activation .mdc-switch__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-switch.mdc-ripple-upgraded--foreground-deactivation .mdc-switch__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-switch .mdc-switch__ripple::after,.mdc-switch .mdc-switch__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after,.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-switch{width:36px;width:var(--mdc-switch-track-width,36px)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:#3d5afe;background:var(--mdc-switch-selected-handle-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-hover-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-focus-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-pressed-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:#3d5afe;background:var(--mdc-switch-disabled-selected-handle-color,#3d5afe)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:#9e9e9e;background:var(--mdc-switch-unselected-handle-color,#9e9e9e)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-hover-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-focus-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-pressed-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:#424242;background:var(--mdc-switch-disabled-unselected-handle-color,#424242)}.mdc-switch .mdc-switch__handle::before{background:#fff;background:var(--mdc-switch-handle-surface-color,var(--mdc-theme-surface,#fff))}.mdc-switch:enabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0, 0, 0, 0.12);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--mdc-switch-handle-elevation,var(--mdc-elevation-box-shadow-for-gss));box-shadow:var(--mdc-switch-handle-elevation,var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch:disabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0, 0, 0, 0.12);-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--mdc-switch-disabled-handle-elevation,var(--mdc-elevation-box-shadow-for-gss));box-shadow:var(--mdc-switch-disabled-handle-elevation,var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch .mdc-switch__handle{height:20px;height:var(--mdc-switch-handle-height,20px)}.mdc-switch:disabled .mdc-switch__handle::after{opacity:.24;opacity:var(--mdc-switch-disabled-handle-opacity, .24)}.mdc-switch .mdc-switch__handle{border-radius:10px;border-radius:var(--mdc-switch-handle-shape,10px)}.mdc-switch .mdc-switch__handle{width:20px;width:var(--mdc-switch-handle-width,20px)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - 20px);width:calc(100% - var(--mdc-switch-handle-width,20px))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-selected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-selected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-unselected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-unselected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:.54;opacity:var(--mdc-switch-disabled-selected-icon-opacity, .54)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:.54;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, .54)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:18px;width:var(--mdc-switch-selected-icon-size,18px);height:18px;height:var(--mdc-switch-selected-icon-size,18px)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:18px;width:var(--mdc-switch-unselected-icon-size,18px);height:18px;height:var(--mdc-switch-unselected-icon-size,18px)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-hover-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-focus-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-pressed-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-hover-state-layer-color,#424242)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-focus-state-layer-color,#424242)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-pressed-state-layer-color,#424242)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before{opacity:.04;opacity:var(--mdc-switch-selected-hover-state-layer-opacity, .04)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, .12)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.1;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, .1)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before{opacity:.04;opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, .04)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, .12)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.1;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, .1)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mdc-switch .mdc-switch__ripple{height:48px;height:var(--mdc-switch-state-layer-size,48px);width:48px;width:var(--mdc-switch-state-layer-size,48px)}.mdc-switch .mdc-switch__track{height:14px;height:var(--mdc-switch-track-height,14px)}.mdc-switch:disabled .mdc-switch__track{opacity:.12;opacity:var(--mdc-switch-disabled-track-opacity, .12)}.mdc-switch:enabled .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-track-color,#cfd6ff)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-hover-track-color,#cfd6ff)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-focus-track-color,#cfd6ff)}.mdc-switch:enabled:active .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-pressed-track-color,#cfd6ff)}.mdc-switch:disabled .mdc-switch__track::after{background:#3d5afe;background:var(--mdc-switch-disabled-selected-track-color,#3d5afe)}.mdc-switch:enabled .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-track-color,#e0e0e0)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-hover-track-color,#e0e0e0)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-focus-track-color,#e0e0e0)}.mdc-switch:enabled:active .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-pressed-track-color,#e0e0e0)}.mdc-switch:disabled .mdc-switch__track::before{background:#424242;background:var(--mdc-switch-disabled-unselected-track-color,#424242)}.mdc-switch .mdc-switch__track{border-radius:7px;border-radius:var(--mdc-switch-track-shape,7px)}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-switch:disabled .mdc-switch__handle::after{opacity:1;opacity:var(--mdc-switch-disabled-handle-opacity, 1)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-selected-icon-color,GrayText)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-unselected-icon-color,GrayText)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-selected-icon-opacity, 1)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 1)}.mdc-switch:disabled .mdc-switch__track{opacity:1;opacity:var(--mdc-switch-disabled-track-opacity, 1)}}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field>label{-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~label{padding-left:8px}.forge-form-field--align-end>label{-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}.forge-switch__container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-switch__container.forge-switch--label-position-start{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;flex-flow:row-reverse}.forge-switch__container.forge-switch--label-position-start .forge-switch__label{margin-left:auto;padding-right:8px}:host{display:inline-block}:host *{cursor:pointer}:host .forge-switch__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);padding-left:8px}:host([hidden]){display:none}:host([dense]) .mdc-switch__ripple{height:28px;width:28px}:host([disabled]) *{cursor:not-allowed}:host([disabled]) .forge-switch__label{color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}';
14
- import { createUserInteractionListener } from '../core/utils';
15
- class ForgeMDCSwitch extends MDCSwitch {
16
- initialize() {
17
- // Do not call super.initialize()
18
- // We defer instantiation of the ripple until first user interaction
19
- this._deferRippleInitialization();
20
- }
21
- destroy() {
22
- var _a;
23
- // We are not calling super.destroy() because it expects `ripple` to be set when it might not be yet
24
- // We instead just replicate all existing functionality, but allow for `ripple` to be undefined
25
- this.foundation.destroy();
26
- (_a = this.ripple) === null || _a === void 0 ? void 0 : _a.destroy();
27
- this.root.removeEventListener('click', this.foundation.handleClick);
28
- if (typeof this._destroyUserInteractionListener === 'function') {
29
- this._destroyUserInteractionListener();
30
- this._destroyUserInteractionListener = undefined;
31
- }
32
- }
33
- async _deferRippleInitialization() {
34
- const { userInteraction, destroy } = createUserInteractionListener(this.root);
35
- this._destroyUserInteractionListener = destroy;
36
- const { type } = await userInteraction;
37
- this._destroyUserInteractionListener = undefined;
38
- this.ripple = new MDCRipple(this.root, this.createRippleFoundation());
39
- if (type === 'focusin') {
40
- // eslint-disable-next-line @typescript-eslint/dot-notation
41
- this.ripple['foundation'].handleFocus();
42
- }
43
- }
44
- }
13
+ import { SwitchFoundation } from './switch-foundation';
14
+ import { internals } from '../constants';
15
+ const template = '<template><div class=\"forge-switch\" part=\"switch\"><div id=\"container\" class=\"container\"><slot name=\"input\"><input id=\"input\" class=\"input\" type=\"checkbox\" role=\"switch\"></slot><div class=\"track\" part=\"track\"></div><div class=\"handle\" part=\"handle\"><div id=\"icon-off\" class=\"icon icon__off\" part=\"icon-off\"><slot name=\"icon-off\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M20 13H4v-2h16v2z\"/></svg></slot></div><div id=\"icon-on\" class=\"icon icon__on\" part=\"icon-on\"><slot name=\"icon-on\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\"/></svg></slot></div><forge-state-layer target=\"container\" exportparts=\"surface:state-layer\"></forge-state-layer></div><forge-focus-indicator target=\"container\" exportparts=\"indicator:focus-indicator\"></forge-focus-indicator></div><label id=\"label\" for=\"input\" class=\"label\" part=\"label\"><slot></slot></label></div></template>';
16
+ const styles = ':host{display:inline-block}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-handle-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, var(--forge-shape-round, 50%));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, var(--forge-shape-full, 9999px));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, space-between);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-state-layer-state-layer-off-color, var(--_state-layer-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:var(--_switch-direction);flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:var(--_switch-justify);justify-content:var(--_switch-justify);gap:var(--_switch-gap);display:-webkit-box;display:flex;--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{-webkit-transition-property:background-color,border-color,border-width;transition-property:background-color,border-color,border-width;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);-webkit-box-sizing:border-box;box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;-webkit-transition-property:translate;transition-property:translate;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:\"\";position:relative;display:block;scale:var(--_switch-handle-off-scale);-webkit-transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);-webkit-box-shadow:var(--_switch-handle-off-elevation);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;display:-webkit-box;display:flex;-webkit-transition-property:opacity,scale;transition-property:opacity,scale;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label-font-weight,400);line-height:var(--forge-typography-label-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label-text-decoration,inherit);text-decoration:var(--forge-typography-label-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([on]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([on]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([on]) .handle::before{scale:var(--_switch-handle-on-scale);-webkit-box-shadow:var(--_switch-handle-on-elevation);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([on]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([on]) .handle .icon__off{opacity:0;scale:0.4}:host([on]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);-webkit-box-shadow:var(--_switch-handle-active-off-elevation);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);-webkit-box-shadow:var(--_switch-handle-active-on-elevation);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch{opacity:var(--_switch-disabled-opacity)}:host([disabled]) .forge-switch .container{cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{-webkit-box-shadow:none;box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}';
45
17
  /**
46
- * The custom element class behind the `<forge-switch>` element.
47
- *
48
18
  * @tag forge-switch
19
+ *
20
+ * @summary Switches toggle the state of a single setting on or off.
21
+ *
22
+ * @description
23
+ * Use switches to:
24
+ * - Toggle a single item on or off, on mobile and tablet
25
+ * - Immediately activate or deactivate something
26
+ *
27
+ * @property {boolean} on - Whether the switch is on the on or off state.
28
+ * @property {boolean} selected - Deprecated. Alias for `on`.
29
+ * @property {boolean} defaultOn - Whether the switch is on or off by default.
30
+ * @property {string} value - The value of the switch.
31
+ * @property {boolean} dense - The density state.
32
+ * @property {boolean} disabled - Controls if the switch is disabled.
33
+ * @property {boolean} required = Controls if the switch is required.
34
+ * @property {boolean} readonly - Controls if the switch is readonly.
35
+ * @property {SwitchIconVisibility} icon - Controls the presence of the off and on icons.
36
+ * @property {SwitchLabelPosition} labelPosition - Whether the label appears before or after the switch.
37
+ *
38
+ * @attribute {string} on - Controls whether the switch is in the on or off state.
39
+ * @attribute {string} selected - Deprecated. Alias for `on`.
40
+ * @attribute {string} default-on - Controls whether the switch is in the on or off state by default.
41
+ * @attribute {string} value - The value of the switch.
42
+ * @attribute {string} dense - Sets the density state.
43
+ * @attribute {string} disabled - Controls if the switch is disabled.
44
+ * @attribute {string} required - Controls if the switch is required.
45
+ * @attribute {string} readonly - Controls if the switch is readonly.
46
+ * @attribute {string} icon - Controls the presence of the off and on icons.
47
+ * @attribute {string} label-position - Sets whether the label appears before or after the switch.
48
+ *
49
+ * @method {(force?: boolean) => void} toggle - Toggles whether the switch is selected or forces a selected state.
50
+ *
51
+ * @event {CustomEvent} forge-switch-change - Dispatches when the switch's value changes.
52
+ *
53
+ * @cssproperty --forge-theme-primary - The primary color of the switch.
54
+ * @cssproperty --forge-theme-on-primary - The color of elements placed on top of the primary color (the handle icons for example).
55
+ * @cssproperty --forge-switch-handle-on-color - The color of the handle in the switch's on state.
56
+ * @cssproperty --forge-switch-handle-off-color - The color of the handle in the switch's off state.
57
+ * @cssproperty --forge-switch-handle-active-on-color - The color of the handle when the switch is active (pressed) in its on state.
58
+ * @cssproperty --forge-switch-handle-active-off-color - The color of the handle when the switch is active (pressed) in its off state.
59
+ * @cssproperty --forge-switch-handle-size - The inline and block size of the handle.
60
+ * @cssproperty --forge-switch-handle-width - The inline size of the handle.
61
+ * @cssproperty --forge-switch-handle-height - The block size of the handle.
62
+ * @cssproperty --forge-switch-handle-scale - The scale transformation applied to the handle.
63
+ * @cssproperty --forge-switch-handle-on-scale - The scale transformation applied to the handle in the switch's on state.
64
+ * @cssproperty --forge-switch-handle-off-scale - The scale transformation applied to the handle in the switch's off state.
65
+ * @cssproperty --forge-switch-handle-active-scale - The scale transformation applied to the handle when the switch is active (pressed).
66
+ * @cssproperty --forge-switch-handle-active-on-scale - The scale transformation applied to the handle when the switch is active (pressed) in its on state.
67
+ * @cssproperty --forge-switch-handle-active-off-scale - The scale transformation applied to the handle when the switch is active (pressed) in its off state.
68
+ * @cssproperty --forge-switch-handle-shape - The shape of the handle.
69
+ * @cssproperty --forge-switch-handle-elevation - The handle's shadow.
70
+ * @cssproperty --forge-switch-handle-on-elevation - The handle's shadow in the switch's on state.
71
+ * @cssproperty --forge-switch-handle-off-elevation - The handle's shadow in the switch's off state.
72
+ * @cssproperty --forge-switch-handle-active-elevation - The handle's shadow when the switch is active (pressed).
73
+ * @cssproperty --forge-switch-handle-active-on-elevation - The handle's shadow when the switch is active (pressed) in its on state.
74
+ * @cssproperty --forge-switch-handle-active-off-elevation - The handle's shadow when the switch is active (pressed) in its off state.
75
+ * @cssproperty --forge-switch-track-on-color - The color of the track in the switch's on state.
76
+ * @cssproperty --forge-switch-track-off-color - The color fo the track in the switch's off state.
77
+ * @cssproperty --forge-switch-track-active-on-color - The color of the track when the switch is active (pressed) in its on state.
78
+ * @cssproperty --forge-switch-track-active-off-color - The color fo the track when the switch is active (pressed) in its off state.
79
+ * @cssproperty --forge-switch-track-width - The inline size of the track.
80
+ * @cssproperty --forge-switch-track-height - The block size of the track.
81
+ * @cssproperty --forge-switch-track-shape - The shape of the track.
82
+ * @cssproperty --forge-switch-track-border-width - The width of the track border.
83
+ * @cssproperty --forge-switch-track-on-border-width - The width of the track border in the switch's on state.
84
+ * @cssproperty --forge-switch-track-off-border-width - The width of the track border in the switch's off state.
85
+ * @cssproperty --forge-switch-track-active-on-border-width - The width of the track border when the switch is active (pressed) in its on state.
86
+ * @cssproperty --forge-switch-track-active-off-border-width - The width of the track border when the switch is active (pressed) in its off state.
87
+ * @cssproperty --forge-switch-track-border-color - The color of the track border.
88
+ * @cssproperty --forge-switch-track-on-border-color - The color of the track border in the switch's on state.
89
+ * @cssproperty --forge-switch-track-off-border-color - The color of the track border in the switch's off state.
90
+ * @cssproperty --forge-switch-track-active-on-border-color - The color of the track border when the switch is active (pressed) in its on state.
91
+ * @cssproperty --forge-switch-track-active-off-border-color - The color of the track border when the switch is active (pressed) in its off state.
92
+ * @cssproperty --forge-switch-icon-color - The color of the handle icons.
93
+ * @cssproperty --forge-switch-icon-on-color - The color of the handle icon in the switch's on state.
94
+ * @cssproperty --forge-switch-icon-off-color - The color of the handle icon in the switch's off state.
95
+ * @cssproperty --forge-switch-icon-active-on-color - The color of the handle icon when the switch is active (pressed) in its on state.
96
+ * @cssproperty --forge-switch-icon-active-off-color - The color of the handle icon when the switch is active (pressed) in its off state.
97
+ * @cssproperty --forge-switch-icon-size - The size of the handle icon.
98
+ * @cssproperty --forge-switch-icon-on-size - The size of the handle icon in the switch's on state.
99
+ * @cssproperty --forge-switch-icon-off-size - The size of the handle icon in the switch's off state.
100
+ * @cssproperty --forge-switch-icon-scale - The scale transformation applied to the handle icons.
101
+ * @cssproperty --forge-switch-icon-on-scale - The scale transformation applied to the handle icons in the switch's on state.
102
+ * @cssproperty --forge-switch-icon-off-scale - The scale transformation applied to the handle icons in the switch's off state.
103
+ * @cssproperty --forge-switch-icon-active-on-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its on state.
104
+ * @cssproperty --forge-switch-icon-active-off-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its off state.
105
+ * @cssproperty --forge-switch-gap - The space between the switch and label.
106
+ * @cssproperty --forge-switch-justify - How the switch and label are distributed along their main axis.
107
+ * @cssproperty --forge-switch-direction - Whether the switch and label are arranged along the inline or block axis.
108
+ * @cssproperty --forge-switch-state-layer-size - The inline and block size of the handle's state layer.
109
+ * @cssproperty --forge-switch-state-layer-width - The inline size of the handle's state layer.
110
+ * @cssproperty --forge-switch-state-layer-height - The block size of the handle's state layer.
111
+ * @cssproperty --forge-switch-state-layer-on-color - The color of the handle's state layer when the switch is in its on state.
112
+ * @cssproperty --forge-switch-state-layer-off-color - The color of the handle's state layer when the switch is in its off state.
113
+ * @cssproperty --forge-switch-state-layer-dense-size - The inline and block size of the handle's state layer when the dense switch is used.
114
+ * @cssproperty --forge-switch-state-layer-dense-width - The inline size of the handle's state layer when the dense switch is used.
115
+ * @cssproperty --forge-switch-state-layer-dense-height - The block size of the handle's state layer when the dense switch is used.
116
+ * @cssproperty --forge-switch-disabled-opacity - The opacity of the switch when disabled.
117
+ * @cssproperty --forge-switch-animation-duration - The duration of animations.
118
+ * @cssproperty --forge-switch-animation-timing - The timing function used in most animations.
119
+ * @cssproperty --forge-switch-active-animation-timing - The timing function used in active state animations.
120
+ *
121
+ * @csspart switch - Styles the switch container element.
122
+ * @csspart track - Styles the track element.
123
+ * @csspart handle - Styles the handle element.
124
+ * @csspart icon-on - Styles the on icon element.
125
+ * @csspart icon-off - Styles the off icon element.
126
+ * @csspart label - Styles the label element.
127
+ * @csspart state-layer - Styles the state layer root element.
128
+ * @csspart focus-indicator - Styles the focus indicator root element.
49
129
  */
50
- let SwitchComponent = class SwitchComponent extends BaseComponent {
130
+ let SwitchComponent = class SwitchComponent extends BaseNullableFormComponent {
51
131
  static get observedAttributes() {
52
132
  return [
133
+ SWITCH_CONSTANTS.attributes.ON,
134
+ SWITCH_CONSTANTS.attributes.SELECTED,
135
+ SWITCH_CONSTANTS.attributes.DEFAULT_ON,
136
+ SWITCH_CONSTANTS.attributes.VALUE,
53
137
  SWITCH_CONSTANTS.attributes.DENSE,
54
138
  SWITCH_CONSTANTS.attributes.DISABLED,
55
- SWITCH_CONSTANTS.attributes.SELECTED,
56
- SWITCH_CONSTANTS.attributes.LABEL_POSITION,
57
- SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL
139
+ SWITCH_CONSTANTS.attributes.REQUIRED,
140
+ SWITCH_CONSTANTS.attributes.READONLY,
141
+ SWITCH_CONSTANTS.attributes.ICON,
142
+ SWITCH_CONSTANTS.attributes.LABEL_POSITION
58
143
  ];
59
144
  }
145
+ get form() {
146
+ return this[internals].form;
147
+ }
148
+ get labels() {
149
+ return this[internals].labels;
150
+ }
151
+ get name() {
152
+ var _a;
153
+ return (_a = this.getAttribute('name')) !== null && _a !== void 0 ? _a : '';
154
+ }
155
+ set name(value) {
156
+ toggleAttribute(this, !!value, 'name', value !== null && value !== void 0 ? value : '');
157
+ }
158
+ get validity() {
159
+ this._foundation.syncValidity(this._hasCustomValidityError);
160
+ return this[internals].validity;
161
+ }
162
+ get validationMessage() {
163
+ this._foundation.syncValidity(this._hasCustomValidityError);
164
+ return this[internals].validationMessage;
165
+ }
166
+ get willValidate() {
167
+ return this[internals].willValidate;
168
+ }
60
169
  constructor() {
61
170
  super();
62
- this._dense = false;
63
- this._disabled = false;
64
- this._selected = false;
65
- this._labelPosition = 'end';
66
- attachShadowTemplate(this, template, styles);
67
- this._initialize();
68
- }
69
- _initialize() {
70
- this._buttonElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.BUTTON);
71
- this._containerElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.CONTAINER);
72
- this._clickListener = evt => this._onClick(evt);
171
+ attachShadowTemplate(this, template, styles, true);
172
+ this[internals] = this.attachInternals();
173
+ this._foundation = new SwitchFoundation(new SwitchAdapter(this));
73
174
  }
74
175
  connectedCallback() {
75
- // Add our click listener before initializing MDCSwitch to ensure we receive the event **first**
76
- this._buttonElement.addEventListener('click', this._clickListener);
77
- this._mdcSwitch = new ForgeMDCSwitch(this._buttonElement);
78
- this._applyInitialState();
79
- }
80
- disconnectedCallback() {
81
- var _a;
82
- (_a = this._mdcSwitch) === null || _a === void 0 ? void 0 : _a.destroy();
176
+ this._foundation.initialize();
83
177
  }
84
178
  attributeChangedCallback(name, oldValue, newValue) {
85
179
  switch (name) {
180
+ case SWITCH_CONSTANTS.attributes.ON:
181
+ case SWITCH_CONSTANTS.attributes.SELECTED:
182
+ this.on = coerceBoolean(newValue);
183
+ break;
184
+ case SWITCH_CONSTANTS.attributes.DEFAULT_ON:
185
+ this.defaultOn = coerceBoolean(newValue);
186
+ break;
187
+ case SWITCH_CONSTANTS.attributes.VALUE:
188
+ this.value = newValue;
189
+ break;
86
190
  case SWITCH_CONSTANTS.attributes.DENSE:
87
191
  this.dense = coerceBoolean(newValue);
88
192
  break;
89
193
  case SWITCH_CONSTANTS.attributes.DISABLED:
90
194
  this.disabled = coerceBoolean(newValue);
91
195
  break;
92
- case SWITCH_CONSTANTS.attributes.SELECTED:
93
- this.selected = coerceBoolean(newValue);
196
+ case SWITCH_CONSTANTS.attributes.REQUIRED:
197
+ this.required = coerceBoolean(newValue);
198
+ break;
199
+ case SWITCH_CONSTANTS.attributes.READONLY:
200
+ this.readonly = coerceBoolean(newValue);
201
+ break;
202
+ case SWITCH_CONSTANTS.attributes.ICON:
203
+ this.icon = newValue;
94
204
  break;
95
205
  case SWITCH_CONSTANTS.attributes.LABEL_POSITION:
96
206
  this.labelPosition = newValue;
97
207
  break;
98
- case SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL:
99
- this._applyButtonLabel(newValue);
100
- break;
101
208
  }
102
209
  }
103
- _applyInitialState() {
104
- var _a;
105
- if (this._mdcSwitch) {
106
- this._mdcSwitch.disabled = this._disabled;
107
- this._mdcSwitch.selected = this._selected;
108
- }
109
- this._applyDense();
110
- this._applyLabelPosition();
111
- this._applyButtonLabel((_a = this.getAttribute(SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL)) !== null && _a !== void 0 ? _a : '');
112
- }
113
- _onClick(evt) {
114
- var _a;
115
- if ((_a = this._mdcSwitch) === null || _a === void 0 ? void 0 : _a.disabled) {
210
+ setFormValue(value, state) {
211
+ this[internals].setFormValue(value, state);
212
+ if (state) {
213
+ const stateValue = isString(state) ? state : state[this.name];
214
+ this.on = stateValue === SWITCH_CONSTANTS.state.ON;
116
215
  return;
117
216
  }
118
- // Prevents MDCSwitch from receiving the click event in the targeting phase.
119
- // We will handle updating the selected state of MDCSwitch based on the result of our own event.
120
- evt.stopImmediatePropagation();
121
- const newValue = !this._selected;
122
- const isCancelled = !emitEvent(this, SWITCH_CONSTANTS.events.SELECT, newValue, true, true);
123
- if (!isCancelled) {
124
- this._applySelected(newValue);
217
+ if (isString(value)) {
218
+ this.on = !!value;
125
219
  }
126
- }
127
- _applySelected(value) {
128
- this._selected = value;
129
- if (this._mdcSwitch) {
130
- this._mdcSwitch.selected = this._selected;
220
+ else if (value === null || value === void 0 ? void 0 : value[this.name]) {
221
+ this.on = !!value[this.name];
222
+ }
223
+ else {
224
+ this.on = false;
131
225
  }
132
226
  }
133
- _applyDense() {
134
- var _a, _b;
135
- toggleAttribute(this, this._dense, SWITCH_CONSTANTS.attributes.DENSE);
136
- (_b = (_a = this._mdcSwitch) === null || _a === void 0 ? void 0 : _a.ripple) === null || _b === void 0 ? void 0 : _b.layout();
227
+ checkValidity() {
228
+ this._foundation.syncValidity(this._hasCustomValidityError);
229
+ return this[internals].checkValidity();
137
230
  }
138
- _applyLabelPosition() {
139
- toggleClass(this._containerElement, this._labelPosition === 'start', SWITCH_CONSTANTS.classes.LABEL_START);
231
+ reportValidity() {
232
+ this._foundation.syncValidity(this._hasCustomValidityError);
233
+ return this[internals].reportValidity();
140
234
  }
141
- _applyButtonLabel(value) {
142
- if (!this._buttonElement) {
143
- return;
144
- }
145
- toggleAttribute(this._buttonElement, !!value, 'aria-label', value);
235
+ setCustomValidity(error) {
236
+ this._hasCustomValidityError = !!error;
237
+ this._foundation.setValidity({ customError: !!error }, error);
146
238
  }
147
- get dense() {
148
- return this._dense;
239
+ formResetCallback() {
240
+ this.on = this.defaultOn;
149
241
  }
150
- set dense(value) {
151
- if (this._dense !== value) {
152
- this._dense = value;
153
- this._applyDense();
154
- }
242
+ formStateRestoreCallback(state) {
243
+ this.on = state === SWITCH_CONSTANTS.state.ON;
155
244
  }
156
- get disabled() {
157
- return this._disabled;
245
+ formDisabledCallback(isDisabled) {
246
+ this.disabled = isDisabled;
158
247
  }
159
- set disabled(value) {
160
- if (this._disabled !== value) {
161
- this._disabled = value;
162
- if (this._mdcSwitch) {
163
- this._mdcSwitch.disabled = this._disabled;
164
- }
165
- toggleAttribute(this, this._disabled, SWITCH_CONSTANTS.attributes.DISABLED);
166
- }
248
+ labelClickedCallback() {
249
+ this._foundation.proxyClick();
167
250
  }
168
- get selected() {
169
- return this._selected;
251
+ labelChangedCallback(value) {
252
+ this._foundation.proxyLabel(value);
170
253
  }
171
- set selected(value) {
172
- if (this._selected !== value) {
173
- this._applySelected(value);
174
- toggleAttribute(this, this._selected, SWITCH_CONSTANTS.attributes.SELECTED);
254
+ /**
255
+ * Toggles the switch on or off.
256
+ * @param force Whether to set the switch on or off.
257
+ */
258
+ toggle(force) {
259
+ if (isDefined(force)) {
260
+ this._foundation.on = force;
175
261
  }
176
- }
177
- get labelPosition() {
178
- return this._labelPosition;
179
- }
180
- set labelPosition(value) {
181
- if (this._labelPosition !== value) {
182
- this._labelPosition = value;
183
- this._applyLabelPosition();
184
- this.setAttribute(SWITCH_CONSTANTS.attributes.LABEL_POSITION, this._labelPosition);
262
+ else {
263
+ this._foundation.on = !this._foundation.on;
185
264
  }
186
265
  }
187
266
  };
267
+ __decorate([
268
+ FoundationProperty()
269
+ ], SwitchComponent.prototype, "on", void 0);
270
+ __decorate([
271
+ FoundationProperty({ name: 'on' })
272
+ ], SwitchComponent.prototype, "selected", void 0);
273
+ __decorate([
274
+ FoundationProperty()
275
+ ], SwitchComponent.prototype, "defaultOn", void 0);
276
+ __decorate([
277
+ FoundationProperty()
278
+ ], SwitchComponent.prototype, "value", void 0);
279
+ __decorate([
280
+ FoundationProperty()
281
+ ], SwitchComponent.prototype, "dense", void 0);
282
+ __decorate([
283
+ FoundationProperty()
284
+ ], SwitchComponent.prototype, "disabled", void 0);
285
+ __decorate([
286
+ FoundationProperty()
287
+ ], SwitchComponent.prototype, "required", void 0);
288
+ __decorate([
289
+ FoundationProperty()
290
+ ], SwitchComponent.prototype, "readonly", void 0);
291
+ __decorate([
292
+ FoundationProperty()
293
+ ], SwitchComponent.prototype, "icon", void 0);
294
+ __decorate([
295
+ FoundationProperty()
296
+ ], SwitchComponent.prototype, "labelPosition", void 0);
188
297
  SwitchComponent = __decorate([
189
298
  CustomElement({
190
- name: SWITCH_CONSTANTS.elementName
299
+ name: SWITCH_CONSTANTS.elementName,
300
+ dependencies: [
301
+ FocusIndicatorComponent,
302
+ StateLayerComponent
303
+ ]
191
304
  })
192
305
  ], SwitchComponent);
193
306
  export { SwitchComponent };
@@ -76,6 +76,7 @@ export declare class TableFoundation implements ITableFoundation {
76
76
  private _rowDoubleClickListener;
77
77
  private _selectRowListener;
78
78
  private _selectAllListener;
79
+ private _sortableHeadCellKeydownListener;
79
80
  private _headRowMouseDownListener;
80
81
  private _headRowContextMenuListener;
81
82
  private _documentMouseMoveListener;
@@ -259,6 +260,7 @@ export declare class TableFoundation implements ITableFoundation {
259
260
  private _onHeadRowMouseDown;
260
261
  private _onMouseMove;
261
262
  private _onMouseUp;
263
+ private _onSortableHeadCellKeydown;
262
264
  /**
263
265
  * Called when a click event is triggered on the table header row.
264
266
  * We use this to capture all click events on the row, and determine which
@@ -42,6 +42,7 @@ export class TableFoundation {
42
42
  this._rowDoubleClickListener = evt => this._onRowDoubleClick(evt);
43
43
  this._selectRowListener = evt => this._onRowSelected(evt);
44
44
  this._selectAllListener = evt => this._onSelectAll(evt);
45
+ this._sortableHeadCellKeydownListener = (evt) => this._onSortableHeadCellKeydown(evt);
45
46
  this._headRowMouseDownListener = evt => this._onHeadRowMouseDown(evt);
46
47
  this._headRowContextMenuListener = evt => this._onHeadRowContextMenu(evt);
47
48
  this._documentMouseMoveListener = evt => this._onMouseMove(evt);
@@ -86,13 +87,11 @@ export class TableFoundation {
86
87
  this._renderBody();
87
88
  }
88
89
  get data() {
89
- return JSON.parse(JSON.stringify(this._data));
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
- evt.preventDefault();
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