@tylertech/forge 3.0.0-next.16 → 3.0.0-next.17

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 (410) hide show
  1. package/custom-elements.json +1078 -1440
  2. package/dist/esm/accordion/index.js +1 -1
  3. package/dist/esm/app-bar/app-bar/index.js +1 -1
  4. package/dist/esm/app-bar/help-button/index.js +1 -1
  5. package/dist/esm/app-bar/index.js +1 -1
  6. package/dist/esm/app-bar/menu-button/index.js +1 -1
  7. package/dist/esm/app-bar/notification-button/index.js +1 -1
  8. package/dist/esm/app-bar/profile-button/index.js +1 -1
  9. package/dist/esm/app-bar/search/index.js +1 -1
  10. package/dist/esm/autocomplete/index.js +1 -1
  11. package/dist/esm/avatar/index.js +1 -1
  12. package/dist/esm/backdrop/index.js +1 -1
  13. package/dist/esm/badge/index.js +1 -1
  14. package/dist/esm/banner/index.js +1 -1
  15. package/dist/esm/bottom-sheet/index.js +1 -1
  16. package/dist/esm/busy-indicator/index.js +1 -1
  17. package/dist/esm/button/index.js +1 -1
  18. package/dist/esm/button-area/index.js +1 -1
  19. package/dist/esm/button-toggle/button-toggle/index.js +1 -1
  20. package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
  21. package/dist/esm/button-toggle/index.js +1 -1
  22. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  23. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  24. package/dist/esm/calendar/index.js +1 -1
  25. package/dist/esm/card/index.js +1 -1
  26. package/dist/esm/checkbox/index.js +1 -1
  27. package/dist/esm/chip-field/index.js +1 -1
  28. package/dist/esm/chips/chip/index.js +1 -1
  29. package/dist/esm/chips/chip-set/index.js +1 -1
  30. package/dist/esm/chips/index.js +1 -1
  31. package/dist/esm/chunks/{chunk.74HZVSDM.js → chunk.253H47GA.js} +2 -2
  32. package/dist/esm/chunks/{chunk.BKQSLDMK.js → chunk.2K3T63I2.js} +2 -2
  33. package/dist/esm/chunks/{chunk.WQHKUNR7.js → chunk.2NGPMBVU.js} +2 -2
  34. package/dist/esm/chunks/{chunk.4O6OEUGY.js → chunk.2UVBQKJI.js} +2 -2
  35. package/dist/esm/chunks/{chunk.5XLCY232.js → chunk.3PHNRX5D.js} +2 -2
  36. package/dist/esm/chunks/chunk.42VNZ74O.js +7 -0
  37. package/dist/esm/chunks/chunk.42VNZ74O.js.map +7 -0
  38. package/dist/esm/chunks/{chunk.QZ57WM3D.js → chunk.4JEBLMI3.js} +2 -2
  39. package/dist/esm/chunks/{chunk.5T7TT3AB.js → chunk.4X4SSZQU.js} +2 -2
  40. package/dist/esm/chunks/chunk.53HPDCFR.js +7 -0
  41. package/dist/esm/chunks/chunk.53HPDCFR.js.map +7 -0
  42. package/dist/esm/chunks/{chunk.X7YTDVNT.js → chunk.5BQT3E7Y.js} +2 -2
  43. package/dist/esm/chunks/{chunk.EWFNM4WO.js → chunk.5YTYVHYR.js} +2 -2
  44. package/dist/esm/chunks/{chunk.YWDYBX3G.js → chunk.6J27XSTE.js} +2 -2
  45. package/dist/esm/chunks/{chunk.EPRRK33O.js → chunk.6JR2HMWB.js} +2 -2
  46. package/dist/esm/chunks/{chunk.65WE722H.js → chunk.6P4G73VL.js} +2 -2
  47. package/dist/esm/chunks/{chunk.ZPVRRFT7.js → chunk.6RZCV4ZV.js} +2 -2
  48. package/dist/esm/chunks/{chunk.WNH7EHZP.js → chunk.6YDMW2GO.js} +2 -2
  49. package/dist/esm/chunks/{chunk.XBFH6M72.js → chunk.7QO5JEOC.js} +2 -2
  50. package/dist/esm/chunks/{chunk.2YE556AM.js → chunk.AQOLBID6.js} +2 -2
  51. package/dist/esm/chunks/{chunk.OXVCCHM5.js → chunk.AWEDY45N.js} +2 -2
  52. package/dist/esm/chunks/chunk.CLODJYSW.js +7 -0
  53. package/dist/esm/chunks/chunk.CLODJYSW.js.map +7 -0
  54. package/dist/esm/chunks/{chunk.KPC6IS3C.js → chunk.CPD4RUF2.js} +2 -2
  55. package/dist/esm/chunks/{chunk.YBPAGWVG.js → chunk.D7L2IMHJ.js} +2 -2
  56. package/dist/esm/chunks/{chunk.ZS3T6MJS.js → chunk.DFRD7A2Y.js} +2 -2
  57. package/dist/esm/chunks/{chunk.C72LM2AL.js → chunk.DOAQODLZ.js} +2 -2
  58. package/dist/esm/chunks/{chunk.EN2HVFJ4.js → chunk.EPVNVBZI.js} +2 -2
  59. package/dist/esm/chunks/chunk.F2327OUE.js +7 -0
  60. package/dist/esm/chunks/chunk.F2327OUE.js.map +7 -0
  61. package/dist/esm/chunks/chunk.FTADCSFT.js +7 -0
  62. package/dist/esm/chunks/{chunk.HJUFU2PV.js.map → chunk.FTADCSFT.js.map} +2 -2
  63. package/dist/esm/chunks/{chunk.FQVR2QNF.js → chunk.GAHE4QVB.js} +2 -2
  64. package/dist/esm/chunks/chunk.GDKJ4RZX.js +7 -0
  65. package/dist/esm/chunks/chunk.GDKJ4RZX.js.map +7 -0
  66. package/dist/esm/chunks/{chunk.N75VD4S4.js → chunk.GFKYBECY.js} +2 -2
  67. package/dist/esm/chunks/{chunk.IA27LU2O.js → chunk.GYGIU62J.js} +2 -2
  68. package/dist/esm/chunks/{chunk.OT3JZ6JO.js → chunk.H6AG3EFX.js} +2 -2
  69. package/dist/esm/chunks/{chunk.5WVOPPBY.js → chunk.HBFU4EGB.js} +2 -2
  70. package/dist/esm/chunks/{chunk.RFKKHN7V.js → chunk.HP4333ZN.js} +2 -2
  71. package/dist/esm/chunks/{chunk.TNEUDWZU.js → chunk.IC4DLKE3.js} +2 -2
  72. package/dist/esm/chunks/{chunk.QKTNCOVX.js → chunk.IDB4KFSQ.js} +2 -2
  73. package/dist/esm/chunks/{chunk.K3STAW42.js → chunk.JBQXD3FJ.js} +2 -2
  74. package/dist/esm/chunks/{chunk.FPRBYGET.js → chunk.JLDKNU5Q.js} +2 -2
  75. package/dist/esm/chunks/{chunk.74JHE77R.js → chunk.JMIUB3S3.js} +2 -2
  76. package/dist/esm/chunks/{chunk.JXJVPJRO.js → chunk.JPOTN7LL.js} +2 -2
  77. package/dist/esm/chunks/{chunk.T4N7KZHZ.js → chunk.JRROGJ2G.js} +2 -2
  78. package/dist/esm/chunks/{chunk.H6MMHAQI.js → chunk.KD4DVSJR.js} +2 -2
  79. package/dist/esm/chunks/{chunk.DPIWAXEW.js → chunk.KVPKVWCZ.js} +2 -2
  80. package/dist/esm/chunks/{chunk.TE6ZNUAM.js → chunk.KWP42KR7.js} +2 -2
  81. package/dist/esm/chunks/{chunk.ZUTQPJ2B.js → chunk.KYACLC66.js} +2 -2
  82. package/dist/esm/chunks/{chunk.GHMAI3SM.js → chunk.KZMXTOLO.js} +2 -2
  83. package/dist/esm/chunks/{chunk.W5TDBDVY.js → chunk.L5OB7WM2.js} +2 -2
  84. package/dist/esm/chunks/{chunk.4JB3SESQ.js → chunk.L7BSLZCB.js} +2 -2
  85. package/dist/esm/chunks/{chunk.FZELFLPE.js → chunk.LDHY3O6H.js} +2 -2
  86. package/dist/esm/chunks/{chunk.NW54VA4E.js → chunk.LEN33O6V.js} +2 -2
  87. package/dist/esm/chunks/{chunk.V564JB6A.js → chunk.LFLIYBAB.js} +2 -2
  88. package/dist/esm/chunks/{chunk.RDQ3QGWS.js → chunk.LXFL2C62.js} +2 -2
  89. package/dist/esm/chunks/{chunk.ETDUW5K2.js → chunk.ME7ICFCZ.js} +2 -2
  90. package/dist/esm/chunks/{chunk.B53Q676I.js → chunk.MMMG4MZ3.js} +2 -2
  91. package/dist/esm/chunks/{chunk.ZWIEYVZC.js → chunk.MTZOQQXR.js} +2 -2
  92. package/dist/esm/chunks/{chunk.6PB5OWMP.js → chunk.NBYCIDFC.js} +2 -2
  93. package/dist/esm/chunks/chunk.ND2X5OQ4.js +7 -0
  94. package/dist/esm/chunks/chunk.ND2X5OQ4.js.map +7 -0
  95. package/dist/esm/chunks/{chunk.OJGPKHHC.js → chunk.NHYJMP25.js} +2 -2
  96. package/dist/esm/chunks/{chunk.GTGXHY4A.js → chunk.NPCUVYWP.js} +2 -2
  97. package/dist/esm/chunks/{chunk.BZG47SA5.js → chunk.O47OSK6Z.js} +2 -2
  98. package/dist/esm/chunks/{chunk.BZG47SA5.js.map → chunk.O47OSK6Z.js.map} +1 -1
  99. package/dist/esm/chunks/{chunk.TZ67MC2N.js → chunk.O5HBMTSZ.js} +2 -2
  100. package/dist/esm/chunks/{chunk.4JL5LW5J.js → chunk.O7DID7GP.js} +2 -2
  101. package/dist/esm/chunks/{chunk.V3IHX6B2.js → chunk.OAZXY4Q5.js} +2 -2
  102. package/dist/esm/chunks/{chunk.55D2BMXX.js → chunk.OD54UG2G.js} +2 -2
  103. package/dist/esm/chunks/{chunk.X57DRPFB.js → chunk.OJFSECZE.js} +2 -2
  104. package/dist/esm/chunks/{chunk.5LCWC3A7.js → chunk.OJHNLDNM.js} +2 -2
  105. package/dist/esm/chunks/{chunk.VGIZJ32U.js → chunk.OR5GB6X3.js} +2 -2
  106. package/dist/esm/chunks/{chunk.KM5XYTE3.js → chunk.OVDO5RVX.js} +2 -2
  107. package/dist/esm/chunks/{chunk.4GMGQZOW.js → chunk.PGSL6NFZ.js} +2 -2
  108. package/dist/esm/chunks/{chunk.NKEAMFO4.js → chunk.PR76A5VF.js} +2 -2
  109. package/dist/esm/chunks/{chunk.XOH2JCRS.js → chunk.PZAL7VQF.js} +2 -2
  110. package/dist/esm/chunks/{chunk.FWWBFNQA.js → chunk.QQUSMJIM.js} +2 -2
  111. package/dist/esm/chunks/{chunk.ZYCKD6K5.js → chunk.RCYIHHYO.js} +2 -2
  112. package/dist/esm/chunks/{chunk.HRGTAVNA.js → chunk.RKIJTSSL.js} +1 -1
  113. package/dist/esm/chunks/{chunk.R2QENXIL.js → chunk.RLOZYTNN.js} +2 -2
  114. package/dist/esm/chunks/{chunk.DGG5ABL3.js → chunk.S3KKICL3.js} +2 -2
  115. package/dist/esm/chunks/{chunk.E62ZPQSM.js → chunk.SN3VXOWN.js} +2 -2
  116. package/dist/esm/chunks/{chunk.M4KCRUKW.js → chunk.STIZCKQA.js} +2 -2
  117. package/dist/esm/chunks/{chunk.6IPX5C4B.js → chunk.SUR46MJG.js} +2 -2
  118. package/dist/esm/chunks/{chunk.WA2YP4NC.js → chunk.SZETPZGY.js} +2 -2
  119. package/dist/esm/chunks/{chunk.FZZUNYH5.js → chunk.TGGC2THA.js} +2 -2
  120. package/dist/esm/chunks/{chunk.Y6D5Z56X.js → chunk.TRSICKKS.js} +2 -2
  121. package/dist/esm/chunks/{chunk.FGHSNC2V.js → chunk.U7S4DJTU.js} +2 -2
  122. package/dist/esm/chunks/{chunk.GTBCTNMI.js → chunk.UCIVBX64.js} +2 -2
  123. package/dist/esm/chunks/{chunk.RRNSZCVJ.js → chunk.UVXKHQQZ.js} +2 -2
  124. package/dist/esm/chunks/{chunk.3U6A353B.js → chunk.UYAP5GFT.js} +2 -2
  125. package/dist/esm/chunks/{chunk.ZLACSRD4.js → chunk.V7HN24VV.js} +2 -2
  126. package/dist/esm/chunks/{chunk.4QOXI2GM.js → chunk.VLADAZRB.js} +2 -2
  127. package/dist/esm/chunks/{chunk.ECJBVX3D.js → chunk.VN7JOJVU.js} +2 -2
  128. package/dist/esm/chunks/{chunk.GLUKTMQU.js → chunk.VNFATHAQ.js} +2 -2
  129. package/dist/esm/chunks/{chunk.IO3TM653.js → chunk.VNH44AGF.js} +2 -2
  130. package/dist/esm/chunks/{chunk.M5JGYRH4.js → chunk.VOL4DT5F.js} +2 -2
  131. package/dist/esm/chunks/{chunk.4OG3OGVO.js → chunk.VX7H6YHF.js} +2 -2
  132. package/dist/esm/chunks/{chunk.OSCODMUG.js → chunk.W7CM652O.js} +2 -2
  133. package/dist/esm/chunks/chunk.WINWKU4K.js +7 -0
  134. package/dist/esm/chunks/chunk.WINWKU4K.js.map +7 -0
  135. package/dist/esm/chunks/{chunk.BZVLSWZR.js → chunk.WJ26N3FC.js} +2 -2
  136. package/dist/esm/chunks/{chunk.ZHMV5SR4.js → chunk.WJLHVUHN.js} +2 -2
  137. package/dist/esm/chunks/{chunk.GURV4TDZ.js → chunk.WXFJYCGO.js} +2 -2
  138. package/dist/esm/chunks/{chunk.P5XHGSJY.js → chunk.XPIAOMSC.js} +2 -2
  139. package/dist/esm/chunks/{chunk.VZTV4GXC.js → chunk.YCG7OVYF.js} +2 -2
  140. package/dist/esm/chunks/{chunk.7SYU6KRU.js → chunk.YLJTJKN4.js} +2 -2
  141. package/dist/esm/chunks/chunk.YVCGGQQG.js +12 -0
  142. package/dist/esm/chunks/{chunk.R53VHVKB.js.map → chunk.YVCGGQQG.js.map} +3 -3
  143. package/dist/esm/chunks/{chunk.2OZ2HVBZ.js → chunk.Z7JF5PPO.js} +2 -2
  144. package/dist/esm/chunks/{chunk.WYSUQK6Z.js → chunk.Z7SLVU2O.js} +2 -2
  145. package/dist/esm/chunks/{chunk.Q5YXX4DU.js → chunk.ZJQLVAJY.js} +2 -2
  146. package/dist/esm/chunks/{chunk.S32JKL3M.js → chunk.ZSHN7Z45.js} +2 -2
  147. package/dist/esm/chunks/{chunk.KV7PGQJ7.js → chunk.ZTBOQMRE.js} +2 -2
  148. package/dist/esm/chunks/{chunk.WFQYTXCB.js → chunk.ZZRAZZ3N.js} +2 -2
  149. package/dist/esm/chunks/{chunk.SJQPD3CO.js → chunk.ZZV7P3FR.js} +2 -2
  150. package/dist/esm/circular-progress/index.js +1 -1
  151. package/dist/esm/color-picker/index.js +1 -1
  152. package/dist/esm/core/index.js +1 -1
  153. package/dist/esm/date-picker/index.js +1 -1
  154. package/dist/esm/date-range-picker/index.js +1 -1
  155. package/dist/esm/deprecated/button/index.js +7 -0
  156. package/dist/esm/deprecated/index.js +7 -0
  157. package/dist/esm/deprecated/index.js.map +7 -0
  158. package/dist/esm/dialog/index.js +1 -1
  159. package/dist/esm/divider/index.js +1 -1
  160. package/dist/esm/drawer/drawer/index.js +1 -1
  161. package/dist/esm/drawer/index.js +1 -1
  162. package/dist/esm/drawer/mini-drawer/index.js +1 -1
  163. package/dist/esm/drawer/modal-drawer/index.js +1 -1
  164. package/dist/esm/expansion-panel/index.js +1 -1
  165. package/dist/esm/file-picker/index.js +1 -1
  166. package/dist/esm/floating-action-button/index.js +1 -1
  167. package/dist/esm/floating-label/index.js +1 -1
  168. package/dist/esm/focus-indicator/index.js +1 -1
  169. package/dist/esm/icon/index.js +1 -1
  170. package/dist/esm/icon-button/index.js +1 -1
  171. package/dist/esm/index.js +1 -1
  172. package/dist/esm/inline-message/index.js +1 -1
  173. package/dist/esm/keyboard-shortcut/index.js +1 -1
  174. package/dist/esm/label/index.js +1 -1
  175. package/dist/esm/label-value/index.js +1 -1
  176. package/dist/esm/linear-progress/index.js +1 -1
  177. package/dist/esm/list/index.js +1 -1
  178. package/dist/esm/list/list/index.js +1 -1
  179. package/dist/esm/list/list-item/index.js +1 -1
  180. package/dist/esm/list-dropdown/index.js +1 -1
  181. package/dist/esm/menu/index.js +1 -1
  182. package/dist/esm/open-icon/index.js +1 -1
  183. package/dist/esm/overlay/index.js +1 -1
  184. package/dist/esm/page-state/index.js +1 -1
  185. package/dist/esm/paginator/index.js +1 -1
  186. package/dist/esm/popover/index.js +1 -1
  187. package/dist/esm/popup/index.js +1 -1
  188. package/dist/esm/product-icon/index.js +1 -1
  189. package/dist/esm/profile-card/index.js +1 -1
  190. package/dist/esm/quantity-field/index.js +1 -1
  191. package/dist/esm/radio/index.js +1 -1
  192. package/dist/esm/radio/radio/index.js +1 -1
  193. package/dist/esm/radio/radio-group/index.js +1 -1
  194. package/dist/esm/ripple/index.js +1 -1
  195. package/dist/esm/scaffold/index.js +1 -1
  196. package/dist/esm/select/core/index.js +1 -1
  197. package/dist/esm/select/index.js +1 -1
  198. package/dist/esm/select/option/index.js +1 -1
  199. package/dist/esm/select/option-group/index.js +1 -1
  200. package/dist/esm/select/select/index.js +1 -1
  201. package/dist/esm/select/select-dropdown/index.js +1 -1
  202. package/dist/esm/skeleton/index.js +1 -1
  203. package/dist/esm/slider/index.js +1 -1
  204. package/dist/esm/split-button/index.js +1 -1
  205. package/dist/esm/split-view/index.js +1 -1
  206. package/dist/esm/split-view/split-view/index.js +1 -1
  207. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  208. package/dist/esm/stack/index.js +1 -1
  209. package/dist/esm/state-layer/index.js +1 -1
  210. package/dist/esm/stepper/index.js +1 -1
  211. package/dist/esm/stepper/step/index.js +1 -1
  212. package/dist/esm/stepper/stepper/index.js +1 -1
  213. package/dist/esm/switch/index.js +1 -1
  214. package/dist/esm/table/index.js +1 -1
  215. package/dist/esm/tabs/index.js +1 -1
  216. package/dist/esm/tabs/tab/index.js +1 -1
  217. package/dist/esm/tabs/tab-bar/index.js +1 -1
  218. package/dist/esm/text-field/index.js +1 -1
  219. package/dist/esm/time-picker/index.js +1 -1
  220. package/dist/esm/toast/index.js +1 -1
  221. package/dist/esm/toolbar/index.js +1 -1
  222. package/dist/esm/tooltip/index.js +1 -1
  223. package/dist/esm/utils/index.js +1 -1
  224. package/dist/esm/view-switcher/index.js +1 -1
  225. package/dist/esm/view-switcher/view/index.js +1 -1
  226. package/dist/forge-dark.css +1 -1
  227. package/dist/forge.css +1 -1
  228. package/dist/theme/forge-theme.css +1 -1
  229. package/dist/typography/forge-typography.css +1 -1
  230. package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +1 -1
  231. package/esm/avatar/avatar-adapter.d.ts +0 -6
  232. package/esm/avatar/avatar-adapter.js +6 -14
  233. package/esm/avatar/avatar-constants.d.ts +0 -1
  234. package/esm/avatar/avatar-constants.js +2 -3
  235. package/esm/avatar/avatar-foundation.d.ts +0 -5
  236. package/esm/avatar/avatar-foundation.js +0 -15
  237. package/esm/avatar/avatar.d.ts +28 -7
  238. package/esm/avatar/avatar.js +29 -12
  239. package/esm/avatar/index.d.ts +0 -1
  240. package/esm/avatar/index.js +0 -1
  241. package/esm/badge/badge-constants.d.ts +8 -4
  242. package/esm/badge/badge-constants.js +7 -4
  243. package/esm/badge/badge.d.ts +38 -11
  244. package/esm/badge/badge.js +55 -32
  245. package/esm/badge/index.d.ts +0 -3
  246. package/esm/badge/index.js +0 -3
  247. package/esm/circular-progress/circular-progress-foundation.js +3 -0
  248. package/esm/deprecated/button/deprecated-button-component-delegate.d.ts +24 -0
  249. package/esm/deprecated/button/deprecated-button-component-delegate.js +39 -0
  250. package/esm/deprecated/button/deprecated-button-constants.d.ts +17 -0
  251. package/esm/deprecated/button/deprecated-button-constants.js +20 -0
  252. package/esm/deprecated/button/deprecated-button.d.ts +54 -0
  253. package/esm/deprecated/button/deprecated-button.js +149 -0
  254. package/esm/deprecated/button/index.d.ts +12 -0
  255. package/esm/deprecated/button/index.js +16 -0
  256. package/{dist/esm/chunks/chunk.WINL2C7Q.js → esm/deprecated/index.d.ts} +1 -1
  257. package/esm/deprecated/index.js +6 -0
  258. package/esm/index.d.ts +5 -0
  259. package/esm/index.js +17 -0
  260. package/esm/inline-message/inline-message-constants.d.ts +9 -2
  261. package/esm/inline-message/inline-message-constants.js +7 -3
  262. package/esm/inline-message/inline-message.d.ts +31 -2
  263. package/esm/inline-message/inline-message.js +37 -5
  264. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  265. package/esm/state-layer/state-layer-foundation.js +3 -0
  266. package/package.json +2 -2
  267. package/styles/avatar/_core.scss +43 -0
  268. package/styles/avatar/_token-utils.scss +30 -0
  269. package/styles/avatar/avatar.scss +21 -3
  270. package/styles/badge/_core.scss +58 -0
  271. package/styles/badge/_token-utils.scss +30 -0
  272. package/styles/badge/badge.scss +101 -15
  273. package/styles/badge/index.scss +6 -0
  274. package/styles/core/styles/tokens/avatar/_tokens.scss +23 -0
  275. package/styles/core/styles/tokens/badge/_tokens.scss +42 -0
  276. package/styles/core/styles/tokens/inline-message/_tokens.scss +31 -0
  277. package/styles/core/styles/tokens/theme/_token-utils.scss +22 -1
  278. package/styles/core/styles/typography/index.scss +1 -1
  279. package/styles/deprecated/button/deprecated-button.scss +133 -0
  280. package/styles/inline-message/_core.scss +45 -0
  281. package/styles/inline-message/_token-utils.scss +30 -0
  282. package/styles/inline-message/index.scss +6 -0
  283. package/styles/inline-message/inline-message.scss +75 -9
  284. package/styles/theme/_theme-dark.scss +5 -5
  285. package/dist/esm/chunks/chunk.24NQGTNU.js +0 -7
  286. package/dist/esm/chunks/chunk.24NQGTNU.js.map +0 -7
  287. package/dist/esm/chunks/chunk.2JCTFKCR.js +0 -7
  288. package/dist/esm/chunks/chunk.2JCTFKCR.js.map +0 -7
  289. package/dist/esm/chunks/chunk.3VHQPHQP.js +0 -7
  290. package/dist/esm/chunks/chunk.3VHQPHQP.js.map +0 -7
  291. package/dist/esm/chunks/chunk.436USWLL.js +0 -7
  292. package/dist/esm/chunks/chunk.436USWLL.js.map +0 -7
  293. package/dist/esm/chunks/chunk.HJUFU2PV.js +0 -7
  294. package/dist/esm/chunks/chunk.LCS2O4Y7.js +0 -7
  295. package/dist/esm/chunks/chunk.LCS2O4Y7.js.map +0 -7
  296. package/dist/esm/chunks/chunk.R53VHVKB.js +0 -12
  297. package/dist/esm/chunks/chunk.T235SNYZ.js +0 -7
  298. package/dist/esm/chunks/chunk.T235SNYZ.js.map +0 -7
  299. package/esm/avatar/avatar-component-delegate.d.ts +0 -16
  300. package/esm/avatar/avatar-component-delegate.js +0 -15
  301. package/esm/badge/badge-adapter.d.ts +0 -17
  302. package/esm/badge/badge-adapter.js +0 -20
  303. package/esm/badge/badge-component-delegate.d.ts +0 -16
  304. package/esm/badge/badge-component-delegate.js +0 -15
  305. package/esm/badge/badge-foundation.d.ts +0 -24
  306. package/esm/badge/badge-foundation.js +0 -55
  307. package/styles/avatar/_mixins.scss +0 -46
  308. package/styles/avatar/_variables.scss +0 -16
  309. package/styles/inline-message/_mixins.scss +0 -82
  310. package/styles/inline-message/_variables.scss +0 -67
  311. /package/dist/esm/chunks/{chunk.74HZVSDM.js.map → chunk.253H47GA.js.map} +0 -0
  312. /package/dist/esm/chunks/{chunk.BKQSLDMK.js.map → chunk.2K3T63I2.js.map} +0 -0
  313. /package/dist/esm/chunks/{chunk.WQHKUNR7.js.map → chunk.2NGPMBVU.js.map} +0 -0
  314. /package/dist/esm/chunks/{chunk.4O6OEUGY.js.map → chunk.2UVBQKJI.js.map} +0 -0
  315. /package/dist/esm/chunks/{chunk.5XLCY232.js.map → chunk.3PHNRX5D.js.map} +0 -0
  316. /package/dist/esm/chunks/{chunk.QZ57WM3D.js.map → chunk.4JEBLMI3.js.map} +0 -0
  317. /package/dist/esm/chunks/{chunk.5T7TT3AB.js.map → chunk.4X4SSZQU.js.map} +0 -0
  318. /package/dist/esm/chunks/{chunk.X7YTDVNT.js.map → chunk.5BQT3E7Y.js.map} +0 -0
  319. /package/dist/esm/chunks/{chunk.EWFNM4WO.js.map → chunk.5YTYVHYR.js.map} +0 -0
  320. /package/dist/esm/chunks/{chunk.YWDYBX3G.js.map → chunk.6J27XSTE.js.map} +0 -0
  321. /package/dist/esm/chunks/{chunk.EPRRK33O.js.map → chunk.6JR2HMWB.js.map} +0 -0
  322. /package/dist/esm/chunks/{chunk.65WE722H.js.map → chunk.6P4G73VL.js.map} +0 -0
  323. /package/dist/esm/chunks/{chunk.ZPVRRFT7.js.map → chunk.6RZCV4ZV.js.map} +0 -0
  324. /package/dist/esm/chunks/{chunk.WNH7EHZP.js.map → chunk.6YDMW2GO.js.map} +0 -0
  325. /package/dist/esm/chunks/{chunk.XBFH6M72.js.map → chunk.7QO5JEOC.js.map} +0 -0
  326. /package/dist/esm/chunks/{chunk.2YE556AM.js.map → chunk.AQOLBID6.js.map} +0 -0
  327. /package/dist/esm/chunks/{chunk.OXVCCHM5.js.map → chunk.AWEDY45N.js.map} +0 -0
  328. /package/dist/esm/chunks/{chunk.KPC6IS3C.js.map → chunk.CPD4RUF2.js.map} +0 -0
  329. /package/dist/esm/chunks/{chunk.YBPAGWVG.js.map → chunk.D7L2IMHJ.js.map} +0 -0
  330. /package/dist/esm/chunks/{chunk.ZS3T6MJS.js.map → chunk.DFRD7A2Y.js.map} +0 -0
  331. /package/dist/esm/chunks/{chunk.C72LM2AL.js.map → chunk.DOAQODLZ.js.map} +0 -0
  332. /package/dist/esm/chunks/{chunk.EN2HVFJ4.js.map → chunk.EPVNVBZI.js.map} +0 -0
  333. /package/dist/esm/chunks/{chunk.FQVR2QNF.js.map → chunk.GAHE4QVB.js.map} +0 -0
  334. /package/dist/esm/chunks/{chunk.N75VD4S4.js.map → chunk.GFKYBECY.js.map} +0 -0
  335. /package/dist/esm/chunks/{chunk.IA27LU2O.js.map → chunk.GYGIU62J.js.map} +0 -0
  336. /package/dist/esm/chunks/{chunk.OT3JZ6JO.js.map → chunk.H6AG3EFX.js.map} +0 -0
  337. /package/dist/esm/chunks/{chunk.5WVOPPBY.js.map → chunk.HBFU4EGB.js.map} +0 -0
  338. /package/dist/esm/chunks/{chunk.RFKKHN7V.js.map → chunk.HP4333ZN.js.map} +0 -0
  339. /package/dist/esm/chunks/{chunk.TNEUDWZU.js.map → chunk.IC4DLKE3.js.map} +0 -0
  340. /package/dist/esm/chunks/{chunk.QKTNCOVX.js.map → chunk.IDB4KFSQ.js.map} +0 -0
  341. /package/dist/esm/chunks/{chunk.K3STAW42.js.map → chunk.JBQXD3FJ.js.map} +0 -0
  342. /package/dist/esm/chunks/{chunk.FPRBYGET.js.map → chunk.JLDKNU5Q.js.map} +0 -0
  343. /package/dist/esm/chunks/{chunk.74JHE77R.js.map → chunk.JMIUB3S3.js.map} +0 -0
  344. /package/dist/esm/chunks/{chunk.JXJVPJRO.js.map → chunk.JPOTN7LL.js.map} +0 -0
  345. /package/dist/esm/chunks/{chunk.T4N7KZHZ.js.map → chunk.JRROGJ2G.js.map} +0 -0
  346. /package/dist/esm/chunks/{chunk.H6MMHAQI.js.map → chunk.KD4DVSJR.js.map} +0 -0
  347. /package/dist/esm/chunks/{chunk.DPIWAXEW.js.map → chunk.KVPKVWCZ.js.map} +0 -0
  348. /package/dist/esm/chunks/{chunk.TE6ZNUAM.js.map → chunk.KWP42KR7.js.map} +0 -0
  349. /package/dist/esm/chunks/{chunk.ZUTQPJ2B.js.map → chunk.KYACLC66.js.map} +0 -0
  350. /package/dist/esm/chunks/{chunk.GHMAI3SM.js.map → chunk.KZMXTOLO.js.map} +0 -0
  351. /package/dist/esm/chunks/{chunk.W5TDBDVY.js.map → chunk.L5OB7WM2.js.map} +0 -0
  352. /package/dist/esm/chunks/{chunk.4JB3SESQ.js.map → chunk.L7BSLZCB.js.map} +0 -0
  353. /package/dist/esm/chunks/{chunk.FZELFLPE.js.map → chunk.LDHY3O6H.js.map} +0 -0
  354. /package/dist/esm/chunks/{chunk.NW54VA4E.js.map → chunk.LEN33O6V.js.map} +0 -0
  355. /package/dist/esm/chunks/{chunk.V564JB6A.js.map → chunk.LFLIYBAB.js.map} +0 -0
  356. /package/dist/esm/chunks/{chunk.RDQ3QGWS.js.map → chunk.LXFL2C62.js.map} +0 -0
  357. /package/dist/esm/chunks/{chunk.ETDUW5K2.js.map → chunk.ME7ICFCZ.js.map} +0 -0
  358. /package/dist/esm/chunks/{chunk.B53Q676I.js.map → chunk.MMMG4MZ3.js.map} +0 -0
  359. /package/dist/esm/chunks/{chunk.ZWIEYVZC.js.map → chunk.MTZOQQXR.js.map} +0 -0
  360. /package/dist/esm/chunks/{chunk.6PB5OWMP.js.map → chunk.NBYCIDFC.js.map} +0 -0
  361. /package/dist/esm/chunks/{chunk.OJGPKHHC.js.map → chunk.NHYJMP25.js.map} +0 -0
  362. /package/dist/esm/chunks/{chunk.GTGXHY4A.js.map → chunk.NPCUVYWP.js.map} +0 -0
  363. /package/dist/esm/chunks/{chunk.TZ67MC2N.js.map → chunk.O5HBMTSZ.js.map} +0 -0
  364. /package/dist/esm/chunks/{chunk.4JL5LW5J.js.map → chunk.O7DID7GP.js.map} +0 -0
  365. /package/dist/esm/chunks/{chunk.V3IHX6B2.js.map → chunk.OAZXY4Q5.js.map} +0 -0
  366. /package/dist/esm/chunks/{chunk.55D2BMXX.js.map → chunk.OD54UG2G.js.map} +0 -0
  367. /package/dist/esm/chunks/{chunk.X57DRPFB.js.map → chunk.OJFSECZE.js.map} +0 -0
  368. /package/dist/esm/chunks/{chunk.5LCWC3A7.js.map → chunk.OJHNLDNM.js.map} +0 -0
  369. /package/dist/esm/chunks/{chunk.VGIZJ32U.js.map → chunk.OR5GB6X3.js.map} +0 -0
  370. /package/dist/esm/chunks/{chunk.KM5XYTE3.js.map → chunk.OVDO5RVX.js.map} +0 -0
  371. /package/dist/esm/chunks/{chunk.4GMGQZOW.js.map → chunk.PGSL6NFZ.js.map} +0 -0
  372. /package/dist/esm/chunks/{chunk.NKEAMFO4.js.map → chunk.PR76A5VF.js.map} +0 -0
  373. /package/dist/esm/chunks/{chunk.XOH2JCRS.js.map → chunk.PZAL7VQF.js.map} +0 -0
  374. /package/dist/esm/chunks/{chunk.FWWBFNQA.js.map → chunk.QQUSMJIM.js.map} +0 -0
  375. /package/dist/esm/chunks/{chunk.ZYCKD6K5.js.map → chunk.RCYIHHYO.js.map} +0 -0
  376. /package/dist/esm/chunks/{chunk.HRGTAVNA.js.map → chunk.RKIJTSSL.js.map} +0 -0
  377. /package/dist/esm/chunks/{chunk.R2QENXIL.js.map → chunk.RLOZYTNN.js.map} +0 -0
  378. /package/dist/esm/chunks/{chunk.DGG5ABL3.js.map → chunk.S3KKICL3.js.map} +0 -0
  379. /package/dist/esm/chunks/{chunk.E62ZPQSM.js.map → chunk.SN3VXOWN.js.map} +0 -0
  380. /package/dist/esm/chunks/{chunk.M4KCRUKW.js.map → chunk.STIZCKQA.js.map} +0 -0
  381. /package/dist/esm/chunks/{chunk.6IPX5C4B.js.map → chunk.SUR46MJG.js.map} +0 -0
  382. /package/dist/esm/chunks/{chunk.WA2YP4NC.js.map → chunk.SZETPZGY.js.map} +0 -0
  383. /package/dist/esm/chunks/{chunk.FZZUNYH5.js.map → chunk.TGGC2THA.js.map} +0 -0
  384. /package/dist/esm/chunks/{chunk.Y6D5Z56X.js.map → chunk.TRSICKKS.js.map} +0 -0
  385. /package/dist/esm/chunks/{chunk.FGHSNC2V.js.map → chunk.U7S4DJTU.js.map} +0 -0
  386. /package/dist/esm/chunks/{chunk.GTBCTNMI.js.map → chunk.UCIVBX64.js.map} +0 -0
  387. /package/dist/esm/chunks/{chunk.RRNSZCVJ.js.map → chunk.UVXKHQQZ.js.map} +0 -0
  388. /package/dist/esm/chunks/{chunk.3U6A353B.js.map → chunk.UYAP5GFT.js.map} +0 -0
  389. /package/dist/esm/chunks/{chunk.ZLACSRD4.js.map → chunk.V7HN24VV.js.map} +0 -0
  390. /package/dist/esm/chunks/{chunk.4QOXI2GM.js.map → chunk.VLADAZRB.js.map} +0 -0
  391. /package/dist/esm/chunks/{chunk.ECJBVX3D.js.map → chunk.VN7JOJVU.js.map} +0 -0
  392. /package/dist/esm/chunks/{chunk.GLUKTMQU.js.map → chunk.VNFATHAQ.js.map} +0 -0
  393. /package/dist/esm/chunks/{chunk.IO3TM653.js.map → chunk.VNH44AGF.js.map} +0 -0
  394. /package/dist/esm/chunks/{chunk.M5JGYRH4.js.map → chunk.VOL4DT5F.js.map} +0 -0
  395. /package/dist/esm/chunks/{chunk.4OG3OGVO.js.map → chunk.VX7H6YHF.js.map} +0 -0
  396. /package/dist/esm/chunks/{chunk.OSCODMUG.js.map → chunk.W7CM652O.js.map} +0 -0
  397. /package/dist/esm/chunks/{chunk.BZVLSWZR.js.map → chunk.WJ26N3FC.js.map} +0 -0
  398. /package/dist/esm/chunks/{chunk.ZHMV5SR4.js.map → chunk.WJLHVUHN.js.map} +0 -0
  399. /package/dist/esm/chunks/{chunk.GURV4TDZ.js.map → chunk.WXFJYCGO.js.map} +0 -0
  400. /package/dist/esm/chunks/{chunk.P5XHGSJY.js.map → chunk.XPIAOMSC.js.map} +0 -0
  401. /package/dist/esm/chunks/{chunk.VZTV4GXC.js.map → chunk.YCG7OVYF.js.map} +0 -0
  402. /package/dist/esm/chunks/{chunk.7SYU6KRU.js.map → chunk.YLJTJKN4.js.map} +0 -0
  403. /package/dist/esm/chunks/{chunk.2OZ2HVBZ.js.map → chunk.Z7JF5PPO.js.map} +0 -0
  404. /package/dist/esm/chunks/{chunk.WYSUQK6Z.js.map → chunk.Z7SLVU2O.js.map} +0 -0
  405. /package/dist/esm/chunks/{chunk.Q5YXX4DU.js.map → chunk.ZJQLVAJY.js.map} +0 -0
  406. /package/dist/esm/chunks/{chunk.S32JKL3M.js.map → chunk.ZSHN7Z45.js.map} +0 -0
  407. /package/dist/esm/chunks/{chunk.KV7PGQJ7.js.map → chunk.ZTBOQMRE.js.map} +0 -0
  408. /package/dist/esm/chunks/{chunk.WFQYTXCB.js.map → chunk.ZZRAZZ3N.js.map} +0 -0
  409. /package/dist/esm/chunks/{chunk.SJQPD3CO.js.map → chunk.ZZV7P3FR.js.map} +0 -0
  410. /package/dist/esm/{chunks/chunk.WINL2C7Q.js.map → deprecated/button/index.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/state-layer/state-layer-constants.ts", "../../src/state-layer/state-layer-utils.ts", "../../src/state-layer/state-layer-adapter.ts", "../../src/state-layer/state-layer-foundation.ts", "../../src/state-layer/state-layer.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}state-layer`;\n\nconst observedAttributes = {\n TARGET: 'target',\n DISABLED: 'disabled'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst selectors = {\n SURFACE: '.forge-state-layer'\n};\n\nconst classes = {\n HOVERED: 'forge-state-layer--hovered',\n PRESSED: 'forge-state-layer--pressed'\n};\n\nexport const STATE_LAYER_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes\n};\n\nexport class StateLayerCoords {\n constructor(public x: number, public y: number) {}\n\n public static fromPointerEvent(event: PointerEvent): StateLayerCoords {\n return new StateLayerCoords(event.pageX, event.pageY);\n }\n}\n\nexport const TOUCH_DELAY_MS = 150;\nexport const PRESS_GROW_MS = 450;\nexport const MINIMUM_PRESS_MS = 225;\nexport const INITIAL_ORIGIN_SCALE = 0.2;\nexport const PADDING = 10;\nexport const SOFT_EDGE_MINIMUM_SIZE = 75;\nexport const SOFT_EDGE_CONTAINER_RATIO = 0.35;\nexport const PRESS_PSEUDO = '::after';\nexport const ANIMATION_FILL = 'forwards';\nexport const EASING = 'cubic-bezier(0.2, 0, 0, 1)';\n\n/**\n * Interaction states for the state layer.\n *\n * On Touch:\n * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nexport enum PointerState {\n /**\n * Initial state of the control, no touch in progress.\n *\n * Transitions:\n * - on touch down: transition to `TOUCH_DELAY`.\n * - on mouse down: transition to `WAITING_FOR_CLICK`.\n */\n INACTIVE,\n /**\n * Touch down has been received, waiting to determine if it's a swipe or\n * scroll.\n *\n * Transitions:\n * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.\n * - on cancel: transition to `INACTIVE`.\n * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.\n */\n TOUCH_DELAY,\n /**\n * A touch has been deemed to be a press\n *\n * Transitions:\n * - on up: transition to `WAITING_FOR_CLICK`.\n */\n HOLDING,\n /**\n * The user touch has finished, transition into rest state.\n *\n * Transitions:\n * - on click end press; transition to `INACTIVE`.\n */\n WAITING_FOR_CLICK\n}\n", "import { INITIAL_ORIGIN_SCALE, PADDING, SOFT_EDGE_CONTAINER_RATIO, SOFT_EDGE_MINIMUM_SIZE, StateLayerCoords } from './state-layer-constants';\n\nexport function calcRippleSize(hostEl: HTMLElement): { rippleScale: string; rippleSize: string; initialSize: number } {\n const { height, width } = hostEl.getBoundingClientRect();\n const maxDim = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n const maxRadius = hypotenuse + PADDING;\n const rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n const rippleSize = `${initialSize}px`;\n return { rippleScale, rippleSize, initialSize };\n}\n\nexport function getTranslationCoordinates(hostEl: HTMLElement, initialSize: number, coords?: StateLayerCoords): { startPoint: { x: number; y: number }; endPoint: { x: number; y: number } } {\n const { height, width } = hostEl.getBoundingClientRect();\n const endPoint = {\n x: (width - initialSize) / 2,\n y: (height - initialSize) / 2\n };\n\n let startPoint;\n if (isValidCoords(coords)) {\n startPoint = toNormalizedCoords(hostEl, coords);\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2\n };\n }\n\n startPoint = {\n x: startPoint.x - (initialSize / 2),\n y: startPoint.y - (initialSize / 2)\n };\n\n return { startPoint, endPoint };\n}\n\nexport function toNormalizedCoords(hostEl: HTMLElement, coords: StateLayerCoords): { x: number; y: number } {\n const { scrollX, scrollY } = window;\n const { left, top } = hostEl.getBoundingClientRect();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const { x, y } = coords;\n return { x: x - documentX, y: y - documentY };\n}\n\nexport function isInBounds(hostEl: HTMLElement, x: number, y: number): boolean {\n const { height, width } = hostEl.getBoundingClientRect();\n return x >= 0 && x <= width && y >= 0 && y <= height;\n}\n\nfunction isValidCoords(value: any): value is StateLayerCoords {\n return value && (value instanceof StateLayerCoords || ['x', 'y'].every(key => key in value));\n}\n", "import { getShadowElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { locateTargetHeuristic, createUserInteractionListener } from '../core/utils/utils';\nimport { IStateLayerComponent } from './state-layer';\nimport { ANIMATION_FILL, EASING, MINIMUM_PRESS_MS, PRESS_GROW_MS, PRESS_PSEUDO, StateLayerCoords, STATE_LAYER_CONSTANTS } from './state-layer-constants';\nimport { calcRippleSize, getTranslationCoordinates, isInBounds } from './state-layer-utils';\n\nexport interface IStateLayerAdapter extends IBaseAdapter {\n destroy(): void;\n deferInitialization(listener: (evt?: PointerEvent) => void): void;\n getTargetElement(): HTMLElement | null;\n setTargetElement(el: HTMLElement | null): void;\n trySetTarget(value?: string | null): void;\n addTargetListener(type: string, listener: EventListener): void;\n removeTargetListener(type: string, listener: EventListener): void;\n setHovered(hovered: boolean): void;\n setPressed(pressed: boolean): void;\n startAnimation(coords?: StateLayerCoords): void;\n endAnimation(): Promise<void>;\n inBounds(x: number, y: number): boolean;\n}\n\nexport class StateLayerAdapter extends BaseAdapter<IStateLayerComponent> implements IStateLayerAdapter {\n private readonly _surfaceElement: HTMLElement;\n private _targetElement: HTMLElement | null = null;\n private _rippleAnimation: Animation | undefined;\n private _destroyDeferListener: (() => void) | undefined;\n\n constructor(component: IStateLayerComponent) {\n super(component);\n this._surfaceElement = getShadowElement(component, STATE_LAYER_CONSTANTS.selectors.SURFACE);\n }\n\n public destroy(): void {\n if (typeof this._destroyDeferListener === 'function') {\n this._destroyDeferListener();\n this._destroyDeferListener = undefined;\n }\n this._targetElement = null;\n }\n\n public async deferInitialization(listener: (evt?: PointerEvent) => void): Promise<void> {\n if (!this._targetElement) {\n return;\n }\n const { userInteraction, destroy } = createUserInteractionListener(this._targetElement);\n this._destroyDeferListener = destroy;\n const evt = await userInteraction;\n listener(evt.type === 'pointerenter' ? evt as PointerEvent : undefined);\n }\n\n public addTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.removeEventListener(type, listener);\n }\n\n public setHovered(hovered: boolean): void {\n this._surfaceElement.classList.toggle(STATE_LAYER_CONSTANTS.classes.HOVERED, hovered);\n }\n \n public setPressed(pressed: boolean): void {\n this._surfaceElement.classList.toggle(STATE_LAYER_CONSTANTS.classes.PRESSED, pressed);\n }\n\n public getTargetElement(): HTMLElement | null {\n return this._targetElement;\n }\n\n public setTargetElement(el: HTMLElement | null): void {\n this._targetElement = el;\n }\n\n public trySetTarget(value?: string | null): void {\n this._targetElement = locateTargetHeuristic(this._component, value);\n }\n\n public startAnimation(coords?: StateLayerCoords): void {\n if (!this._surfaceElement) {\n return;\n }\n\n this.setPressed(true);\n this._rippleAnimation?.cancel();\n\n const { rippleSize, rippleScale, initialSize } = calcRippleSize(this._component);\n const { startPoint, endPoint } = getTranslationCoordinates(this._component, initialSize, coords);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n this._rippleAnimation = this._surfaceElement.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [rippleSize, rippleSize],\n width: [rippleSize, rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${rippleScale})`\n ]\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: EASING,\n fill: ANIMATION_FILL\n });\n }\n\n public async endAnimation(): Promise<void> {\n const animation = this._rippleAnimation;\n const pressAnimationPlayState = animation?.currentTime ?? Infinity;\n\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.setPressed(false);\n return;\n }\n\n await new Promise(resolve => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);\n });\n\n if (this._rippleAnimation !== animation) {\n return;\n }\n\n this.setPressed(false);\n }\n\n public inBounds(x: number, y: number): boolean {\n return isInBounds(this._component, x, y);\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IStateLayerAdapter } from './state-layer-adapter';\nimport { PointerState, StateLayerCoords, STATE_LAYER_CONSTANTS, TOUCH_DELAY_MS } from './state-layer-constants';\n\nexport interface IStateLayerFoundation extends ICustomElementFoundation {\n targetElement: HTMLElement | null;\n target: string | null;\n disabled: boolean;\n playAnimation(coords?: StateLayerCoords): void;\n}\n\nexport class StateLayerFoundation implements IStateLayerFoundation {\n // State\n private _target: string | null = null;\n private _disabled = false;\n private _attached = false;\n private _deferred = true;\n private _pointerStartEvent: PointerEvent | undefined;\n private _pointerState: PointerState = PointerState.INACTIVE;\n private _checkBoundsAfterContextMenu = false;\n\n // Listeners\n private _pointerEnterListener: EventListener;\n private _pointerLeaveListener: EventListener;\n private _pointerDownListener: EventListener;\n private _pointerUpListener: EventListener;\n private _pointerCancelListener: EventListener;\n private _clickListener: EventListener;\n private _contextmenuListener: EventListener;\n\n constructor(private _adapter: IStateLayerAdapter) {\n this._pointerEnterListener = (evt: PointerEvent) => this._onPointerEnter(evt);\n this._pointerLeaveListener = (evt: PointerEvent) => this._onPointerLeave(evt);\n this._pointerDownListener = (evt: PointerEvent) => this._onPointerDown(evt);\n this._pointerUpListener = (evt: PointerEvent) => this._onPointerUp(evt);\n this._pointerCancelListener = (evt: PointerEvent) => this._onPointerCancel(evt);\n this._clickListener = () => this._onClick();\n this._contextmenuListener = () => this._onContextmenu();\n }\n\n public initialize(): void {\n this._adapter.trySetTarget(this._target);\n\n // Clicks could be triggered programmatically so we need to listen for them regardless\n // of deferred initialization status\n this._adapter.addTargetListener('click', this._clickListener);\n\n // We defer initialization until the first pointerenter event is received.\n //\n // This is a performance optimization to avoid attaching many listeners to the target element\n // until the user is first interacting with it.\n this._deferInitialization();\n }\n\n public disconnect(): void {\n this._pointerStartEvent = undefined;\n this._pointerState = PointerState.INACTIVE;\n this._adapter.setHovered(false);\n this._adapter.setPressed(false);\n this._removeListeners(); // Must be called before destroying adapter\n this._adapter.destroy();\n }\n\n public playAnimation(coords?: StateLayerCoords): void {\n this._adapter.startAnimation(coords);\n this._endAnimation();\n }\n\n private _deferInitialization(): void {\n this._adapter.deferInitialization(this._onDeferredInitialize.bind(this));\n }\n\n private _applyListeners(): void {\n if (this._disabled) {\n return;\n }\n\n this._adapter.addTargetListener('pointerenter', this._pointerEnterListener);\n this._adapter.addTargetListener('pointerleave', this._pointerLeaveListener);\n this._adapter.addTargetListener('pointerdown', this._pointerDownListener);\n this._adapter.addTargetListener('pointerup', this._pointerUpListener);\n this._adapter.addTargetListener('pointercancel', this._pointerCancelListener);\n this._adapter.addTargetListener('contextmenu', this._contextmenuListener);\n this._attached = true;\n }\n\n private _removeListeners(): void {\n this._adapter.removeTargetListener('pointerenter', this._pointerEnterListener);\n this._adapter.removeTargetListener('pointerleave', this._pointerLeaveListener);\n this._adapter.removeTargetListener('pointerdown', this._pointerDownListener);\n this._adapter.removeTargetListener('pointerup', this._pointerUpListener);\n this._adapter.removeTargetListener('pointercancel', this._pointerCancelListener);\n this._adapter.removeTargetListener('click', this._clickListener);\n this._adapter.removeTargetListener('contextmenu', this._contextmenuListener);\n this._attached = false;\n }\n\n private _onDeferredInitialize(evt?: PointerEvent): void {\n this._applyListeners();\n\n if (evt?.type === 'pointerenter') {\n // Manually trigger the pointerenter listener since this is in response to a pointerenter event already\n this._pointerEnterListener(evt);\n }\n \n this._deferred = false;\n }\n\n private _onPointerEnter(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n this._adapter.setHovered(true);\n }\n\n private _onPointerLeave(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n\n this._adapter.setHovered(false);\n\n if (this._pointerState !== PointerState.INACTIVE) {\n this._adapter.endAnimation();\n }\n }\n\n private async _onPointerDown(evt: PointerEvent): Promise<void> {\n this._pointerStartEvent = evt;\n\n if (!this._canHandleEvent(evt)) {\n return;\n }\n \n if (!this._isTouch(evt.pointerType)) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n this._startAnimation(evt);\n return;\n }\n\n // after a longpress contextmenu event, an extra `pointerdown` can be\n // dispatched to the pressed element. Check that the down is within\n // bounds of the element in this case.\n if (this._checkBoundsAfterContextMenu && !this._adapter.inBounds(evt.x, evt.y)) {\n return;\n }\n\n this._checkBoundsAfterContextMenu = false;\n\n this._pointerState = PointerState.TOUCH_DELAY;\n await new Promise(resolve => setTimeout(resolve, TOUCH_DELAY_MS));\n\n if (this._pointerState !== PointerState.TOUCH_DELAY) {\n return;\n }\n\n this._pointerState = PointerState.HOLDING;\n this._startAnimation(evt);\n }\n\n private _onPointerUp(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n\n if (this._pointerState === PointerState.HOLDING) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n return;\n }\n\n if (this._pointerState === PointerState.TOUCH_DELAY) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n this._startAnimation(this._pointerStartEvent);\n return;\n }\n }\n\n private _onClick(): void {\n if (this._disabled) {\n return;\n }\n\n if (this._pointerState === PointerState.WAITING_FOR_CLICK) {\n this._endAnimation();\n return;\n }\n\n if (this._pointerState === PointerState.INACTIVE) {\n this._startAnimation(this._pointerStartEvent);\n this._endAnimation();\n }\n }\n\n private _onPointerCancel(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n this._endAnimation();\n }\n\n private _onContextmenu(): void {\n if (this._disabled) {\n return;\n }\n\n this._checkBoundsAfterContextMenu = true;\n this._adapter.endAnimation();\n }\n\n private _startAnimation(evt?: PointerEvent): void {\n const coords = evt ? StateLayerCoords.fromPointerEvent(evt) : undefined;\n this._adapter.startAnimation(coords);\n }\n\n private _endAnimation(): void {\n this._pointerState = PointerState.INACTIVE;\n this._adapter.endAnimation();\n this._pointerStartEvent = undefined;\n }\n\n private _canHandleEvent({ type, isPrimary, buttons, pointerType, pointerId }: PointerEvent): boolean {\n if (this._disabled || !isPrimary) {\n return false;\n }\n\n if (this._pointerStartEvent && this._pointerStartEvent.pointerId !== pointerId) {\n return false;\n }\n\n if (type === 'pointerenter' || type === 'pointerleave') {\n return !this._isTouch(pointerType);\n }\n\n const isPrimaryButton = buttons === 1;\n return this._isTouch(pointerType) || isPrimaryButton;\n }\n\n private _isTouch(pointerType: string): boolean {\n return pointerType === 'touch';\n }\n\n public get isAttached(): boolean {\n return this._attached;\n }\n\n public get targetElement(): HTMLElement | null {\n return this._adapter.getTargetElement();\n }\n public set targetElement(el: HTMLElement | null) {\n // Always remove the listeners from the previous target element\n this._removeListeners();\n\n // If unattached destroy the defer listener to recreate on the new target element\n if (!this._attached) {\n this._adapter.destroy();\n this._deferred = false;\n }\n\n this._adapter.setTargetElement(el);\n\n // If we are not already deferring attaching the listeners, then do that now\n if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n public get target(): string | null {\n return this._adapter.getHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET);\n }\n public set target(value: string | null) {\n if (this._target !== value) {\n this._target = value;\n\n if (this._adapter.isConnected) {\n // Always remove the listeners from the previous target element\n this._removeListeners();\n\n if (!this._attached) {\n this._adapter.destroy();\n this._deferred = false;\n }\n\n this._adapter.trySetTarget(value);\n\n if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET, Boolean(this._target), this._target as string);\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n value = Boolean(value);\n if (this._disabled !== value) {\n this._disabled = value;\n\n if (this._adapter.isConnected) {\n if (this._disabled) {\n this._removeListeners();\n } else if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { StateLayerAdapter } from './state-layer-adapter';\nimport { StateLayerFoundation } from './state-layer-foundation';\nimport { StateLayerCoords, STATE_LAYER_CONSTANTS } from './state-layer-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-state-layer\\\" part=\\\"surface\\\"></div></template>';\nconst styles = ':host{border-radius:inherit;position:absolute;inset:0;overflow:hidden;display:-webkit-box;display:flex;margin:auto;pointer-events:none;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host([disabled]){display:none}.forge-state-layer{--_state-layer-color:var(--forge-state-layer-color, var(--forge-theme-on-surface, #000000));--_state-layer-hover-color:var(--forge-state-layer-hover-color, var(--_state-layer-color));--_state-layer-hover-opacity:var(--forge-state-layer-hover-opacity, 0.08);--_state-layer-pressed-color:var(--forge-state-layer-pressed-color, var(--_state-layer-color));--_state-layer-pressed-opacity:var(--forge-state-layer-pressed-opacity, 0.12);--_state-layer-hover-duration:var(--forge-state-layer-hover-duration, 15ms);--_state-layer-pressed-duration:var(--forge-state-layer-pressed-duration, 105ms);--_state-layer-animation-duration:var(--forge-state-layer-animation-duration, 375ms)}.forge-state-layer::after,.forge-state-layer::before{content:\\\"\\\";opacity:0;position:absolute}.forge-state-layer::before{background-color:var(--_state-layer-hover-color);inset:0;-webkit-transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear;transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear}.forge-state-layer::after{background:radial-gradient(closest-side,var(--_state-layer-pressed-color) max(100% - 70px,65%),transparent 100%);-webkit-transform-origin:center center;transform-origin:center center;-webkit-transition:opacity var(--_state-layer-animation-duration) linear;transition:opacity var(--_state-layer-animation-duration) linear}.forge-state-layer--hovered::before{background-color:var(--_state-layer-hover-color);opacity:var(--_state-layer-hover-opacity)}.forge-state-layer--pressed::after{opacity:var(--_state-layer-pressed-opacity);-webkit-transition-duration:var(--_state-layer-pressed-duration);transition-duration:var(--_state-layer-pressed-duration)}@media screen and (forced-colors:active){:host{display:none}}';\n\nexport interface IStateLayerComponent extends IBaseComponent {\n targetElement: HTMLElement | null;\n target: string | null;\n disabled: boolean;\n playAnimation(coords?: StateLayerCoords): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-state-layer': IStateLayerComponent;\n }\n}\n\n/**\n * @tag forge-state-layer\n * \n * @summary State layers show the interaction status of an element.\n * \n * @description \n * A state layer is a semi-transparent overlay on an element that indicates its interaction\n * state. State layers provide a systematic approach to visualizing states by using opacity.\n * A layer can be applied to an entire element or in a circular shape. Only one state layer\n * can be applied at a given time.\n * \n * @property {HTMLElement} targetElement - The element to attach the state layer to.\n * @property {string} target - The id of the element to attach the state layer to.\n * @property {boolean} disabled - Controls whether the state layer is disabled.\n * \n * @attribute {string} target - The id of the element to attach the state layer to.\n * @attribute {boolean} disabled - Controls whether the state layer is disabled.\n * \n * @cssproperty --forge-state-layer-color - The color of the state layer. Defaults to the on-surface theme.\n * @cssproperty --forge-state-layer-hover-color - The color of the state layer when hovered.\n * @cssproperty --forge-state-layer-hover-opacity - The opacity of the state layer when hovered.\n * @cssproperty --forge-state-layer-pressed-color - The color of the state layer when pressed.\n * @cssproperty --forge-state-layer-pressed-opacity - The opacity of the state layer when pressed.\n * @cssproperty --forge-state-layer-hover-duration - The duration of the hover animation.\n * @cssproperty --forge-state-layer-animation-duration - The duration of the animation.\n * @cssproperty --forge-state-layer-pressed-duration - The duration of the pressed animation.\n * \n * @csspart surface - The surface element.\n */\n@CustomElement({\n name: STATE_LAYER_CONSTANTS.elementName\n})\nexport class StateLayerComponent extends BaseComponent implements IStateLayerComponent {\n public static get observedAttributes(): string[] {\n return [\n STATE_LAYER_CONSTANTS.attributes.TARGET,\n STATE_LAYER_CONSTANTS.attributes.DISABLED\n ];\n }\n\n private _foundation: StateLayerFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new StateLayerFoundation(new StateLayerAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case STATE_LAYER_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case STATE_LAYER_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare targetElement: HTMLElement | null;\n\n @FoundationProperty()\n public declare target: string | null;\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n /**\n * Triggers the animation to run.\n * \n * Note: If coordinates are not provided, the transition will originate from the center of the target element.\n * \n * @param {StateLayerCoords} [coords] - The coordinates to play the animation from.\n */\n public playAnimation(coords?: StateLayerCoords): void {\n this._foundation.playAnimation(coords);\n }\n}\n"],
5
- "mappings": "2TAEA,IAAMA,EAAc,GAAGC,eAEjBC,EAAqB,CACzB,OAAQ,SACR,SAAU,UACZ,EAEMC,EAAaC,EAAA,GACdF,GAGCG,EAAY,CAChB,QAAS,oBACX,EAEMC,EAAU,CACd,QAAS,6BACT,QAAS,4BACX,EAEaC,EAAwB,CACnC,YAAAP,EACA,WAAAG,EACA,UAAAE,EACA,QAAAC,CACF,EAEaE,EAAN,MAAMC,CAAiB,CAC5B,YAAmBC,EAAkBC,EAAW,CAA7B,OAAAD,EAAkB,OAAAC,CAAY,CAEjD,OAAc,iBAAiBC,EAAuC,CACpE,OAAO,IAAIH,EAAiBG,EAAM,MAAOA,EAAM,KAAK,CACtD,CACF,EAEaC,EAAiB,IACjBC,EAAgB,IAChBC,EAAmB,IACnBC,EAAuB,GACvBC,EAAU,GACVC,EAAyB,GACzBC,EAA4B,IAC5BC,EAAe,UACfC,EAAiB,WACjBC,EAAS,6BAYVC,OAQVA,IAAA,uBAUAA,IAAA,6BAOAA,IAAA,qBAOAA,IAAA,yCAhCUA,OAAA,ICxDL,SAASC,EAAeC,EAAuF,CACpH,GAAM,CAAE,OAAAC,EAAQ,MAAAC,CAAM,EAAIF,EAAO,sBAAsB,EACjDG,EAAS,KAAK,IAAIF,EAAQC,CAAK,EAC/BE,EAAe,KAAK,IAAIC,EAA4BF,EAAQG,CAAsB,EAClFC,EAAc,KAAK,MAAMJ,EAASK,CAAoB,EAGtDC,EAAc,IAFD,KAAK,KAAKP,GAAS,EAAID,GAAU,CAAC,EACtBS,EACKN,GAAgBG,IAC9CI,EAAa,GAAGJ,MACtB,MAAO,CAAE,YAAAE,EAAa,WAAAE,EAAY,YAAAJ,CAAY,CAChD,CAEO,SAAUK,EAA0BZ,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X } from '../constants';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}state-layer`;\n\nconst observedAttributes = {\n TARGET: 'target',\n DISABLED: 'disabled'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst selectors = {\n SURFACE: '.forge-state-layer'\n};\n\nconst classes = {\n HOVERED: 'forge-state-layer--hovered',\n PRESSED: 'forge-state-layer--pressed'\n};\n\nexport const STATE_LAYER_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes\n};\n\nexport class StateLayerCoords {\n constructor(public x: number, public y: number) {}\n\n public static fromPointerEvent(event: PointerEvent): StateLayerCoords {\n return new StateLayerCoords(event.pageX, event.pageY);\n }\n}\n\nexport const TOUCH_DELAY_MS = 150;\nexport const PRESS_GROW_MS = 450;\nexport const MINIMUM_PRESS_MS = 225;\nexport const INITIAL_ORIGIN_SCALE = 0.2;\nexport const PADDING = 10;\nexport const SOFT_EDGE_MINIMUM_SIZE = 75;\nexport const SOFT_EDGE_CONTAINER_RATIO = 0.35;\nexport const PRESS_PSEUDO = '::after';\nexport const ANIMATION_FILL = 'forwards';\nexport const EASING = 'cubic-bezier(0.2, 0, 0, 1)';\n\n/**\n * Interaction states for the state layer.\n *\n * On Touch:\n * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nexport enum PointerState {\n /**\n * Initial state of the control, no touch in progress.\n *\n * Transitions:\n * - on touch down: transition to `TOUCH_DELAY`.\n * - on mouse down: transition to `WAITING_FOR_CLICK`.\n */\n INACTIVE,\n /**\n * Touch down has been received, waiting to determine if it's a swipe or\n * scroll.\n *\n * Transitions:\n * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.\n * - on cancel: transition to `INACTIVE`.\n * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.\n */\n TOUCH_DELAY,\n /**\n * A touch has been deemed to be a press\n *\n * Transitions:\n * - on up: transition to `WAITING_FOR_CLICK`.\n */\n HOLDING,\n /**\n * The user touch has finished, transition into rest state.\n *\n * Transitions:\n * - on click end press; transition to `INACTIVE`.\n */\n WAITING_FOR_CLICK\n}\n", "import { INITIAL_ORIGIN_SCALE, PADDING, SOFT_EDGE_CONTAINER_RATIO, SOFT_EDGE_MINIMUM_SIZE, StateLayerCoords } from './state-layer-constants';\n\nexport function calcRippleSize(hostEl: HTMLElement): { rippleScale: string; rippleSize: string; initialSize: number } {\n const { height, width } = hostEl.getBoundingClientRect();\n const maxDim = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n const maxRadius = hypotenuse + PADDING;\n const rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n const rippleSize = `${initialSize}px`;\n return { rippleScale, rippleSize, initialSize };\n}\n\nexport function getTranslationCoordinates(hostEl: HTMLElement, initialSize: number, coords?: StateLayerCoords): { startPoint: { x: number; y: number }; endPoint: { x: number; y: number } } {\n const { height, width } = hostEl.getBoundingClientRect();\n const endPoint = {\n x: (width - initialSize) / 2,\n y: (height - initialSize) / 2\n };\n\n let startPoint;\n if (isValidCoords(coords)) {\n startPoint = toNormalizedCoords(hostEl, coords);\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2\n };\n }\n\n startPoint = {\n x: startPoint.x - (initialSize / 2),\n y: startPoint.y - (initialSize / 2)\n };\n\n return { startPoint, endPoint };\n}\n\nexport function toNormalizedCoords(hostEl: HTMLElement, coords: StateLayerCoords): { x: number; y: number } {\n const { scrollX, scrollY } = window;\n const { left, top } = hostEl.getBoundingClientRect();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const { x, y } = coords;\n return { x: x - documentX, y: y - documentY };\n}\n\nexport function isInBounds(hostEl: HTMLElement, x: number, y: number): boolean {\n const { height, width } = hostEl.getBoundingClientRect();\n return x >= 0 && x <= width && y >= 0 && y <= height;\n}\n\nfunction isValidCoords(value: any): value is StateLayerCoords {\n return value && (value instanceof StateLayerCoords || ['x', 'y'].every(key => key in value));\n}\n", "import { getShadowElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { locateTargetHeuristic, createUserInteractionListener } from '../core/utils/utils';\nimport { IStateLayerComponent } from './state-layer';\nimport { ANIMATION_FILL, EASING, MINIMUM_PRESS_MS, PRESS_GROW_MS, PRESS_PSEUDO, StateLayerCoords, STATE_LAYER_CONSTANTS } from './state-layer-constants';\nimport { calcRippleSize, getTranslationCoordinates, isInBounds } from './state-layer-utils';\n\nexport interface IStateLayerAdapter extends IBaseAdapter {\n destroy(): void;\n deferInitialization(listener: (evt?: PointerEvent) => void): void;\n getTargetElement(): HTMLElement | null;\n setTargetElement(el: HTMLElement | null): void;\n trySetTarget(value?: string | null): void;\n addTargetListener(type: string, listener: EventListener): void;\n removeTargetListener(type: string, listener: EventListener): void;\n setHovered(hovered: boolean): void;\n setPressed(pressed: boolean): void;\n startAnimation(coords?: StateLayerCoords): void;\n endAnimation(): Promise<void>;\n inBounds(x: number, y: number): boolean;\n}\n\nexport class StateLayerAdapter extends BaseAdapter<IStateLayerComponent> implements IStateLayerAdapter {\n private readonly _surfaceElement: HTMLElement;\n private _targetElement: HTMLElement | null = null;\n private _rippleAnimation: Animation | undefined;\n private _destroyDeferListener: (() => void) | undefined;\n\n constructor(component: IStateLayerComponent) {\n super(component);\n this._surfaceElement = getShadowElement(component, STATE_LAYER_CONSTANTS.selectors.SURFACE);\n }\n\n public destroy(): void {\n if (typeof this._destroyDeferListener === 'function') {\n this._destroyDeferListener();\n this._destroyDeferListener = undefined;\n }\n this._targetElement = null;\n }\n\n public async deferInitialization(listener: (evt?: PointerEvent) => void): Promise<void> {\n if (!this._targetElement) {\n return;\n }\n const { userInteraction, destroy } = createUserInteractionListener(this._targetElement);\n this._destroyDeferListener = destroy;\n const evt = await userInteraction;\n listener(evt.type === 'pointerenter' ? evt as PointerEvent : undefined);\n }\n\n public addTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.removeEventListener(type, listener);\n }\n\n public setHovered(hovered: boolean): void {\n this._surfaceElement.classList.toggle(STATE_LAYER_CONSTANTS.classes.HOVERED, hovered);\n }\n \n public setPressed(pressed: boolean): void {\n this._surfaceElement.classList.toggle(STATE_LAYER_CONSTANTS.classes.PRESSED, pressed);\n }\n\n public getTargetElement(): HTMLElement | null {\n return this._targetElement;\n }\n\n public setTargetElement(el: HTMLElement | null): void {\n this._targetElement = el;\n }\n\n public trySetTarget(value?: string | null): void {\n this._targetElement = locateTargetHeuristic(this._component, value);\n }\n\n public startAnimation(coords?: StateLayerCoords): void {\n if (!this._surfaceElement) {\n return;\n }\n\n this.setPressed(true);\n this._rippleAnimation?.cancel();\n\n const { rippleSize, rippleScale, initialSize } = calcRippleSize(this._component);\n const { startPoint, endPoint } = getTranslationCoordinates(this._component, initialSize, coords);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n this._rippleAnimation = this._surfaceElement.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [rippleSize, rippleSize],\n width: [rippleSize, rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${rippleScale})`\n ]\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: EASING,\n fill: ANIMATION_FILL\n });\n }\n\n public async endAnimation(): Promise<void> {\n const animation = this._rippleAnimation;\n const pressAnimationPlayState = animation?.currentTime ?? Infinity;\n\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.setPressed(false);\n return;\n }\n\n await new Promise(resolve => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);\n });\n\n if (this._rippleAnimation !== animation) {\n return;\n }\n\n this.setPressed(false);\n }\n\n public inBounds(x: number, y: number): boolean {\n return isInBounds(this._component, x, y);\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IStateLayerAdapter } from './state-layer-adapter';\nimport { PointerState, StateLayerCoords, STATE_LAYER_CONSTANTS, TOUCH_DELAY_MS } from './state-layer-constants';\n\nexport interface IStateLayerFoundation extends ICustomElementFoundation {\n targetElement: HTMLElement | null;\n target: string | null;\n disabled: boolean;\n playAnimation(coords?: StateLayerCoords): void;\n}\n\nexport class StateLayerFoundation implements IStateLayerFoundation {\n // State\n private _target: string | null = null;\n private _disabled = false;\n private _attached = false;\n private _deferred = true;\n private _pointerStartEvent: PointerEvent | undefined;\n private _pointerState: PointerState = PointerState.INACTIVE;\n private _checkBoundsAfterContextMenu = false;\n\n // Listeners\n private _pointerEnterListener: EventListener;\n private _pointerLeaveListener: EventListener;\n private _pointerDownListener: EventListener;\n private _pointerUpListener: EventListener;\n private _pointerCancelListener: EventListener;\n private _clickListener: EventListener;\n private _contextmenuListener: EventListener;\n\n constructor(private _adapter: IStateLayerAdapter) {\n this._pointerEnterListener = (evt: PointerEvent) => this._onPointerEnter(evt);\n this._pointerLeaveListener = (evt: PointerEvent) => this._onPointerLeave(evt);\n this._pointerDownListener = (evt: PointerEvent) => this._onPointerDown(evt);\n this._pointerUpListener = (evt: PointerEvent) => this._onPointerUp(evt);\n this._pointerCancelListener = (evt: PointerEvent) => this._onPointerCancel(evt);\n this._clickListener = () => this._onClick();\n this._contextmenuListener = () => this._onContextmenu();\n }\n\n public initialize(): void {\n this._adapter.trySetTarget(this._target);\n\n // Clicks could be triggered programmatically so we need to listen for them regardless\n // of deferred initialization status\n this._adapter.addTargetListener('click', this._clickListener);\n\n // We defer initialization until the first pointerenter event is received.\n //\n // This is a performance optimization to avoid attaching many listeners to the target element\n // until the user is first interacting with it.\n this._deferInitialization();\n }\n\n public disconnect(): void {\n this._pointerStartEvent = undefined;\n this._pointerState = PointerState.INACTIVE;\n this._adapter.setHovered(false);\n this._adapter.setPressed(false);\n this._removeListeners(); // Must be called before destroying adapter\n this._adapter.destroy();\n }\n\n public playAnimation(coords?: StateLayerCoords): void {\n this._adapter.startAnimation(coords);\n this._endAnimation();\n }\n\n private _deferInitialization(): void {\n this._adapter.deferInitialization(this._onDeferredInitialize.bind(this));\n }\n\n private _applyListeners(): void {\n if (this._disabled) {\n return;\n }\n\n this._adapter.addTargetListener('pointerenter', this._pointerEnterListener);\n this._adapter.addTargetListener('pointerleave', this._pointerLeaveListener);\n this._adapter.addTargetListener('pointerdown', this._pointerDownListener);\n this._adapter.addTargetListener('pointerup', this._pointerUpListener);\n this._adapter.addTargetListener('pointercancel', this._pointerCancelListener);\n this._adapter.addTargetListener('contextmenu', this._contextmenuListener);\n this._attached = true;\n }\n\n private _removeListeners(): void {\n this._adapter.removeTargetListener('pointerenter', this._pointerEnterListener);\n this._adapter.removeTargetListener('pointerleave', this._pointerLeaveListener);\n this._adapter.removeTargetListener('pointerdown', this._pointerDownListener);\n this._adapter.removeTargetListener('pointerup', this._pointerUpListener);\n this._adapter.removeTargetListener('pointercancel', this._pointerCancelListener);\n this._adapter.removeTargetListener('click', this._clickListener);\n this._adapter.removeTargetListener('contextmenu', this._contextmenuListener);\n this._attached = false;\n }\n\n private _onDeferredInitialize(evt?: PointerEvent): void {\n if (!this._adapter.isConnected) {\n return;\n }\n\n this._applyListeners();\n\n if (evt?.type === 'pointerenter') {\n // Manually trigger the pointerenter listener since this is in response to a pointerenter event already\n this._pointerEnterListener(evt);\n }\n \n this._deferred = false;\n }\n\n private _onPointerEnter(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n this._adapter.setHovered(true);\n }\n\n private _onPointerLeave(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n\n this._adapter.setHovered(false);\n\n if (this._pointerState !== PointerState.INACTIVE) {\n this._adapter.endAnimation();\n }\n }\n\n private async _onPointerDown(evt: PointerEvent): Promise<void> {\n this._pointerStartEvent = evt;\n\n if (!this._canHandleEvent(evt)) {\n return;\n }\n \n if (!this._isTouch(evt.pointerType)) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n this._startAnimation(evt);\n return;\n }\n\n // after a longpress contextmenu event, an extra `pointerdown` can be\n // dispatched to the pressed element. Check that the down is within\n // bounds of the element in this case.\n if (this._checkBoundsAfterContextMenu && !this._adapter.inBounds(evt.x, evt.y)) {\n return;\n }\n\n this._checkBoundsAfterContextMenu = false;\n\n this._pointerState = PointerState.TOUCH_DELAY;\n await new Promise(resolve => setTimeout(resolve, TOUCH_DELAY_MS));\n\n if (this._pointerState !== PointerState.TOUCH_DELAY) {\n return;\n }\n\n this._pointerState = PointerState.HOLDING;\n this._startAnimation(evt);\n }\n\n private _onPointerUp(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n\n if (this._pointerState === PointerState.HOLDING) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n return;\n }\n\n if (this._pointerState === PointerState.TOUCH_DELAY) {\n this._pointerState = PointerState.WAITING_FOR_CLICK;\n this._startAnimation(this._pointerStartEvent);\n return;\n }\n }\n\n private _onClick(): void {\n if (this._disabled) {\n return;\n }\n\n if (this._pointerState === PointerState.WAITING_FOR_CLICK) {\n this._endAnimation();\n return;\n }\n\n if (this._pointerState === PointerState.INACTIVE) {\n this._startAnimation(this._pointerStartEvent);\n this._endAnimation();\n }\n }\n\n private _onPointerCancel(evt: PointerEvent): void {\n if (!this._canHandleEvent(evt)) {\n return;\n }\n this._endAnimation();\n }\n\n private _onContextmenu(): void {\n if (this._disabled) {\n return;\n }\n\n this._checkBoundsAfterContextMenu = true;\n this._adapter.endAnimation();\n }\n\n private _startAnimation(evt?: PointerEvent): void {\n const coords = evt ? StateLayerCoords.fromPointerEvent(evt) : undefined;\n this._adapter.startAnimation(coords);\n }\n\n private _endAnimation(): void {\n this._pointerState = PointerState.INACTIVE;\n this._adapter.endAnimation();\n this._pointerStartEvent = undefined;\n }\n\n private _canHandleEvent({ type, isPrimary, buttons, pointerType, pointerId }: PointerEvent): boolean {\n if (this._disabled || !isPrimary) {\n return false;\n }\n\n if (this._pointerStartEvent && this._pointerStartEvent.pointerId !== pointerId) {\n return false;\n }\n\n if (type === 'pointerenter' || type === 'pointerleave') {\n return !this._isTouch(pointerType);\n }\n\n const isPrimaryButton = buttons === 1;\n return this._isTouch(pointerType) || isPrimaryButton;\n }\n\n private _isTouch(pointerType: string): boolean {\n return pointerType === 'touch';\n }\n\n public get isAttached(): boolean {\n return this._attached;\n }\n\n public get targetElement(): HTMLElement | null {\n return this._adapter.getTargetElement();\n }\n public set targetElement(el: HTMLElement | null) {\n // Always remove the listeners from the previous target element\n this._removeListeners();\n\n // If unattached destroy the defer listener to recreate on the new target element\n if (!this._attached) {\n this._adapter.destroy();\n this._deferred = false;\n }\n\n this._adapter.setTargetElement(el);\n\n // If we are not already deferring attaching the listeners, then do that now\n if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n public get target(): string | null {\n return this._adapter.getHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET);\n }\n public set target(value: string | null) {\n if (this._target !== value) {\n this._target = value;\n\n if (this._adapter.isConnected) {\n // Always remove the listeners from the previous target element\n this._removeListeners();\n\n if (!this._attached) {\n this._adapter.destroy();\n this._deferred = false;\n }\n\n this._adapter.trySetTarget(value);\n\n if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET, Boolean(this._target), this._target as string);\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n value = Boolean(value);\n if (this._disabled !== value) {\n this._disabled = value;\n\n if (this._adapter.isConnected) {\n if (this._disabled) {\n this._removeListeners();\n } else if (!this._deferred) {\n this._deferInitialization();\n }\n }\n\n this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { StateLayerAdapter } from './state-layer-adapter';\nimport { StateLayerFoundation } from './state-layer-foundation';\nimport { StateLayerCoords, STATE_LAYER_CONSTANTS } from './state-layer-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-state-layer\\\" part=\\\"surface\\\"></div></template>';\nconst styles = ':host{border-radius:inherit;position:absolute;inset:0;overflow:hidden;display:-webkit-box;display:flex;margin:auto;pointer-events:none;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host([disabled]){display:none}.forge-state-layer{--_state-layer-color:var(--forge-state-layer-color, var(--forge-theme-on-surface, #000000));--_state-layer-hover-color:var(--forge-state-layer-hover-color, var(--_state-layer-color));--_state-layer-hover-opacity:var(--forge-state-layer-hover-opacity, 0.08);--_state-layer-pressed-color:var(--forge-state-layer-pressed-color, var(--_state-layer-color));--_state-layer-pressed-opacity:var(--forge-state-layer-pressed-opacity, 0.12);--_state-layer-hover-duration:var(--forge-state-layer-hover-duration, 15ms);--_state-layer-pressed-duration:var(--forge-state-layer-pressed-duration, 105ms);--_state-layer-animation-duration:var(--forge-state-layer-animation-duration, 375ms)}.forge-state-layer::after,.forge-state-layer::before{content:\\\"\\\";opacity:0;position:absolute}.forge-state-layer::before{background-color:var(--_state-layer-hover-color);inset:0;-webkit-transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear;transition:opacity var(--_state-layer-hover-duration) linear,background-color var(--_state-layer-hover-duration) linear}.forge-state-layer::after{background:radial-gradient(closest-side,var(--_state-layer-pressed-color) max(100% - 70px,65%),transparent 100%);-webkit-transform-origin:center center;transform-origin:center center;-webkit-transition:opacity var(--_state-layer-animation-duration) linear;transition:opacity var(--_state-layer-animation-duration) linear}.forge-state-layer--hovered::before{background-color:var(--_state-layer-hover-color);opacity:var(--_state-layer-hover-opacity)}.forge-state-layer--pressed::after{opacity:var(--_state-layer-pressed-opacity);-webkit-transition-duration:var(--_state-layer-pressed-duration);transition-duration:var(--_state-layer-pressed-duration)}@media screen and (forced-colors:active){:host{display:none}}';\n\nexport interface IStateLayerComponent extends IBaseComponent {\n targetElement: HTMLElement | null;\n target: string | null;\n disabled: boolean;\n playAnimation(coords?: StateLayerCoords): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-state-layer': IStateLayerComponent;\n }\n}\n\n/**\n * @tag forge-state-layer\n * \n * @summary State layers show the interaction status of an element.\n * \n * @description \n * A state layer is a semi-transparent overlay on an element that indicates its interaction\n * state. State layers provide a systematic approach to visualizing states by using opacity.\n * A layer can be applied to an entire element or in a circular shape. Only one state layer\n * can be applied at a given time.\n * \n * @property {HTMLElement} targetElement - The element to attach the state layer to.\n * @property {string} target - The id of the element to attach the state layer to.\n * @property {boolean} disabled - Controls whether the state layer is disabled.\n * \n * @attribute {string} target - The id of the element to attach the state layer to.\n * @attribute {boolean} disabled - Controls whether the state layer is disabled.\n * \n * @cssproperty --forge-state-layer-color - The color of the state layer. Defaults to the on-surface theme.\n * @cssproperty --forge-state-layer-hover-color - The color of the state layer when hovered.\n * @cssproperty --forge-state-layer-hover-opacity - The opacity of the state layer when hovered.\n * @cssproperty --forge-state-layer-pressed-color - The color of the state layer when pressed.\n * @cssproperty --forge-state-layer-pressed-opacity - The opacity of the state layer when pressed.\n * @cssproperty --forge-state-layer-hover-duration - The duration of the hover animation.\n * @cssproperty --forge-state-layer-animation-duration - The duration of the animation.\n * @cssproperty --forge-state-layer-pressed-duration - The duration of the pressed animation.\n * \n * @csspart surface - The surface element.\n */\n@CustomElement({\n name: STATE_LAYER_CONSTANTS.elementName\n})\nexport class StateLayerComponent extends BaseComponent implements IStateLayerComponent {\n public static get observedAttributes(): string[] {\n return [\n STATE_LAYER_CONSTANTS.attributes.TARGET,\n STATE_LAYER_CONSTANTS.attributes.DISABLED\n ];\n }\n\n private _foundation: StateLayerFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new StateLayerFoundation(new StateLayerAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case STATE_LAYER_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case STATE_LAYER_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare targetElement: HTMLElement | null;\n\n @FoundationProperty()\n public declare target: string | null;\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n /**\n * Triggers the animation to run.\n * \n * Note: If coordinates are not provided, the transition will originate from the center of the target element.\n * \n * @param {StateLayerCoords} [coords] - The coordinates to play the animation from.\n */\n public playAnimation(coords?: StateLayerCoords): void {\n this._foundation.playAnimation(coords);\n }\n}\n"],
5
+ "mappings": "2TAEA,IAAMA,EAAc,GAAGC,eAEjBC,EAAqB,CACzB,OAAQ,SACR,SAAU,UACZ,EAEMC,EAAaC,EAAA,GACdF,GAGCG,EAAY,CAChB,QAAS,oBACX,EAEMC,EAAU,CACd,QAAS,6BACT,QAAS,4BACX,EAEaC,EAAwB,CACnC,YAAAP,EACA,WAAAG,EACA,UAAAE,EACA,QAAAC,CACF,EAEaE,EAAN,MAAMC,CAAiB,CAC5B,YAAmBC,EAAkBC,EAAW,CAA7B,OAAAD,EAAkB,OAAAC,CAAY,CAEjD,OAAc,iBAAiBC,EAAuC,CACpE,OAAO,IAAIH,EAAiBG,EAAM,MAAOA,EAAM,KAAK,CACtD,CACF,EAEaC,EAAiB,IACjBC,EAAgB,IAChBC,EAAmB,IACnBC,EAAuB,GACvBC,EAAU,GACVC,EAAyB,GACzBC,EA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K,YAAY,WAAW,CAC9B,CAEO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAAsB,WAAW,OACpC,KAAK,OAASG,EACd,MACF,KAAKH,EAAsB,WAAW,SACpC,KAAK,SAAWI,EAAcD,CAAQ,EACtC,KACJ,CACF,CAkBO,cAAcE,EAAiC,CACpD,KAAK,YAAY,cAAcA,CAAM,CACvC,CACF,EAlBiBC,EAAA,CADdC,EAAmB,GAnCTZ,EAoCI,6BAGAW,EAAA,CADdC,EAAmB,GAtCTZ,EAuCI,sBAGAW,EAAA,CADdC,EAAmB,GAzCTZ,EA0CI,wBA1CJA,EAANW,EAAA,CAHNE,EAAc,CACb,KAAMR,EAAsB,WAC9B,CAAC,GACYL",
6
6
  "names": ["elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "attributes", "__spreadValues", "selectors", "classes", "STATE_LAYER_CONSTANTS", "StateLayerCoords", "_StateLayerCoords", "x", "y", "event", "TOUCH_DELAY_MS", "PRESS_GROW_MS", "MINIMUM_PRESS_MS", "INITIAL_ORIGIN_SCALE", "PADDING", "SOFT_EDGE_MINIMUM_SIZE", "SOFT_EDGE_CONTAINER_RATIO", "PRESS_PSEUDO", "ANIMATION_FILL", "EASING", "PointerState", "calcRippleSize", "hostEl", "height", "width", "maxDim", "softEdgeSize", "SOFT_EDGE_CONTAINER_RATIO", "SOFT_EDGE_MINIMUM_SIZE", "initialSize", "INITIAL_ORIGIN_SCALE", "rippleScale", "PADDING", "rippleSize", "getTranslationCoordinates", "coords", "endPoint", "startPoint", "isValidCoords", "toNormalizedCoords", "scrollX", "scrollY", "left", "top", "documentX", "documentY", "x", "y", "isInBounds", "value", "StateLayerCoords", "key", "StateLayerAdapter", "BaseAdapter", "component", "getShadowElement", "STATE_LAYER_CONSTANTS", "listener", "userInteraction", "destroy", "createUserInteractionListener", "evt", "type", "_a", "hovered", "pressed", "el", "value", "locateTargetHeuristic", "coords", "rippleSize", "rippleScale", "initialSize", "calcRippleSize", "startPoint", "endPoint", "getTranslationCoordinates", "translateStart", "translateEnd", "PRESS_PSEUDO", "PRESS_GROW_MS", "EASING", "ANIMATION_FILL", "animation", "pressAnimationPlayState", "MINIMUM_PRESS_MS", "resolve", "x", "y", "isInBounds", "StateLayerFoundation", "_adapter", "evt", "coords", "resolve", "TOUCH_DELAY_MS", "StateLayerCoords", "type", "isPrimary", "buttons", "pointerType", "pointerId", "isPrimaryButton", "el", "STATE_LAYER_CONSTANTS", "value", "template", "styles", "StateLayerComponent", "BaseComponent", "attachShadowTemplate", "StateLayerFoundation", "StateLayerAdapter", "STATE_LAYER_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "coords", "__decorateClass", "FoundationProperty", "CustomElement"]
