@tylertech/forge 3.0.0-next.7 → 3.0.0-next.9

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 (359) hide show
  1. package/custom-elements.json +7530 -4847
  2. package/dist/button/forge-button.css +1 -1
  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/banner/index.js +1 -1
  12. package/dist/esm/bottom-sheet/index.js +1 -1
  13. package/dist/esm/busy-indicator/index.js +1 -1
  14. package/dist/esm/button/index.js +1 -1
  15. package/dist/esm/button-toggle/button-toggle/index.js +1 -1
  16. package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
  17. package/dist/esm/button-toggle/index.js +1 -1
  18. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  19. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  20. package/dist/esm/calendar/index.js +1 -1
  21. package/dist/esm/card/index.js +1 -1
  22. package/dist/esm/checkbox/index.js +1 -1
  23. package/dist/esm/chip-field/index.js +1 -1
  24. package/dist/esm/chips/chip/index.js +1 -1
  25. package/dist/esm/chips/chip-set/index.js +1 -1
  26. package/dist/esm/chips/index.js +1 -1
  27. package/dist/esm/chunks/{chunk.PPPTT3SM.js → chunk.2VP57RZO.js} +2 -2
  28. package/dist/esm/chunks/{chunk.PPPTT3SM.js.map → chunk.2VP57RZO.js.map} +2 -2
  29. package/dist/esm/chunks/{chunk.TXFYS6EU.js → chunk.33EJTOVA.js} +2 -2
  30. package/dist/esm/chunks/{chunk.OTVT3XM2.js → chunk.3JDFBEF7.js} +2 -2
  31. package/dist/esm/chunks/chunk.3ME47JIX.js +7 -0
  32. package/dist/esm/chunks/chunk.3ME47JIX.js.map +7 -0
  33. package/dist/esm/chunks/{chunk.V6JVHYVW.js → chunk.44UCSD46.js} +2 -2
  34. package/dist/esm/chunks/{chunk.EUE3OVC7.js → chunk.4WVHON6T.js} +2 -2
  35. package/dist/esm/chunks/chunk.4WVHON6T.js.map +7 -0
  36. package/dist/esm/chunks/{chunk.6SBTLXLH.js → chunk.5IQGVS6U.js} +2 -2
  37. package/dist/esm/chunks/{chunk.6SBTLXLH.js.map → chunk.5IQGVS6U.js.map} +1 -1
  38. package/dist/esm/chunks/{chunk.7JQHQKXN.js → chunk.6MPXRRMB.js} +2 -2
  39. package/dist/esm/chunks/{chunk.MXNLCQRB.js → chunk.6VDF54LZ.js} +2 -2
  40. package/dist/esm/chunks/{chunk.GF2GUVYS.js → chunk.7TGGJGTG.js} +2 -2
  41. package/dist/esm/chunks/{chunk.GF2GUVYS.js.map → chunk.7TGGJGTG.js.map} +1 -1
  42. package/dist/esm/chunks/{chunk.4EB5NVCK.js → chunk.AHHNJSZK.js} +2 -2
  43. package/dist/esm/chunks/chunk.BBKRPL6R.js +7 -0
  44. package/dist/esm/chunks/chunk.BBKRPL6R.js.map +7 -0
  45. package/dist/esm/chunks/{chunk.BSTIDYQJ.js → chunk.BBWMSCVG.js} +2 -2
  46. package/dist/esm/chunks/{chunk.BKCEVPKW.js → chunk.BDCJIRNK.js} +2 -2
  47. package/dist/esm/chunks/chunk.BSVFCJCQ.js +7 -0
  48. package/dist/esm/chunks/chunk.BSVFCJCQ.js.map +7 -0
  49. package/dist/esm/chunks/chunk.CAUWWFF4.js +7 -0
  50. package/dist/esm/chunks/chunk.CAUWWFF4.js.map +7 -0
  51. package/dist/esm/chunks/{chunk.SYZB7B4F.js → chunk.CL65KLH7.js} +2 -2
  52. package/dist/esm/chunks/{chunk.4LVS2EYJ.js → chunk.DFGBVJBE.js} +2 -2
  53. package/dist/esm/chunks/chunk.DXZ5LVFJ.js +7 -0
  54. package/dist/esm/chunks/chunk.DXZ5LVFJ.js.map +7 -0
  55. package/dist/esm/chunks/{chunk.YUAU5IWT.js → chunk.F776DWXU.js} +2 -2
  56. package/dist/esm/chunks/{chunk.HKJEGD6C.js → chunk.FIBGOPNP.js} +2 -2
  57. package/dist/esm/chunks/{chunk.HKJEGD6C.js.map → chunk.FIBGOPNP.js.map} +1 -1
  58. package/dist/esm/chunks/{chunk.OHNPVHPF.js → chunk.GEGK55XX.js} +2 -2
  59. package/dist/esm/chunks/{chunk.OHNPVHPF.js.map → chunk.GEGK55XX.js.map} +2 -2
  60. package/dist/esm/chunks/{chunk.2QFIMTVP.js → chunk.GT3XBPZY.js} +2 -2
  61. package/dist/esm/chunks/{chunk.OT6H5NHX.js → chunk.HUGRRRQA.js} +2 -2
  62. package/dist/esm/chunks/{chunk.GJW4WS4I.js → chunk.HXJCTE47.js} +2 -2
  63. package/dist/esm/chunks/{chunk.RHYRMQS7.js → chunk.IPGZ24EH.js} +2 -2
  64. package/dist/esm/chunks/{chunk.RHYRMQS7.js.map → chunk.IPGZ24EH.js.map} +1 -1
  65. package/dist/esm/chunks/chunk.ISC7SZSP.js +7 -0
  66. package/dist/esm/chunks/chunk.ISC7SZSP.js.map +7 -0
  67. package/dist/esm/chunks/{chunk.RUSHOL23.js → chunk.JAAJDT5E.js} +2 -2
  68. package/dist/esm/chunks/{chunk.SIJGKRYS.js → chunk.JCRC2VEI.js} +2 -2
  69. package/dist/esm/chunks/{chunk.SIJGKRYS.js.map → chunk.JCRC2VEI.js.map} +1 -1
  70. package/dist/esm/chunks/{chunk.STGRPD2L.js → chunk.JFKSREWG.js} +2 -2
  71. package/dist/esm/chunks/{chunk.STGRPD2L.js.map → chunk.JFKSREWG.js.map} +1 -1
  72. package/dist/esm/chunks/{chunk.FAANPQES.js → chunk.JL4XB4RI.js} +2 -2
  73. package/dist/esm/chunks/{chunk.24L5GDD2.js → chunk.JTIPXKV6.js} +2 -2
  74. package/dist/esm/chunks/{chunk.24L5GDD2.js.map → chunk.JTIPXKV6.js.map} +2 -2
  75. package/dist/esm/chunks/chunk.KO45GDOA.js +7 -0
  76. package/dist/esm/chunks/{chunk.2CTK5R37.js.map → chunk.KO45GDOA.js.map} +2 -2
  77. package/dist/esm/chunks/chunk.KSCUIS5C.js +7 -0
  78. package/dist/esm/chunks/chunk.KSCUIS5C.js.map +7 -0
  79. package/dist/esm/chunks/{chunk.2LRDPTHK.js → chunk.M2M47T4L.js} +2 -2
  80. package/dist/esm/chunks/{chunk.JVW6JGV3.js → chunk.MGWY7YIL.js} +2 -2
  81. package/dist/esm/chunks/{chunk.JVW6JGV3.js.map → chunk.MGWY7YIL.js.map} +2 -2
  82. package/dist/esm/chunks/{chunk.3CBVRCKM.js → chunk.MJSLXZBM.js} +2 -2
  83. package/dist/esm/chunks/{chunk.3CBVRCKM.js.map → chunk.MJSLXZBM.js.map} +1 -1
  84. package/dist/esm/chunks/{chunk.2YAU7AXH.js → chunk.N7PQ2MUQ.js} +2 -2
  85. package/dist/esm/chunks/{chunk.2YAU7AXH.js.map → chunk.N7PQ2MUQ.js.map} +1 -1
  86. package/dist/esm/chunks/{chunk.XMFQFFKR.js → chunk.NE4NCRRZ.js} +2 -2
  87. package/dist/esm/chunks/chunk.NF4J3Q5X.js +7 -0
  88. package/dist/esm/chunks/chunk.NF4J3Q5X.js.map +7 -0
  89. package/dist/esm/chunks/chunk.OEYALYRM.js +7 -0
  90. package/dist/esm/chunks/chunk.OEYALYRM.js.map +7 -0
  91. package/dist/esm/chunks/{chunk.GHSAKRYH.js → chunk.OKKH7F7M.js} +2 -2
  92. package/dist/esm/chunks/{chunk.AGMPIMJV.js → chunk.QL45FKVJ.js} +2 -2
  93. package/dist/esm/chunks/{chunk.AGMPIMJV.js.map → chunk.QL45FKVJ.js.map} +2 -2
  94. package/dist/esm/chunks/chunk.QU76MOCS.js +12 -0
  95. package/dist/esm/chunks/chunk.QU76MOCS.js.map +7 -0
  96. package/dist/esm/chunks/{chunk.5PHLKON3.js → chunk.R5HZFOUK.js} +2 -2
  97. package/dist/esm/chunks/{chunk.5PHLKON3.js.map → chunk.R5HZFOUK.js.map} +2 -2
  98. package/dist/esm/chunks/chunk.SAXRW6GB.js +7 -0
  99. package/dist/esm/chunks/chunk.SAXRW6GB.js.map +7 -0
  100. package/dist/esm/chunks/{chunk.2IQGDFQS.js → chunk.SEP3L4QL.js} +2 -2
  101. package/dist/esm/chunks/{chunk.2IQGDFQS.js.map → chunk.SEP3L4QL.js.map} +1 -1
  102. package/dist/esm/chunks/{chunk.Z5TWWM7I.js → chunk.SN5LPTHH.js} +2 -2
  103. package/dist/esm/chunks/{chunk.Z5TWWM7I.js.map → chunk.SN5LPTHH.js.map} +1 -1
  104. package/dist/esm/chunks/{chunk.CNQESSA3.js → chunk.UKFJHDO7.js} +2 -2
  105. package/dist/esm/chunks/{chunk.IGK3VYZG.js → chunk.VI2GRQO3.js} +2 -2
  106. package/dist/esm/chunks/{chunk.A5MBSCSQ.js → chunk.VNOJO2PF.js} +2 -2
  107. package/dist/esm/chunks/chunk.W7PZTNZ4.js +7 -0
  108. package/dist/esm/chunks/chunk.W7PZTNZ4.js.map +7 -0
  109. package/dist/esm/chunks/chunk.WH6C36MO.js +7 -0
  110. package/dist/esm/chunks/chunk.WH6C36MO.js.map +7 -0
  111. package/dist/esm/chunks/{chunk.2YX7ASSX.js → chunk.WXN4S7CN.js} +2 -2
  112. package/dist/esm/chunks/{chunk.ER52NFXX.js → chunk.X5BG35YX.js} +2 -2
  113. package/dist/esm/chunks/{chunk.THPU5KBV.js → chunk.XRESQBNE.js} +2 -2
  114. package/dist/esm/chunks/{chunk.632OMHHN.js → chunk.YDY2IGBF.js} +2 -2
  115. package/dist/esm/chunks/{chunk.632OMHHN.js.map → chunk.YDY2IGBF.js.map} +1 -1
  116. package/dist/esm/chunks/{chunk.QYKO543K.js → chunk.YWCLKUK7.js} +2 -2
  117. package/dist/esm/chunks/{chunk.QA3NU7EN.js → chunk.Z4J4D5FD.js} +2 -2
  118. package/dist/esm/chunks/{chunk.QA3NU7EN.js.map → chunk.Z4J4D5FD.js.map} +1 -1
  119. package/dist/esm/chunks/{chunk.V4RBOYNH.js → chunk.ZTGPXIC2.js} +2 -2
  120. package/dist/esm/chunks/{chunk.V4RBOYNH.js.map → chunk.ZTGPXIC2.js.map} +1 -1
  121. package/dist/esm/circular-progress/index.js +1 -1
  122. package/dist/esm/color-picker/index.js +1 -1
  123. package/dist/esm/core/index.js +1 -1
  124. package/dist/esm/core/utils/index.js +1 -1
  125. package/dist/esm/date-picker/index.js +1 -1
  126. package/dist/esm/date-range-picker/index.js +1 -1
  127. package/dist/esm/expansion-panel/index.js +1 -1
  128. package/dist/esm/file-picker/index.js +1 -1
  129. package/dist/esm/focus-indicator/index.js +7 -0
  130. package/dist/esm/focus-indicator/index.js.map +7 -0
  131. package/dist/esm/icon/index.js +1 -1
  132. package/dist/esm/icon-button/index.js +1 -1
  133. package/dist/esm/index.js +1 -1
  134. package/dist/esm/list/index.js +1 -1
  135. package/dist/esm/list/list/index.js +1 -1
  136. package/dist/esm/list/list-item/index.js +1 -1
  137. package/dist/esm/list-dropdown/index.js +1 -1
  138. package/dist/esm/menu/index.js +1 -1
  139. package/dist/esm/open-icon/index.js +1 -1
  140. package/dist/esm/paginator/index.js +1 -1
  141. package/dist/esm/profile-card/index.js +1 -1
  142. package/dist/esm/quantity-field/index.js +1 -1
  143. package/dist/esm/radio/index.js +1 -1
  144. package/dist/esm/select/core/index.js +1 -1
  145. package/dist/esm/select/index.js +1 -1
  146. package/dist/esm/select/select/index.js +1 -1
  147. package/dist/esm/select/select-dropdown/index.js +1 -1
  148. package/dist/esm/slider/index.js +1 -1
  149. package/dist/esm/split-view/index.js +1 -1
  150. package/dist/esm/split-view/split-view/index.js +1 -1
  151. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  152. package/dist/esm/state-layer/index.js +7 -0
  153. package/dist/esm/state-layer/index.js.map +7 -0
  154. package/dist/esm/stepper/index.js +1 -1
  155. package/dist/esm/stepper/step/index.js +1 -1
  156. package/dist/esm/stepper/stepper/index.js +1 -1
  157. package/dist/esm/switch/index.js +1 -1
  158. package/dist/esm/table/index.js +1 -1
  159. package/dist/esm/tabs/index.js +1 -1
  160. package/dist/esm/tabs/tab/index.js +1 -1
  161. package/dist/esm/tabs/tab-bar/index.js +1 -1
  162. package/dist/esm/text-field/index.js +1 -1
  163. package/dist/esm/time-picker/index.js +1 -1
  164. package/dist/esm/toast/index.js +1 -1
  165. package/dist/forge-dark.css +1 -1
  166. package/dist/forge.css +1 -1
  167. package/dist/icon-button/forge-icon-button.css +1 -1
  168. package/dist/table/forge-table.css +1 -1
  169. package/dist/theme/forge-theme.css +1 -1
  170. package/esm/app-bar/app-bar.js +1 -1
  171. package/esm/banner/banner.js +1 -1
  172. package/esm/bottom-sheet/bottom-sheet.js +1 -1
  173. package/esm/busy-indicator/busy-indicator.js +1 -1
  174. package/esm/button/button.d.ts +1 -0
  175. package/esm/button/button.js +8 -2
  176. package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
  177. package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
  178. package/esm/calendar/calendar.js +1 -1
  179. package/esm/card/card-constants.d.ts +2 -2
  180. package/esm/card/card-constants.js +2 -2
  181. package/esm/card/card.d.ts +19 -8
  182. package/esm/card/card.js +30 -21
  183. package/esm/checkbox/checkbox-adapter.d.ts +1 -0
  184. package/esm/checkbox/checkbox-adapter.js +9 -2
  185. package/esm/checkbox/checkbox.js +1 -1
  186. package/esm/chip-field/chip-field.js +1 -1
  187. package/esm/chips/chip/chip.js +1 -1
  188. package/esm/circular-progress/circular-progress.d.ts +3 -3
  189. package/esm/circular-progress/circular-progress.js +4 -4
  190. package/esm/color-picker/color-picker.js +1 -1
  191. package/esm/core/testing/pointer.d.ts +13 -0
  192. package/esm/core/testing/pointer.js +42 -0
  193. package/esm/core/utils/utils.d.ts +16 -2
  194. package/esm/core/utils/utils.js +47 -6
  195. package/esm/file-picker/file-picker.js +1 -1
  196. package/esm/focus-indicator/focus-indicator-adapter.d.ts +29 -0
  197. package/esm/focus-indicator/focus-indicator-adapter.js +39 -0
  198. package/esm/focus-indicator/focus-indicator-constants.d.ts +15 -0
  199. package/esm/focus-indicator/focus-indicator-constants.js +19 -0
  200. package/esm/focus-indicator/focus-indicator-foundation.d.ts +43 -0
  201. package/esm/focus-indicator/focus-indicator-foundation.js +110 -0
  202. package/esm/focus-indicator/focus-indicator.d.ts +67 -0
  203. package/esm/focus-indicator/focus-indicator.js +112 -0
  204. package/esm/focus-indicator/index.d.ts +10 -0
  205. package/esm/focus-indicator/index.js +14 -0
  206. package/esm/icon-button/icon-button.d.ts +1 -0
  207. package/esm/icon-button/icon-button.js +9 -2
  208. package/esm/index.d.ts +2 -0
  209. package/esm/index.js +6 -0
  210. package/esm/list/list-item/list-item-adapter.d.ts +3 -3
  211. package/esm/list/list-item/list-item-adapter.js +2 -2
  212. package/esm/list/list-item/list-item-foundation.d.ts +1 -0
  213. package/esm/list/list-item/list-item-foundation.js +8 -1
  214. package/esm/list/list-item/list-item.js +1 -1
  215. package/esm/paginator/paginator.js +1 -1
  216. package/esm/profile-card/profile-card.js +1 -1
  217. package/esm/radio/radio-adapter.d.ts +1 -0
  218. package/esm/radio/radio-adapter.js +9 -2
  219. package/esm/select/select/select.js +1 -1
  220. package/esm/slider/slider-adapter.d.ts +0 -16
  221. package/esm/slider/slider-adapter.js +11 -71
  222. package/esm/slider/slider-constants.d.ts +0 -3
  223. package/esm/slider/slider-constants.js +0 -3
  224. package/esm/slider/slider-foundation.d.ts +0 -1
  225. package/esm/slider/slider-foundation.js +0 -6
  226. package/esm/slider/slider-utils.js +6 -3
  227. package/esm/slider/slider.d.ts +0 -2
  228. package/esm/slider/slider.js +9 -7
  229. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  230. package/esm/state-layer/index.d.ts +10 -0
  231. package/esm/state-layer/index.js +14 -0
  232. package/esm/state-layer/state-layer-adapter.d.ts +41 -0
  233. package/esm/state-layer/state-layer-adapter.js +101 -0
  234. package/esm/state-layer/state-layer-constants.d.ts +79 -0
  235. package/esm/state-layer/state-layer-constants.js +89 -0
  236. package/esm/state-layer/state-layer-foundation.d.ts +57 -0
  237. package/esm/state-layer/state-layer-foundation.js +237 -0
  238. package/esm/state-layer/state-layer-utils.d.ts +26 -0
  239. package/esm/state-layer/state-layer-utils.js +54 -0
  240. package/esm/state-layer/state-layer.d.ts +66 -0
  241. package/esm/state-layer/state-layer.js +96 -0
  242. package/esm/stepper/step/step.js +1 -1
  243. package/esm/switch/switch.js +10 -3
  244. package/esm/tabs/tab/tab-adapter.d.ts +4 -6
  245. package/esm/tabs/tab/tab-adapter.js +9 -18
  246. package/esm/tabs/tab/tab-constants.d.ts +0 -1
  247. package/esm/tabs/tab/tab-constants.js +0 -1
  248. package/esm/tabs/tab/tab-foundation.d.ts +0 -1
  249. package/esm/tabs/tab/tab-foundation.js +1 -3
  250. package/esm/tabs/tab/tab.d.ts +0 -1
  251. package/esm/tabs/tab/tab.js +9 -6
  252. package/esm/tabs/tab-bar/tab-bar.d.ts +2 -2
  253. package/esm/tabs/tab-bar/tab-bar.js +3 -3
  254. package/esm/text-field/text-field.js +1 -1
  255. package/esm/toast/toast.js +1 -1
  256. package/package.json +1 -1
  257. package/styles/app-bar/_mixins.scss +9 -1
  258. package/styles/card/_mixins.scss +8 -7
  259. package/styles/circular-progress/_mixins.scss +3 -10
  260. package/styles/core/{style-layer → styles}/circular-progress/_core.scss +5 -8
  261. package/styles/core/styles/focus-indicator/_core.scss +5 -0
  262. package/styles/core/styles/focus-indicator/_variables.scss +8 -0
  263. package/styles/core/styles/focus-indicator/index.scss +7 -0
  264. package/styles/core/{style-layer → styles}/slider/_core.scss +13 -31
  265. package/styles/core/styles/state-layer/_core.scss +144 -0
  266. package/styles/core/styles/state-layer/_variables.scss +8 -0
  267. package/styles/core/{style-layer/tabs/tab → styles/state-layer}/index.scss +0 -4
  268. package/styles/core/{style-layer → styles}/tabs/tab/_core.scss +36 -40
  269. package/styles/core/{style-layer → styles}/tabs/tab-bar/_core.scss +2 -2
  270. package/styles/core/{style-layer → styles}/tabs/tab-bar/_variables.scss +1 -1
  271. package/styles/core/styles/tabs/tab-bar/index.scss +7 -0
  272. package/styles/core/styles/tokens/_color-palette.scss +299 -0
  273. package/styles/core/styles/tokens/circular-progress/_tokens.scss +14 -0
  274. package/styles/core/styles/tokens/focus-indicator/_tokens.scss +24 -0
  275. package/styles/core/styles/tokens/index.scss +58 -0
  276. package/styles/core/styles/tokens/state-layer/_tokens.scss +17 -0
  277. package/styles/core/styles/tokens/theme/_tokens.scss +185 -0
  278. package/styles/core/styles/tokens/typography/_tokens.scss +47 -0
  279. package/styles/core/styles/utils/_elevation.scss +5 -0
  280. package/styles/focus-indicator/_mixins.scss +138 -0
  281. package/styles/focus-indicator/_variables.scss +5 -0
  282. package/styles/focus-indicator/focus-indicator.scss +32 -0
  283. package/styles/linear-progress/_mixins.scss +1 -1
  284. package/styles/linear-progress/_variables.scss +1 -1
  285. package/styles/slider/_mixins.scss +17 -1
  286. package/styles/state-layer/_mixins.scss +23 -0
  287. package/styles/state-layer/state-layer.scss +20 -0
  288. package/styles/tabs/tab/_mixins.scss +20 -1
  289. package/styles/tabs/tab/_variables.scss +2 -0
  290. package/styles/tabs/tab-bar/_mixins.scss +2 -1
  291. package/styles/tabs/tab-bar/_variables.scss +2 -2
  292. package/styles/theme/_theme-dark.scss +5 -3
  293. package/styles/theme/_theme.scss +3 -36
  294. package/dist/esm/chunks/chunk.246JM2YT.js +0 -7
  295. package/dist/esm/chunks/chunk.246JM2YT.js.map +0 -7
  296. package/dist/esm/chunks/chunk.2CTK5R37.js +0 -7
  297. package/dist/esm/chunks/chunk.2XFVFZ3P.js +0 -7
  298. package/dist/esm/chunks/chunk.2XFVFZ3P.js.map +0 -7
  299. package/dist/esm/chunks/chunk.5IVB5L5Z.js +0 -7
  300. package/dist/esm/chunks/chunk.5IVB5L5Z.js.map +0 -7
  301. package/dist/esm/chunks/chunk.A5R7KUIP.js +0 -7
  302. package/dist/esm/chunks/chunk.A5R7KUIP.js.map +0 -7
  303. package/dist/esm/chunks/chunk.BWZKQ6WX.js +0 -7
  304. package/dist/esm/chunks/chunk.BWZKQ6WX.js.map +0 -7
  305. package/dist/esm/chunks/chunk.EUE3OVC7.js.map +0 -7
  306. package/dist/esm/chunks/chunk.GUYPITGA.js +0 -7
  307. package/dist/esm/chunks/chunk.GUYPITGA.js.map +0 -7
  308. package/dist/esm/chunks/chunk.GWIVOPRO.js +0 -7
  309. package/dist/esm/chunks/chunk.GWIVOPRO.js.map +0 -7
  310. package/dist/esm/chunks/chunk.JHXNEHWR.js +0 -12
  311. package/dist/esm/chunks/chunk.JHXNEHWR.js.map +0 -7
  312. package/dist/esm/chunks/chunk.NVMILGC2.js +0 -7
  313. package/dist/esm/chunks/chunk.NVMILGC2.js.map +0 -7
  314. package/dist/esm/chunks/chunk.WFDIA7R6.js +0 -7
  315. package/dist/esm/chunks/chunk.WFDIA7R6.js.map +0 -7
  316. package/esm/slider/slider-handle-ripple.d.ts +0 -18
  317. package/esm/slider/slider-handle-ripple.js +0 -37
  318. package/esm/tabs/tab/tab-ripple.d.ts +0 -17
  319. package/esm/tabs/tab/tab-ripple.js +0 -33
  320. package/styles/circular-progress/_variables.scss +0 -12
  321. /package/dist/esm/chunks/{chunk.TXFYS6EU.js.map → chunk.33EJTOVA.js.map} +0 -0
  322. /package/dist/esm/chunks/{chunk.OTVT3XM2.js.map → chunk.3JDFBEF7.js.map} +0 -0
  323. /package/dist/esm/chunks/{chunk.V6JVHYVW.js.map → chunk.44UCSD46.js.map} +0 -0
  324. /package/dist/esm/chunks/{chunk.7JQHQKXN.js.map → chunk.6MPXRRMB.js.map} +0 -0
  325. /package/dist/esm/chunks/{chunk.MXNLCQRB.js.map → chunk.6VDF54LZ.js.map} +0 -0
  326. /package/dist/esm/chunks/{chunk.4EB5NVCK.js.map → chunk.AHHNJSZK.js.map} +0 -0
  327. /package/dist/esm/chunks/{chunk.BSTIDYQJ.js.map → chunk.BBWMSCVG.js.map} +0 -0
  328. /package/dist/esm/chunks/{chunk.BKCEVPKW.js.map → chunk.BDCJIRNK.js.map} +0 -0
  329. /package/dist/esm/chunks/{chunk.SYZB7B4F.js.map → chunk.CL65KLH7.js.map} +0 -0
  330. /package/dist/esm/chunks/{chunk.4LVS2EYJ.js.map → chunk.DFGBVJBE.js.map} +0 -0
  331. /package/dist/esm/chunks/{chunk.YUAU5IWT.js.map → chunk.F776DWXU.js.map} +0 -0
  332. /package/dist/esm/chunks/{chunk.2QFIMTVP.js.map → chunk.GT3XBPZY.js.map} +0 -0
  333. /package/dist/esm/chunks/{chunk.OT6H5NHX.js.map → chunk.HUGRRRQA.js.map} +0 -0
  334. /package/dist/esm/chunks/{chunk.GJW4WS4I.js.map → chunk.HXJCTE47.js.map} +0 -0
  335. /package/dist/esm/chunks/{chunk.RUSHOL23.js.map → chunk.JAAJDT5E.js.map} +0 -0
  336. /package/dist/esm/chunks/{chunk.FAANPQES.js.map → chunk.JL4XB4RI.js.map} +0 -0
  337. /package/dist/esm/chunks/{chunk.2LRDPTHK.js.map → chunk.M2M47T4L.js.map} +0 -0
  338. /package/dist/esm/chunks/{chunk.XMFQFFKR.js.map → chunk.NE4NCRRZ.js.map} +0 -0
  339. /package/dist/esm/chunks/{chunk.GHSAKRYH.js.map → chunk.OKKH7F7M.js.map} +0 -0
  340. /package/dist/esm/chunks/{chunk.CNQESSA3.js.map → chunk.UKFJHDO7.js.map} +0 -0
  341. /package/dist/esm/chunks/{chunk.IGK3VYZG.js.map → chunk.VI2GRQO3.js.map} +0 -0
  342. /package/dist/esm/chunks/{chunk.A5MBSCSQ.js.map → chunk.VNOJO2PF.js.map} +0 -0
  343. /package/dist/esm/chunks/{chunk.2YX7ASSX.js.map → chunk.WXN4S7CN.js.map} +0 -0
  344. /package/dist/esm/chunks/{chunk.ER52NFXX.js.map → chunk.X5BG35YX.js.map} +0 -0
  345. /package/dist/esm/chunks/{chunk.THPU5KBV.js.map → chunk.XRESQBNE.js.map} +0 -0
  346. /package/dist/esm/chunks/{chunk.QYKO543K.js.map → chunk.YWCLKUK7.js.map} +0 -0
  347. /package/styles/core/{style-layer → styles}/circular-progress/_animations.scss +0 -0
  348. /package/styles/core/{style-layer → styles}/circular-progress/_variables.scss +0 -0
  349. /package/styles/core/{style-layer → styles}/circular-progress/index.scss +0 -0
  350. /package/styles/core/{style-layer → styles}/core/_config.scss +0 -0
  351. /package/styles/core/{style-layer → styles}/linear-progress/_animations.scss +0 -0
  352. /package/styles/core/{style-layer → styles}/linear-progress/_core.scss +0 -0
  353. /package/styles/core/{style-layer → styles}/linear-progress/_variables.scss +0 -0
  354. /package/styles/core/{style-layer → styles}/linear-progress/index.scss +0 -0
  355. /package/styles/core/{style-layer → styles}/slider/_functions.scss +0 -0
  356. /package/styles/core/{style-layer → styles}/slider/_variables.scss +0 -0
  357. /package/styles/core/{style-layer → styles}/slider/index.scss +0 -0
  358. /package/styles/core/{style-layer → styles}/tabs/tab/_variables.scss +0 -0
  359. /package/styles/core/{style-layer/tabs/tab-bar → styles/tabs/tab}/index.scss +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/list/list/list-constants.ts", "../../src/list/list-item/list-item-constants.ts", "../../src/list/list-item/list-item-adapter.ts", "../../src/list/list-item/list-item-foundation.ts", "../../src/list/list-item/list-item.ts", "../../src/list/list-item/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}list`;\n\nconst attributes = {\n STATIC: 'static',\n DENSE: 'dense',\n PROPAGATE_CLICK: 'propagate-click',\n INDENTED: 'indented',\n SELECTED_VALUE: 'selected-value'\n};\n\nconst selectors = {\n FOCUSABLE_LIST_ITEMS: '.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled)'\n};\n\nexport const LIST_CONSTANTS = {\n elementName,\n attributes,\n selectors\n};\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\nimport { IListItemComponent } from './list-item';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}list-item`;\n\nconst attributes = {\n STATIC: 'static',\n TWO_LINE: 'two-line',\n THREE_LINE: 'three-line',\n ACTIVE: 'active',\n SELECTED: 'selected',\n VALUE: 'value',\n HREF: 'href',\n TARGET: 'target',\n RIPPLE: 'ripple',\n DISABLED: 'disabled',\n DENSE: 'dense',\n PROPAGATE_CLICK: 'propagate-click',\n INDENTED: 'indented',\n WRAP: 'wrap',\n DRAWER_CONTEXT: 'forge-drawer-context',\n IGNORE: 'forge-ignore'\n};\n\nconst classes = {\n LIST_ITEM: 'forge-list-item',\n STATIC: 'forge-list-item--static',\n TEXT: 'forge-list-item__text',\n TWO_LINE: 'forge-list-item--two-line',\n THREE_LINE: 'forge-list-item--three-line',\n ACTIVE: 'forge-list-item--active',\n ACTIVATED: 'forge-list-item--activated',\n SELECTED: 'forge-list-item--selected',\n DISABLED: 'forge-list-item--disabled',\n DENSE: 'forge-list-item--dense',\n INDENTED: 'forge-list-item--indented',\n WRAP: 'forge-list-item--wrap'\n};\n\nconst selectors = {\n LIST_ITEM: `.${classes.LIST_ITEM}`,\n DEFAULT_SLOT: `.${classes.TEXT} > slot`,\n CHECKBOX_RADIO_SELECTOR: 'input[type=checkbox]:not(:disabled):not([forge-ignore]),input[type=radio]:not(:disabled):not([forge-ignore])'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nconst roles = {\n LINK: 'link',\n LIST_ITEM: 'listitem'\n};\n\nexport const LIST_ITEM_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors,\n events,\n roles\n};\n\nexport interface IListItemSelectEventData {\n value: any;\n listItem: IListItemComponent;\n}\n", "import { addClass, getShadowElement, removeClass, requireParent, isDeepEqual, toggleClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { userInteractionListener } from '../../core/utils';\nimport { IListComponent } from '../list/list';\nimport { LIST_CONSTANTS } from '../list/list-constants';\nimport { IListItemComponent } from './list-item';\nimport { LIST_ITEM_CONSTANTS } from './list-item-constants';\nimport { ForgeRipple } from '../../ripple';\n\nexport interface IListItemAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n getListItem(): IListItemComponent;\n addListener(type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions): void;\n removeListener(type: string, listener: (evt: Event) => void): void;\n createRipple(): any;\n setStatic(value: boolean): void;\n setTwoLine(value: boolean): void;\n setThreeLine(value: boolean): void;\n getLineCount(): number;\n setActive(value: boolean): void;\n setSelected(value: boolean): void;\n tryToggleCheckboxRadio(value?: boolean): void;\n setFocus(): void;\n hasFocus(): boolean;\n setRole(role: string): void;\n setDisabled(disabled: boolean): void;\n setDense(dense: boolean): void;\n setIndented(indented: boolean): void;\n setWrap(value: boolean): void;\n trySelect(value: unknown): boolean | null;\n userInteractionListener(): ReturnType<typeof userInteractionListener>;\n}\n\nexport class ListItemAdapter extends BaseAdapter<IListItemComponent> implements IListItemAdapter {\n private _listItemElement: HTMLElement;\n private _defaultSlot: HTMLSlotElement;\n\n constructor(component: IListItemComponent) {\n super(component);\n this._initialize();\n }\n\n private _initialize(): void {\n this._listItemElement = getShadowElement(this._component, LIST_ITEM_CONSTANTS.selectors.LIST_ITEM);\n this._defaultSlot = getShadowElement(this._component, LIST_ITEM_CONSTANTS.selectors.DEFAULT_SLOT) as HTMLSlotElement;\n }\n \n public initializeAccessibility(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'listitem');\n }\n }\n\n public getListItem(): IListItemComponent {\n return this._component;\n }\n\n /**\n * Adds an event listener to the `<forge-list-item>` host element.\n * @param {string} type The event type.\n * @param {Function} listener The event callback.\n */\n public addListener(type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions): void {\n this._listItemElement.addEventListener(type, listener, options);\n }\n\n /**\n * Removes an event listener from the `<forge-list-item>` host element.\n * @param {string} type The event type.\n * @param {Function} listener The event callback.\n */\n public removeListener(type: string, listener: (evt: Event) => void): void {\n this._listItemElement.removeEventListener(type, listener);\n }\n\n /**\n * Creates a ripple instance on the list item.\n * @returns {ForgeRipple}\n */\n public createRipple(): any {\n return new ForgeRipple(this._listItemElement);\n }\n\n /**\n * Toggles the static state of this list item.\n * @param {boolean} value The static state.\n */\n public setStatic(value: boolean): void {\n if (value) {\n this._listItemElement.tabIndex = -1;\n addClass(LIST_ITEM_CONSTANTS.classes.STATIC, this._listItemElement);\n } else {\n this._listItemElement.tabIndex = 0;\n removeClass(LIST_ITEM_CONSTANTS.classes.STATIC, this._listItemElement);\n }\n }\n\n /**\n * Sets this list item as a two-line list item.\n * @param {boolean} value The two-line state.\n */\n public setTwoLine(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.TWO_LINE, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.TWO_LINE, this._listItemElement);\n }\n }\n\n /**\n * Sets this list item as a three-line list item.\n * @param {boolean} value The three-line state.\n */\n public setThreeLine(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.THREE_LINE, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.THREE_LINE, this._listItemElement);\n }\n }\n\n /**\n * Determines how many lines the list item is displaying.\n */\n public getLineCount(): number {\n return this._defaultSlot.assignedNodes().filter(e => e.nodeType === Node.ELEMENT_NODE).length; // assignedElements does not exist in the polyfilled version so filtering nodes instead\n }\n\n /**\n * Toggles the active class of the list item.\n * @param {boolean} value The active state.\n */\n public setActive(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.ACTIVE, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.ACTIVE, this._listItemElement);\n }\n }\n\n /**\n * Toggles the selected class of the list item.\n * @param {boolean} value The active state.\n */\n public setSelected(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.SELECTED, this._listItemElement);\n // We are treating selected and activated as the same state, and mdc-states hooks right into --activated\n // addClass(LIST_ITEM_CONSTANTS.classes.ACTIVATED, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.SELECTED, this._listItemElement);\n // removeClass(LIST_ITEM_CONSTANTS.classes.ACTIVATED, this._listItemElement);\n }\n }\n\n /**\n * Attemps to toggle a checkbox or radio button within the list item if it can find one.\n */\n public tryToggleCheckboxRadio(value?: boolean): void {\n const checkable = this._component.querySelector(LIST_ITEM_CONSTANTS.selectors.CHECKBOX_RADIO_SELECTOR) as HTMLInputElement;\n if (checkable) {\n const force = typeof value === 'boolean';\n const currentState = checkable.checked;\n \n // Check if we are just toggling or forcing to a specific checked state\n checkable.checked = force ? value as boolean : !checkable.checked;\n\n if (!force || currentState !== value) {\n checkable.dispatchEvent(new Event('change', { bubbles: true }));\n }\n }\n }\n\n /** Attempts to set focus to this list item. */\n public setFocus(): void {\n this._listItemElement.focus();\n }\n\n /** Returns whether the component has focus or not. */\n public hasFocus(): boolean {\n return document.activeElement === this._component || !!this._component.shadowRoot?.activeElement;\n }\n\n /**\n * Sets the role on the list item element.\n * @param role The role.\n */\n public setRole(role: string): void {\n this._listItemElement.setAttribute('role', role);\n }\n\n public setDisabled(disabled: boolean): void {\n toggleClass(this._listItemElement, disabled, LIST_ITEM_CONSTANTS.classes.DISABLED);\n }\n\n public setDense(dense: boolean): void {\n toggleClass(this._listItemElement, dense, LIST_ITEM_CONSTANTS.classes.DENSE);\n }\n\n public setIndented(indented: boolean): void {\n toggleClass(this._listItemElement, indented, LIST_ITEM_CONSTANTS.classes.INDENTED);\n }\n\n public setWrap(value: boolean): void {\n toggleClass(this._listItemElement, value, LIST_ITEM_CONSTANTS.classes.WRAP);\n }\n\n /**\n * Attempts to set the selected state of the list item element and it's visual indicators\n * @param value The value to compare to the parent list element's selected value\n * @returns Returns whether the list item is selected or not\n */\n public trySelect(value: unknown): boolean | null {\n const list = requireParent<IListComponent>(this._component, LIST_CONSTANTS.elementName);\n if (!list || list.selectedValue === undefined) {\n return null;\n }\n\n const listValues = list.selectedValue instanceof Array ? list.selectedValue : [list.selectedValue];\n const isSelected = listValues.some(v => isDeepEqual(v, value));\n\n this.setSelected(isSelected);\n this.tryToggleCheckboxRadio(isSelected);\n return isSelected;\n }\n\n public userInteractionListener(): ReturnType<typeof userInteractionListener> {\n return userInteractionListener(this._listItemElement);\n }\n}\n", "import { ICustomElementFoundation, matchesSelectors } from '@tylertech/forge-core';\nimport { ForgeRipple } from '../../ripple';\nimport { IListItemAdapter } from './list-item-adapter';\nimport { LIST_ITEM_CONSTANTS, IListItemSelectEventData } from './list-item-constants';\n\nexport interface IListItemFoundation extends ICustomElementFoundation {\n static: boolean;\n twoLine: boolean;\n threeLine: boolean;\n active: boolean;\n selected: boolean;\n value: any;\n href: string;\n target: string;\n ripple: boolean;\n disabled: boolean;\n dense: boolean;\n wrap: boolean;\n setFocus(): void;\n}\n\n/**\n * The foundation class behind the `<forge-list-item>` component.\n */\nexport class ListItemFoundation implements IListItemFoundation {\n private _ripple = true;\n private _rippleInstance: ForgeRipple;\n private _static = false;\n private _twoLine = false;\n private _threeLine = false;\n private _active = false;\n private _selected = false;\n private _value: any;\n private _href: string;\n private _target: string;\n private _disabled = false;\n private _dense = false;\n private _propagateClick = true;\n private _indented = false;\n private _wrap = false;\n private _clickListener: (evt: MouseEvent) => void;\n private _mouseDownListener: (evt: MouseEvent) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n\n constructor(private _adapter: IListItemAdapter) {\n this._clickListener = (evt: MouseEvent) => this._onClick(evt);\n this._mouseDownListener = (evt: MouseEvent) => this._onMouseDown(evt);\n this._keydownListener = (evt: KeyboardEvent) => this._onKeydown(evt);\n }\n\n public initialize(): void {\n this._adapter.initializeAccessibility();\n this._setRipple();\n this._adapter.setStatic(this._static);\n this._adapter.setDense(this._dense);\n this._adapter.setDisabled(this._disabled);\n this._adapter.setIndented(this._indented);\n this._adapter.setWrap(this._wrap);\n\n if (!this._static) {\n this._adapter.addListener('click', this._clickListener);\n this._adapter.addListener('mousedown', this._mouseDownListener, { passive: false, capture: true });\n this._adapter.addListener('keydown', this._keydownListener);\n }\n\n if (this._threeLine) {\n this._adapter.setThreeLine(this._threeLine);\n } else if (this.twoLine) {\n this._adapter.setTwoLine(this._twoLine);\n }\n\n const isSelected = this._adapter.trySelect(this._value);\n if(isSelected != null) {\n this._selected = isSelected;\n }\n }\n\n public disconnect(): void {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n this._rippleInstance = undefined as any;\n }\n }\n\n private _onMouseDown(evt: MouseEvent): void {\n if (this._adapter.hasFocus() || !this._propagateClick) {\n evt.preventDefault();\n }\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n if (evt.key === 'Enter' || evt.key === ' ') {\n if (evt.key === ' ') {\n evt.preventDefault();\n }\n this._select(evt.target as HTMLElement);\n }\n }\n\n /**\n * Handles clicking a list item.\n * @param evt\n */\n private _onClick(evt: MouseEvent): void {\n this._select(evt.target as HTMLElement);\n }\n\n private _select(targetElement: HTMLElement): void {\n const ignoreElement = targetElement?.hasAttribute(LIST_ITEM_CONSTANTS.attributes.IGNORE);\n if (this._static || this._disabled || ignoreElement) {\n return;\n }\n\n if (!this._adapter.hasFocus() && this._propagateClick) {\n this.setFocus();\n }\n\n if (this._href) {\n if (this._target) {\n window.open(this._href, this._target);\n } else {\n document.location.href = this._href;\n }\n return;\n }\n\n // If the target was not a checkbox or radio button, attempt to find one and toggle its checked state\n if (!matchesSelectors(targetElement, LIST_ITEM_CONSTANTS.selectors.CHECKBOX_RADIO_SELECTOR)) {\n this._adapter.tryToggleCheckboxRadio();\n }\n\n const data: IListItemSelectEventData = {\n value: this._value,\n listItem: this._adapter.getListItem()\n };\n this._adapter.emitHostEvent(LIST_ITEM_CONSTANTS.events.SELECT, data);\n }\n\n /** Gets/sets whether the list item has a ripple or not. */\n public get ripple(): boolean {\n return this._ripple;\n }\n public set ripple(value: boolean) {\n if (this._ripple !== value) {\n // We don't attach ripples to static items\n if (value && this._static) {\n return;\n }\n this._ripple = value;\n this._setRipple();\n\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.RIPPLE, String(this._ripple));\n }\n }\n\n /** Gets/sets whether the static state of this list item. */\n public get static(): boolean {\n return this._static;\n }\n public set static(value: boolean) {\n if (this._static !== value) {\n this._static = value;\n this._adapter.setStatic(this._static);\n\n // Ensure we either add or remove the ripple\n this._setRipple();\n\n // Toggle the click listener\n if (this._static) {\n this._adapter.removeListener('click', this._clickListener);\n } else {\n this._adapter.addListener('click', this._clickListener);\n }\n\n if (this._static) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.STATIC);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.STATIC);\n }\n }\n }\n\n /** Gets/sets whether the list item displays two lines of text. */\n public get twoLine(): boolean {\n return this._twoLine;\n }\n public set twoLine(value: boolean) {\n if (this._twoLine !== value) {\n this._twoLine = value;\n this._adapter.setTwoLine(this._twoLine);\n\n if (this._twoLine) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.TWO_LINE);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.TWO_LINE);\n }\n }\n }\n\n /** Gets/sets whether the list item displays two lines of text. */\n public get threeLine(): boolean {\n return this._threeLine;\n }\n public set threeLine(value: boolean) {\n if (this._threeLine !== value) {\n this._threeLine = value;\n\n if (this._threeLine) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.THREE_LINE);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.THREE_LINE);\n }\n\n if (this._threeLine) {\n this._twoLine = false;\n }\n\n this._adapter.setTwoLine(this._twoLine);\n this._adapter.setThreeLine(this._threeLine);\n }\n }\n\n /** Gets/sets whether the list item is active or not. */\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n if (this._active !== value) {\n this._active = value;\n this._adapter.setActive(this._active);\n if (this._active) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.ACTIVE);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.ACTIVE);\n }\n }\n }\n\n /** Gets/sets whether the list item is selected or not. */\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._selected = value;\n this._adapter.setSelected(this._selected);\n this._adapter.tryToggleCheckboxRadio(this._selected);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.SELECTED, this._selected);\n }\n }\n\n /** Gets/sets the unique value for this list item. */\n public get value(): any {\n return this._value;\n }\n public set value(value: any) {\n this._value = value;\n const isSelected = this._adapter.trySelect(this._value);\n if(isSelected != null) {\n this._selected = isSelected;\n }\n }\n\n /** Gets/sets the href link that this list item will send the browser to when clicked. */\n public get href(): string {\n return this._href;\n }\n public set href(value: string) {\n if (this._href !== value) {\n this._href = value;\n if (this._href) {\n this._adapter.setRole(LIST_ITEM_CONSTANTS.roles.LINK);\n } else {\n this._adapter.setRole(LIST_ITEM_CONSTANTS.roles.LIST_ITEM);\n }\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.HREF, this._href);\n }\n }\n\n /** Gets/sets the href link target. */\n public get target(): string {\n return this._target;\n }\n public set target(value: string) {\n this._target = value;\n }\n\n /** Gets/sets the disabled state. */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n /** Gets/sets the dense state. */\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._adapter.setDense(this._dense);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DENSE, this._dense);\n }\n }\n\n /** Gets/sets the dense state. */\n public get propagateClick(): boolean {\n return this._propagateClick;\n }\n public set propagateClick(value: boolean) {\n if (this._propagateClick !== value) {\n this._propagateClick = value;\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK, '' + !!this._propagateClick);\n }\n }\n\n public get indented(): boolean {\n return this._indented;\n }\n public set indented(value: boolean) {\n if (this._indented !== value) {\n this._indented = value;\n this._adapter.setIndented(this._indented);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.INDENTED, this._indented);\n }\n }\n\n public get wrap(): boolean {\n return this._wrap;\n }\n public set wrap(value: boolean) {\n if (this._wrap !== value) {\n this._wrap = value;\n this._adapter.setWrap(this._wrap);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.WRAP, this._wrap);\n }\n }\n\n private async _setRipple(): Promise<void> {\n if (this._ripple && !this._static && !this._rippleInstance) {\n const type = await this._adapter.userInteractionListener();\n if (this._ripple && !this._static && !this._rippleInstance) { // need to re-check after await\n this._rippleInstance = this._adapter.createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n } else if ((!this._ripple || this._static) && this._rippleInstance) {\n this._rippleInstance.destroy();\n this._rippleInstance = undefined as any;\n }\n }\n\n /**\n * Sets focus to this list item.\n */\n public setFocus(): void {\n this._adapter.setFocus();\n }\n}\n", "import { CustomElement, attachShadowTemplate, requireParent, elementParents, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\nimport { ListItemAdapter } from './list-item-adapter';\nimport { ListItemFoundation } from './list-item-foundation';\nimport { IListItemSelectEventData, LIST_ITEM_CONSTANTS } from './list-item-constants';\nimport { LIST_CONSTANTS } from '../list/list-constants';\nimport { IListComponent } from '../list';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\n\nconst defaultTemplate = '<template><div class=\\\"forge-list-item\\\" tabindex=\\\"0\\\" part=\\\"root\\\"><slot name=\\\"leading\\\"></slot><slot name=\\\"avatar\\\"></slot><div class=\\\"forge-list-item__text\\\" part=\\\"text-container\\\"><slot></slot><slot name=\\\"title\\\"></slot><slot name=\\\"subtitle\\\"></slot><slot name=\\\"tertiary-title\\\"></slot><slot></slot></div><slot name=\\\"trailing\\\"></slot></div></template>';\nconst styles = '@-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-ripple-surface{--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;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-ripple-surface::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-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::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-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::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-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::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-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-list-item{min-height:32px;min-height:var(--forge-list-item-min-height,32px);max-height:none;max-height:var(--forge-list-item-max-height,none);height:32px;height:var(--forge-list-item-height,32px);padding:8px 16px;padding:var(--forge-list-item-padding,8px 16px);margin-left:0;margin-left:var(--forge-list-item-indent,0);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-list-item-align-items,center);align-items:var(--forge-list-item-align-items,center);position:relative;display:-webkit-box;display:flex;-webkit-box-pack:start;justify-content:flex-start;overflow:hidden}.forge-list-item:focus{outline:0}.forge-list-item ::slotted([slot=leading]),.forge-list-item ::slotted([slot=trailing]){font-size:1.5rem}.forge-list-item ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:0;margin-left:var(--forge-list-item-leading-margin-left,0);margin-right:32px;margin-right:var(--forge-list-item-leading-margin-right,32px);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}.forge-list-item ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-list-item ::slotted([slot=avatar]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:0;margin-left:var(--forge-list-item-leading-margin-left,0);margin-right:32px;margin-right:var(--forge-list-item-leading-margin-right,32px);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;margin-left:0;margin-right:16px;min-width:40px;min-height:40px;border-radius:50%;display:inline-flex;background-color:rgba(0,0,0,.54);background-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item{--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}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::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)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--foreground-activation::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}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--foreground-deactivation::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))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}.forge-list-item ::slotted([slot=title]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.forge-list-item ::slotted([slot=subtitle]),.forge-list-item ::slotted([slot=tertiary-title]){-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);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));display:block}.forge-list-item--two-line{height:56px;height:var(--forge-list-item-height,56px)}.forge-list-item--three-line{height:72px;height:var(--forge-list-item-height,72px)}.forge-list-item--dense{height:16px;height:var(--forge-list-item-height,16px)}.forge-list-item--dense ::slotted([slot=leading]),.forge-list-item--dense ::slotted([slot=trailing]){font-size:1.25rem}.forge-list-item--dense ::slotted([slot=leading]){margin-right:12px;margin-right:var(--forge-list-item-leading-margin-right,12px)}.forge-list-item--dense ::slotted(.forge-list-item__title){-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)}.forge-list-item--wrap{min-height:32px;min-height:var(--forge-list-item-min-height,32px);height:auto;height:var(--forge-list-item-height,auto)}.forge-list-item--wrap .forge-list-item__text,.forge-list-item--wrap ::slotted([slot=subtitle]),.forge-list-item--wrap ::slotted([slot=tertiary-title]),.forge-list-item--wrap ::slotted([slot=title]){text-overflow:clip;white-space:normal}.forge-list-item--indented{margin-left:56px;margin-left:var(--forge-list-item-indent,56px)}.forge-list-item--active.forge-list-item--activated:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before,.forge-list-item--active.forge-list-item--selected:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{opacity:.2}.forge-list-item--active.forge-list-item--activated:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before,.forge-list-item--active.forge-list-item--selected:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before{opacity:.24}.forge-list-item--activated,.forge-list-item--selected{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-list-item--activated .forge-list-item__text .forge-list-item__subtitle,.forge-list-item--activated .forge-list-item__text ::slotted(.forge-list-item__subtitle),.forge-list-item--selected .forge-list-item__text .forge-list-item__subtitle,.forge-list-item--selected .forge-list-item__text ::slotted(.forge-list-item__subtitle){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);opacity:.87}.forge-list-item--activated .forge-list-item__text .forge-list-item__tertiary-title,.forge-list-item--activated .forge-list-item__text ::slotted(.forge-list-item__tertiary-title),.forge-list-item--selected .forge-list-item__text .forge-list-item__tertiary-title,.forge-list-item--selected .forge-list-item__text ::slotted(.forge-list-item__tertiary-title){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);opacity:.87}.forge-list-item--activated ::slotted([slot=leading]),.forge-list-item--activated ::slotted([slot=trailing]),.forge-list-item--selected ::slotted([slot=leading]),.forge-list-item--selected ::slotted([slot=trailing]){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-list-item--activated ::slotted([slot=avatar].forge-list-item__avatar-icon),.forge-list-item--selected ::slotted([slot=avatar].forge-list-item__avatar-icon){background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12));color:#000;color:var(--mdc-theme-on-surface,#000)}.forge-list-item--disabled{cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-list-item--disabled ::slotted([slot=leading]),.forge-list-item--disabled ::slotted([slot=trailing]){cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-list-item[role=link]{cursor:pointer}:host{display:block;contain:content}:host([hidden]){display:none}:host([forge-drawer-context=true]) .forge-list-item{margin:8px;margin:var(--forge-list-item-margin,8px);padding:0 8px;padding:var(--forge-list-item-padding,0 8px);border-radius:4px;border-radius:var(--forge-list-item-border-radius,4px);cursor:pointer;cursor:var(--forge-list-item-cursor,pointer);height:40px;height:var(--forge-list-item-height,40px);font-size:.875rem;font-weight:500}:host([forge-drawer-context=true]) .forge-list-item--static{cursor:initial}:host([forge-drawer-context=true]) .forge-list-item--indented{margin-left:64px;margin-left:var(--forge-list-item-indent,64px)}:host([forge-drawer-context=true]) .forge-list-item--two-line{min-height:56px-8px;min-height:var(--forge-list-item-min-height,56px-8px);height:56px-8px;height:var(--forge-list-item-height,56px-8px)}:host([forge-drawer-context=true]) .forge-list-item--three-line{min-height:72px-8px;min-height:var(--forge-list-item-min-height,72px-8px);height:72px-8px;height:var(--forge-list-item-height,72px-8px)}:host([forge-drawer-context=true]) .forge-list-item:first-child{margin-top:4px;margin-bottom:4px}:host([forge-drawer-context=true]) .forge-list-item--dense{height:16px;height:var(--forge-list-item-height,16px)}:host([forge-drawer-context=true]) .forge-list-item--dense ::slotted([slot=leading]),:host([forge-drawer-context=true]) .forge-list-item--dense ::slotted([slot=trailing]){font-size:1.25rem}:host([forge-drawer-context=true]) .forge-list-item--dense .forge-list-item__text{-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)}:host([forge-drawer-context=true]) .forge-list-item--wrap{height:auto;height:var(--forge-list-item-height,auto);padding:4px 8px;padding:var(--forge-list-item-padding,4px 8px);min-height:40px;min-height:var(--forge-list-item-min-height,40px)}:host([forge-drawer-context=true]) .forge-list-item--disabled{cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed)}:host([dense]){-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)}';\n\nexport interface IListItemComponent extends IBaseComponent {\n static: boolean;\n twoLine: boolean;\n threeLine: boolean;\n active: boolean;\n selected: boolean;\n value: any;\n href: string;\n target: string;\n ripple: boolean;\n disabled: boolean;\n dense: boolean;\n propagateClick: boolean;\n indented: boolean;\n wrap: boolean;\n focus(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-list-item': IListItemComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-list-item-select': CustomEvent<IListItemSelectEventData>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-list-item>` element.\n * \n * @tag forge-list-item\n */\n@CustomElement({\n name: LIST_ITEM_CONSTANTS.elementName\n})\nexport class ListItemComponent extends BaseComponent implements IListItemComponent {\n public static get observedAttributes(): string[] {\n return [\n LIST_ITEM_CONSTANTS.attributes.STATIC,\n LIST_ITEM_CONSTANTS.attributes.TWO_LINE,\n LIST_ITEM_CONSTANTS.attributes.THREE_LINE,\n LIST_ITEM_CONSTANTS.attributes.ACTIVE,\n LIST_ITEM_CONSTANTS.attributes.SELECTED,\n LIST_ITEM_CONSTANTS.attributes.VALUE,\n LIST_ITEM_CONSTANTS.attributes.HREF,\n LIST_ITEM_CONSTANTS.attributes.TARGET,\n LIST_ITEM_CONSTANTS.attributes.RIPPLE,\n LIST_ITEM_CONSTANTS.attributes.DISABLED,\n LIST_ITEM_CONSTANTS.attributes.DENSE,\n LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK,\n LIST_ITEM_CONSTANTS.attributes.INDENTED,\n LIST_ITEM_CONSTANTS.attributes.WRAP\n ];\n }\n\n private _foundation: ListItemFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, defaultTemplate, styles);\n this._foundation = new ListItemFoundation(new ListItemAdapter(this));\n }\n\n public connectedCallback(): void {\n // To simulate the :host-context() selector for Firefox until they implement it, we need to determine if the\n // list item is within a drawer for auto-styling the list item when included within a drawer. Check to see if\n // any of the parents of this element are a drawer.\n if (!this.hasAttribute(LIST_ITEM_CONSTANTS.attributes.DRAWER_CONTEXT) && elementParents(this).some(el => ['forge-drawer', 'forge-modal-drawer', 'forge-mini-drawer'].includes(el.tagName.toLowerCase()))) {\n this.setAttribute(LIST_ITEM_CONSTANTS.attributes.DRAWER_CONTEXT, 'true');\n }\n\n const list = requireParent<IListComponent>(this, LIST_CONSTANTS.elementName);\n if (list) {\n this._inheritParentListProps(list);\n }\n\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case LIST_ITEM_CONSTANTS.attributes.STATIC:\n this.static = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.TWO_LINE:\n this.twoLine = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.THREE_LINE:\n this.threeLine = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.ACTIVE:\n this.active = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n case LIST_ITEM_CONSTANTS.attributes.HREF:\n this.href = newValue;\n break;\n case LIST_ITEM_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case LIST_ITEM_CONSTANTS.attributes.RIPPLE:\n this.ripple = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK:\n this.propagateClick = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.INDENTED:\n this.indented = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.WRAP:\n this.wrap = coerceBoolean(newValue);\n break;\n }\n }\n\n private _inheritParentListProps(list: IListComponent): void {\n if (list.hasAttribute(LIST_CONSTANTS.attributes.STATIC)) {\n this.static = true;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.DENSE)) {\n this.dense = true;\n }\n if (list.getAttribute(LIST_CONSTANTS.attributes.PROPAGATE_CLICK) === 'false') {\n this.propagateClick = false;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.INDENTED)) {\n this.indented = true;\n }\n }\n\n /** Gets/sets whether the static state of this list item. */\n @FoundationProperty()\n public declare static: boolean;\n\n /** Gets/sets whether the list item displays two lines of text. */\n @FoundationProperty()\n public declare twoLine: boolean;\n\n /** Gets/sets whether the list item displays three lines of text. */\n @FoundationProperty()\n public declare threeLine: boolean;\n\n /** Gets/sets whether the list item is active or not. */\n @FoundationProperty()\n public declare active: boolean;\n\n /** Gets/sets whether the list item is selected or not. */\n @FoundationProperty()\n public declare selected: boolean;\n\n /** Gets/sets list item value. */\n @FoundationProperty()\n public declare value: any;\n\n /** Gets/sets the href link that this list item will send the browser to when clicked. */\n @FoundationProperty()\n public declare href: string;\n\n /** Gets/sets the href link target. Only pertains when `href` is also used. */\n @FoundationProperty()\n public declare target: string;\n\n /** Gets/sets whether the list item has a ripple or not. */\n @FoundationProperty()\n public declare ripple: boolean;\n\n /** Gets/sets whether the list item is disabled or not. */\n @FoundationProperty()\n public declare disabled: boolean;\n\n /** Gets/sets whether the list item is using dense styles or not. */\n @FoundationProperty()\n public declare dense: boolean;\n\n /** Gets/sets whether the list item allows mousedown events through to the underlying list item element. Default is true. */\n @FoundationProperty()\n public declare propagateClick: boolean;\n\n /** Gets/sets whether the list item is indented or not. Default is false. */\n @FoundationProperty()\n public declare indented: boolean;\n\n /** Gets/sets whether the list item content is wrapped or not. Default is true. */\n @FoundationProperty()\n public declare wrap: boolean;\n\n /** Sets focus to this list item. */\n public override focus(): void {\n this._foundation.setFocus();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { ListItemComponent } from './list-item';\n\nexport * from './list-item-adapter';\nexport * from './list-item-constants';\nexport * from './list-item-foundation';\nexport * from './list-item';\n\nexport function defineListItemComponent(): void {\n defineCustomElement(ListItemComponent);\n}\n"],
5
- "mappings": "yaAEA,IAAMA,EAA2C,GAAGC,QAE9CC,EAAa,CACjB,OAAQ,SACR,MAAO,QACP,gBAAiB,kBACjB,SAAU,WACV,eAAgB,gBAClB,EAEMC,EAAY,CAChB,qBAAsB,gFACxB,EAEaC,EAAiB,CAC5B,YAAAJ,EACA,WAAAE,EACA,UAAAC,CACF,ECjBA,IAAME,EAA2C,GAAGC,aAE9CC,EAAa,CACjB,OAAQ,SACR,SAAU,WACV,WAAY,aACZ,OAAQ,SACR,SAAU,WACV,MAAO,QACP,KAAM,OACN,OAAQ,SACR,OAAQ,SACR,SAAU,WACV,MAAO,QACP,gBAAiB,kBACjB,SAAU,WACV,KAAM,OACN,eAAgB,uBAChB,OAAQ,cACV,EAEMC,EAAU,CACd,UAAW,kBACX,OAAQ,0BACR,KAAM,wBACN,SAAU,4BACV,WAAY,8BACZ,OAAQ,0BACR,UAAW,6BACX,SAAU,4BACV,SAAU,4BACV,MAAO,yBACP,SAAU,4BACV,KAAM,uBACR,EAEMC,EAAY,CAChB,UAAW,IAAID,EAAQ,YACvB,aAAc,IAAIA,EAAQ,cAC1B,wBAAyB,8GAC3B,EAEME,EAAS,CACb,OAAQ,GAAGL,UACb,EAEMM,EAAQ,CACZ,KAAM,OACN,UAAW,UACb,EAEaC,EAAsB,CACjC,YAAAP,EACA,WAAAE,EACA,QAAAC,EACA,UAAAC,EACA,OAAAC,EACA,MAAAC,CACF,EC5BO,IAAME,EAAN,cAA8BC,CAA4D,CAI/F,YAAYC,EAA+B,CACzC,MAAMA,CAAS,EACf,KAAK,YAAY,CACnB,CAEQ,aAAoB,CAC1B,KAAK,iBAAmBC,EAAiB,KAAK,WAAYC,EAAoB,UAAU,SAAS,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", "COMPONENT_NAME_PREFIX", "attributes", "classes", "selectors", "events", "roles", "LIST_ITEM_CONSTANTS", "ListItemAdapter", "BaseAdapter", "component", "getShadowElement", "LIST_ITEM_CONSTANTS", "type", "listener", "options", "ForgeRipple", "value", "addClass", "removeClass", "e", "checkable", "force", "currentState", "_a", "role", "disabled", "toggleClass", "dense", "indented", "list", "requireParent", "LIST_CONSTANTS", "isSelected", "v", "isDeepEqual", "userInteractionListener", "ListItemFoundation", "_adapter", "evt", "isSelected", "targetElement", "ignoreElement", "LIST_ITEM_CONSTANTS", "matchesSelectors", "data", "value", "type", "defaultTemplate", "styles", "ListItemComponent", "BaseComponent", "attachShadowTemplate", "ListItemFoundation", "ListItemAdapter", "LIST_ITEM_CONSTANTS", "elementParents", "el", "list", "requireParent", "LIST_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "defineListItemComponent", "defineCustomElement", "ListItemComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as E}from"./chunk.H5D54EHO.js";import{b as I}from"./chunk.SZIM4KFZ.js";import{b as f}from"./chunk.NVMILGC2.js";import{a as g}from"./chunk.RFLASSCI.js";import{a as m,b as h,d as b}from"./chunk.DTZFWZPB.js";import{a as u,h as _,k as d}from"./chunk.NK7H3MMM.js";import{f as l,m as c,t as p}from"./chunk.CFDK4RCW.js";import{k as s,l as a}from"./chunk.J2M2MXP2.js";import{d as r}from"./chunk.M3QDAYD2.js";var v=`${h}icon-button`,y={TOGGLE:"toggle",IS_ON:"is-on",ICON_ON:"forge-icon-button-on",DENSE:"dense",DENSITY_LEVEL:"density-level"},L={BUTTON:"button, a",ICON:"i, span, svg, img, forge-icon"},B={BUTTON:"forge-icon-button",BUTTON_ON:"forge-icon-button--on",BUTTON_DENSE:"forge-icon-button--dense",ICON:"forge-icon-button__icon",ICON_ON:"forge-icon-button__icon--on",DENSITY:["forge-icon-button--dense-1","forge-icon-button--dense-2","forge-icon-button--dense-3","forge-icon-button--dense-4","forge-icon-button--dense-5","forge-icon-button--dense-6"]},S={CHANGE:`${v}-change`},e={elementName:v,attributes:y,selectors:L,classes:B,events:S};var o=class extends d{constructor(){super();this._toggle=!1;this._isOn=!1;this._dense=!1;this._densityLevel=5}static get observedAttributes(){return[e.attributes.IS_ON,e.attributes.DENSE,e.attributes.DENSITY_LEVEL,e.attributes.TOGGLE]}connectedCallback(){this.querySelector(e.selectors.BUTTON)?this._initialize():c(this,e.selectors.BUTTON).then(()=>this._initialize())}disconnectedCallback(){this._rippleInstance&&this._rippleInstance.destroy()}attributeChangedCallback(t,n,i){switch(t){case e.attributes.IS_ON:this.isOn=s(i);break;case e.attributes.DENSE:this.dense=s(i);break;case e.attributes.DENSITY_LEVEL:this.densityLevel=a(i);break;case e.attributes.TOGGLE:this.toggle=s(i);break}}get toggle(){return this._toggle}set toggle(t){this._toggle=t,this._toggle?this._initializeToggle():this._destroyToggle()}get isOn(){return this._isOn}set isOn(t){this._isOn!==t&&(this._isOn=t,this._applyToggle())}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._applyDensity())}get densityLevel(){return this._densityLevel}set densityLevel(t){this._densityLevel!==t&&(this._densityLevel=t,this._densityLevel<=0?this._densityLevel=1:this._densityLevel>6?this._densityLevel=6:typeof this._densityLevel!="number"&&(this._densityLevel=5),this._applyDensity())}_initialize(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this._buttonElement.classList.add(e.classes.BUTTON),this._applyToggle(),this._applyDensity(),this._toggleHandler=()=>{this._toggleValue(),_(this,e.events.CHANGE,this._isOn,!0)},this._toggle&&this._initializeToggle(),this._deferRippleInitialization())}async _deferRippleInitialization(){let t=await f(this._buttonElement);this._rippleInstance||(this._rippleInstance=this._createRipple(),t==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){this._rippleInstance&&this._rippleInstance.destroy();let t=new I(this._buttonElement);return t.unbounded=!0,t}_toggleValue(){this._isOn=!this._isOn,this._applyToggle()}_applyToggle(){this._buttonElement&&(p(this._buttonElement,this._isOn,e.classes.BUTTON_ON),this._toggle&&this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))}_applyDensity(){if(this._buttonElement){if(e.classes.DENSITY.forEach(t=>this._buttonElement.classList.remove(t)),this._dense){if(this.setAttribute(e.attributes.DENSE,""),this._buttonElement.classList.add(e.classes.BUTTON_DENSE),this._densityLevel<7&&this._densityLevel>0&&this.densityLevel!==5){let t=e.classes.DENSITY[this._densityLevel-1];this._buttonElement.classList.add(t),this.setAttribute(e.attributes.DENSITY_LEVEL,this._densityLevel.toString())}}else this.removeAttribute(e.attributes.DENSE),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE);this._rippleInstance&&this._rippleInstance.layout()}}_initializeToggle(){if(!this._buttonElement)return;let t=Array.from(this._buttonElement.querySelectorAll(e.selectors.ICON));if(t.length!==2){console.error('You must specify two icons, one for "on" and one for "off".');return}if(t.forEach(n=>n.classList.add(e.classes.ICON)),!t.some(n=>n.classList.contains(e.classes.ICON_ON))){let n=t.find(i=>i.hasAttribute(e.attributes.ICON_ON));n?n.classList.add(e.classes.ICON_ON):t[0].classList.add(e.classes.ICON_ON)}this._buttonElement.addEventListener("click",this._toggleHandler),window.requestAnimationFrame(()=>{this._isOn&&(this._buttonElement.classList.add(e.classes.BUTTON_ON),this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))})}_destroyToggle(){this._buttonElement&&this._buttonElement.removeEventListener("click",this._toggleHandler)}layout(){this._rippleInstance&&this._rippleInstance.layout()}};o=r([m({name:e.elementName})],o);var N=class extends g{constructor(t){super(t)}_build(){var n;let t=document.createElement(e.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(n=this._config.options)!=null&&n.tooltip){let i=document.createElement("forge-tooltip");i.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(i.position=this._config.options.tooltipPosition),t.appendChild(i)}return t}get iconElement(){return this._iconElement}get disabled(){return!!this._buttonElement.disabled}set disabled(t){this._buttonElement.disabled=t}get butttonElement(){return this._buttonElement}get buttonElement(){return this._buttonElement}_configure(){this._configureIcon()}_configureIcon(){var n,i;if(!((n=this._config.options)!=null&&n.iconName))return;switch(((i=this._config.options)==null?void 0:i.iconType)||"component"){case"font":let O=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[b];l(O,this._buttonElement),this._buttonElement.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(E.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&l(this._config.options.iconClass,this._iconElement),this._buttonElement.appendChild(this._iconElement);break}}onClick(t){this._buttonElement.addEventListener("click",t)}onFocus(t){this._buttonElement.addEventListener("focus",n=>t(n))}onBlur(t){this._buttonElement.addEventListener("blur",n=>t(n))}};function W(){u(o)}export{e as a,o as b,N as c,W as d};
7
- //# sourceMappingURL=chunk.A5R7KUIP.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/icon-button/icon-button-constants.ts", "../../src/icon-button/icon-button.ts", "../../src/icon-button/icon-button-component-delegate.ts", "../../src/icon-button/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}icon-button`;\n\nconst attributes = {\n TOGGLE: 'toggle',\n IS_ON: 'is-on',\n ICON_ON: 'forge-icon-button-on',\n DENSE: 'dense',\n DENSITY_LEVEL: 'density-level'\n};\n\nconst selectors = {\n BUTTON: 'button, a',\n ICON: 'i, span, svg, img, forge-icon'\n};\n\nconst classes = {\n BUTTON: 'forge-icon-button',\n BUTTON_ON: 'forge-icon-button--on',\n BUTTON_DENSE: 'forge-icon-button--dense',\n ICON: 'forge-icon-button__icon',\n ICON_ON: 'forge-icon-button__icon--on',\n DENSITY: [\n 'forge-icon-button--dense-1',\n 'forge-icon-button--dense-2',\n 'forge-icon-button--dense-3',\n 'forge-icon-button--dense-4',\n 'forge-icon-button--dense-5',\n 'forge-icon-button--dense-6'\n ]\n};\n\nconst events = {\n CHANGE: `${elementName}-change`\n};\n\nexport const ICON_BUTTON_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes,\n events\n};\n", "import { coerceBoolean, coerceNumber, CustomElement, emitEvent, ensureChild, toggleClass } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { ForgeRipple } from '../ripple';\nimport { userInteractionListener } from '../core/utils';\nimport { ICON_BUTTON_CONSTANTS } from './icon-button-constants';\n\nexport interface IIconButtonComponent extends IBaseComponent {\n toggle: boolean;\n isOn: boolean;\n dense: boolean;\n densityLevel: number;\n layout(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-icon-button': IIconButtonComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-icon-button-change': CustomEvent<boolean>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-icon-button>` element.\n * \n * @tag forge-icon-button\n */\n@CustomElement({\n name: ICON_BUTTON_CONSTANTS.elementName\n})\nexport class IconButtonComponent extends BaseComponent implements IIconButtonComponent {\n public static get observedAttributes(): string[] {\n return [\n ICON_BUTTON_CONSTANTS.attributes.IS_ON,\n ICON_BUTTON_CONSTANTS.attributes.DENSE,\n ICON_BUTTON_CONSTANTS.attributes.DENSITY_LEVEL,\n ICON_BUTTON_CONSTANTS.attributes.TOGGLE\n ];\n }\n\n private _rippleInstance: ForgeRipple;\n private _buttonElement: HTMLButtonElement;\n private _toggle = false;\n private _isOn = false;\n private _dense = false;\n private _densityLevel = 5;\n private _toggleHandler: (event: Event) => void;\n\n constructor() {\n super();\n }\n\n public connectedCallback(): void {\n if (this.querySelector(ICON_BUTTON_CONSTANTS.selectors.BUTTON)) {\n this._initialize();\n } else {\n ensureChild(this, ICON_BUTTON_CONSTANTS.selectors.BUTTON).then(() => this._initialize());\n }\n }\n\n public disconnectedCallback(): void {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case ICON_BUTTON_CONSTANTS.attributes.IS_ON:\n this.isOn = coerceBoolean(newValue);\n break;\n case ICON_BUTTON_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case ICON_BUTTON_CONSTANTS.attributes.DENSITY_LEVEL:\n this.densityLevel = coerceNumber(newValue);\n break;\n case ICON_BUTTON_CONSTANTS.attributes.TOGGLE:\n this.toggle = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Gets/sets whether the button is togglable. */\n public get toggle(): boolean {\n return this._toggle;\n }\n public set toggle(value: boolean) {\n this._toggle = value;\n\n if (this._toggle) {\n this._initializeToggle();\n } else {\n this._destroyToggle();\n }\n }\n\n /** Gets/sets the toggled state of the icon button. Only applies when `toggle = true`. */\n public get isOn(): boolean {\n return this._isOn;\n }\n public set isOn(value: boolean) {\n if (this._isOn !== value) {\n this._isOn = value;\n this._applyToggle();\n }\n }\n\n /** Gets/sets whether the icon button is dense. */\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._applyDensity();\n }\n }\n\n /** Controls the density level. 1 (least dense) to 6 (most dense). */\n public get densityLevel(): number {\n return this._densityLevel;\n }\n public set densityLevel(value: number) {\n if (this._densityLevel !== value) {\n this._densityLevel = value;\n\n if (this._densityLevel <= 0) {\n this._densityLevel = 1;\n } else if (this._densityLevel > 6) {\n this._densityLevel = 6;\n } else if (typeof this._densityLevel !== 'number') {\n this._densityLevel = 5;\n }\n\n this._applyDensity();\n }\n }\n\n private _initialize(): void {\n this._buttonElement = this.querySelector(ICON_BUTTON_CONSTANTS.selectors.BUTTON) as HTMLButtonElement;\n if (!this._buttonElement) {\n return;\n }\n\n this._buttonElement.classList.add(ICON_BUTTON_CONSTANTS.classes.BUTTON);\n this._applyToggle();\n this._applyDensity();\n this._toggleHandler = () => {\n this._toggleValue();\n emitEvent(this, ICON_BUTTON_CONSTANTS.events.CHANGE, this._isOn, true);\n };\n\n if (this._toggle) {\n this._initializeToggle();\n }\n\n // We wait to initialize the ripple instance until the user interacts with the component to avoid unnecessary performance overhead\n this._deferRippleInitialization();\n }\n\n private async _deferRippleInitialization(): Promise<void> {\n const type = await userInteractionListener(this._buttonElement);\n if (!this._rippleInstance) {\n this._rippleInstance = this._createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n }\n\n private _createRipple(): ForgeRipple {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n const ripple = new ForgeRipple(this._buttonElement);\n ripple.unbounded = true;\n return ripple;\n }\n\n private _toggleValue(): void {\n this._isOn = !this._isOn;\n this._applyToggle();\n }\n\n private _applyToggle(): void {\n if (!this._buttonElement) {\n return;\n }\n toggleClass(this._buttonElement, this._isOn, ICON_BUTTON_CONSTANTS.classes.BUTTON_ON);\n if (this._toggle) {\n this._buttonElement.setAttribute('aria-pressed', `${this._isOn}`);\n }\n }\n\n private _applyDensity(): void {\n if (!this._buttonElement) {\n return;\n }\n\n // Remove all other density classes first\n ICON_BUTTON_CONSTANTS.classes.DENSITY.forEach(c => this._buttonElement.classList.remove(c));\n\n if (this._dense) {\n this.setAttribute(ICON_BUTTON_CONSTANTS.attributes.DENSE, '');\n this._buttonElement.classList.add(ICON_BUTTON_CONSTANTS.classes.BUTTON_DENSE);\n\n // 5 is the default density level (we apply 5 implicitly in the regular dense class)\n // Exclude 5 since its already covered by dense class\n if (this._densityLevel < 7 && this._densityLevel > 0 && this.densityLevel !== 5) {\n const densityLevelClass = ICON_BUTTON_CONSTANTS.classes.DENSITY[this._densityLevel - 1];\n this._buttonElement.classList.add(densityLevelClass);\n this.setAttribute(ICON_BUTTON_CONSTANTS.attributes.DENSITY_LEVEL, this._densityLevel.toString());\n }\n } else {\n this.removeAttribute(ICON_BUTTON_CONSTANTS.attributes.DENSE);\n this._buttonElement.classList.remove(ICON_BUTTON_CONSTANTS.classes.BUTTON_DENSE);\n }\n\n // re-layout the ripple for cases where dense was changed after initial layout\n if (this._rippleInstance) {\n this._rippleInstance.layout();\n }\n }\n\n private _initializeToggle(): void {\n if (!this._buttonElement) {\n return;\n }\n const icons = Array.from(this._buttonElement.querySelectorAll(ICON_BUTTON_CONSTANTS.selectors.ICON));\n\n // We require two icon/image elements to be specified for the \"on\" and \"off\" states\n if (icons.length !== 2) {\n console.error('You must specify two icons, one for \"on\" and one for \"off\".');\n return;\n }\n\n // Add the icon class to each icon\n icons.forEach(icon => icon.classList.add(ICON_BUTTON_CONSTANTS.classes.ICON));\n\n // If there are no icons that specify the \"on\" class, then automatically choose the first icon as the \"on\" icon and add the class,\n // alternatively we check for the existence of a `forge-icon-button-on` attribute on any of the icons and use that.\n if (!icons.some(icon => icon.classList.contains(ICON_BUTTON_CONSTANTS.classes.ICON_ON))) {\n const requestedOnIcon = icons.find(icon => icon.hasAttribute(ICON_BUTTON_CONSTANTS.attributes.ICON_ON));\n if (requestedOnIcon) {\n requestedOnIcon.classList.add(ICON_BUTTON_CONSTANTS.classes.ICON_ON);\n } else {\n icons[0].classList.add(ICON_BUTTON_CONSTANTS.classes.ICON_ON);\n }\n }\n\n this._buttonElement.addEventListener('click', this._toggleHandler);\n\n // Wait a frame to ensure the value of the `on` property has been set\n window.requestAnimationFrame(() => {\n if (this._isOn) {\n this._buttonElement.classList.add(ICON_BUTTON_CONSTANTS.classes.BUTTON_ON);\n this._buttonElement.setAttribute('aria-pressed', `${this._isOn}`);\n }\n });\n }\n\n private _destroyToggle(): void {\n if (!this._buttonElement) {\n return;\n }\n this._buttonElement.removeEventListener('click', this._toggleHandler);\n }\n\n public layout(): void {\n if (this._rippleInstance) {\n this._rippleInstance.layout();\n }\n }\n}\n", "import { addClass } from '@tylertech/forge-core';\nimport { IconExternalType, ICON_CONSTANTS, IIconComponent } from '../icon';\nimport { ICON_CLASS_NAME } from '../constants';\nimport { BaseComponentDelegate, IBaseComponentDelegateConfig, IBaseComponentDelegateOptions } from '../core/delegates/base-component-delegate';\nimport { IIconButtonComponent } from './icon-button';\nimport { ICON_BUTTON_CONSTANTS } from './icon-button-constants';\nimport { PopupPlacement } from '../popup';\n\nexport type IconButtonComponentDelegateProps = Partial<IIconButtonComponent>;\nexport interface IIconButtonComponentDelegateOptions extends IBaseComponentDelegateOptions {\n iconName?: string;\n iconExternal?: boolean;\n iconExternalType?: IconExternalType;\n iconType?: 'font' | 'component';\n iconClass?: string | string[];\n tooltip?: string;\n tooltipPosition?: PopupPlacement;\n}\nexport interface IIconButtonComponentDelegateConfig extends IBaseComponentDelegateConfig<IIconButtonComponent, IIconButtonComponentDelegateOptions> {}\n\nexport class IconButtonComponentDelegate extends BaseComponentDelegate<IIconButtonComponent, IIconButtonComponentDelegateOptions> {\n private _buttonElement: HTMLButtonElement;\n private _iconElement?: IIconComponent;\n\n constructor(config?: IIconButtonComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IIconButtonComponent {\n const component = document.createElement(ICON_BUTTON_CONSTANTS.elementName);\n this._buttonElement = document.createElement('button');\n this._buttonElement.type = 'button';\n component.appendChild(this._buttonElement);\n\n if (this._config.options?.tooltip) {\n const tooltip = document.createElement('forge-tooltip');\n tooltip.textContent = this._config.options.tooltip;\n \n if (this._config.options.tooltipPosition) {\n tooltip.position = this._config.options.tooltipPosition;\n }\n\n component.appendChild(tooltip);\n }\n\n return component;\n }\n\n public get iconElement(): IIconComponent | undefined {\n return this._iconElement;\n }\n\n public get disabled(): boolean {\n return !!this._buttonElement.disabled;\n }\n public set disabled(value: boolean) {\n this._buttonElement.disabled = value;\n }\n\n /** @deprecated Use buttonElement instead. */\n public get butttonElement(): HTMLButtonElement | undefined {\n return this._buttonElement;\n }\n\n public get buttonElement(): HTMLButtonElement | undefined {\n return this._buttonElement;\n }\n\n protected _configure(): void {\n this._configureIcon();\n }\n\n private _configureIcon(): void {\n if (!this._config.options?.iconName) {\n return;\n }\n\n const type = this._config.options?.iconType || 'component';\n\n switch (type) {\n case 'font':\n const classes = Array.isArray(this._config.options.iconClass) ? this._config.options.iconClass : [ICON_CLASS_NAME];\n addClass(classes, this._buttonElement);\n this._buttonElement.textContent = this._config.options.iconName;\n break;\n case 'component':\n this._iconElement = document.createElement(ICON_CONSTANTS.elementName);\n this._iconElement.name = this._config.options.iconName;\n if (this._config.options.iconExternal !== undefined) {\n this._iconElement.external = !!this._config.options.iconExternal;\n }\n if (this._config.options.iconExternalType) {\n this._iconElement.externalType = this._config.options.iconExternalType;\n }\n if (this._config.options.iconClass) {\n addClass(this._config.options.iconClass, this._iconElement);\n }\n this._buttonElement.appendChild(this._iconElement);\n break;\n }\n }\n\n public onClick(listener: (evt: MouseEvent) => void): void {\n this._buttonElement.addEventListener('click', listener);\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._buttonElement.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._buttonElement.addEventListener('blur', evt => listener(evt));\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { IconButtonComponent } from './icon-button';\n\nexport * from './icon-button-constants';\nexport * from './icon-button';\nexport * from './icon-button-component-delegate';\n\nexport function defineIconButtonComponent(): void {\n defineCustomElement(IconButtonComponent);\n}\n"],
5
- "mappings": "yZAEA,IAAMA,EAA2C,GAAGC,eAE9CC,EAAa,CACjB,OAAQ,SACR,MAAO,QACP,QAAS,uBACT,MAAO,QACP,cAAe,eACjB,EAEMC,EAAY,CAChB,OAAQ,YACR,KAAM,+BACR,EAEMC,EAAU,CACd,OAAQ,oBACR,UAAW,wBACX,aAAc,2BACd,KAAM,0BACN,QAAS,8BACT,QAAS,CACP,6BACA,6BACA,6BACA,6BACA,6BACA,4BACF,CACF,EAEMC,E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AAA,EAAsB,UACzB,OAKF,SAFaK,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,WAAY,YAEjC,CACZ,IAAK,OACH,IAAMC,EAAU,MAAM,QAAQ,KAAK,QAAQ,QAAQ,SAAS,EAAI,KAAK,QAAQ,QAAQ,UAAY,CAACC,CAAe,EACjHC,EAASF,EAAS,KAAK,cAAc,EACrC,KAAK,eAAe,YAAc,KAAK,QAAQ,QAAQ,SACvD,MACF,IAAK,YACH,KAAK,aAAe,SAAS,cAAcG,EAAe,WAAW,EACrE,KAAK,aAAa,KAAO,KAAK,QAAQ,QAAQ,SAC1C,KAAK,QAAQ,QAAQ,eAAiB,SACxC,KAAK,aAAa,SAAW,CAAC,CAAC,KAAK,QAAQ,QAAQ,cAElD,KAAK,QAAQ,QAAQ,mBACvB,KAAK,aAAa,aAAe,KAAK,QAAQ,QAAQ,kBAEpD,KAAK,QAAQ,QAAQ,WACvBD,EAAS,KAAK,QAAQ,QAAQ,UAAW,KAAK,YAAY,EAE5D,KAAK,eAAe,YAAY,KAAK,YAAY,EACjD,KACJ,CACF,CAEO,QAAQE,EAA2C,CACxD,KAAK,eAAe,iBAAiB,QAASA,CAAQ,CACxD,CAEO,QAAQA,EAAsC,CACnD,KAAK,eAAe,iBAAiB,QAASC,GAAOD,EAASC,CAAG,CAAC,CACpE,CAEO,OAAOD,EAAsC,CAClD,KAAK,eAAe,iBAAiB,OAAQC,GAAOD,EAASC,CAAG,CAAC,CACnE,CACF,ECzGO,SAASC,GAAkC,CAChDC,EAAoBC,CAAmB,CACzC",
6
- "names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "classes", "events", "ICON_BUTTON_CONSTANTS", "IconButtonComponent", "BaseComponent", "ICON_BUTTON_CONSTANTS", "ensureChild", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "value", "emitEvent", "type", "userInteractionListener", "ripple", "ForgeRipple", "toggleClass", "c", "densityLevelClass", "icons", "icon", "requestedOnIcon", "__decorateClass", "CustomElement", "IconButtonComponentDelegate", "BaseComponentDelegate", "config", "_a", "component", "ICON_BUTTON_CONSTANTS", "tooltip", "value", "_b", "classes", "ICON_CLASS_NAME", "addClass", "ICON_CONSTANTS", "listener", "evt", "defineIconButtonComponent", "defineCustomElement", "IconButtonComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as c,b as g}from"./chunk.DTZFWZPB.js";import{a as s,e as l,f as p,k as b}from"./chunk.NK7H3MMM.js";import{t as d,u as n}from"./chunk.CFDK4RCW.js";import{k as i}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var h=`${g}card`,u={OUTLINED:"outlined"},f={OUTLINED:"forge-card--outlined"},x={ROOT:".forge-card"},e={elementName:h,attributes:u,classes:f,selectors:x};var v='<template><div class="forge-card" part="root"><slot></slot></div></template>',T=".forge-card{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);-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);height:100%;height:var(--forge-card-height,100%);width:100%;width:var(--forge-card-width,100%);padding:16px;padding:var(--forge-card-padding,16px);overflow:hidden;overflow:var(--forge-card-overflow,hidden);-webkit-box-sizing:border-box;box-sizing:border-box}.forge-card--outlined{-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);border-width:1px;border-style:solid;border-color:#e0e0e0;border-color:#e0e0e0;border-color:var(--forge-theme-border-color,#e0e0e0)}:host{display:block}:host([hidden]){display:none}",t=class extends b{constructor(){super();this._outlined=!1;l(this,v,T),this._rootElement=p(this,e.selectors.ROOT)}static get observedAttributes(){return[e.attributes.OUTLINED]}connectedCallback(){this._applyOutlined()}attributeChangedCallback(o,m,r){if(m!==r)switch(o){case e.attributes.OUTLINED:this.outlined=i(r);break}}_applyOutlined(){d(this._rootElement,this._outlined,e.classes.OUTLINED)}get outlined(){return this._outlined}set outlined(o){this._outlined!==o&&(this._outlined=!!o,n(this,this._outlined,e.attributes.OUTLINED,String(!!this._outlined)),this._applyOutlined())}};t=a([c({name:e.elementName})],t);function M(){s(t)}export{e as a,t as b,M as c};
7
- //# sourceMappingURL=chunk.BWZKQ6WX.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/card/card-constants.ts", "../../src/card/card.ts", "../../src/card/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}card`;\n\nconst attributes = {\n OUTLINED: 'outlined'\n};\n\nconst classes = {\n OUTLINED: 'forge-card--outlined'\n};\n\nconst selectors = {\n ROOT: '.forge-card'\n};\n\nexport const CARD_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors\n};\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, getShadowElement, toggleAttribute, toggleClass } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nimport { CARD_CONSTANTS } from './card-constants';\n\nconst template = '<template><div class=\\\"forge-card\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-card{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);-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);height:100%;height:var(--forge-card-height,100%);width:100%;width:var(--forge-card-width,100%);padding:16px;padding:var(--forge-card-padding,16px);overflow:hidden;overflow:var(--forge-card-overflow,hidden);-webkit-box-sizing:border-box;box-sizing:border-box}.forge-card--outlined{-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);border-width:1px;border-style:solid;border-color:#e0e0e0;border-color:#e0e0e0;border-color:var(--forge-theme-border-color,#e0e0e0)}:host{display:block}:host([hidden]){display:none}';\n\nexport interface ICardComponent extends IBaseComponent {\n outlined: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-card': ICardComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-card>` component.\n * \n * @tag forge-card\n */\n@CustomElement({\n name: CARD_CONSTANTS.elementName\n})\nexport class CardComponent extends BaseComponent implements ICardComponent {\n public static get observedAttributes(): string[] {\n return [\n CARD_CONSTANTS.attributes.OUTLINED\n ];\n }\n\n private _rootElement: HTMLElement;\n private _outlined = false;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._rootElement = getShadowElement(this, CARD_CONSTANTS.selectors.ROOT);\n }\n\n public connectedCallback(): void {\n this._applyOutlined();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n if (oldValue === newValue) {\n return;\n }\n switch (name) {\n case CARD_CONSTANTS.attributes.OUTLINED:\n this.outlined = coerceBoolean(newValue);\n break;\n }\n }\n\n private _applyOutlined(): void {\n toggleClass(this._rootElement, this._outlined, CARD_CONSTANTS.classes.OUTLINED);\n }\n\n /** Gets/sets whether the card is using the outlined style or not. */\n public get outlined(): boolean {\n return this._outlined;\n }\n public set outlined(value: boolean) {\n if (this._outlined !== value) {\n this._outlined = !!value;\n toggleAttribute(this, this._outlined, CARD_CONSTANTS.attributes.OUTLINED, String(!!this._outlined));\n this._applyOutlined();\n }\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CardComponent } from './card';\n\nexport * from './card-constants';\nexport * from './card';\n\nexport function defineCardComponent(): void {\n defineCustomElement(CardComponent);\n}\n"],
5
- "mappings": "2OAEA,IAAMA,EAA2C,GAAGC,QAE9CC,EAAa,CACjB,SAAU,UACZ,EAEMC,EAAU,CACd,SAAU,sBACZ,EAEMC,EAAY,CAChB,KAAM,aACR,EAEaC,EAAiB,CAC5B,YAAAL,EACA,WAAAE,EACA,QAAAC,EACA,UAAAC,CACF,EChBA,IAAME,EAAW,+EACXC,EAAS,k9BAoBFC,EAAN,cAA4BC,CAAwC,CAUzE,aAAc,CACZ,MAAM,EAHR,KAAQ,UAAY,GAIlBC,EAAqB,KAAMJ,EAAUC,CAAM,EAC3C,KAAK,aAAeI,EAAiB,KAAMC,EAAe,UAAU,IAAI,CAC1E,CAbA,WAAkB,oBAA+B,CAC/C,MAAO,CACLA,EAAe,WAAW,QAC5B,CACF,CAWO,mBAA0B,CAC/B,KAAK,eAAe,CACtB,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,GAAID,IAAaC,EAGjB,OAAQF,EAAM,CACZ,KAAKD,EAAe,WAAW,SAC7B,KAAK,SAAWI,EAAcD,CAAQ,EACtC,KACJ,CACF,CAEQ,gBAAuB,CAC7BE,EAAY,KAAK,aAAc,KAAK,UAAWL,EAAe,QAAQ,QAAQ,CAChF,CAGA,IAAW,UAAoB,CAC7B,OAAO,KAAK,SACd,CACA,IAAW,SAASM,EAAgB,CAC9B,KAAK,YAAcA,IACrB,KAAK,UAAY,CAAC,CAACA,EACnBC,EAAgB,KAAM,KAAK,UAAWP,EAAe,WAAW,SAAU,OAAO,CAAC,CAAC,KAAK,SAAS,CAAC,EAClG,KAAK,eAAe,EAExB,CACF,EA9CaJ,EAANY,EAAA,CAHNC,EAAc,CACb,KAAMT,EAAe,WACvB,CAAC,GACYJ,GCnBN,SAASc,GAA4B,CAC1CC,EAAoBC,CAAa,CACnC",
6
- "names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "classes", "selectors", "CARD_CONSTANTS", "template", "styles", "CardComponent", "BaseComponent", "attachShadowTemplate", "getShadowElement", "CARD_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "toggleClass", "value", "toggleAttribute", "__decorateClass", "CustomElement", "defineCardComponent", "defineCustomElement", "CardComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../node_modules/@material/switch/constants.ts", "../../../../../../node_modules/@material/base/observer.ts", "../../../../../../node_modules/@material/base/observer-foundation.ts", "../../../../../../node_modules/@material/switch/foundation.ts", "../../../../../../node_modules/@material/switch/component.ts", "../../src/switch/switch-constants.ts", "../../src/switch/switch.ts", "../../src/switch/switch-component-delegate.ts", "../../src/switch/index.ts"],
4
- "sourcesContent": [null, null, null, null, null, "import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}switch`;\n\nconst classes = {\n LABEL_START: 'forge-switch--label-position-start'\n};\n\nconst selectors = {\n BUTTON: '.mdc-switch',\n CONTAINER: '.forge-switch__container'\n};\n\nconst attributes = {\n DENSE: 'dense',\n DISABLED: 'disabled',\n SELECTED: 'selected',\n LABEL_POSITION: 'label-position',\n BUTTON_ARIA_LABEL: 'button-aria-label'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nexport const SWITCH_CONSTANTS = {\n classes,\n selectors,\n attributes,\n elementName,\n events\n};\n\nexport type SwitchLabelPosition = 'start' | 'end';\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, getShadowElement, emitEvent, toggleAttribute, toggleClass } from '@tylertech/forge-core';\nimport { MDCSwitch } from '@material/switch';\nimport { MDCRipple } from '@material/ripple';\nimport { SwitchLabelPosition, SWITCH_CONSTANTS } from './switch-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst 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>';\nconst 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:#ffffff;fill:var(--mdc-switch-selected-icon-color,var(--mdc-theme-on-primary,#ffffff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:#ffffff;fill:var(--mdc-switch-disabled-selected-icon-color,var(--mdc-theme-on-primary,#ffffff))}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:#ffffff;fill:var(--mdc-switch-unselected-icon-color,var(--mdc-theme-on-primary,#ffffff))}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:#ffffff;fill:var(--mdc-switch-disabled-unselected-icon-color,var(--mdc-theme-on-primary,#ffffff))}.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))}';\nimport { userInteractionListener } from '../core/utils';\n\nexport interface ISwitchComponent extends IBaseComponent {\n dense: boolean;\n disabled: boolean;\n selected: boolean;\n labelPosition: SwitchLabelPosition;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-switch': ISwitchComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-switch-select': CustomEvent<boolean>;\n }\n}\n\nclass ForgeMDCSwitch extends MDCSwitch {\n public override initialize(): void {\n // Do not call super.initialize()\n // We defer instantiation of the ripple until first user interaction\n this._deferRippleInitialization();\n }\n\n public override destroy(): void {\n // We are not calling super.destroy() because it expects `ripple` to be set when it might not be yet\n // We instead just replicate all existing functionality, but allow for `ripple` to be undefined\n this.foundation.destroy();\n this.ripple?.destroy();\n this.root.removeEventListener('click', this.foundation.handleClick);\n }\n\n private async _deferRippleInitialization(): Promise<void> {\n const type = await userInteractionListener(this.root);\n this.ripple = new MDCRipple(this.root, this.createRippleFoundation());\n if (type === 'focusin') {\n // eslint-disable-next-line @typescript-eslint/dot-notation\n this.ripple['foundation'].handleFocus();\n }\n }\n}\n\n/**\n * The custom element class behind the `<forge-switch>` element.\n * \n * @tag forge-switch\n */\n@CustomElement({\n name: SWITCH_CONSTANTS.elementName\n})\nexport class SwitchComponent extends BaseComponent implements ISwitchComponent {\n public static get observedAttributes(): string[] {\n return [\n SWITCH_CONSTANTS.attributes.DENSE,\n SWITCH_CONSTANTS.attributes.DISABLED,\n SWITCH_CONSTANTS.attributes.SELECTED,\n SWITCH_CONSTANTS.attributes.LABEL_POSITION,\n SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL\n ];\n }\n\n private _containerElement: HTMLElement;\n private _buttonElement: HTMLButtonElement;\n private _mdcSwitch: MDCSwitch | undefined;\n private _dense = false;\n private _disabled = false;\n private _selected = false;\n private _labelPosition: SwitchLabelPosition = 'end';\n private _clickListener: (evt: MouseEvent) => void;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._initialize();\n }\n\n private _initialize(): void {\n this._buttonElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.BUTTON) as HTMLButtonElement;\n this._containerElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.CONTAINER);\n this._clickListener = evt => this._onClick(evt);\n }\n\n public connectedCallback(): void {\n // Add our click listener before initializing MDCSwitch to ensure we receive the event **first**\n this._buttonElement.addEventListener('click', this._clickListener);\n\n this._mdcSwitch = new ForgeMDCSwitch(this._buttonElement);\n this._applyInitialState();\n }\n\n public disconnectedCallback(): void {\n this._mdcSwitch?.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case SWITCH_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.LABEL_POSITION:\n this.labelPosition = newValue as SwitchLabelPosition;\n break;\n case SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL:\n this._applyButtonLabel(newValue);\n break;\n }\n }\n\n private _applyInitialState(): void {\n if (this._mdcSwitch) {\n this._mdcSwitch.disabled = this._disabled;\n this._mdcSwitch.selected = this._selected;\n }\n\n this._applyDense();\n this._applyLabelPosition();\n this._applyButtonLabel(this.getAttribute(SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL) ?? '');\n }\n\n private _onClick(evt: MouseEvent): void {\n if (this._mdcSwitch?.disabled) {\n return;\n }\n\n // Prevents MDCSwitch from receiving the click event in the targeting phase.\n // We will handle updating the selected state of MDCSwitch based on the result of our own event.\n evt.stopImmediatePropagation();\n\n const newValue = !this._selected;\n const isCancelled = !emitEvent(this, SWITCH_CONSTANTS.events.SELECT, newValue, true, true);\n \n if (!isCancelled) {\n this._applySelected(newValue);\n }\n }\n\n private _applySelected(value: boolean): void {\n this._selected = value;\n if (this._mdcSwitch) {\n this._mdcSwitch.selected = this._selected;\n }\n }\n\n private _applyDense(): void {\n toggleAttribute(this, this._dense, SWITCH_CONSTANTS.attributes.DENSE);\n this._mdcSwitch?.ripple?.layout();\n }\n\n private _applyLabelPosition(): void {\n toggleClass(this._containerElement, this._labelPosition === 'start', SWITCH_CONSTANTS.classes.LABEL_START);\n }\n\n private _applyButtonLabel(value: string): void {\n if (!this._buttonElement) {\n return;\n }\n toggleAttribute(this._buttonElement, !!value, 'aria-label', value);\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._applyDense();\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n if (this._mdcSwitch) {\n this._mdcSwitch.disabled = this._disabled;\n }\n toggleAttribute(this, this._disabled, SWITCH_CONSTANTS.attributes.DISABLED);\n }\n }\n\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._applySelected(value);\n toggleAttribute(this, this._selected, SWITCH_CONSTANTS.attributes.SELECTED);\n }\n }\n\n public get labelPosition(): SwitchLabelPosition {\n return this._labelPosition;\n }\n public set labelPosition(value: SwitchLabelPosition) {\n if (this._labelPosition !== value) {\n this._labelPosition = value;\n this._applyLabelPosition();\n this.setAttribute(SWITCH_CONSTANTS.attributes.LABEL_POSITION, this._labelPosition);\n }\n }\n}\n", "import { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core';\nimport { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { ISwitchComponent } from './switch';\nimport { SWITCH_CONSTANTS } from './switch-constants';\n\nexport type SwitchComponentDelegateProps = Partial<ISwitchComponent>;\nexport interface ISwitchComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n selected?: boolean;\n}\nexport interface ISwitchComponentDelegateConfig extends IBaseComponentDelegateConfig<ISwitchComponent, ISwitchComponentDelegateOptions> {}\n\nexport class SwitchComponentDelegate extends FormFieldComponentDelegate<ISwitchComponent, ISwitchComponentDelegateOptions> {\n private _labelElement?: HTMLLabelElement;\n\n constructor(config?: ISwitchComponentDelegateConfig) {\n super(config);\n }\n\n public get value(): boolean {\n return this._element.selected;\n }\n public set value(value: boolean) {\n this._element.selected = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get labelElement(): HTMLLabelElement | undefined {\n return this._labelElement;\n }\n\n public onChange(listener: (value: boolean) => void): void {\n this._element.addEventListener('forge-switch-select', ({ detail }: CustomEvent<boolean>) => listener(detail));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._element.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._element.addEventListener('blur', evt => listener(evt));\n }\n\n public setLabel(text: string | null): void {\n if (text) {\n if (this._labelElement) {\n this._labelElement.textContent = text;\n } else {\n this._createLabel(text);\n }\n } else if (this._labelElement) {\n this._element.removeChild(this._labelElement);\n this._labelElement = undefined;\n }\n }\n\n protected _build(): ISwitchComponent {\n return document.createElement(SWITCH_CONSTANTS.elementName);\n }\n\n protected override _configure(): void {\n if (typeof this._config.options?.label === 'string') {\n this._createLabel(this._config.options.label);\n }\n if (this._config.options?.selected !== undefined) {\n this._element.selected = this._config.options.selected;\n }\n if (this._config.options?.id) {\n this._element.id = this._config.options.id;\n }\n }\n\n private _createLabel(text: string): void {\n this._labelElement = document.createElement('label');\n this._labelElement.textContent = text;\n this._element.appendChild(this._labelElement);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SwitchComponent } from './switch';\n\nexport * from './switch-constants';\nexport * from './switch';\nexport * from './switch-component-delegate';\n\nexport function defineSwitchComponent(): void {\n defineCustomElement(SwitchComponent);\n}\n"],
5
- "mappings": "kaA0BA,IAAYA,GAAZ,SAAYA,EAAU,CACpBA,EAAA,WAAA,yBACAA,EAAA,SAAA,uBACAA,EAAA,WAAA,wBACF,GAJYA,IAAAA,EAAU,CAAA,EAAA,EAStB,IAAYC,GAAZ,SAAYA,EAAS,CACnBA,EAAA,OAAA,qBACF,GAFYA,IAAAA,EAAS,CAAA,EAAA,ECiLf,SAAUC,EACZC,EAAWC,EAAaC,EAAwB,CAClD,IAAMC,EAAkBC,GAAgBJ,EAAQC,CAAQ,EAClDI,EAAYF,EAAgB,aAAaF,CAAQ,EACvD,OAAAI,EAAU,KAAKH,CAAQ,EAChB,UAAA,CACLG,EAAU,OAAOA,EAAU,QAAQH,CAAQ,EAAG,CAAC,CACjD,CACF,CAKA,IAAMI,EAAqB,IAAI,QAgB/B,SAASF,GACLJ,EAAWC,EAAW,CACxB,IAAMM,EAAe,IAAI,IAEpBD,EAAmB,IAAIN,CAAM,GAChCM,EAAmB,IAAIN,EAAQ,CAC7B,UAAW,GACX,aAAY,SAACQ,EAAG,CACd,IAAMH,EAAYE,EAAa,IAAIC,CAAG,GAAK,CAAA,EAC3C,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EACjC,KAAK,SAAS,YAAY,KAAK,aAAa,CAC9C,CACF,EC5EO,SAASK,IAA8B,CAC5CC,EAAoBC,CAAe,CACrC",
6
- "names": ["CssClasses", "Selectors", "observeProperty", "target", "property", "observer", "targetObservers", "installObserver", "observers", "allTargetObservers", "observersMap", "key", "descriptor", "getDescriptor", "observedDescriptor", "__assign", "descGet", "descSet", "value_1", "newValue", "previous", "_b", "__values", "_c", "descriptorTarget", "setObserversEnabled", "enabled", "MDCObserverFoundation", "_super", "__extends", "adapter", "_this", "target", "observers", "cleanup", "_b", "__values", "_c", "property", "observer", "unobserve", "cleanup_1", "cleanup_1_1", "cleanupFn", "observeProperty", "enabled", "setObserversEnabled", "__spreadArray", "__read", "MDCFoundation", "MDCSwitchFoundation", "_super", "__extends", "adapter", "_this", "MDCObserverFoundation", "MDCSwitchRenderFoundation", "_super", "__extends", "CssClasses", "addClass", "className", "MDCSwitchFoundation", "MDCSwitch", "_super", "__extends", "root", "foundation", "_this", "MDCRipple", "rippleElement", "Selectors", "MDCSwitchRenderFoundation", "className", "ariaChecked", "disabled", "MDCRippleFoundation", "__assign", "MDCComponent", "elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "events", "SWITCH_CONSTANTS", "template", "styles", "ForgeMDCSwitch", "MDCSwitch", "_a", "type", "userInteractionListener", "MDCRipple", "SwitchComponent", "BaseComponent", "attachShadowTemplate", "SWITCH_CONSTANTS", "getShadowElement", "evt", "name", "oldValue", "newValue", "coerceBoolean", "emitEvent", "value", "_b", "toggleAttribute", "toggleClass", "__decorateClass", "CustomElement", "SwitchComponentDelegate", "FormFieldComponentDelegate", "config", "value", "listener", "detail", "evt", "text", "SWITCH_CONSTANTS", "_a", "_b", "_c", "defineSwitchComponent", "defineCustomElement", "SwitchComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{b,c as L}from"./chunk.SZIM4KFZ.js";import{b as z}from"./chunk.NVMILGC2.js";import{a as C}from"./chunk.NVUMRW44.js";import{a as I,b as x}from"./chunk.DTZFWZPB.js";import{a as E,e as w,f as m,k as R}from"./chunk.NK7H3MMM.js";import{f as v,g as y,s as k}from"./chunk.CFDK4RCW.js";import{k as _}from"./chunk.J2M2MXP2.js";import{a as g,b as h,d as p}from"./chunk.M3QDAYD2.js";var D=`${x}radio`,A={RADIO:"mdc-radio",RADIO_DENSE:"forge-radio--dense",DISABLED:"mdc-radio--disabled",WRAPPER_DISABLED:"forge-radio-wrapper--disabled",CHECKED:"forge-radio--checked",FOCUSED:"forge-radio--focused",ENABLED:"forge-radio--enabled"},S={WRAPPER:".forge-radio-wrapper",RADIO:".mdc-radio",RADIO_INPUT:'input[type="radio"]',LABEL:"label"},O={DENSE:"dense",ROLE:"role",RADIOGROUP_ROLE:"radiogroup",SLOT:"slot"},N=["checked","disabled"],i={elementName:D,classes:A,selectors:S,attributes:O,inputProperties:N};var d=class{constructor(e){this._adapter=e;this._dense=!1}connect(){this._adapter.connect(),this._adapter.deferRippleInitialization(),this._focusListenerCallback=()=>this._adapter.syncFocusedStateWithInput(),this._disabledListenerCallback=()=>this._adapter.syncDisabledStateWithInput(),this._syncRadiogroupCheckStyles=()=>this._adapter.syncRadiogroupCheckStyles(),this._addFocusEventListeners(),this._addInputDisabledListener(),this._extendNativeInputSetter(),this._addRadioChangeListener(),this._adapter.syncCheckedStateWithInput(),this._adapter.syncDisabledStateWithInput(),this._adapter.syncFocusedStateWithInput(),this._applyDense(),this.syncCheckedState()}disconnect(){this._removeFocusEventListeners(),this._removeInputDisabledListener(),this._adapter.revertNativeInputSetter(),this._removeRadioChangeListener(),this._adapter.destroyRipple()}syncCheckedState(){this._adapter.syncCheckedStateWithInput()}_applyDense(){this._dense?(this._adapter.addRootClass(i.classes.RADIO_DENSE),this._adapter.setHostAttribute(i.attributes.DENSE)):(this._adapter.removeRootClass(i.classes.RADIO_DENSE),this._adapter.removeHostAttribute(i.attributes.DENSE))}_extendNativeInputSetter(){this._adapter.extendNativeInputSetter(this._syncRadiogroupCheckStyles)}_addRadioChangeListener(){this._adapter.addInputEventListener("change",this._syncRadiogroupCheckStyles)}_removeRadioChangeListener(){this._adapter.removeInputEventListener("change",this._syncRadiogroupCheckStyles)}_addFocusEventListeners(){this._adapter.addInputEventListener("focus",this._focusListenerCallback),this._adapter.addInputEventListener("blur",this._focusListenerCallback)}_removeFocusEventListeners(){this._adapter.removeInputEventListener("focus",this._focusListenerCallback),this._adapter.removeInputEventListener("blur",this._focusListenerCallback)}_addInputDisabledListener(){this._adapter.addInputDisabledAttributeChangeListener(this._disabledListenerCallback)}_removeInputDisabledListener(){this._adapter.removeInputDisabledAttributeChangeListener()}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._applyDense())}};var c=class{constructor(e){this._component=e;this._rootElement=m(this._component,i.selectors.RADIO),this._containerElement=m(this._component,i.selectors.WRAPPER)}get root(){return this._rootElement}get unbounded(){return!0}get disabled(){return this._isDisabled()}connect(){let e=this._component.querySelector(i.selectors.LABEL);e&&e.setAttribute(i.attributes.SLOT,i.selectors.LABEL)}async deferRippleInitialization(){let e=await z(this._rootElement);this._rippleInstance||(this._rippleInstance=this._createRipple(),e==="focusin"&&this._rippleInstance.handleFocus())}destroyRipple(){var e;(e=this._rippleInstance)==null||e.destroy(),this._rippleInstance=void 0}setHostAttribute(e,t=""){this._component.setAttribute(e,t)}removeHostAttribute(e){this._component.removeAttribute(e)}addRootClass(e){this._rootElement.classList.add(e)}removeRootClass(e){this._rootElement.classList.remove(e)}addContainerClass(e){this._containerElement.classList.add(e)}removeContainerClass(e){this._containerElement.classList.remove(e)}syncDisabledStateWithInput(){this.inputDisabled?(this.addRootClass(i.classes.DISABLED),this.removeRootClass(i.classes.ENABLED),this.addContainerClass(i.classes.WRAPPER_DISABLED)):(this.addRootClass(i.classes.ENABLED),this.removeRootClass(i.classes.DISABLED),this.removeContainerClass(i.classes.WRAPPER_DISABLED))}syncFocusedStateWithInput(){k()===this._inputElement?this.addRootClass(i.classes.FOCUSED):this.removeRootClass(i.classes.FOCUSED)}syncCheckedStateWithInput(){this.inputChecked?this.addRootClass(i.classes.CHECKED):this.removeRootClass(i.classes.CHECKED)}addInputEventListener(e,t){this._inputElement&&this._inputElement.addEventListener(e,t)}removeInputEventListener(e,t){this._inputElement&&this._inputElement.removeEventListener(e,t)}addInputDisabledAttributeChangeListener(e){this._setupInputDisabledAttributeMutationObserver(e)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}getRadiosFromContainingRadiogroup(){let e=this._getContainingRadioGroup(this._component);return e==null?null:e.querySelectorAll(i.elementName)}syncRadiogroupCheckStyles(){let e=this.getRadiosFromContainingRadiogroup();e&&e.forEach(t=>t.syncCheckedState())}extendNativeInputSetter(e){if(!this._inputElement)return;let t=this._inputElement,r=Object.getPrototypeOf(t);i.inputProperties.forEach(o=>{let a=Object.getOwnPropertyDescriptor(r,o);if(this._validPropertyDescriptor(a)&&a){let f={configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:l=>{var s;(s=a.set)==null||s.call(t,l),e()}};Object.defineProperty(t,o,f)}})}revertNativeInputSetter(){if(!this._inputElement)return;let e=this._inputElement,t=Object.getPrototypeOf(e);i.inputProperties.forEach(r=>{let o=Object.getOwnPropertyDescriptor(t,r);this._validPropertyDescriptor(o)&&Object.defineProperty(e,r,o)})}_validPropertyDescriptor(e){return!!e&&typeof e.set=="function"}_getContainingRadioGroup(e){if(!e||!e.parentElement)throw new Error('Unable to locate ancestor element with role="radiogroup". When using radios, a parent with this attribute must be applied.');let t=e.parentElement,r=t.getAttribute(i.attributes.ROLE);return r&&r.toLocaleLowerCase()===i.attributes.RADIOGROUP_ROLE.toLocaleLowerCase()?t:this._getContainingRadioGroup(t)}_setupInputDisabledAttributeMutationObserver(e){if(!this._inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let t=o=>this._inputDisabledAttributeMutationCallback(o,e);this._inputAttributeMutationObserver=new MutationObserver(t);let r={attributes:!0,attributeOldValue:!0,attributeFilter:["disabled"]};this._inputAttributeMutationObserver.observe(this._inputElement,r)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(e,t){for(let r of e)r.type!=="attributes"||!r.attributeName||r.attributeName!=="disabled"||r.target[r.attributeName]===r.oldValue||t()}get inputDisabled(){return this._inputElement?this._inputElement.disabled:!1}get inputChecked(){return this._inputElement?this._inputElement.checked:!1}get _inputElement(){return this._nativeInputElement||(this._nativeInputElement=this._component.querySelector(i.selectors.RADIO_INPUT)),this._nativeInputElement}_isDisabled(){return this._inputElement?this._inputElement.disabled:!1}_createRipple(){let e=h(g({},b.createAdapter(this)),{deregisterInteractionHandler:(t,r)=>{this._inputElement&&this._inputElement.removeEventListener(t,r,{passive:!0})},isSurfaceActive:()=>this._inputElement?this._inputElement.matches(":active"):!1,isUnbounded:()=>!!this.unbounded,registerInteractionHandler:(t,r)=>{this._inputElement&&this._inputElement.addEventListener(t,r,{passive:!0})},isSurfaceDisabled:()=>this._inputElement?this._inputElement.disabled:!1,addClass:t=>v(t,this._rootElement),removeClass:t=>y(t,this._rootElement),updateCssVariable:(t,r)=>this._rootElement.style.setProperty(t,r)});return new b(this._rootElement,new L(e))}};var P='<template><div class="forge-radio-wrapper forge-form-field" part="root"><div class="mdc-radio" part="container"><slot></slot><div class="mdc-radio__background" part="background"><div class="mdc-radio__outer-circle" part="outer-circle"></div><div class="mdc-radio__inner-circle" part="inner-circle"></div></div><div class="mdc-radio__ripple" part="ripple-container"></div></div><slot name="label"></slot></div></template>',M='.mdc-radio{padding:10px;display:inline-block;position:relative;-webkit-box-flex:0;flex:0 0 auto;-webkit-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.54);border-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-radio.forge-radio--enabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__inner-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio .mdc-radio__background::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio .mdc-radio__background::before{top:-10px;left:-10px;width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio__background{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;-webkit-transform:scale(0,0);transform:scale(0,0);border-radius:50%;opacity:0;pointer-events:none;content:"";-webkit-transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transform:scale(0,0);transform:scale(0,0);border-width:10px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio ::slotted(input[type=radio]){position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;top:0;right:0;left:0;width:40px;height:40px}.mdc-radio.forge-radio--dense{padding:4px;margin:0}.mdc-radio.forge-radio--dense .mdc-radio__background::before{top:-4px;left:-4px;width:28px;height:28px}.mdc-radio.forge-radio--dense .mdc-radio__native-control{top:0;right:0;left:0;width:28px;height:28px}.mdc-radio.forge-radio--dense ::slotted(input[type=radio]){width:28px;height:28px}.mdc-radio--disabled+::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-radio--checked .mdc-radio__background,.mdc-radio--disabled .mdc-radio__background{-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled .mdc-radio__background{cursor:default}.forge-radio--focused .mdc-radio__background::before{-webkit-transform:scale(1);transform:scale(1);opacity:.12;-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-radio{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-radio .mdc-radio__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-radio .mdc-radio__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-radio.mdc-ripple-upgraded--unbounded .mdc-radio__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-radio.mdc-ripple-upgraded--foreground-activation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-radio.mdc-ripple-upgraded--foreground-deactivation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after,.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-ripple-surface--hover .mdc-radio__ripple::before,.mdc-radio:hover .mdc-radio__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__ripple::before,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-radio:not(.mdc-ripple-upgraded) .mdc-radio__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-radio:not(.mdc-ripple-upgraded):active .mdc-radio__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-radio.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__background::before,.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__background::before{content:none}.mdc-radio__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.forge-radio-wrapper--disabled{cursor:not-allowed}.forge-radio-wrapper--disabled ::slotted(label){cursor:not-allowed}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field ::slotted([slot=label]){-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~::slotted([slot=label]){padding-left:8px}.forge-form-field--align-end ::slotted([slot=label]){-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}:host{display:inline-block}:host([hidden]){display:none}',n=class extends R{constructor(){super();w(this,P,M),this._foundation=new d(new c(this))}static get observedAttributes(){return[i.attributes.DENSE]}connectedCallback(){this._ensureRadioInputElement().then(()=>this._foundation.connect())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,r,o){switch(t){case i.attributes.DENSE:this.dense=_(o);break}}_ensureRadioInputElement(){return new Promise(t=>{if(this.querySelector(i.selectors.RADIO_INPUT)){t();return}let o=new MutationObserver(a=>{a.reduce((l,s)=>l+s.addedNodes.length,0)>0&&this.querySelector(i.selectors.RADIO_INPUT)&&(o.disconnect(),t())});o.observe(this,{childList:!0,subtree:!0})})}syncCheckedState(){this._foundation.syncCheckedState()}};p([C()],n.prototype,"dense",2),n=p([I({name:i.elementName})],n);function ae(){E(n)}export{i as a,n as b,ae as c};
7
- //# sourceMappingURL=chunk.GUYPITGA.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/radio/radio-constants.ts", "../../src/radio/radio-foundation.ts", "../../src/radio/radio-adapter.ts", "../../src/radio/radio.ts", "../../src/radio/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}radio`;\n\nconst classes = {\n RADIO: 'mdc-radio',\n RADIO_DENSE: 'forge-radio--dense',\n DISABLED: 'mdc-radio--disabled',\n WRAPPER_DISABLED: 'forge-radio-wrapper--disabled',\n CHECKED: 'forge-radio--checked',\n FOCUSED: 'forge-radio--focused',\n ENABLED: 'forge-radio--enabled'\n};\n\nconst selectors = {\n WRAPPER: '.forge-radio-wrapper',\n RADIO: '.mdc-radio',\n RADIO_INPUT: 'input[type=\"radio\"]',\n LABEL: 'label'\n};\n\nconst attributes = {\n DENSE: 'dense',\n ROLE: 'role',\n RADIOGROUP_ROLE: 'radiogroup',\n SLOT: 'slot'\n};\n\nconst inputProperties = ['checked', 'disabled'];\n\nexport const RADIO_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n inputProperties\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IRadioAdapter } from './radio-adapter';\nimport { RADIO_CONSTANTS } from './radio-constants';\n\nexport interface IRadioFoundation extends ICustomElementFoundation {\n dense: boolean;\n}\n\nexport class RadioFoundation implements IRadioFoundation {\n private _dense = false;\n private _focusListenerCallback: () => void;\n private _disabledListenerCallback: () => void;\n private _syncRadiogroupCheckStyles: () => void;\n\n constructor(private _adapter: IRadioAdapter) {}\n\n public connect(): void {\n this._adapter.connect();\n this._adapter.deferRippleInitialization();\n this._focusListenerCallback = () => this._adapter.syncFocusedStateWithInput();\n this._disabledListenerCallback = () => this._adapter.syncDisabledStateWithInput();\n this._syncRadiogroupCheckStyles = () => this._adapter.syncRadiogroupCheckStyles();\n this._addFocusEventListeners();\n this._addInputDisabledListener();\n this._extendNativeInputSetter();\n this._addRadioChangeListener();\n this._adapter.syncCheckedStateWithInput();\n this._adapter.syncDisabledStateWithInput();\n this._adapter.syncFocusedStateWithInput();\n this._applyDense();\n this.syncCheckedState();\n }\n\n public disconnect(): void {\n this._removeFocusEventListeners();\n this._removeInputDisabledListener();\n this._adapter.revertNativeInputSetter();\n this._removeRadioChangeListener();\n this._adapter.destroyRipple();\n }\n\n public syncCheckedState(): void {\n this._adapter.syncCheckedStateWithInput();\n }\n\n private _applyDense(): void {\n if (this._dense) {\n this._adapter.addRootClass(RADIO_CONSTANTS.classes.RADIO_DENSE);\n this._adapter.setHostAttribute(RADIO_CONSTANTS.attributes.DENSE);\n } else {\n this._adapter.removeRootClass(RADIO_CONSTANTS.classes.RADIO_DENSE);\n this._adapter.removeHostAttribute(RADIO_CONSTANTS.attributes.DENSE);\n }\n }\n\n private _extendNativeInputSetter(): void {\n this._adapter.extendNativeInputSetter(this._syncRadiogroupCheckStyles);\n }\n\n private _addRadioChangeListener(): void {\n this._adapter.addInputEventListener('change', this._syncRadiogroupCheckStyles);\n }\n\n private _removeRadioChangeListener(): void {\n this._adapter.removeInputEventListener('change', this._syncRadiogroupCheckStyles);\n }\n\n private _addFocusEventListeners(): void {\n this._adapter.addInputEventListener('focus', this._focusListenerCallback);\n this._adapter.addInputEventListener('blur', this._focusListenerCallback);\n }\n\n private _removeFocusEventListeners(): void {\n this._adapter.removeInputEventListener('focus', this._focusListenerCallback);\n this._adapter.removeInputEventListener('blur', this._focusListenerCallback);\n }\n\n private _addInputDisabledListener(): void {\n this._adapter.addInputDisabledAttributeChangeListener(this._disabledListenerCallback);\n }\n\n private _removeInputDisabledListener(): void {\n this._adapter.removeInputDisabledAttributeChangeListener();\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._applyDense();\n }\n }\n}\n", "import { addClass, getShadowElement, removeClass, getActiveElement } from '@tylertech/forge-core';\nimport { IRadioComponent } from './radio';\nimport { RADIO_CONSTANTS } from './radio-constants';\nimport { ForgeRipple, ForgeRippleAdapter, ForgeRippleCapableSurface, ForgeRippleFoundation } from '../ripple';\nimport { userInteractionListener } from '../core/utils';\n\nexport interface IRadioAdapter {\n connect(): void;\n deferRippleInitialization(): Promise<void>;\n destroyRipple(): void;\n setHostAttribute(name: string, value?: string): void;\n removeHostAttribute(name: string): void;\n addRootClass(className: string): void;\n removeRootClass(className: string): void;\n addContainerClass(className: string): void;\n removeContainerClass(className: string): void;\n syncCheckedStateWithInput(): void;\n syncFocusedStateWithInput(): void;\n syncDisabledStateWithInput(): void;\n addInputEventListener(event: string, callback: (event: Event) => void): void;\n removeInputEventListener(event: string, callback: (event: Event) => void): void;\n addInputDisabledAttributeChangeListener(callback: () => void): void;\n removeInputDisabledAttributeChangeListener(): void;\n extendNativeInputSetter(callback: () => void): void;\n revertNativeInputSetter(): void;\n syncRadiogroupCheckStyles(): void;\n}\n\nexport class RadioAdapter implements IRadioAdapter, ForgeRippleCapableSurface {\n private _rootElement: HTMLElement;\n private _containerElement: HTMLElement;\n private _nativeInputElement: HTMLInputElement | null;\n private _inputAttributeMutationObserver?: MutationObserver;\n private _rippleInstance: ForgeRipple | undefined;\n\n constructor(private _component: IRadioComponent) {\n this._rootElement = getShadowElement(this._component, RADIO_CONSTANTS.selectors.RADIO);\n this._containerElement = getShadowElement(this._component, RADIO_CONSTANTS.selectors.WRAPPER);\n }\n\n // ForgeRippleCapableSurface\n public get root(): Element {\n return this._rootElement;\n }\n\n public get unbounded(): boolean | undefined {\n return true;\n }\n\n public get disabled(): boolean | undefined {\n return this._isDisabled();\n }\n\n public connect(): void {\n const labelElement = this._component.querySelector(RADIO_CONSTANTS.selectors.LABEL) as HTMLLabelElement;\n if (labelElement) {\n labelElement.setAttribute(RADIO_CONSTANTS.attributes.SLOT, RADIO_CONSTANTS.selectors.LABEL);\n }\n }\n\n public async deferRippleInitialization(): Promise<void> {\n const type = await userInteractionListener(this._rootElement);\n if (!this._rippleInstance) {\n this._rippleInstance = this._createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n }\n\n public destroyRipple(): void {\n this._rippleInstance?.destroy();\n this._rippleInstance = undefined;\n }\n\n public setHostAttribute(name: string, value = ''): void {\n this._component.setAttribute(name, value);\n }\n\n public removeHostAttribute(name: string): void {\n this._component.removeAttribute(name);\n }\n\n public addRootClass(className: string): void {\n this._rootElement.classList.add(className);\n }\n\n public removeRootClass(className: string): void {\n this._rootElement.classList.remove(className);\n }\n\n public addContainerClass(className: string): void {\n this._containerElement.classList.add(className);\n }\n\n public removeContainerClass(className: string): void {\n this._containerElement.classList.remove(className);\n }\n\n public syncDisabledStateWithInput(): void {\n if (this.inputDisabled) {\n this.addRootClass(RADIO_CONSTANTS.classes.DISABLED);\n this.removeRootClass(RADIO_CONSTANTS.classes.ENABLED);\n this.addContainerClass(RADIO_CONSTANTS.classes.WRAPPER_DISABLED);\n } else {\n this.addRootClass(RADIO_CONSTANTS.classes.ENABLED);\n this.removeRootClass(RADIO_CONSTANTS.classes.DISABLED);\n this.removeContainerClass(RADIO_CONSTANTS.classes.WRAPPER_DISABLED);\n }\n }\n\n public syncFocusedStateWithInput(): void {\n if (getActiveElement() === this._inputElement) {\n this.addRootClass(RADIO_CONSTANTS.classes.FOCUSED);\n } else {\n this.removeRootClass(RADIO_CONSTANTS.classes.FOCUSED);\n }\n }\n\n public syncCheckedStateWithInput(): void {\n if (this.inputChecked) {\n this.addRootClass(RADIO_CONSTANTS.classes.CHECKED);\n } else {\n this.removeRootClass(RADIO_CONSTANTS.classes.CHECKED);\n }\n }\n\n public addInputEventListener(event: string, callback: (event: Event) => void): void {\n if (!this._inputElement) {\n return;\n }\n\n this._inputElement.addEventListener(event, callback);\n }\n\n public removeInputEventListener(event: string, callback: (event: Event) => void): void {\n if (!this._inputElement) {\n return;\n }\n\n this._inputElement.removeEventListener(event, callback);\n }\n\n public addInputDisabledAttributeChangeListener(callback: () => void): void {\n this._setupInputDisabledAttributeMutationObserver(callback);\n }\n\n public removeInputDisabledAttributeChangeListener(): void {\n this._cleanupInputDisabledAttributeMutationObserver();\n }\n\n // Get the collection of all forge-radios under the containing radiogroup ancestor.\n public getRadiosFromContainingRadiogroup(): NodeListOf<IRadioComponent> | null {\n const radioGroup = this._getContainingRadioGroup(this._component);\n if (radioGroup == null) {\n return null;\n }\n\n return radioGroup.querySelectorAll(RADIO_CONSTANTS.elementName);\n }\n\n public syncRadiogroupCheckStyles(): void {\n const radios = this.getRadiosFromContainingRadiogroup();\n if (radios) {\n radios.forEach(x => x.syncCheckedState());\n }\n }\n\n public extendNativeInputSetter(callback: () => void): void {\n if (!this._inputElement) {\n return;\n }\n\n const nativeInput = this._inputElement;\n const inputProto = Object.getPrototypeOf(nativeInput);\n RADIO_CONSTANTS.inputProperties.forEach(controlState => {\n const desc = Object.getOwnPropertyDescriptor(inputProto, controlState) as PropertyDescriptor;\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!this._validPropertyDescriptor(desc)) {\n return;\n }\n\n if (desc) {\n const nativeInputDesc = {\n configurable: desc.configurable,\n enumerable: desc.enumerable,\n get: desc.get,\n set: (state: boolean) => {\n desc.set?.call(nativeInput, state);\n callback();\n }\n };\n Object.defineProperty(nativeInput, controlState, nativeInputDesc);\n }\n });\n }\n\n public revertNativeInputSetter(): void {\n if (!this._inputElement) {\n return;\n }\n\n const nativeInput = this._inputElement;\n const inputProto = Object.getPrototypeOf(nativeInput);\n RADIO_CONSTANTS.inputProperties.forEach(controlState => {\n const desc = Object.getOwnPropertyDescriptor(inputProto, controlState) as PropertyDescriptor;\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!this._validPropertyDescriptor(desc)) {\n return;\n }\n Object.defineProperty(nativeInput, controlState, desc);\n });\n }\n\n private _validPropertyDescriptor(inputPropDesc: PropertyDescriptor | undefined): boolean {\n return !!inputPropDesc && typeof inputPropDesc.set === 'function';\n }\n\n // Recursively crawl up the node tree looking for the containing radiogroup ancestor element.\n private _getContainingRadioGroup(element: HTMLElement): HTMLElement | null {\n if (!element || !element.parentElement) {\n throw new Error('Unable to locate ancestor element with role=\"radiogroup\". When using radios, a parent with this attribute must be applied.');\n }\n\n const parentElement = element.parentElement;\n const roleValue = parentElement.getAttribute(RADIO_CONSTANTS.attributes.ROLE);\n if (!!roleValue && roleValue.toLocaleLowerCase() === RADIO_CONSTANTS.attributes.RADIOGROUP_ROLE.toLocaleLowerCase()) {\n return parentElement;\n }\n\n return this._getContainingRadioGroup(parentElement);\n }\n\n private _setupInputDisabledAttributeMutationObserver(callback: () => void): void {\n if (!this._inputElement) {\n return;\n }\n\n this._cleanupInputDisabledAttributeMutationObserver();\n const mutationCallback = (mutationRecords: MutationRecord[]): void => this._inputDisabledAttributeMutationCallback(mutationRecords, callback);\n this._inputAttributeMutationObserver = new MutationObserver(mutationCallback);\n const mutationOptions: MutationObserverInit = {\n attributes: true,\n attributeOldValue: true,\n attributeFilter: ['disabled']\n };\n this._inputAttributeMutationObserver.observe(this._inputElement, mutationOptions);\n }\n\n private _cleanupInputDisabledAttributeMutationObserver(): void {\n if (this._inputAttributeMutationObserver) {\n this._inputAttributeMutationObserver.disconnect();\n delete this._inputAttributeMutationObserver;\n }\n }\n\n private _inputDisabledAttributeMutationCallback(mutationRecords: MutationRecord[], callback: () => void): void {\n for (const mutationRecord of mutationRecords) {\n // Skip:\n // - Non-attribute mutations.\n // - Mutations without an attribute name.\n // - Mutations without a matching attribute name.\n // - Mutations that did not change the attribute value.\n if (mutationRecord.type !== 'attributes'\n || !mutationRecord.attributeName\n || mutationRecord.attributeName !== 'disabled'\n || mutationRecord.target[mutationRecord.attributeName] === mutationRecord.oldValue) {\n continue;\n }\n\n callback();\n }\n }\n\n public get inputDisabled(): boolean {\n if (!this._inputElement) {\n return false;\n }\n\n return this._inputElement.disabled;\n }\n\n public get inputChecked(): boolean {\n if (!this._inputElement) {\n return false;\n }\n\n return this._inputElement.checked;\n }\n\n private get _inputElement(): HTMLInputElement | null {\n if (!this._nativeInputElement) {\n this._nativeInputElement = this._component.querySelector<HTMLInputElement>(RADIO_CONSTANTS.selectors.RADIO_INPUT);\n }\n\n return this._nativeInputElement;\n }\n\n private _isDisabled(): boolean {\n return this._inputElement ? this._inputElement.disabled : false;\n }\n\n private _createRipple(): ForgeRipple {\n const adapter: ForgeRippleAdapter = {\n ...ForgeRipple.createAdapter(this),\n deregisterInteractionHandler: (evtType, handler) => {\n if (this._inputElement) {\n this._inputElement.removeEventListener(evtType, handler, { passive: true } as AddEventListenerOptions);\n }\n },\n isSurfaceActive: () => this._inputElement ? this._inputElement.matches(':active') : false,\n isUnbounded: () => Boolean(this.unbounded),\n registerInteractionHandler: (evtType, handler) => {\n if (this._inputElement) {\n this._inputElement.addEventListener(evtType, handler, { passive: true });\n }\n },\n isSurfaceDisabled: () => this._inputElement ? this._inputElement.disabled : false,\n addClass: (className: string) => addClass(className, this._rootElement),\n removeClass: (className: string) => removeClass(className, this._rootElement),\n updateCssVariable: (varName: string, value: string | null) => this._rootElement.style.setProperty(varName, value)\n };\n return new ForgeRipple(this._rootElement, new ForgeRippleFoundation(adapter));\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { RADIO_CONSTANTS } from './radio-constants';\nimport { RadioFoundation } from './radio-foundation';\nimport { RadioAdapter } from './radio-adapter';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-radio-wrapper forge-form-field\\\" part=\\\"root\\\"><div class=\\\"mdc-radio\\\" part=\\\"container\\\"><slot></slot><div class=\\\"mdc-radio__background\\\" part=\\\"background\\\"><div class=\\\"mdc-radio__outer-circle\\\" part=\\\"outer-circle\\\"></div><div class=\\\"mdc-radio__inner-circle\\\" part=\\\"inner-circle\\\"></div></div><div class=\\\"mdc-radio__ripple\\\" part=\\\"ripple-container\\\"></div></div><slot name=\\\"label\\\"></slot></div></template>';\nconst styles = '.mdc-radio{padding:10px;display:inline-block;position:relative;-webkit-box-flex:0;flex:0 0 auto;-webkit-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.54);border-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-radio.forge-radio--enabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__inner-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio .mdc-radio__background::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio .mdc-radio__background::before{top:-10px;left:-10px;width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio__background{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;-webkit-transform:scale(0,0);transform:scale(0,0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\";-webkit-transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transform:scale(0,0);transform:scale(0,0);border-width:10px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio ::slotted(input[type=radio]){position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;top:0;right:0;left:0;width:40px;height:40px}.mdc-radio.forge-radio--dense{padding:4px;margin:0}.mdc-radio.forge-radio--dense .mdc-radio__background::before{top:-4px;left:-4px;width:28px;height:28px}.mdc-radio.forge-radio--dense .mdc-radio__native-control{top:0;right:0;left:0;width:28px;height:28px}.mdc-radio.forge-radio--dense ::slotted(input[type=radio]){width:28px;height:28px}.mdc-radio--disabled+::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-radio--checked .mdc-radio__background,.mdc-radio--disabled .mdc-radio__background{-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled .mdc-radio__background{cursor:default}.forge-radio--focused .mdc-radio__background::before{-webkit-transform:scale(1);transform:scale(1);opacity:.12;-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-radio{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-radio .mdc-radio__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-radio .mdc-radio__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-radio.mdc-ripple-upgraded--unbounded .mdc-radio__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-radio.mdc-ripple-upgraded--foreground-activation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-radio.mdc-ripple-upgraded--foreground-deactivation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after,.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-ripple-surface--hover .mdc-radio__ripple::before,.mdc-radio:hover .mdc-radio__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__ripple::before,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-radio:not(.mdc-ripple-upgraded) .mdc-radio__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-radio:not(.mdc-ripple-upgraded):active .mdc-radio__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-radio.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__background::before,.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__background::before{content:none}.mdc-radio__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.forge-radio-wrapper--disabled{cursor:not-allowed}.forge-radio-wrapper--disabled ::slotted(label){cursor:not-allowed}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field ::slotted([slot=label]){-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~::slotted([slot=label]){padding-left:8px}.forge-form-field--align-end ::slotted([slot=label]){-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}:host{display:inline-block}:host([hidden]){display:none}';\n\nexport interface IRadioComponent extends IBaseComponent {\n dense: boolean;\n syncCheckedState(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-radio': IRadioComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-radio>` element.\n * \n * @tag forge-radio\n */\n@CustomElement({\n name: RADIO_CONSTANTS.elementName\n})\nexport class RadioComponent extends BaseComponent implements IRadioComponent {\n public static get observedAttributes(): string[] {\n return [\n RADIO_CONSTANTS.attributes.DENSE\n ];\n }\n\n protected _foundation: RadioFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new RadioFoundation(new RadioAdapter(this));\n }\n\n public connectedCallback(): void {\n this._ensureRadioInputElement().then(() => this._foundation.connect());\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case RADIO_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n }\n }\n\n private _ensureRadioInputElement(): Promise<void> {\n // Not using core function ensureChild because it was not selecting the input properly\n return new Promise<void>(resolve => {\n const element = this.querySelector(RADIO_CONSTANTS.selectors.RADIO_INPUT);\n if (element) {\n resolve();\n return;\n }\n\n const observer = new MutationObserver(changes => {\n const hasAddedNodes = changes.reduce((prev, curr) => prev + curr.addedNodes.length, 0) > 0;\n if (hasAddedNodes) {\n if (this.querySelector(RADIO_CONSTANTS.selectors.RADIO_INPUT)) {\n observer.disconnect();\n resolve();\n }\n }\n });\n observer.observe(this, { childList: true, subtree: true });\n });\n }\n\n public syncCheckedState(): void {\n this._foundation.syncCheckedState();\n }\n\n /** Gets/sets whether the radio button is dense. */\n @FoundationProperty()\n public declare dense: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { RadioComponent } from './radio';\n\nexport * from './radio-constants';\nexport * from './radio';\n\nexport function defineRadioComponent(): void {\n defineCustomElement(RadioComponent);\n}\n"],
5
- "mappings": "0XAEA,IAAMA,EAA2C,GAAGC,SAE9CC,EAAU,CACd,MAAO,YACP,YAAa,qBACb,SAAU,sBACV,iBAAkB,gCAClB,QAAS,uBACT,QAAS,uBACT,QAAS,sBACX,EAEMC,EAAY,CAChB,QAAS,uBACT,MAAO,aACP,YAAa,sBACb,MAAO,OACT,EAEMC,EAAa,CACjB,MAAO,QACP,KAAM,OACN,gBAAiB,aACjB,KAAM,MACR,EAEMC,EAAkB,CAAC,UAAW,UAAU,EAEjCC,EAAkB,CAC7B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T,EAAgB,UAAU,WAAW,IAC1DM,EAAS,WAAW,EACpBD,EAAQ,EAGd,CAAC,EACDC,EAAS,QAAQ,KAAM,CAAE,UAAW,GAAM,QAAS,EAAK,CAAC,CAC3D,CAAC,CACH,CAEO,kBAAyB,CAC9B,KAAK,YAAY,iBAAiB,CACpC,CAKF,EADiBI,EAAA,CADdC,EAAmB,GA1DThB,EA2DI,qBA3DJA,EAANe,EAAA,CAHNE,EAAc,CACb,KAAMZ,EAAgB,WACxB,CAAC,GACYL,GCrBN,SAASkB,IAA6B,CAC3CC,EAAoBC,CAAc,CACpC",
6
- "names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "inputProperties", "RADIO_CONSTANTS", "RadioFoundation", "_adapter", "RADIO_CONSTANTS", "value", "RadioAdapter", "_component", "getShadowElement", "RADIO_CONSTANTS", "labelElement", "type", "userInteractionListener", "_a", "name", "value", "className", "getActiveElement", "event", "callback", "radioGroup", "radios", "x", "nativeInput", "inputProto", "controlState", "desc", "nativeInputDesc", "state", "inputPropDesc", "element", "parentElement", "roleValue", "mutationCallback", "mutationRecords", "mutationOptions", "mutationRecord", "adapter", "__spreadProps", "__spreadValues", "ForgeRipple", "evtType", "handler", "addClass", "removeClass", "varName", "ForgeRippleFoundation", "template", "styles", "RadioComponent", "BaseComponent", "attachShadowTemplate", "RadioFoundation", "RadioAdapter", "RADIO_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "resolve", "observer", "changes", "prev", "curr", "__decorateClass", "FoundationProperty", "CustomElement", "defineRadioComponent", "defineCustomElement", "RadioComponent"]
7
- }