7
7
  }
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a,d as M}from"./chunk.ECJBVX3D.js";import{a as C}from"./chunk.LEVFMI2Q.js";import{a as O}from"./chunk.ZY3ETQ3D.js";import{a as d}from"./chunk.NVUMRW44.js";import{a as x,b as D}from"./chunk.RRNSZCVJ.js";import{a as T,e as R,f as E,k as N}from"./chunk.TPXXHX5J.js";import{l as A,t as I,u as g}from"./chunk.HZUQXCOQ.js";import{a as y}from"./chunk.MGLWXAZO.js";import{b as m,d as f,k as _}from"./chunk.J2M2MXP2.js";import{a as L,d as l}from"./chunk.M3QDAYD2.js";var Y=`${D}stepper`,F={STEPPER:"forge-stepper",LINEAR:"forge-stepper--linear",ALTERNATIVE:"forge-stepper--alternative",CLUSTERED:"forge-stepper--clustered",FIXED:"forge-stepper--fixed",ALIGN_LEFT:"forge-stepper--align-left",ALIGN_CENTER:"forge-stepper--align-center",ALIGN_RIGHT:"forge-stepper--align-right",VERTICAL:"forge-stepper--vertical",FOCUSED:"forge-stepper--focused"},K={STEPPER:`.${F.STEPPER}`},k={SELECTED_INDEX:"selected-index",LINEAR:"linear",ALTERNATIVE:"alternative",LAYOUT_MODE:"layout-mode",LAYOUT_ALIGN:"layout-align",DISABLED:"disabled",VERTICAL:"vertical"},n={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_KEY:"Tab"},u={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,HOME_KEYCODE:36,ENTER_KEYCODE:13,SPACE_KEYCODE:32},P=[n.ARROW_LEFT_KEY,n.ARROW_RIGHT_KEY,n.ARROW_DOWN_KEY,n.ARROW_UP_KEY,n.END_KEY,n.HOME_KEY,n.ENTER_KEY,n.SPACE_KEY,n.TAB_KEY],H={[u.ARROW_LEFT_KEYCODE]:n.ARROW_LEFT_KEY,[u.ARROW_RIGHT_KEYCODE]:n.ARROW_RIGHT_KEY,[u.END_KEYCODE]:n.END_KEY,[u.HOME_KEYCODE]:n.HOME_KEY,[u.ENTER_KEYCODE]:n.ENTER_KEY,[u.SPACE_KEYCODE]:n.SPACE_KEY},i={elementName:Y,classes:F,selectors:K,attributes:k,numbers:u,strings:n,ACCEPTABLE_KEYS:P,KEYCODE_MAP:H};var c=class S{static createStepElement(t,e,s){var p,v;let o=document.createElement(a.elementName);return o.index=e,o.completed=t.completed||!1,o.editable=t.editable||!1,o.selected=s.selectedIndex===e,o.alternative=s.alternative,o.error=t.error||!1,o.disabled=t.disabled||!1,o.vertical=(v=(p=t.vertical)!=null?p:s.vertical)!=null?v:!1,o.ignoreUserExpansion=t.ignoreUserExpansion||!1,o.expanded=t.expanded||!1,s.linear&&e>s.selectedIndex&&(o.tabIndex=-1),o.textContent=t.label,t.optionalLabel&&o.appendChild(this.createStepOptionalLabel(t.optionalLabel)),o}static createStepOptionalLabel(t){let e=document.createElement("span");return e.slot="optional",e.textContent=t||"",e}static setLinearState(t,e){let s=t.classList.contains(i.classes.LINEAR);s&&!e&&(t.classList.remove(i.classes.LINEAR),s=!1),!s&&e&&t.classList.add(i.classes.LINEAR)}static setAlternativeState(t,e){let s=t.classList.contains(i.classes.ALTERNATIVE);s&&!e&&(t.classList.remove(i.classes.ALTERNATIVE),s=!1),!s&&e&&t.classList.add(i.classes.ALTERNATIVE)}static setLayoutMode(t,e){switch(e){case"clustered":t.classList.contains(i.classes.FIXED)&&t.classList.remove(i.classes.FIXED),t.classList.add(i.classes.CLUSTERED);break;case"fixed":t.classList.contains(i.classes.CLUSTERED)&&t.classList.remove(i.classes.CLUSTERED),t.classList.add(i.classes.FIXED);break}}static setLayoutAlign(t,e){switch(t.classList.contains(i.classes.ALIGN_LEFT)&&t.classList.remove(i.classes.ALIGN_LEFT),t.classList.contains(i.classes.ALIGN_CENTER)&&t.classList.remove(i.classes.ALIGN_CENTER),t.classList.contains(i.classes.ALIGN_RIGHT)&&t.classList.remove(i.classes.ALIGN_RIGHT),e){case"left":t.classList.add(i.classes.ALIGN_LEFT);break;case"center":t.classList.add(i.classes.ALIGN_CENTER);break;case"right":t.classList.add(i.classes.ALIGN_RIGHT);break}}static createSteps(t){let e=[];return t.steps.forEach((s,o)=>{let p=S.createStepElement(s,o,t);e.push(p)}),e[0].setAttribute(a.attributes.FIRST,""),e[e.length-1].setAttribute(a.attributes.LAST,""),e}};var h=class extends O{constructor(e){super(e);this._rootElement=E(e,i.selectors.STEPPER),this._slotElement=this._rootElement.querySelector("slot")}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","tablist")}patchSafari(){this._applyToSteps(e=>e.setAttribute("safari",""))}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}getLastStep(){let e=this._getSteps();return e.item(e.length-1)}setSelected(e){this._getSteps().forEach(s=>{s===e?s.selected=!0:s.selected=!1})}assignIndices(){this._getSteps().forEach((s,o)=>{s.index=o})}assignFirstLastStep(){let e=this._getSteps();e&&e.length>1&&(e[0].setAttribute("first",""),e[e.length-1].setAttribute("last",""))}setLayoutAlign(e){c.setLayoutAlign(this._rootElement,e)}setLayoutMode(e){c.setLayoutMode(this._rootElement,e),this._applyToSteps(s=>s.setAttribute(a.attributes.CLUSTERED,""))}setAlternativeState(e){c.setAlternativeState(this._rootElement,e),this._applyToSteps(s=>s.alternative=e)}setVertical(e){g(this._rootElement,e,i.classes.VERTICAL),this._applyToSteps(s=>s.vertical=e)}setLinearState(e){c.setLinearState(this._rootElement,e)}removeRootListener(e,s){this._rootElement.removeEventListener("click",s)}addRootListener(e,s){this._rootElement.addEventListener(e,s)}setSelectedByIndex(e){this._applyToSteps(s=>{s.selected&&s.index!==e&&(s.selected=!1),s.index===e&&(s.selected=!0)})}applyConfiguredSteps(e){this._component.querySelectorAll(a.elementName).forEach(s=>{this._component.removeChild(s)}),e.forEach(s=>this._component.appendChild(s))}tryGetFocusedStep(){let e,s=I(this._component.ownerDocument);return this._applyToSteps(o=>{s===E(o,a.selectors.STEP)&&(e=o)}),e}getFocusedOrSelectedStep(){let e=this.tryGetFocusedStep();return e||(e=this._getSteps()[0],e.focus()),e}getStep(e){let s=0,o=this._getSteps();return e<0?o.item(o.length-1):(o.length>e&&(s=e),o.item(s))}toggleDisabled(e){this._applyToSteps(s=>s.disabled=e)}toggleRootClass(e,s){g(this._rootElement,s,e)}isStepperFocused(){return this._rootElement.classList.contains(i.classes.FOCUSED)}setStepsListener(e,s){this._applyToSteps(o=>o.addEventListener(e,s))}removeStepsListener(e,s){this._applyToSteps(o=>o.removeEventListener(e,s))}_applyToSteps(e){this._getSteps().forEach(e)}_getSteps(){return this._component.querySelectorAll(a.elementName)}};var b=class{constructor(t){this._adapter=t;this._steps=[];this._selectedIndex=0;this._linear=!1;this._alternative=!1;this._layoutMode="fixed";this._layoutAlign="center";this._initialize=!1;this._clickListener=e=>this._handleClick(e),this._keyListener=e=>this._onKeydown(e),this._stepFocusListener=()=>this._onStepFocus(),this._stepBlurListener=()=>this._onStepBlur(),this._stepExpandedContentFocusInListener=e=>this._onStepExpandedContentFocusIn(e),this._stepExpandedContentFocusOutListener=e=>this._onStepExpandedContentFocusOut(e),this._slotChangeListener=e=>this._onSlotChange(e)}initialize(){this._adapter.initializeAccessibility(),this._adapter.assignIndices(),this._adapter.setLinearState(this._linear),this._adapter.setAlternativeState(this._alternative),this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setLayoutMode(this._layoutMode),this._adapter.addRootListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keyListener),this._adapter.assignFirstLastStep(),this._adapter.addRootListener(a.events.EXPANDED_CONTENT_FOCUSIN,this._stepExpandedContentFocusInListener),this._adapter.addRootListener(a.events.EXPANDED_CONTENT_FOCUSOUT,this._stepExpandedContentFocusOutListener),this._applySelectedIndex(),this._patchBrowser(),this._adapter.setStepsListener("blur",this._stepBlurListener),this._adapter.setStepsListener("focus",this._stepFocusListener),this._initialize||this._adapter.addSlotChangeListener(this._slotChangeListener),this._initialize=!0}disconnect(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keyListener),this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.removeStepsListener("blur",this._stepBlurListener),this._adapter.removeStepsListener("focus",this._stepFocusListener)}get steps(){return this._steps.map(t=>L({},t))}set steps(t){if(Array.isArray(t)&&t.length>0)this._steps=[...t.map(e=>L({},e))];else{this._steps=[];return}this._renderConfiguration()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){if(!m(t))t=0;else if(!f(t)){let e=Number(t);t=isNaN(e)?0:e}this._selectedIndex!==t&&(this._selectedIndex=t,this._adapter.setHostAttribute(i.attributes.SELECTED_INDEX,this._selectedIndex.toString()),this._applySelectedIndex())}get linear(){return this._linear}set linear(t){t=!!t,this._linear!==t&&(this._linear=t,this._adapter.setLinearState(this._linear),this._adapter.setHostAttribute(i.attributes.LINEAR,this._linear.toString()))}get alternative(){return this._alternative}set alternative(t){t=!!t,this._alternative!==t&&(this._alternative=t,this._adapter.setAlternativeState(this._alternative),this._adapter.setHostAttribute(i.attributes.ALTERNATIVE,this._alternative.toString()))}get layoutMode(){return this._layoutMode}set layoutMode(t){/^(fixed|clustered)$/.test(t)&&this._layoutMode!==t&&(this._layoutMode=t,this._adapter.setHostAttribute(i.attributes.LAYOUT_MODE,this._layoutMode),this._adapter.setLayoutMode(this._layoutMode))}get layoutAlign(){return this._layoutAlign}set layoutAlign(t){/^(left|center|right)$/.test(t)&&this._layoutAlign!==t&&(this._layoutAlign=t,this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setHostAttribute(i.attributes.LAYOUT_ALIGN,this._layoutAlign))}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._applyDisabled())}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._adapter.toggleHostAttribute(i.attributes.VERTICAL,this._vertical))}_applyVertical(){this._adapter.setVertical(this._vertical)}_applyDisabled(){this._disabled?this._adapter.setHostAttribute(i.attributes.DISABLED,"disabled"):this._adapter.removeHostAttribute(i.attributes.DISABLED),this._adapter.toggleDisabled(this._disabled)}_applySelectedIndex(){this._adapter.setSelectedByIndex(this._selectedIndex)}_handleClick(t){if(t.preventDefault(),this._linear)return;let e=C(t),s=e.find(p=>p.classList&&p.classList.contains(a.classes.STEP)),o=e.find(p=>p.localName===a.elementName);s&&o&&!o.selected&&!o.disabled&&this._adapter.emitHostEvent(a.events.SELECT,o.index,!0,!0)&&(this._adapter.setSelected(o),this.selectedIndex=o.index)}_renderConfiguration(){let t=c.createSteps({steps:this._steps,vertical:this._vertical,selectedIndex:this._selectedIndex,alternative:this._alternative,layoutAlign:this._layoutAlign,layoutMode:this._layoutMode,linear:this._linear});this.disconnect(),this._adapter.applyConfiguredSteps(t),this.initialize()}_onKeydown(t){if(this._linear)return;let e=this._getKeyFromEvent(t);if(!this._adapter.isStepperFocused()||!e)return;[a.strings.HOME_KEY,a.strings.END_KEY,a.strings.ARROW_DOWN_KEY,i.strings.ARROW_UP_KEY].includes(e)&&t.preventDefault();let s=this._vertical?this._determineVerticalMoveTarget(e):this._determineMoveTarget(e);s&&this._moveFocusTo(s)}_moveFocusTo(t){E(t,a.selectors.STEP).focus()}_getKeyFromEvent(t){return i.ACCEPTABLE_KEYS.includes(t.key)?t.key:i.KEYCODE_MAP[t.keyCode]}_determineMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case i.strings.ARROW_RIGHT_KEY:return this._adapter.getStep(e.index+1);case i.strings.ARROW_LEFT_KEY:return this._adapter.getStep(e.index-1);case i.strings.HOME_KEY:return this._adapter.getStep(0);case i.strings.END_KEY:return this._adapter.getLastStep()}return e}_determineVerticalMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case i.strings.ARROW_DOWN_KEY:return this._adapter.getStep(e.index+1);case i.strings.ARROW_UP_KEY:return this._adapter.getStep(e.index-1);case i.strings.HOME_KEY:return this._adapter.getStep(0);case i.strings.END_KEY:return this._adapter.getLastStep()}return e}_onSlotChange(t){this.disconnect(),this.initialize()}_onStepExpandedContentFocusIn(t){let e=this._adapter.getStep(t.detail.index+1);e&&e.setStepTabIndex(0),t.detail.setStepTabIndex(0)}_onStepExpandedContentFocusOut(t){let e=t.target,s=this._adapter.getStep(e.index+1);s&&s.setStepTabIndex(-1),e.setStepTabIndex(-1)}_onStepFocus(){this._adapter.toggleRootClass(i.classes.FOCUSED,!0)}_onStepBlur(){this._adapter.toggleRootClass(i.classes.FOCUSED,!1)}_patchBrowser(){new y().SAFARI()&&this._adapter.patchSafari()}};var w='<template><div class="forge-stepper" part="root"><slot></slot></div></template>',B=".forge-stepper{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;white-space:nowrap;overflow:hidden}.forge-stepper:not(.forge-stepper--vertical) ::slotted(*){display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;min-width:112px}.forge-stepper--fixed ::slotted(*){-webkit-box-flex:1;flex:1}.forge-stepper--alternative{-webkit-box-align:start;align-items:flex-start}.forge-stepper--alternative ::slotted(*){min-width:160px}.forge-stepper--align-left{-webkit-box-pack:start;justify-content:flex-start}.forge-stepper--align-center{-webkit-box-pack:center;justify-content:center}.forge-stepper--align-right{-webkit-box-pack:end;justify-content:flex-end}:host{display:block}:host([hidden]){display:none}:host([vertical]) .forge-stepper{display:unset;-webkit-box-align:unset;align-items:unset;white-space:unset;overflow:unset}",r=class extends N{constructor(){super();R(this,w,B),this._foundation=new b(new h(this))}static get observedAttributes(){return[i.attributes.SELECTED_INDEX,i.attributes.LINEAR,i.attributes.ALTERNATIVE,i.attributes.LAYOUT_MODE,i.attributes.LAYOUT_ALIGN,i.attributes.DISABLED,i.attributes.VERTICAL]}async connectedCallback(){await A(this),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,o){switch(e){case i.attributes.SELECTED_INDEX:this.selectedIndex=Number(o)||0;break;case i.attributes.LINEAR:this.linear=_(o);break;case i.attributes.ALTERNATIVE:this.alternative=_(o);break;case i.attributes.LAYOUT_MODE:this.layoutMode=o;break;case i.attributes.LAYOUT_ALIGN:this.layoutAlign=o;break;case i.attributes.DISABLED:this.disabled=_(o);break;case i.attributes.VERTICAL:this.vertical=_(o);break}}};l([d()],r.prototype,"steps",2),l([d()],r.prototype,"selectedIndex",2),l([d()],r.prototype,"linear",2),l([d()],r.prototype,"alternative",2),l([d()],r.prototype,"layoutMode",2),l([d()],r.prototype,"layoutAlign",2),l([d()],r.prototype,"disabled",2),l([d()],r.prototype,"vertical",2),r=l([x({name:i.elementName,dependencies:[M]})],r);function Re(){T(r)}export{i as a,h as b,b as c,r as d,Re as e};
7
- //# sourceMappingURL=chunk.FQVR2QNF.js.map
6
+ import{a,d as M}from"./chunk.VN7JOJVU.js";import{a as C}from"./chunk.LEVFMI2Q.js";import{a as O}from"./chunk.ZY3ETQ3D.js";import{a as d}from"./chunk.NVUMRW44.js";import{a as x,b as D}from"./chunk.UVXKHQQZ.js";import{a as T,e as R,f as E,k as N}from"./chunk.TPXXHX5J.js";import{a as y}from"./chunk.MGLWXAZO.js";import{l as A,t as I,u as g}from"./chunk.HZUQXCOQ.js";import{b as m,d as f,k as _}from"./chunk.J2M2MXP2.js";import{a as L,d as l}from"./chunk.M3QDAYD2.js";var Y=`${D}stepper`,F={STEPPER:"forge-stepper",LINEAR:"forge-stepper--linear",ALTERNATIVE:"forge-stepper--alternative",CLUSTERED:"forge-stepper--clustered",FIXED:"forge-stepper--fixed",ALIGN_LEFT:"forge-stepper--align-left",ALIGN_CENTER:"forge-stepper--align-center",ALIGN_RIGHT:"forge-stepper--align-right",VERTICAL:"forge-stepper--vertical",FOCUSED:"forge-stepper--focused"},K={STEPPER:`.${F.STEPPER}`},k={SELECTED_INDEX:"selected-index",LINEAR:"linear",ALTERNATIVE:"alternative",LAYOUT_MODE:"layout-mode",LAYOUT_ALIGN:"layout-align",DISABLED:"disabled",VERTICAL:"vertical"},n={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_KEY:"Tab"},u={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,HOME_KEYCODE:36,ENTER_KEYCODE:13,SPACE_KEYCODE:32},P=[n.ARROW_LEFT_KEY,n.ARROW_RIGHT_KEY,n.ARROW_DOWN_KEY,n.ARROW_UP_KEY,n.END_KEY,n.HOME_KEY,n.ENTER_KEY,n.SPACE_KEY,n.TAB_KEY],H={[u.ARROW_LEFT_KEYCODE]:n.ARROW_LEFT_KEY,[u.ARROW_RIGHT_KEYCODE]:n.ARROW_RIGHT_KEY,[u.END_KEYCODE]:n.END_KEY,[u.HOME_KEYCODE]:n.HOME_KEY,[u.ENTER_KEYCODE]:n.ENTER_KEY,[u.SPACE_KEYCODE]:n.SPACE_KEY},i={elementName:Y,classes:F,selectors:K,attributes:k,numbers:u,strings:n,ACCEPTABLE_KEYS:P,KEYCODE_MAP:H};var c=class S{static createStepElement(t,e,s){var p,v;let o=document.createElement(a.elementName);return o.index=e,o.completed=t.completed||!1,o.editable=t.editable||!1,o.selected=s.selectedIndex===e,o.alternative=s.alternative,o.error=t.error||!1,o.disabled=t.disabled||!1,o.vertical=(v=(p=t.vertical)!=null?p:s.vertical)!=null?v:!1,o.ignoreUserExpansion=t.ignoreUserExpansion||!1,o.expanded=t.expanded||!1,s.linear&&e>s.selectedIndex&&(o.tabIndex=-1),o.textContent=t.label,t.optionalLabel&&o.appendChild(this.createStepOptionalLabel(t.optionalLabel)),o}static createStepOptionalLabel(t){let e=document.createElement("span");return e.slot="optional",e.textContent=t||"",e}static setLinearState(t,e){let s=t.classList.contains(i.classes.LINEAR);s&&!e&&(t.classList.remove(i.classes.LINEAR),s=!1),!s&&e&&t.classList.add(i.classes.LINEAR)}static setAlternativeState(t,e){let s=t.classList.contains(i.classes.ALTERNATIVE);s&&!e&&(t.classList.remove(i.classes.ALTERNATIVE),s=!1),!s&&e&&t.classList.add(i.classes.ALTERNATIVE)}static setLayoutMode(t,e){switch(e){case"clustered":t.classList.contains(i.classes.FIXED)&&t.classList.remove(i.classes.FIXED),t.classList.add(i.classes.CLUSTERED);break;case"fixed":t.classList.contains(i.classes.CLUSTERED)&&t.classList.remove(i.classes.CLUSTERED),t.classList.add(i.classes.FIXED);break}}static setLayoutAlign(t,e){switch(t.classList.contains(i.classes.ALIGN_LEFT)&&t.classList.remove(i.classes.ALIGN_LEFT),t.classList.contains(i.classes.ALIGN_CENTER)&&t.classList.remove(i.classes.ALIGN_CENTER),t.classList.contains(i.classes.ALIGN_RIGHT)&&t.classList.remove(i.classes.ALIGN_RIGHT),e){case"left":t.classList.add(i.classes.ALIGN_LEFT);break;case"center":t.classList.add(i.classes.ALIGN_CENTER);break;case"right":t.classList.add(i.classes.ALIGN_RIGHT);break}}static createSteps(t){let e=[];return t.steps.forEach((s,o)=>{let p=S.createStepElement(s,o,t);e.push(p)}),e[0].setAttribute(a.attributes.FIRST,""),e[e.length-1].setAttribute(a.attributes.LAST,""),e}};var h=class extends O{constructor(e){super(e);this._rootElement=E(e,i.selectors.STEPPER),this._slotElement=this._rootElement.querySelector("slot")}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","tablist")}patchSafari(){this._applyToSteps(e=>e.setAttribute("safari",""))}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}getLastStep(){let e=this._getSteps();return e.item(e.length-1)}setSelected(e){this._getSteps().forEach(s=>{s===e?s.selected=!0:s.selected=!1})}assignIndices(){this._getSteps().forEach((s,o)=>{s.index=o})}assignFirstLastStep(){let e=this._getSteps();e&&e.length>1&&(e[0].setAttribute("first",""),e[e.length-1].setAttribute("last",""))}setLayoutAlign(e){c.setLayoutAlign(this._rootElement,e)}setLayoutMode(e){c.setLayoutMode(this._rootElement,e),this._applyToSteps(s=>s.setAttribute(a.attributes.CLUSTERED,""))}setAlternativeState(e){c.setAlternativeState(this._rootElement,e),this._applyToSteps(s=>s.alternative=e)}setVertical(e){g(this._rootElement,e,i.classes.VERTICAL),this._applyToSteps(s=>s.vertical=e)}setLinearState(e){c.setLinearState(this._rootElement,e)}removeRootListener(e,s){this._rootElement.removeEventListener("click",s)}addRootListener(e,s){this._rootElement.addEventListener(e,s)}setSelectedByIndex(e){this._applyToSteps(s=>{s.selected&&s.index!==e&&(s.selected=!1),s.index===e&&(s.selected=!0)})}applyConfiguredSteps(e){this._component.querySelectorAll(a.elementName).forEach(s=>{this._component.removeChild(s)}),e.forEach(s=>this._component.appendChild(s))}tryGetFocusedStep(){let e,s=I(this._component.ownerDocument);return this._applyToSteps(o=>{s===E(o,a.selectors.STEP)&&(e=o)}),e}getFocusedOrSelectedStep(){let e=this.tryGetFocusedStep();return e||(e=this._getSteps()[0],e.focus()),e}getStep(e){let s=0,o=this._getSteps();return e<0?o.item(o.length-1):(o.length>e&&(s=e),o.item(s))}toggleDisabled(e){this._applyToSteps(s=>s.disabled=e)}toggleRootClass(e,s){g(this._rootElement,s,e)}isStepperFocused(){return this._rootElement.classList.contains(i.classes.FOCUSED)}setStepsListener(e,s){this._applyToSteps(o=>o.addEventListener(e,s))}removeStepsListener(e,s){this._applyToSteps(o=>o.removeEventListener(e,s))}_applyToSteps(e){this._getSteps().forEach(e)}_getSteps(){return this._component.querySelectorAll(a.elementName)}};var b=class{constructor(t){this._adapter=t;this._steps=[];this._selectedIndex=0;this._linear=!1;this._alternative=!1;this._layoutMode="fixed";this._layoutAlign="center";this._initialize=!1;this._clickListener=e=>this._handleClick(e),this._keyListener=e=>this._onKeydown(e),this._stepFocusListener=()=>this._onStepFocus(),this._stepBlurListener=()=>this._onStepBlur(),this._stepExpandedContentFocusInListener=e=>this._onStepExpandedContentFocusIn(e),this._stepExpandedContentFocusOutListener=e=>this._onStepExpandedContentFocusOut(e),this._slotChangeListener=e=>this._onSlotChange(e)}initialize(){this._adapter.initializeAccessibility(),this._adapter.assignIndices(),this._adapter.setLinearState(this._linear),this._adapter.setAlternativeState(this._alternative),this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setLayoutMode(this._layoutMode),this._adapter.addRootListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keyListener),this._adapter.assignFirstLastStep(),this._adapter.addRootListener(a.events.EXPANDED_CONTENT_FOCUSIN,this._stepExpandedContentFocusInListener),this._adapter.addRootListener(a.events.EXPANDED_CONTENT_FOCUSOUT,this._stepExpandedContentFocusOutListener),this._applySelectedIndex(),this._patchBrowser(),this._adapter.setStepsListener("blur",this._stepBlurListener),this._adapter.setStepsListener("focus",this._stepFocusListener),this._initialize||this._adapter.addSlotChangeListener(this._slotChangeListener),this._initialize=!0}disconnect(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keyListener),this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.removeStepsListener("blur",this._stepBlurListener),this._adapter.removeStepsListener("focus",this._stepFocusListener)}get steps(){return this._steps.map(t=>L({},t))}set steps(t){if(Array.isArray(t)&&t.length>0)this._steps=[...t.map(e=>L({},e))];else{this._steps=[];return}this._renderConfiguration()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){if(!m(t))t=0;else if(!f(t)){let e=Number(t);t=isNaN(e)?0:e}this._selectedIndex!==t&&(this._selectedIndex=t,this._adapter.setHostAttribute(i.attributes.SELECTED_INDEX,this._selectedIndex.toString()),this._applySelectedIndex())}get linear(){return this._linear}set linear(t){t=!!t,this._linear!==t&&(this._linear=t,this._adapter.setLinearState(this._linear),this._adapter.setHostAttribute(i.attributes.LINEAR,this._linear.toString()))}get alternative(){return this._alternative}set alternative(t){t=!!t,this._alternative!==t&&(this._alternative=t,this._adapter.setAlternativeState(this._alternative),this._adapter.setHostAttribute(i.attributes.ALTERNATIVE,this._alternative.toString()))}get layoutMode(){return this._layoutMode}set layoutMode(t){/^(fixed|clustered)$/.test(t)&&this._layoutMode!==t&&(this._layoutMode=t,this._adapter.setHostAttribute(i.attributes.LAYOUT_MODE,this._layoutMode),this._adapter.setLayoutMode(this._layoutMode))}get layoutAlign(){return this._layoutAlign}set layoutAlign(t){/^(left|center|right)$/.test(t)&&this._layoutAlign!==t&&(this._layoutAlign=t,this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setHostAttribute(i.attributes.LAYOUT_ALIGN,this._layoutAlign))}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._applyDisabled())}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._adapter.toggleHostAttribute(i.attributes.VERTICAL,this._vertical))}_applyVertical(){this._adapter.setVertical(this._vertical)}_applyDisabled(){this._disabled?this._adapter.setHostAttribute(i.attributes.DISABLED,"disabled"):this._adapter.removeHostAttribute(i.attributes.DISABLED),this._adapter.toggleDisabled(this._disabled)}_applySelectedIndex(){this._adapter.setSelectedByIndex(this._selectedIndex)}_handleClick(t){if(t.preventDefault(),this._linear)return;let e=C(t),s=e.find(p=>p.classList&&p.classList.contains(a.classes.STEP)),o=e.find(p=>p.localName===a.elementName);s&&o&&!o.selected&&!o.disabled&&this._adapter.emitHostEvent(a.events.SELECT,o.index,!0,!0)&&(this._adapter.setSelected(o),this.selectedIndex=o.index)}_renderConfiguration(){let t=c.createSteps({steps:this._steps,vertical:this._vertical,selectedIndex:this._selectedIndex,alternative:this._alternative,layoutAlign:this._layoutAlign,layoutMode:this._layoutMode,linear:this._linear});this.disconnect(),this._adapter.applyConfiguredSteps(t),this.initialize()}_onKeydown(t){if(this._linear)return;let e=this._getKeyFromEvent(t);if(!this._adapter.isStepperFocused()||!e)return;[a.strings.HOME_KEY,a.strings.END_KEY,a.strings.ARROW_DOWN_KEY,i.strings.ARROW_UP_KEY].includes(e)&&t.preventDefault();let s=this._vertical?this._determineVerticalMoveTarget(e):this._determineMoveTarget(e);s&&this._moveFocusTo(s)}_moveFocusTo(t){E(t,a.selectors.STEP).focus()}_getKeyFromEvent(t){return i.ACCEPTABLE_KEYS.includes(t.key)?t.key:i.KEYCODE_MAP[t.keyCode]}_determineMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case i.strings.ARROW_RIGHT_KEY:return this._adapter.getStep(e.index+1);case i.strings.ARROW_LEFT_KEY:return this._adapter.getStep(e.index-1);case i.strings.HOME_KEY:return this._adapter.getStep(0);case i.strings.END_KEY:return this._adapter.getLastStep()}return e}_determineVerticalMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case i.strings.ARROW_DOWN_KEY:return this._adapter.getStep(e.index+1);case i.strings.ARROW_UP_KEY:return this._adapter.getStep(e.index-1);case i.strings.HOME_KEY:return this._adapter.getStep(0);case i.strings.END_KEY:return this._adapter.getLastStep()}return e}_onSlotChange(t){this.disconnect(),this.initialize()}_onStepExpandedContentFocusIn(t){let e=this._adapter.getStep(t.detail.index+1);e&&e.setStepTabIndex(0),t.detail.setStepTabIndex(0)}_onStepExpandedContentFocusOut(t){let e=t.target,s=this._adapter.getStep(e.index+1);s&&s.setStepTabIndex(-1),e.setStepTabIndex(-1)}_onStepFocus(){this._adapter.toggleRootClass(i.classes.FOCUSED,!0)}_onStepBlur(){this._adapter.toggleRootClass(i.classes.FOCUSED,!1)}_patchBrowser(){new y().SAFARI()&&this._adapter.patchSafari()}};var w='<template><div class="forge-stepper" part="root"><slot></slot></div></template>',B=".forge-stepper{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;white-space:nowrap;overflow:hidden}.forge-stepper:not(.forge-stepper--vertical) ::slotted(*){display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;min-width:112px}.forge-stepper--fixed ::slotted(*){-webkit-box-flex:1;flex:1}.forge-stepper--alternative{-webkit-box-align:start;align-items:flex-start}.forge-stepper--alternative ::slotted(*){min-width:160px}.forge-stepper--align-left{-webkit-box-pack:start;justify-content:flex-start}.forge-stepper--align-center{-webkit-box-pack:center;justify-content:center}.forge-stepper--align-right{-webkit-box-pack:end;justify-content:flex-end}:host{display:block}:host([hidden]){display:none}:host([vertical]) .forge-stepper{display:unset;-webkit-box-align:unset;align-items:unset;white-space:unset;overflow:unset}",r=class extends N{constructor(){super();R(this,w,B),this._foundation=new b(new h(this))}static get observedAttributes(){return[i.attributes.SELECTED_INDEX,i.attributes.LINEAR,i.attributes.ALTERNATIVE,i.attributes.LAYOUT_MODE,i.attributes.LAYOUT_ALIGN,i.attributes.DISABLED,i.attributes.VERTICAL]}async connectedCallback(){await A(this),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,o){switch(e){case i.attributes.SELECTED_INDEX:this.selectedIndex=Number(o)||0;break;case i.attributes.LINEAR:this.linear=_(o);break;case i.attributes.ALTERNATIVE:this.alternative=_(o);break;case i.attributes.LAYOUT_MODE:this.layoutMode=o;break;case i.attributes.LAYOUT_ALIGN:this.layoutAlign=o;break;case i.attributes.DISABLED:this.disabled=_(o);break;case i.attributes.VERTICAL:this.vertical=_(o);break}}};l([d()],r.prototype,"steps",2),l([d()],r.prototype,"selectedIndex",2),l([d()],r.prototype,"linear",2),l([d()],r.prototype,"alternative",2),l([d()],r.prototype,"layoutMode",2),l([d()],r.prototype,"layoutAlign",2),l([d()],r.prototype,"disabled",2),l([d()],r.prototype,"vertical",2),r=l([x({name:i.elementName,dependencies:[M]})],r);function Re(){T(r)}export{i as a,h as b,b as c,r as d,Re as e};
7
+ //# sourceMappingURL=chunk.GAHE4QVB.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import{a as w,b as E}from"./chunk.KD4DVSJR.js";import{a as _}from"./chunk.ZY3ETQ3D.js";import{a as c}from"./chunk.NVUMRW44.js";import{a as b,b as v,m as n}from"./chunk.UVXKHQQZ.js";import{a as f,e as h,f as d,k}from"./chunk.TPXXHX5J.js";import{k as m,l as u}from"./chunk.J2M2MXP2.js";import{d as s}from"./chunk.M3QDAYD2.js";var T=`${v}circular-progress`,C={DETERMINATE:"determinate",PROGRESS:"progress",THEME:"theme",TRACK:"track"},R={INDETERMINATE:"forge-circular-progress--indeterminate"},x={ROOT:".forge-circular-progress",DETERMINATE_PROGRESS_CIRCLE:".progress",TEMPLATES:"svg, .spinner"},e={elementName:T,attributes:C,classes:R,selectors:x};var A='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle></svg><div class="spinner"><div class="left"><div class="circle"></div></div><div class="right"><div class="circle"></div></div></div>',P='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle><circle class="track" pathLength="100"></circle><circle class="progress" pathLength="100" stroke-dashoffset="100"></circle></svg>',l=class extends _{constructor(t){super(t);this._rootElement=d(this._component,e.selectors.ROOT)}initialize(){this._component[n]({role:"progressbar",ariaValueMin:"0",ariaValueMax:"1"})}setDeterminate(t){this._tryResetTemplate(),this._rootElement.classList.toggle(e.classes.INDETERMINATE,!t),t?(this._rootElement.insertAdjacentHTML("beforeend",P),this._determinateProgressCircleElement=d(this._component,e.selectors.DETERMINATE_PROGRESS_CIRCLE)):(this._rootElement.insertAdjacentHTML("beforeend",A),this._component[n]({ariaValueNow:null}),this._determinateProgressCircleElement=void 0)}setProgress(t){var o;this._component[n]({ariaValueNow:`${t}`}),(o=this._determinateProgressCircleElement)==null||o.setAttribute("stroke-dashoffset",`${(1-t)*100}`)}_tryResetTemplate(){var o;let t=(o=this._component.shadowRoot)==null?void 0:o.querySelectorAll(e.selectors.TEMPLATES);t==null||t.forEach(i=>i.remove())}};var g=class{constructor(r){this._adapter=r;this._determinate=!1;this._progress=0;this._theme="primary";this._track=!1}initialize(){this._adapter.initialize(),this._applyDeterminate()}_applyDeterminate(){this._adapter.setDeterminate(this._determinate),this._determinate&&this._adapter.setProgress(this._progress)}get determinate(){return this._determinate}set determinate(r){r=!!r,this._determinate!==r&&(this._determinate=r,this._applyDeterminate(),this._adapter.toggleHostAttribute(e.attributes.DETERMINATE,this._determinate))}get progress(){return this._progress}set progress(r){isNaN(r)&&(r=0),this._progress!==r&&(this._progress=r,this._determinate&&this._adapter.setProgress(this._progress),this._adapter.setHostAttribute(e.attributes.PROGRESS,`${this._progress}`))}get theme(){return this._theme}set theme(r){this._theme!==r&&(this._theme=r,this._adapter.toggleHostAttribute(e.attributes.THEME,!!this._theme,this._theme))}get track(){return this._track}set track(r){r=!!r,this._track!==r&&(this._track=r,this._adapter.toggleHostAttribute(e.attributes.TRACK,this._track))}};var y='<template><div class="forge-circular-progress" part="progressbar"><slot class="center-content"></slot></div></template>',I=":host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:-webkit-inline-box;display:inline-flex;vertical-align:middle;min-block-size:var(--_circular-progress-size);min-inline-size:var(--_circular-progress-size);position:relative;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{-webkit-box-flex:1;flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;-webkit-animation:linear infinite linear-rotate;animation:linear infinite linear-rotate;-webkit-animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306);animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;-webkit-animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;-webkit-transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;-webkit-animation:expand-arc;animation:expand-arc;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{-webkit-transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{-webkit-transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;-webkit-animation:infinite both rotate-arc;animation:infinite both rotate-arc;-webkit-animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-duration:calc(4 * var(--_circular-progress-arc-duration));-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host(:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5))}:host([theme=primary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@-webkit-keyframes expand-arc{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}100%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes expand-arc{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}100%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes rotate-arc{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@keyframes rotate-arc{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@-webkit-keyframes linear-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes linear-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}",a=class extends E(w(k)){constructor(){super();h(this,y,I),this._foundation=new g(new l(this))}static get observedAttributes(){return[e.attributes.DETERMINATE,e.attributes.PROGRESS,e.attributes.THEME,e.attributes.TRACK]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(t,o,i){switch(t){case e.attributes.DETERMINATE:this.determinate=m(i);break;case e.attributes.PROGRESS:this.progress=u(i);break;case e.attributes.THEME:this.theme=i;break;case e.attributes.TRACK:this.track=m(i);break}}};s([c()],a.prototype,"determinate",2),s([c()],a.prototype,"progress",2),s([c()],a.prototype,"theme",2),s([c()],a.prototype,"track",2),a=s([b({name:e.elementName})],a);function ar(){f(a)}export{e as a,l as b,g as c,a as d,ar as e};
7
+ //# sourceMappingURL=chunk.GDKJ4RZX.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/circular-progress/circular-progress-constants.ts", "../../src/circular-progress/circular-progress-adapter.ts", "../../src/circular-progress/circular-progress-foundation.ts", "../../src/circular-progress/circular-progress.ts", "../../src/circular-progress/index.ts"],
4
+ "sourcesContent": ["import { COMPONENT_NAME_PREFIX, Theme } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}circular-progress`;\n\nconst attributes = {\n DETERMINATE: 'determinate',\n PROGRESS: 'progress',\n THEME: 'theme',\n TRACK: 'track'\n};\n\nconst classes = {\n INDETERMINATE: 'forge-circular-progress--indeterminate'\n};\n\nconst selectors = {\n ROOT: '.forge-circular-progress',\n DETERMINATE_PROGRESS_CIRCLE: '.progress',\n TEMPLATES: 'svg, .spinner'\n};\n\nexport const CIRCULAR_PROGRESS_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors\n};\n\nexport type CircularProgressTheme = Theme;\n", "import { getShadowElement } from '@tylertech/forge-core';\n\nimport { ICircularProgressComponent } from './circular-progress';\nimport { CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\n\nconst indeterminateTemplate = '<svg viewBox=\\\"0 0 4800 4800\\\"><circle class=\\\"track-background\\\" pathLength=\\\"100\\\"></circle></svg><div class=\\\"spinner\\\"><div class=\\\"left\\\"><div class=\\\"circle\\\"></div></div><div class=\\\"right\\\"><div class=\\\"circle\\\"></div></div></div>';\nconst determinateTemplate = '<svg viewBox=\\\"0 0 4800 4800\\\"><circle class=\\\"track-background\\\" pathLength=\\\"100\\\"></circle><circle class=\\\"track\\\" pathLength=\\\"100\\\"></circle><circle class=\\\"progress\\\" pathLength=\\\"100\\\" stroke-dashoffset=\\\"100\\\"></circle></svg>';\nimport { setDefaultAria } from '../constants';\n\nexport interface ICircularProgressAdapter extends IBaseAdapter {\n initialize(): void;\n setDeterminate(value: boolean): void;\n setProgress(value: number): void;\n}\n\nexport class CircularProgressAdapter extends BaseAdapter<ICircularProgressComponent> implements ICircularProgressAdapter {\n private readonly _rootElement: HTMLElement;\n private _determinateProgressCircleElement: HTMLElement | undefined;\n\n constructor(component: ICircularProgressComponent) {\n super(component);\n this._rootElement = getShadowElement(this._component, CIRCULAR_PROGRESS_CONSTANTS.selectors.ROOT);\n }\n\n public initialize(): void {\n this._component[setDefaultAria]({\n role: 'progressbar',\n ariaValueMin: '0',\n ariaValueMax: '1'\n });\n }\n\n public setDeterminate(value: boolean): void {\n this._tryResetTemplate();\n this._rootElement.classList.toggle(CIRCULAR_PROGRESS_CONSTANTS.classes.INDETERMINATE, !value);\n \n if (value) {\n this._rootElement.insertAdjacentHTML('beforeend', determinateTemplate);\n this._determinateProgressCircleElement = getShadowElement(this._component, CIRCULAR_PROGRESS_CONSTANTS.selectors.DETERMINATE_PROGRESS_CIRCLE);\n } else {\n this._rootElement.insertAdjacentHTML('beforeend', indeterminateTemplate);\n this._component[setDefaultAria]({ ariaValueNow: null });\n this._determinateProgressCircleElement = undefined;\n }\n }\n\n public setProgress(value: number): void {\n this._component[setDefaultAria]({ ariaValueNow: `${value}` });\n this._determinateProgressCircleElement?.setAttribute('stroke-dashoffset', `${(1 - value) * 100}`);\n }\n\n private _tryResetTemplate(): void {\n const elements = this._component.shadowRoot?.querySelectorAll(CIRCULAR_PROGRESS_CONSTANTS.selectors.TEMPLATES);\n elements?.forEach(el => el.remove());\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ICircularProgressAdapter } from './circular-progress-adapter';\nimport { CircularProgressTheme, CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';\n\nexport interface ICircularProgressFoundation extends ICustomElementFoundation {\n determinate: boolean;\n progress: number;\n theme: CircularProgressTheme;\n track: boolean;\n}\n\nexport class CircularProgressFoundation implements ICircularProgressFoundation {\n private _determinate = false;\n private _progress = 0;\n private _theme: CircularProgressTheme = 'primary';\n private _track = false;\n\n constructor(private _adapter: ICircularProgressAdapter) {}\n\n public initialize(): void {\n this._adapter.initialize();\n this._applyDeterminate();\n }\n\n private _applyDeterminate(): void {\n this._adapter.setDeterminate(this._determinate);\n\n if (this._determinate) {\n this._adapter.setProgress(this._progress);\n }\n }\n\n public get determinate(): boolean {\n return this._determinate;\n }\n public set determinate(value: boolean) {\n value = Boolean(value);\n if (this._determinate !== value) {\n this._determinate = value;\n this._applyDeterminate();\n this._adapter.toggleHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.DETERMINATE, this._determinate);\n }\n }\n\n public get progress(): number {\n return this._progress;\n }\n public set progress(value: number) {\n if (isNaN(value)) {\n value = 0;\n }\n if (this._progress !== value) {\n this._progress = value;\n if (this._determinate) {\n this._adapter.setProgress(this._progress);\n }\n this._adapter.setHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.PROGRESS, `${this._progress}`);\n }\n }\n\n public get theme(): CircularProgressTheme {\n return this._theme;\n }\n public set theme(value: CircularProgressTheme) {\n if (this._theme !== value) {\n this._theme = value;\n this._adapter.toggleHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.THEME, !!this._theme, this._theme);\n }\n }\n\n public get track(): boolean {\n return this._track;\n }\n public set track(value: boolean) {\n value = Boolean(value);\n if (this._track !== value) {\n this._track = value;\n this._adapter.toggleHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.TRACK, this._track);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean, coerceNumber } from '@tylertech/forge-core';\n\nimport { CircularProgressAdapter } from './circular-progress-adapter';\nimport { CircularProgressFoundation } from './circular-progress-foundation';\nimport { CircularProgressTheme, CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';\nimport { BaseComponent } from '../core/base/base-component';\nimport { IWithElementInternals, WithElementInternals } from '../core/mixins/internals/with-element-internals';\nimport { IWithDefaultAria, WithDefaultAria } from '../core/mixins/internals/with-default-aria';\n\nconst template = '<template><div class=\\\"forge-circular-progress\\\" part=\\\"progressbar\\\"><slot class=\\\"center-content\\\"></slot></div></template>';\nconst styles = ':host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:-webkit-inline-box;display:inline-flex;vertical-align:middle;min-block-size:var(--_circular-progress-size);min-inline-size:var(--_circular-progress-size);position:relative;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{-webkit-box-flex:1;flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;-webkit-animation:linear infinite linear-rotate;animation:linear infinite linear-rotate;-webkit-animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306);animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;-webkit-animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;-webkit-transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;-webkit-animation:expand-arc;animation:expand-arc;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{-webkit-transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{-webkit-transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;-webkit-animation:infinite both rotate-arc;animation:infinite both rotate-arc;-webkit-animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-duration:calc(4 * var(--_circular-progress-arc-duration));-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host(:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5))}:host([theme=primary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@-webkit-keyframes expand-arc{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}100%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes expand-arc{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}100%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes rotate-arc{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@keyframes rotate-arc{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@-webkit-keyframes linear-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes linear-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}';\n\nexport interface ICircularProgressComponent extends IWithElementInternals, IWithDefaultAria {\n determinate: boolean;\n progress: number;\n theme: CircularProgressTheme;\n track: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-circular-progress': ICircularProgressComponent;\n }\n}\n\n/**\n * @tag forge-circular-progress\n * \n * @summary\n * Circular progress indicators display progress by animating along a circular track in a clockwise direction.\n * \n * @description\n * Progress indicators inform users about the status of ongoing processes.\n * - Determinate indicators display how long a process will take.\n * - Indeterminate indicators express an unspecified amount of wait time.\n *\n * @property {boolean} determinate - Controls the determinate state.\n * @property {boolean} progress - Controls the progress while in a determinate state. Accepts values from `0` to `1`.\n * @property {CircularProgressTheme} theme - Controls the theme of the progress indicator.\n * @property {boolean} track - Controls the visibility of the track background.\n * \n * @attribute {boolean} determinate - Controls the determinate state.\n * @attribute {boolean} progress - Controls the progress while in a determinate state. Accepts values from `0` to `1`.\n * @attribute {CircularProgressTheme} theme - Controls the theme of the progress indicator.\n * @attribute {boolean} track - Controls the visibility of the track background.\n * \n * @slot - The is the default/unnamed slot. Renders content at the center of the progress indicator.\n * \n * @cssproperty --forge-circular-progress-size - The height and width of the indicator container.\n * @cssproperty --forge-circular-progress-padding - The padding inside the bounding box of the container.\n * @cssproperty --forge-circular-progress-track-width - The track indicator width.\n * @cssproperty --forge-circular-progress-track-color - The track background color.\n * @cssproperty --forge-circular-progress-indicator-color - The track indicator color.\n * @cssproperty --forge-circular-progress-arc-duration - The duration of the arc animation.\n * @cssproperty --forge-circular-progress-theme-transition-duration - The duration of the theme transition.\n * @cssproperty --forge-circular-progress-theme-transition-timing - The easing function to use for the theme transition.\n * \n * @csspart progressbar - Styles the progress bar container element\n */\n@CustomElement({\n name: CIRCULAR_PROGRESS_CONSTANTS.elementName\n})\nexport class CircularProgressComponent extends WithDefaultAria(WithElementInternals(BaseComponent)) implements ICircularProgressComponent {\n public static get observedAttributes(): string[] {\n return [\n CIRCULAR_PROGRESS_CONSTANTS.attributes.DETERMINATE,\n CIRCULAR_PROGRESS_CONSTANTS.attributes.PROGRESS,\n CIRCULAR_PROGRESS_CONSTANTS.attributes.THEME,\n CIRCULAR_PROGRESS_CONSTANTS.attributes.TRACK\n ];\n }\n\n private _foundation: CircularProgressFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new CircularProgressFoundation(new CircularProgressAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.DETERMINATE:\n this.determinate = coerceBoolean(newValue);\n break;\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.PROGRESS:\n this.progress = coerceNumber(newValue);\n break;\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.THEME:\n this.theme = newValue as CircularProgressTheme;\n break;\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.TRACK:\n this.track = coerceBoolean(newValue);\n break;\n }\n }\n \n @FoundationProperty()\n public declare determinate: boolean;\n\n @FoundationProperty()\n public declare progress: number;\n\n @FoundationProperty()\n public declare theme: CircularProgressTheme;\n\n @FoundationProperty()\n public declare track: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CircularProgressComponent } from './circular-progress';\n\nexport * from './circular-progress-adapter';\nexport * from './circular-progress-constants';\nexport * from './circular-progress-foundation';\nexport * from './circular-progress';\n\nexport function defineCircularProgressComponent(): void {\n defineCustomEl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HACXC,EAAS,w9RAoDFC,EAAN,cAAwCC,EAAgBC,EAAqBC,CAAa,CAAC,CAAwC,CAYxI,aAAc,CACZ,MAAM,EACNC,EAAqB,KAAMN,EAAUC,CAAM,EAC3C,KAAK,YAAc,IAAIM,EAA2B,IAAIC,EAAwB,IAAI,CAAC,CACrF,CAfA,WAAkB,oBAA+B,CAC/C,MAAO,CACLC,EAA4B,WAAW,YACvCA,EAA4B,WAAW,SACvCA,EAA4B,WAAW,MACvCA,EAA4B,WAAW,KACzC,CACF,CAUO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAA4B,WAAW,YAC1C,KAAK,YAAcI,EAAcD,CAAQ,EACzC,MACF,KAAKH,EAA4B,WAAW,SAC1C,KAAK,SAAWK,EAAaF,CAAQ,EACrC,MACF,KAAKH,EAA4B,WAAW,MAC1C,KAAK,MAAQG,EACb,MACF,KAAKH,EAA4B,WAAW,MAC1C,KAAK,MAAQI,EAAcD,CAAQ,EACnC,KACJ,CACF,CAaF,EAViBG,EAAA,CADdC,EAAmB,GAvCTd,EAwCI,2BAGAa,EAAA,CADdC,EAAmB,GA1CTd,EA2CI,wBAGAa,EAAA,CADdC,EAAmB,GA7CTd,EA8CI,qBAGAa,EAAA,CADdC,EAAmB,GAhDTd,EAiDI,qBAjDJA,EAANa,EAAA,CAHNE,EAAc,CACb,KAAMR,EAA4B,WACpC,CAAC,GACYP,GCrDN,SAASgB,IAAwC,CACtDC,EAAoBC,CAAyB,CAC/C",
6
+ "names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "classes", "selectors", "CIRCULAR_PROGRESS_CONSTANTS", "indeterminateTemplate", "determinateTemplate", "CircularProgressAdapter", "BaseAdapter", "component", "getShadowElement", "CIRCULAR_PROGRESS_CONSTANTS", "setDefaultAria", "value", "_a", "elements", "el", "CircularProgressFoundation", "_adapter", "value", "CIRCULAR_PROGRESS_CONSTANTS", "template", "styles", "CircularProgressComponent", "WithDefaultAria", "WithElementInternals", "BaseComponent", "attachShadowTemplate", "CircularProgressFoundation", "CircularProgressAdapter", "CIRCULAR_PROGRESS_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "__decorateClass", "FoundationProperty", "CustomElement", "defineCircularProgressComponent", "defineCustomElement", "CircularProgressComponent"]
7
+ }
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{f as e}from"./chunk.T4N7KZHZ.js";import{a as o}from"./chunk.TPXXHX5J.js";function t(){o(e)}export{t as a};
7
- //# sourceMappingURL=chunk.N75VD4S4.js.map
6
+ import{f as e}from"./chunk.JRROGJ2G.js";import{a as o}from"./chunk.TPXXHX5J.js";function t(){o(e)}export{t as a};
7
+ //# sourceMappingURL=chunk.GFKYBECY.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as u}from"./chunk.ZY3ETQ3D.js";import{a as o}from"./chunk.NVUMRW44.js";import{a as d,b as k}from"./chunk.RRNSZCVJ.js";import{a as g,e as b,f as h,k as f}from"./chunk.TPXXHX5J.js";import{k as c}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var _=`${k}stack`,A={DEFAULT:"forge-stack"},x={ROOT:`.${A.DEFAULT}`},S={INLINE:"inline",WRAP:"wrap",STRETCH:"stretch",GAP:"gap",ALIGNMENT:"alignment"},T={DEFAULT_GAP:"16"},e={elementName:_,classes:A,attributes:S,selectors:x,strings:T},E=(n=>(n.Start="start",n.Center="center",n.End="end",n))(E||{});var l=class extends u{constructor(r){super(r);this._rootElement=h(r,e.selectors.ROOT)}setGap(r){let n=/^\d+$/.test(r)?`${r}px`:r;this._rootElement.style.gap=`var(--forge-stack-gap, ${n})`}};var p=class{constructor(t){this._adapter=t;this._inline=!1;this._wrap=!1;this._stretch=!1;this._gap=e.strings.DEFAULT_GAP;this._alignment="start"}get inline(){return this._inline}set inline(t){t=!!t,this._inline!==t&&(this._inline=t,this._adapter.toggleHostAttribute(e.attributes.INLINE,this._inline))}get wrap(){return this._wrap}set wrap(t){t=!!t,this._wrap!==t&&(this._wrap=t,this._adapter.toggleHostAttribute(e.attributes.WRAP,this._wrap))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(e.attributes.STRETCH,this._stretch))}get gap(){return this._gap}set gap(t){this._gap!==t&&(this._gap=t,this._adapter.setGap(this._gap),this._adapter.setHostAttribute(e.attributes.GAP,this._gap))}get alignment(){return this._alignment}set alignment(t){this._alignment!==t&&(this._alignment=t,this._adapter.setHostAttribute(e.attributes.ALIGNMENT,this._alignment))}};var I='<template><div class="forge-stack" part="root"><slot></slot></div></template>',N=".forge-stack{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:100%;gap:16px;gap:var(--forge-stack-gap,16px);height:100%;height:var(--forge-stack-height,100%)}.forge-stack ::slotted(*){-webkit-box-flex:var(--forge-stack-stretch,initial);flex:var(--forge-stack-stretch,initial)}:host{display:block}:host([inline]) .forge-stack{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;--forge-stack-height:auto}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host([stretch]:not([inline])){height:100%}:host([stretch]){--forge-stack-stretch:1}:host([alignment=start]) .forge-stack{-webkit-box-pack:start;justify-content:start}:host([alignment=center]) .forge-stack{-webkit-box-pack:center;justify-content:center}:host([alignment=end]) .forge-stack{-webkit-box-pack:end;justify-content:end}",i=class extends f{constructor(){super();b(this,I,N),this._foundation=new p(new l(this))}static get observedAttributes(){return[e.attributes.INLINE,e.attributes.WRAP,e.attributes.STRETCH,e.attributes.GAP,e.attributes.ALIGNMENT]}attributeChangedCallback(r,n,s){switch(r){case e.attributes.INLINE:this.inline=c(s);break;case e.attributes.WRAP:this.wrap=c(s);break;case e.attributes.STRETCH:this.stretch=c(s);break;case e.attributes.GAP:this.gap=s;break;case e.attributes.ALIGNMENT:this.alignment=s;break}}};a([o()],i.prototype,"inline",2),a([o()],i.prototype,"wrap",2),a([o()],i.prototype,"stretch",2),a([o()],i.prototype,"gap",2),a([o()],i.prototype,"alignment",2),i=a([d({name:e.elementName})],i);function J(){g(i)}export{e as a,E as b,l as c,p as d,i as e,J as f};
7
- //# sourceMappingURL=chunk.IA27LU2O.js.map
6
+ import{a as u}from"./chunk.ZY3ETQ3D.js";import{a as o}from"./chunk.NVUMRW44.js";import{a as d,b as k}from"./chunk.UVXKHQQZ.js";import{a as g,e as b,f as h,k as f}from"./chunk.TPXXHX5J.js";import{k as c}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var _=`${k}stack`,A={DEFAULT:"forge-stack"},x={ROOT:`.${A.DEFAULT}`},S={INLINE:"inline",WRAP:"wrap",STRETCH:"stretch",GAP:"gap",ALIGNMENT:"alignment"},T={DEFAULT_GAP:"16"},e={elementName:_,classes:A,attributes:S,selectors:x,strings:T},E=(n=>(n.Start="start",n.Center="center",n.End="end",n))(E||{});var l=class extends u{constructor(r){super(r);this._rootElement=h(r,e.selectors.ROOT)}setGap(r){let n=/^\d+$/.test(r)?`${r}px`:r;this._rootElement.style.gap=`var(--forge-stack-gap, ${n})`}};var p=class{constructor(t){this._adapter=t;this._inline=!1;this._wrap=!1;this._stretch=!1;this._gap=e.strings.DEFAULT_GAP;this._alignment="start"}get inline(){return this._inline}set inline(t){t=!!t,this._inline!==t&&(this._inline=t,this._adapter.toggleHostAttribute(e.attributes.INLINE,this._inline))}get wrap(){return this._wrap}set wrap(t){t=!!t,this._wrap!==t&&(this._wrap=t,this._adapter.toggleHostAttribute(e.attributes.WRAP,this._wrap))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(e.attributes.STRETCH,this._stretch))}get gap(){return this._gap}set gap(t){this._gap!==t&&(this._gap=t,this._adapter.setGap(this._gap),this._adapter.setHostAttribute(e.attributes.GAP,this._gap))}get alignment(){return this._alignment}set alignment(t){this._alignment!==t&&(this._alignment=t,this._adapter.setHostAttribute(e.attributes.ALIGNMENT,this._alignment))}};var I='<template><div class="forge-stack" part="root"><slot></slot></div></template>',N=".forge-stack{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:100%;gap:16px;gap:var(--forge-stack-gap,16px);height:100%;height:var(--forge-stack-height,100%)}.forge-stack ::slotted(*){-webkit-box-flex:var(--forge-stack-stretch,initial);flex:var(--forge-stack-stretch,initial)}:host{display:block}:host([inline]) .forge-stack{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;--forge-stack-height:auto}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host([stretch]:not([inline])){height:100%}:host([stretch]){--forge-stack-stretch:1}:host([alignment=start]) .forge-stack{-webkit-box-pack:start;justify-content:start}:host([alignment=center]) .forge-stack{-webkit-box-pack:center;justify-content:center}:host([alignment=end]) .forge-stack{-webkit-box-pack:end;justify-content:end}",i=class extends f{constructor(){super();b(this,I,N),this._foundation=new p(new l(this))}static get observedAttributes(){return[e.attributes.INLINE,e.attributes.WRAP,e.attributes.STRETCH,e.attributes.GAP,e.attributes.ALIGNMENT]}attributeChangedCallback(r,n,s){switch(r){case e.attributes.INLINE:this.inline=c(s);break;case e.attributes.WRAP:this.wrap=c(s);break;case e.attributes.STRETCH:this.stretch=c(s);break;case e.attributes.GAP:this.gap=s;break;case e.attributes.ALIGNMENT:this.alignment=s;break}}};a([o()],i.prototype,"inline",2),a([o()],i.prototype,"wrap",2),a([o()],i.prototype,"stretch",2),a([o()],i.prototype,"gap",2),a([o()],i.prototype,"alignment",2),i=a([d({name:e.elementName})],i);function J(){g(i)}export{e as a,E as b,l as c,p as d,i as e,J as f};
7
+ //# sourceMappingURL=chunk.GYGIU62J.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as x}from"./chunk.QKTNCOVX.js";import{e as F,h as V,j as B}from"./chunk.RDQ3QGWS.js";import{c as N}from"./chunk.5WVOPPBY.js";import{a as A,b as m}from"./chunk.74JHE77R.js";import{e as k}from"./chunk.74HZVSDM.js";import{d as P}from"./chunk.EWT2PBEP.js";import{d as w}from"./chunk.4JB3SESQ.js";import{a as T}from"./chunk.ZY3ETQ3D.js";import{a as p}from"./chunk.NVUMRW44.js";import{a as y,b as S,d as D}from"./chunk.RRNSZCVJ.js";import{a as L,e as C}from"./chunk.TPXXHX5J.js";import{m as M}from"./chunk.HZUQXCOQ.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,d as a}from"./chunk.M3QDAYD2.js";var l=`${S}menu`,H={POPUP:"forge-menu__popup",MENU:"mdc-menu"},K={TOGGLE:`.${l}__toggle,[${l}-toggle],forge-button,forge-icon-button,forge-fab,button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},G={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},U={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},R={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:H,selectors:K,attributes:G,events:U,numbers:R};var u=class extends T{constructor(e){super(e);this._childMenus=new Map}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){this._targetElement&&(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new V(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){this._targetElement&&(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,E=>{E.stopPropagation(),r(b(c({},E.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(A.elementName)):[]}};var h=class extends B{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=D;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){this._adapter.hasTargetElement()&&(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){this._adapter.hasTargetElement()&&(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){this._adapter.hasTargetElement()&&(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return F(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Tab":this._open&&this._selectActiveOption();break;case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=!!e,this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var $="<template><slot></slot></template>",z=":host{display:-webkit-inline-box;display:inline-flex}:host([hidden]){display:none}",s=class extends x{constructor(){super();w.define(P),this._foundation=new h(new u(this)),C(this,$,z)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([y({name:i.elementName,dependencies:[k,N]})],s);function Ye(){L(s)}export{i as a,u as b,h as c,s as d,Ye as e};
7
- //# sourceMappingURL=chunk.OT3JZ6JO.js.map
6
+ import{a as x}from"./chunk.IDB4KFSQ.js";import{e as F,h as V,j as B}from"./chunk.LXFL2C62.js";import{c as N}from"./chunk.HBFU4EGB.js";import{a as A,b as m}from"./chunk.JMIUB3S3.js";import{e as k}from"./chunk.253H47GA.js";import{d as P}from"./chunk.EWT2PBEP.js";import{d as w}from"./chunk.L7BSLZCB.js";import{a as T}from"./chunk.ZY3ETQ3D.js";import{a as p}from"./chunk.NVUMRW44.js";import{a as y,b as S,d as D}from"./chunk.UVXKHQQZ.js";import{a as L,e as C}from"./chunk.TPXXHX5J.js";import{m as M}from"./chunk.HZUQXCOQ.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,d as a}from"./chunk.M3QDAYD2.js";var l=`${S}menu`,H={POPUP:"forge-menu__popup",MENU:"mdc-menu"},K={TOGGLE:`.${l}__toggle,[${l}-toggle],forge-button,forge-icon-button,forge-fab,button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},G={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},U={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},R={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:H,selectors:K,attributes:G,events:U,numbers:R};var u=class extends T{constructor(e){super(e);this._childMenus=new Map}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){this._targetElement&&(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new V(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){this._targetElement&&(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,E=>{E.stopPropagation(),r(b(c({},E.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(A.elementName)):[]}};var h=class extends B{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=D;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){this._adapter.hasTargetElement()&&(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){this._adapter.hasTargetElement()&&(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){this._adapter.hasTargetElement()&&(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return F(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Tab":this._open&&this._selectActiveOption();break;case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=!!e,this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var $="<template><slot></slot></template>",z=":host{display:-webkit-inline-box;display:inline-flex}:host([hidden]){display:none}",s=class extends x{constructor(){super();w.define(P),this._foundation=new h(new u(this)),C(this,$,z)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([y({name:i.elementName,dependencies:[k,N]})],s);function Ye(){L(s)}export{i as a,u as b,h as c,s as d,Ye as e};
7
+ //# sourceMappingURL=chunk.H6AG3EFX.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as L,b as i,c as g,f as v}from"./chunk.74JHE77R.js";import{a as f}from"./chunk.ZY3ETQ3D.js";import{a as r}from"./chunk.NVUMRW44.js";import{a as _}from"./chunk.RRNSZCVJ.js";import{a as h,e as m,k as I}from"./chunk.TPXXHX5J.js";import{k as l,n as b}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var d=class extends f{constructor(t){super(t)}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","list")}focusNextListItem(){let t=this._getFocusableListItems();if(t.length){let e=t.findIndex(s=>s.matches(":focus")),n=e<t.length-1?e+1:0;n<=t.length-1&&t[n].focus({preventScroll:!0})}}focusPreviousListItem(){let t=this._getFocusableListItems();if(t.length){let e=t.findIndex(s=>s.matches(":focus")),n=e>0?e-1:t.length-1;n>=0&&t[n].focus({preventScroll:!0})}}focusFirstListItem(){let t=this._getFocusableListItems();t.length&&t[0].focus({preventScroll:!0})}focusLastListItem(){let t=this._getFocusableListItems();t.length&&t[t.length-1].focus({preventScroll:!0})}setSelectedListItems(t){let e=this._getListItems();if(e.length){let n=Array.isArray(t)?t:[t];for(let s of e)s.selected=n.some(c=>b(c,s.value))}}updateListItems(t){this._getListItems().forEach(t)}updateListItemRole(){var e;let t=(e=g[this._component.getAttribute("role")])!=null?e:"listitem";this.updateListItems(n=>n.role=t)}_getListItems(){return Array.from(this._component.querySelectorAll(L.elementName)).filter(e=>e.closest(i.elementName)===this._component)}_getFocusableListItems(){return this._getListItems().filter(t=>!t.disabled&&!t.nonInteractive&&!t.hidden)}};var p=class{constructor(t){this._adapter=t;this._nonInteractive=!1;this._disabled=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._twoLine=!1;this._threeLine=!1;this._wrap=!1;this._keydownListener=this._onKeydown.bind(this)}initialize(){this._adapter.initialize(),this._nonInteractive||this._adapter.addHostListener("keydown",this._keydownListener),this._selectedValue!==void 0&&this._selectedValue!==null&&this._adapter.setSelectedListItems(this._selectedValue)}_onKeydown(t){let{key:e,altKey:n,ctrlKey:s,shiftKey:c,metaKey:E}=t;n||s||c||E||(e==="Home"?(t.preventDefault(),this._adapter.focusFirstListItem()):e==="End"?(t.preventDefault(),this._adapter.focusLastListItem()):e==="ArrowUp"?(t.preventDefault(),this._adapter.focusPreviousListItem()):e==="ArrowDown"&&(t.preventDefault(),this._adapter.focusNextListItem()))}updateRole(){this._adapter.updateListItemRole()}get static(){return this.nonInteractive}set static(t){this.nonInteractive=t}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){this._nonInteractive!==t&&(this._nonInteractive=t,this._adapter.toggleHostListener("keydown",this._keydownListener,!this._nonInteractive),this._adapter.updateListItems(e=>e.nonInteractive=this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.STATIC,this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.NON_INTERACTIVE,this._nonInteractive))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.updateListItems(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.updateListItems(e=>e.dense=this._dense),this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(t){this._propagateClick!==t&&(this._propagateClick=t,this._adapter.updateListItems(e=>e.propagateClick=this._propagateClick),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,this._propagateClick?"true":"false"))}get indented(){return this._indented}set indented(t){this._indented!==t&&(this._indented=t,this._adapter.updateListItems(e=>e.indented=this._indented),this._adapter.toggleHostAttribute(i.attributes.INDENTED,this._indented))}get selectedValue(){return this._selectedValue}set selectedValue(t){this._selectedValue!==t&&(this._selectedValue=t,this._adapter.setSelectedListItems(this._selectedValue))}get twoLine(){return this._twoLine}set twoLine(t){this._twoLine!==t&&(this._twoLine=t,this._adapter.updateListItems(e=>e.twoLine=this._twoLine),this._adapter.toggleHostAttribute(i.attributes.TWO_LINE,this._twoLine))}get threeLine(){return this._threeLine}set threeLine(t){this._threeLine!==t&&(this._threeLine=t,this._adapter.updateListItems(e=>e.threeLine=this._threeLine),this._adapter.toggleHostAttribute(i.attributes.THREE_LINE,this._threeLine))}get wrap(){return this._wrap}set wrap(t){this._wrap!==t&&(this._wrap=t,this._adapter.updateListItems(e=>e.wrap=this._wrap),this._adapter.toggleHostAttribute(i.attributes.WRAP,this._wrap))}};var k='<template><div class="forge-list" part="root"><slot></slot></div></template>',A=":host{display:block}:host([hidden]){display:none}:host([navlist]){--forge-list-item-height:40px;--forge-list-item-margin:4px 8px;--forge-list-item-padding:0 8px;--forge-list-item-shape:4px;--forge-list-item-supporting-text-font-size:0.875rem;--forge-list-item-supporting-text-font-weight:500}.forge-list{--_list-container-color:var(--forge-list-container-color, transparent);--_list-block-padding:var(--forge-list-block-padding, 8px);--_list-inline-padding:var(--forge-list-inline-padding, 0)}.forge-list{display:block;outline:0;background-color:var(--_list-container-color);padding:var(--_list-block-padding) var(--_list-inline-padding);margin:0;border-radius:inherit;min-width:inherit}",o=class extends I{constructor(){super();m(this,k,A),this._foundation=new p(new d(this))}static get observedAttributes(){return[i.attributes.ROLE,i.attributes.STATIC,i.attributes.NON_INTERACTIVE,i.attributes.DISABLED,i.attributes.DENSE,i.attributes.PROPAGATE_CLICK,i.attributes.SELECTED_VALUE,i.attributes.INDENTED,i.attributes.TWO_LINE,i.attributes.THREE_LINE,i.attributes.WRAP]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(e,n,s){switch(e){case i.attributes.ROLE:this._foundation.updateRole();break;case i.attributes.STATIC:case i.attributes.NON_INTERACTIVE:this.nonInteractive=l(s);break;case i.attributes.DISABLED:this.disabled=l(s);break;case i.attributes.DENSE:this.dense=l(s);break;case i.attributes.PROPAGATE_CLICK:this.propagateClick=l(s);break;case i.attributes.INDENTED:this.indented=l(s);break;case i.attributes.SELECTED_VALUE:this.selectedValue=s;break;case i.attributes.TWO_LINE:this.twoLine=l(s);break;case i.attributes.THREE_LINE:this.threeLine=l(s);break;case i.attributes.WRAP:this.wrap=l(s);break}}};a([r()],o.prototype,"static",2),a([r()],o.prototype,"nonInteractive",2),a([r()],o.prototype,"disabled",2),a([r()],o.prototype,"dense",2),a([r()],o.prototype,"propagateClick",2),a([r()],o.prototype,"indented",2),a([r()],o.prototype,"selectedValue",2),a([r()],o.prototype,"twoLine",2),a([r()],o.prototype,"threeLine",2),a([r()],o.prototype,"wrap",2),o=a([_({name:i.elementName,dependencies:[v]})],o);function G(){h(o)}export{d as a,p as b,o as c,G as d};
7
- //# sourceMappingURL=chunk.5WVOPPBY.js.map
6
+ import{a as L,b as i,c as g,f as v}from"./chunk.JMIUB3S3.js";import{a as f}from"./chunk.ZY3ETQ3D.js";import{a as r}from"./chunk.NVUMRW44.js";import{a as _}from"./chunk.UVXKHQQZ.js";import{a as h,e as m,k as I}from"./chunk.TPXXHX5J.js";import{k as l,n as b}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var d=class extends f{constructor(t){super(t)}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","list")}focusNextListItem(){let t=this._getFocusableListItems();if(t.length){let e=t.findIndex(s=>s.matches(":focus")),n=e<t.length-1?e+1:0;n<=t.length-1&&t[n].focus({preventScroll:!0})}}focusPreviousListItem(){let t=this._getFocusableListItems();if(t.length){let e=t.findIndex(s=>s.matches(":focus")),n=e>0?e-1:t.length-1;n>=0&&t[n].focus({preventScroll:!0})}}focusFirstListItem(){let t=this._getFocusableListItems();t.length&&t[0].focus({preventScroll:!0})}focusLastListItem(){let t=this._getFocusableListItems();t.length&&t[t.length-1].focus({preventScroll:!0})}setSelectedListItems(t){let e=this._getListItems();if(e.length){let n=Array.isArray(t)?t:[t];for(let s of e)s.selected=n.some(c=>b(c,s.value))}}updateListItems(t){this._getListItems().forEach(t)}updateListItemRole(){var e;let t=(e=g[this._component.getAttribute("role")])!=null?e:"listitem";this.updateListItems(n=>n.role=t)}_getListItems(){return Array.from(this._component.querySelectorAll(L.elementName)).filter(e=>e.closest(i.elementName)===this._component)}_getFocusableListItems(){return this._getListItems().filter(t=>!t.disabled&&!t.nonInteractive&&!t.hidden)}};var p=class{constructor(t){this._adapter=t;this._nonInteractive=!1;this._disabled=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._twoLine=!1;this._threeLine=!1;this._wrap=!1;this._keydownListener=this._onKeydown.bind(this)}initialize(){this._adapter.initialize(),this._nonInteractive||this._adapter.addHostListener("keydown",this._keydownListener),this._selectedValue!==void 0&&this._selectedValue!==null&&this._adapter.setSelectedListItems(this._selectedValue)}_onKeydown(t){let{key:e,altKey:n,ctrlKey:s,shiftKey:c,metaKey:E}=t;n||s||c||E||(e==="Home"?(t.preventDefault(),this._adapter.focusFirstListItem()):e==="End"?(t.preventDefault(),this._adapter.focusLastListItem()):e==="ArrowUp"?(t.preventDefault(),this._adapter.focusPreviousListItem()):e==="ArrowDown"&&(t.preventDefault(),this._adapter.focusNextListItem()))}updateRole(){this._adapter.updateListItemRole()}get static(){return this.nonInteractive}set static(t){this.nonInteractive=t}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){this._nonInteractive!==t&&(this._nonInteractive=t,this._adapter.toggleHostListener("keydown",this._keydownListener,!this._nonInteractive),this._adapter.updateListItems(e=>e.nonInteractive=this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.STATIC,this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.NON_INTERACTIVE,this._nonInteractive))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.updateListItems(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.updateListItems(e=>e.dense=this._dense),this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(t){this._propagateClick!==t&&(this._propagateClick=t,this._adapter.updateListItems(e=>e.propagateClick=this._propagateClick),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,this._propagateClick?"true":"false"))}get indented(){return this._indented}set indented(t){this._indented!==t&&(this._indented=t,this._adapter.updateListItems(e=>e.indented=this._indented),this._adapter.toggleHostAttribute(i.attributes.INDENTED,this._indented))}get selectedValue(){return this._selectedValue}set selectedValue(t){this._selectedValue!==t&&(this._selectedValue=t,this._adapter.setSelectedListItems(this._selectedValue))}get twoLine(){return this._twoLine}set twoLine(t){this._twoLine!==t&&(this._twoLine=t,this._adapter.updateListItems(e=>e.twoLine=this._twoLine),this._adapter.toggleHostAttribute(i.attributes.TWO_LINE,this._twoLine))}get threeLine(){return this._threeLine}set threeLine(t){this._threeLine!==t&&(this._threeLine=t,this._adapter.updateListItems(e=>e.threeLine=this._threeLine),this._adapter.toggleHostAttribute(i.attributes.THREE_LINE,this._threeLine))}get wrap(){return this._wrap}set wrap(t){this._wrap!==t&&(this._wrap=t,this._adapter.updateListItems(e=>e.wrap=this._wrap),this._adapter.toggleHostAttribute(i.attributes.WRAP,this._wrap))}};var k='<template><div class="forge-list" part="root"><slot></slot></div></template>',A=":host{display:block}:host([hidden]){display:none}:host([navlist]){--forge-list-item-height:40px;--forge-list-item-margin:4px 8px;--forge-list-item-padding:0 8px;--forge-list-item-shape:4px;--forge-list-item-supporting-text-font-size:0.875rem;--forge-list-item-supporting-text-font-weight:500}.forge-list{--_list-container-color:var(--forge-list-container-color, transparent);--_list-block-padding:var(--forge-list-block-padding, 8px);--_list-inline-padding:var(--forge-list-inline-padding, 0)}.forge-list{display:block;outline:0;background-color:var(--_list-container-color);padding:var(--_list-block-padding) var(--_list-inline-padding);margin:0;border-radius:inherit;min-width:inherit}",o=class extends I{constructor(){super();m(this,k,A),this._foundation=new p(new d(this))}static get observedAttributes(){return[i.attributes.ROLE,i.attributes.STATIC,i.attributes.NON_INTERACTIVE,i.attributes.DISABLED,i.attributes.DENSE,i.attributes.PROPAGATE_CLICK,i.attributes.SELECTED_VALUE,i.attributes.INDENTED,i.attributes.TWO_LINE,i.attributes.THREE_LINE,i.attributes.WRAP]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(e,n,s){switch(e){case i.attributes.ROLE:this._foundation.updateRole();break;case i.attributes.STATIC:case i.attributes.NON_INTERACTIVE:this.nonInteractive=l(s);break;case i.attributes.DISABLED:this.disabled=l(s);break;case i.attributes.DENSE:this.dense=l(s);break;case i.attributes.PROPAGATE_CLICK:this.propagateClick=l(s);break;case i.attributes.INDENTED:this.indented=l(s);break;case i.attributes.SELECTED_VALUE:this.selectedValue=s;break;case i.attributes.TWO_LINE:this.twoLine=l(s);break;case i.attributes.THREE_LINE:this.threeLine=l(s);break;case i.attributes.WRAP:this.wrap=l(s);break}}};a([r()],o.prototype,"static",2),a([r()],o.prototype,"nonInteractive",2),a([r()],o.prototype,"disabled",2),a([r()],o.prototype,"dense",2),a([r()],o.prototype,"propagateClick",2),a([r()],o.prototype,"indented",2),a([r()],o.prototype,"selectedValue",2),a([r()],o.prototype,"twoLine",2),a([r()],o.prototype,"threeLine",2),a([r()],o.prototype,"wrap",2),o=a([_({name:i.elementName,dependencies:[v]})],o);function G(){h(o)}export{d as a,p as b,o as c,G as d};
7
+ //# sourceMappingURL=chunk.HBFU4EGB.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as n,b as r}from"./chunk.RRNSZCVJ.js";import{a as o,e as m,k as p}from"./chunk.TPXXHX5J.js";import{d as t}from"./chunk.M3QDAYD2.js";var s=`${r}view`,a={elementName:s};var i="<template><slot></slot></template>",l=":host{display:block}:host([hidden]){display:none}",e=class extends p{constructor(){super(),m(this,i,l)}};e=t([n({name:a.elementName})],e);function u(){o(e)}export{a,e as b,u as c};
7
- //# sourceMappingURL=chunk.RFKKHN7V.js.map
6
+ import{a as n,b as r}from"./chunk.UVXKHQQZ.js";import{a as o,e as m,k as p}from"./chunk.TPXXHX5J.js";import{d as t}from"./chunk.M3QDAYD2.js";var s=`${r}view`,a={elementName:s};var i="<template><slot></slot></template>",l=":host{display:block}:host([hidden]){display:none}",e=class extends p{constructor(){super(),m(this,i,l)}};e=t([n({name:a.elementName})],e);function u(){o(e)}export{a,e as b,u as c};
7
+ //# sourceMappingURL=chunk.HP4333ZN.js.map