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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/custom-elements.json +7530 -4847
  2. package/dist/button/forge-button.css +1 -1
  3. package/dist/esm/accordion/index.js +1 -1
  4. package/dist/esm/app-bar/help-button/index.js +1 -1
  5. package/dist/esm/app-bar/index.js +1 -1
  6. package/dist/esm/app-bar/menu-button/index.js +1 -1
  7. package/dist/esm/app-bar/notification-button/index.js +1 -1
  8. package/dist/esm/app-bar/profile-button/index.js +1 -1
  9. package/dist/esm/app-bar/search/index.js +1 -1
  10. package/dist/esm/autocomplete/index.js +1 -1
  11. package/dist/esm/banner/index.js +1 -1
  12. package/dist/esm/bottom-sheet/index.js +1 -1
  13. package/dist/esm/busy-indicator/index.js +1 -1
  14. package/dist/esm/button/index.js +1 -1
  15. package/dist/esm/button-toggle/button-toggle/index.js +1 -1
  16. package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
  17. package/dist/esm/button-toggle/index.js +1 -1
  18. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  19. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  20. package/dist/esm/calendar/index.js +1 -1
  21. package/dist/esm/card/index.js +1 -1
  22. package/dist/esm/checkbox/index.js +1 -1
  23. package/dist/esm/chip-field/index.js +1 -1
  24. package/dist/esm/chips/chip/index.js +1 -1
  25. package/dist/esm/chips/chip-set/index.js +1 -1
  26. package/dist/esm/chips/index.js +1 -1
  27. package/dist/esm/chunks/{chunk.PPPTT3SM.js → chunk.2VP57RZO.js} +2 -2
  28. package/dist/esm/chunks/{chunk.PPPTT3SM.js.map → chunk.2VP57RZO.js.map} +2 -2
  29. package/dist/esm/chunks/{chunk.TXFYS6EU.js → chunk.33EJTOVA.js} +2 -2
  30. package/dist/esm/chunks/{chunk.OTVT3XM2.js → chunk.3JDFBEF7.js} +2 -2
  31. package/dist/esm/chunks/chunk.3ME47JIX.js +7 -0
  32. package/dist/esm/chunks/chunk.3ME47JIX.js.map +7 -0
  33. package/dist/esm/chunks/{chunk.V6JVHYVW.js → chunk.44UCSD46.js} +2 -2
  34. package/dist/esm/chunks/{chunk.EUE3OVC7.js → chunk.4WVHON6T.js} +2 -2
  35. package/dist/esm/chunks/chunk.4WVHON6T.js.map +7 -0
  36. package/dist/esm/chunks/{chunk.6SBTLXLH.js → chunk.5IQGVS6U.js} +2 -2
  37. package/dist/esm/chunks/{chunk.6SBTLXLH.js.map → chunk.5IQGVS6U.js.map} +1 -1
  38. package/dist/esm/chunks/{chunk.7JQHQKXN.js → chunk.6MPXRRMB.js} +2 -2
  39. package/dist/esm/chunks/{chunk.MXNLCQRB.js → chunk.6VDF54LZ.js} +2 -2
  40. package/dist/esm/chunks/{chunk.GF2GUVYS.js → chunk.7TGGJGTG.js} +2 -2
  41. package/dist/esm/chunks/{chunk.GF2GUVYS.js.map → chunk.7TGGJGTG.js.map} +1 -1
  42. package/dist/esm/chunks/{chunk.4EB5NVCK.js → chunk.AHHNJSZK.js} +2 -2
  43. package/dist/esm/chunks/chunk.BBKRPL6R.js +7 -0
  44. package/dist/esm/chunks/chunk.BBKRPL6R.js.map +7 -0
  45. package/dist/esm/chunks/{chunk.BSTIDYQJ.js → chunk.BBWMSCVG.js} +2 -2
  46. package/dist/esm/chunks/{chunk.BKCEVPKW.js → chunk.BDCJIRNK.js} +2 -2
  47. package/dist/esm/chunks/chunk.BSVFCJCQ.js +7 -0
  48. package/dist/esm/chunks/chunk.BSVFCJCQ.js.map +7 -0
  49. package/dist/esm/chunks/chunk.CAUWWFF4.js +7 -0
  50. package/dist/esm/chunks/chunk.CAUWWFF4.js.map +7 -0
  51. package/dist/esm/chunks/{chunk.SYZB7B4F.js → chunk.CL65KLH7.js} +2 -2
  52. package/dist/esm/chunks/{chunk.4LVS2EYJ.js → chunk.DFGBVJBE.js} +2 -2
  53. package/dist/esm/chunks/chunk.DXZ5LVFJ.js +7 -0
  54. package/dist/esm/chunks/chunk.DXZ5LVFJ.js.map +7 -0
  55. package/dist/esm/chunks/{chunk.YUAU5IWT.js → chunk.F776DWXU.js} +2 -2
  56. package/dist/esm/chunks/{chunk.HKJEGD6C.js → chunk.FIBGOPNP.js} +2 -2
  57. package/dist/esm/chunks/{chunk.HKJEGD6C.js.map → chunk.FIBGOPNP.js.map} +1 -1
  58. package/dist/esm/chunks/{chunk.OHNPVHPF.js → chunk.GEGK55XX.js} +2 -2
  59. package/dist/esm/chunks/{chunk.OHNPVHPF.js.map → chunk.GEGK55XX.js.map} +2 -2
  60. package/dist/esm/chunks/{chunk.2QFIMTVP.js → chunk.GT3XBPZY.js} +2 -2
  61. package/dist/esm/chunks/{chunk.OT6H5NHX.js → chunk.HUGRRRQA.js} +2 -2
  62. package/dist/esm/chunks/{chunk.GJW4WS4I.js → chunk.HXJCTE47.js} +2 -2
  63. package/dist/esm/chunks/{chunk.RHYRMQS7.js → chunk.IPGZ24EH.js} +2 -2
  64. package/dist/esm/chunks/{chunk.RHYRMQS7.js.map → chunk.IPGZ24EH.js.map} +1 -1
  65. package/dist/esm/chunks/chunk.ISC7SZSP.js +7 -0
  66. package/dist/esm/chunks/chunk.ISC7SZSP.js.map +7 -0
  67. package/dist/esm/chunks/{chunk.RUSHOL23.js → chunk.JAAJDT5E.js} +2 -2
  68. package/dist/esm/chunks/{chunk.SIJGKRYS.js → chunk.JCRC2VEI.js} +2 -2
  69. package/dist/esm/chunks/{chunk.SIJGKRYS.js.map → chunk.JCRC2VEI.js.map} +1 -1
  70. package/dist/esm/chunks/{chunk.STGRPD2L.js → chunk.JFKSREWG.js} +2 -2
  71. package/dist/esm/chunks/{chunk.STGRPD2L.js.map → chunk.JFKSREWG.js.map} +1 -1
  72. package/dist/esm/chunks/{chunk.FAANPQES.js → chunk.JL4XB4RI.js} +2 -2
  73. package/dist/esm/chunks/{chunk.24L5GDD2.js → chunk.JTIPXKV6.js} +2 -2
  74. package/dist/esm/chunks/{chunk.24L5GDD2.js.map → chunk.JTIPXKV6.js.map} +2 -2
  75. package/dist/esm/chunks/chunk.KO45GDOA.js +7 -0
  76. package/dist/esm/chunks/{chunk.2CTK5R37.js.map → chunk.KO45GDOA.js.map} +2 -2
  77. package/dist/esm/chunks/chunk.KSCUIS5C.js +7 -0
  78. package/dist/esm/chunks/chunk.KSCUIS5C.js.map +7 -0
  79. package/dist/esm/chunks/{chunk.2LRDPTHK.js → chunk.M2M47T4L.js} +2 -2
  80. package/dist/esm/chunks/{chunk.JVW6JGV3.js → chunk.MGWY7YIL.js} +2 -2
  81. package/dist/esm/chunks/{chunk.JVW6JGV3.js.map → chunk.MGWY7YIL.js.map} +2 -2
  82. package/dist/esm/chunks/{chunk.3CBVRCKM.js → chunk.MJSLXZBM.js} +2 -2
  83. package/dist/esm/chunks/{chunk.3CBVRCKM.js.map → chunk.MJSLXZBM.js.map} +1 -1
  84. package/dist/esm/chunks/{chunk.2YAU7AXH.js → chunk.N7PQ2MUQ.js} +2 -2
  85. package/dist/esm/chunks/{chunk.2YAU7AXH.js.map → chunk.N7PQ2MUQ.js.map} +1 -1
  86. package/dist/esm/chunks/{chunk.XMFQFFKR.js → chunk.NE4NCRRZ.js} +2 -2
  87. package/dist/esm/chunks/chunk.NF4J3Q5X.js +7 -0
  88. package/dist/esm/chunks/chunk.NF4J3Q5X.js.map +7 -0
  89. package/dist/esm/chunks/chunk.OEYALYRM.js +7 -0
  90. package/dist/esm/chunks/chunk.OEYALYRM.js.map +7 -0
  91. package/dist/esm/chunks/{chunk.GHSAKRYH.js → chunk.OKKH7F7M.js} +2 -2
  92. package/dist/esm/chunks/{chunk.AGMPIMJV.js → chunk.QL45FKVJ.js} +2 -2
  93. package/dist/esm/chunks/{chunk.AGMPIMJV.js.map → chunk.QL45FKVJ.js.map} +2 -2
  94. package/dist/esm/chunks/chunk.QU76MOCS.js +12 -0
  95. package/dist/esm/chunks/chunk.QU76MOCS.js.map +7 -0
  96. package/dist/esm/chunks/{chunk.5PHLKON3.js → chunk.R5HZFOUK.js} +2 -2
  97. package/dist/esm/chunks/{chunk.5PHLKON3.js.map → chunk.R5HZFOUK.js.map} +2 -2
  98. package/dist/esm/chunks/chunk.SAXRW6GB.js +7 -0
  99. package/dist/esm/chunks/chunk.SAXRW6GB.js.map +7 -0
  100. package/dist/esm/chunks/{chunk.2IQGDFQS.js → chunk.SEP3L4QL.js} +2 -2
  101. package/dist/esm/chunks/{chunk.2IQGDFQS.js.map → chunk.SEP3L4QL.js.map} +1 -1
  102. package/dist/esm/chunks/{chunk.Z5TWWM7I.js → chunk.SN5LPTHH.js} +2 -2
  103. package/dist/esm/chunks/{chunk.Z5TWWM7I.js.map → chunk.SN5LPTHH.js.map} +1 -1
  104. package/dist/esm/chunks/{chunk.CNQESSA3.js → chunk.UKFJHDO7.js} +2 -2
  105. package/dist/esm/chunks/{chunk.IGK3VYZG.js → chunk.VI2GRQO3.js} +2 -2
  106. package/dist/esm/chunks/{chunk.A5MBSCSQ.js → chunk.VNOJO2PF.js} +2 -2
  107. package/dist/esm/chunks/chunk.W7PZTNZ4.js +7 -0
  108. package/dist/esm/chunks/chunk.W7PZTNZ4.js.map +7 -0
  109. package/dist/esm/chunks/chunk.WH6C36MO.js +7 -0
  110. package/dist/esm/chunks/chunk.WH6C36MO.js.map +7 -0
  111. package/dist/esm/chunks/{chunk.2YX7ASSX.js → chunk.WXN4S7CN.js} +2 -2
  112. package/dist/esm/chunks/{chunk.ER52NFXX.js → chunk.X5BG35YX.js} +2 -2
  113. package/dist/esm/chunks/{chunk.THPU5KBV.js → chunk.XRESQBNE.js} +2 -2
  114. package/dist/esm/chunks/{chunk.632OMHHN.js → chunk.YDY2IGBF.js} +2 -2
  115. package/dist/esm/chunks/{chunk.632OMHHN.js.map → chunk.YDY2IGBF.js.map} +1 -1
  116. package/dist/esm/chunks/{chunk.QYKO543K.js → chunk.YWCLKUK7.js} +2 -2
  117. package/dist/esm/chunks/{chunk.QA3NU7EN.js → chunk.Z4J4D5FD.js} +2 -2
  118. package/dist/esm/chunks/{chunk.QA3NU7EN.js.map → chunk.Z4J4D5FD.js.map} +1 -1
  119. package/dist/esm/chunks/{chunk.V4RBOYNH.js → chunk.ZTGPXIC2.js} +2 -2
  120. package/dist/esm/chunks/{chunk.V4RBOYNH.js.map → chunk.ZTGPXIC2.js.map} +1 -1
  121. package/dist/esm/circular-progress/index.js +1 -1
  122. package/dist/esm/color-picker/index.js +1 -1
  123. package/dist/esm/core/index.js +1 -1
  124. package/dist/esm/core/utils/index.js +1 -1
  125. package/dist/esm/date-picker/index.js +1 -1
  126. package/dist/esm/date-range-picker/index.js +1 -1
  127. package/dist/esm/expansion-panel/index.js +1 -1
  128. package/dist/esm/file-picker/index.js +1 -1
  129. package/dist/esm/focus-indicator/index.js +7 -0
  130. package/dist/esm/focus-indicator/index.js.map +7 -0
  131. package/dist/esm/icon/index.js +1 -1
  132. package/dist/esm/icon-button/index.js +1 -1
  133. package/dist/esm/index.js +1 -1
  134. package/dist/esm/list/index.js +1 -1
  135. package/dist/esm/list/list/index.js +1 -1
  136. package/dist/esm/list/list-item/index.js +1 -1
  137. package/dist/esm/list-dropdown/index.js +1 -1
  138. package/dist/esm/menu/index.js +1 -1
  139. package/dist/esm/open-icon/index.js +1 -1
  140. package/dist/esm/paginator/index.js +1 -1
  141. package/dist/esm/profile-card/index.js +1 -1
  142. package/dist/esm/quantity-field/index.js +1 -1
  143. package/dist/esm/radio/index.js +1 -1
  144. package/dist/esm/select/core/index.js +1 -1
  145. package/dist/esm/select/index.js +1 -1
  146. package/dist/esm/select/select/index.js +1 -1
  147. package/dist/esm/select/select-dropdown/index.js +1 -1
  148. package/dist/esm/slider/index.js +1 -1
  149. package/dist/esm/split-view/index.js +1 -1
  150. package/dist/esm/split-view/split-view/index.js +1 -1
  151. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  152. package/dist/esm/state-layer/index.js +7 -0
  153. package/dist/esm/state-layer/index.js.map +7 -0
  154. package/dist/esm/stepper/index.js +1 -1
  155. package/dist/esm/stepper/step/index.js +1 -1
  156. package/dist/esm/stepper/stepper/index.js +1 -1
  157. package/dist/esm/switch/index.js +1 -1
  158. package/dist/esm/table/index.js +1 -1
  159. package/dist/esm/tabs/index.js +1 -1
  160. package/dist/esm/tabs/tab/index.js +1 -1
  161. package/dist/esm/tabs/tab-bar/index.js +1 -1
  162. package/dist/esm/text-field/index.js +1 -1
  163. package/dist/esm/time-picker/index.js +1 -1
  164. package/dist/esm/toast/index.js +1 -1
  165. package/dist/forge-dark.css +1 -1
  166. package/dist/forge.css +1 -1
  167. package/dist/icon-button/forge-icon-button.css +1 -1
  168. package/dist/table/forge-table.css +1 -1
  169. package/dist/theme/forge-theme.css +1 -1
  170. package/esm/app-bar/app-bar.js +1 -1
  171. package/esm/banner/banner.js +1 -1
  172. package/esm/bottom-sheet/bottom-sheet.js +1 -1
  173. package/esm/busy-indicator/busy-indicator.js +1 -1
  174. package/esm/button/button.d.ts +1 -0
  175. package/esm/button/button.js +8 -2
  176. package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
  177. package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
  178. package/esm/calendar/calendar.js +1 -1
  179. package/esm/card/card-constants.d.ts +2 -2
  180. package/esm/card/card-constants.js +2 -2
  181. package/esm/card/card.d.ts +19 -8
  182. package/esm/card/card.js +30 -21
  183. package/esm/checkbox/checkbox-adapter.d.ts +1 -0
  184. package/esm/checkbox/checkbox-adapter.js +9 -2
  185. package/esm/checkbox/checkbox.js +1 -1
  186. package/esm/chip-field/chip-field.js +1 -1
  187. package/esm/chips/chip/chip.js +1 -1
  188. package/esm/circular-progress/circular-progress.d.ts +3 -3
  189. package/esm/circular-progress/circular-progress.js +4 -4
  190. package/esm/color-picker/color-picker.js +1 -1
  191. package/esm/core/testing/pointer.d.ts +13 -0
  192. package/esm/core/testing/pointer.js +42 -0
  193. package/esm/core/utils/utils.d.ts +16 -2
  194. package/esm/core/utils/utils.js +47 -6
  195. package/esm/file-picker/file-picker.js +1 -1
  196. package/esm/focus-indicator/focus-indicator-adapter.d.ts +29 -0
  197. package/esm/focus-indicator/focus-indicator-adapter.js +39 -0
  198. package/esm/focus-indicator/focus-indicator-constants.d.ts +15 -0
  199. package/esm/focus-indicator/focus-indicator-constants.js +19 -0
  200. package/esm/focus-indicator/focus-indicator-foundation.d.ts +43 -0
  201. package/esm/focus-indicator/focus-indicator-foundation.js +110 -0
  202. package/esm/focus-indicator/focus-indicator.d.ts +67 -0
  203. package/esm/focus-indicator/focus-indicator.js +112 -0
  204. package/esm/focus-indicator/index.d.ts +10 -0
  205. package/esm/focus-indicator/index.js +14 -0
  206. package/esm/icon-button/icon-button.d.ts +1 -0
  207. package/esm/icon-button/icon-button.js +9 -2
  208. package/esm/index.d.ts +2 -0
  209. package/esm/index.js +6 -0
  210. package/esm/list/list-item/list-item-adapter.d.ts +3 -3
  211. package/esm/list/list-item/list-item-adapter.js +2 -2
  212. package/esm/list/list-item/list-item-foundation.d.ts +1 -0
  213. package/esm/list/list-item/list-item-foundation.js +8 -1
  214. package/esm/list/list-item/list-item.js +1 -1
  215. package/esm/paginator/paginator.js +1 -1
  216. package/esm/profile-card/profile-card.js +1 -1
  217. package/esm/radio/radio-adapter.d.ts +1 -0
  218. package/esm/radio/radio-adapter.js +9 -2
  219. package/esm/select/select/select.js +1 -1
  220. package/esm/slider/slider-adapter.d.ts +0 -16
  221. package/esm/slider/slider-adapter.js +11 -71
  222. package/esm/slider/slider-constants.d.ts +0 -3
  223. package/esm/slider/slider-constants.js +0 -3
  224. package/esm/slider/slider-foundation.d.ts +0 -1
  225. package/esm/slider/slider-foundation.js +0 -6
  226. package/esm/slider/slider-utils.js +6 -3
  227. package/esm/slider/slider.d.ts +0 -2
  228. package/esm/slider/slider.js +9 -7
  229. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  230. package/esm/state-layer/index.d.ts +10 -0
  231. package/esm/state-layer/index.js +14 -0
  232. package/esm/state-layer/state-layer-adapter.d.ts +41 -0
  233. package/esm/state-layer/state-layer-adapter.js +101 -0
  234. package/esm/state-layer/state-layer-constants.d.ts +79 -0
  235. package/esm/state-layer/state-layer-constants.js +89 -0
  236. package/esm/state-layer/state-layer-foundation.d.ts +57 -0
  237. package/esm/state-layer/state-layer-foundation.js +237 -0
  238. package/esm/state-layer/state-layer-utils.d.ts +26 -0
  239. package/esm/state-layer/state-layer-utils.js +54 -0
  240. package/esm/state-layer/state-layer.d.ts +66 -0
  241. package/esm/state-layer/state-layer.js +96 -0
  242. package/esm/stepper/step/step.js +1 -1
  243. package/esm/switch/switch.js +10 -3
  244. package/esm/tabs/tab/tab-adapter.d.ts +4 -6
  245. package/esm/tabs/tab/tab-adapter.js +9 -18
  246. package/esm/tabs/tab/tab-constants.d.ts +0 -1
  247. package/esm/tabs/tab/tab-constants.js +0 -1
  248. package/esm/tabs/tab/tab-foundation.d.ts +0 -1
  249. package/esm/tabs/tab/tab-foundation.js +1 -3
  250. package/esm/tabs/tab/tab.d.ts +0 -1
  251. package/esm/tabs/tab/tab.js +9 -6
  252. package/esm/tabs/tab-bar/tab-bar.d.ts +2 -2
  253. package/esm/tabs/tab-bar/tab-bar.js +3 -3
  254. package/esm/text-field/text-field.js +1 -1
  255. package/esm/toast/toast.js +1 -1
  256. package/package.json +1 -1
  257. package/styles/app-bar/_mixins.scss +9 -1
  258. package/styles/card/_mixins.scss +8 -7
  259. package/styles/circular-progress/_mixins.scss +3 -10
  260. package/styles/core/{style-layer → styles}/circular-progress/_core.scss +5 -8
  261. package/styles/core/styles/focus-indicator/_core.scss +5 -0
  262. package/styles/core/styles/focus-indicator/_variables.scss +8 -0
  263. package/styles/core/styles/focus-indicator/index.scss +7 -0
  264. package/styles/core/{style-layer → styles}/slider/_core.scss +13 -31
  265. package/styles/core/styles/state-layer/_core.scss +144 -0
  266. package/styles/core/styles/state-layer/_variables.scss +8 -0
  267. package/styles/core/{style-layer/tabs/tab → styles/state-layer}/index.scss +0 -4
  268. package/styles/core/{style-layer → styles}/tabs/tab/_core.scss +36 -40
  269. package/styles/core/{style-layer → styles}/tabs/tab-bar/_core.scss +2 -2
  270. package/styles/core/{style-layer → styles}/tabs/tab-bar/_variables.scss +1 -1
  271. package/styles/core/styles/tabs/tab-bar/index.scss +7 -0
  272. package/styles/core/styles/tokens/_color-palette.scss +299 -0
  273. package/styles/core/styles/tokens/circular-progress/_tokens.scss +14 -0
  274. package/styles/core/styles/tokens/focus-indicator/_tokens.scss +24 -0
  275. package/styles/core/styles/tokens/index.scss +58 -0
  276. package/styles/core/styles/tokens/state-layer/_tokens.scss +17 -0
  277. package/styles/core/styles/tokens/theme/_tokens.scss +185 -0
  278. package/styles/core/styles/tokens/typography/_tokens.scss +47 -0
  279. package/styles/core/styles/utils/_elevation.scss +5 -0
  280. package/styles/focus-indicator/_mixins.scss +138 -0
  281. package/styles/focus-indicator/_variables.scss +5 -0
  282. package/styles/focus-indicator/focus-indicator.scss +32 -0
  283. package/styles/linear-progress/_mixins.scss +1 -1
  284. package/styles/linear-progress/_variables.scss +1 -1
  285. package/styles/slider/_mixins.scss +17 -1
  286. package/styles/state-layer/_mixins.scss +23 -0
  287. package/styles/state-layer/state-layer.scss +20 -0
  288. package/styles/tabs/tab/_mixins.scss +20 -1
  289. package/styles/tabs/tab/_variables.scss +2 -0
  290. package/styles/tabs/tab-bar/_mixins.scss +2 -1
  291. package/styles/tabs/tab-bar/_variables.scss +2 -2
  292. package/styles/theme/_theme-dark.scss +5 -3
  293. package/styles/theme/_theme.scss +3 -36
  294. package/dist/esm/chunks/chunk.246JM2YT.js +0 -7
  295. package/dist/esm/chunks/chunk.246JM2YT.js.map +0 -7
  296. package/dist/esm/chunks/chunk.2CTK5R37.js +0 -7
  297. package/dist/esm/chunks/chunk.2XFVFZ3P.js +0 -7
  298. package/dist/esm/chunks/chunk.2XFVFZ3P.js.map +0 -7
  299. package/dist/esm/chunks/chunk.5IVB5L5Z.js +0 -7
  300. package/dist/esm/chunks/chunk.5IVB5L5Z.js.map +0 -7
  301. package/dist/esm/chunks/chunk.A5R7KUIP.js +0 -7
  302. package/dist/esm/chunks/chunk.A5R7KUIP.js.map +0 -7
  303. package/dist/esm/chunks/chunk.BWZKQ6WX.js +0 -7
  304. package/dist/esm/chunks/chunk.BWZKQ6WX.js.map +0 -7
  305. package/dist/esm/chunks/chunk.EUE3OVC7.js.map +0 -7
  306. package/dist/esm/chunks/chunk.GUYPITGA.js +0 -7
  307. package/dist/esm/chunks/chunk.GUYPITGA.js.map +0 -7
  308. package/dist/esm/chunks/chunk.GWIVOPRO.js +0 -7
  309. package/dist/esm/chunks/chunk.GWIVOPRO.js.map +0 -7
  310. package/dist/esm/chunks/chunk.JHXNEHWR.js +0 -12
  311. package/dist/esm/chunks/chunk.JHXNEHWR.js.map +0 -7
  312. package/dist/esm/chunks/chunk.NVMILGC2.js +0 -7
  313. package/dist/esm/chunks/chunk.NVMILGC2.js.map +0 -7
  314. package/dist/esm/chunks/chunk.WFDIA7R6.js +0 -7
  315. package/dist/esm/chunks/chunk.WFDIA7R6.js.map +0 -7
  316. package/esm/slider/slider-handle-ripple.d.ts +0 -18
  317. package/esm/slider/slider-handle-ripple.js +0 -37
  318. package/esm/tabs/tab/tab-ripple.d.ts +0 -17
  319. package/esm/tabs/tab/tab-ripple.js +0 -33
  320. package/styles/circular-progress/_variables.scss +0 -12
  321. /package/dist/esm/chunks/{chunk.TXFYS6EU.js.map → chunk.33EJTOVA.js.map} +0 -0
  322. /package/dist/esm/chunks/{chunk.OTVT3XM2.js.map → chunk.3JDFBEF7.js.map} +0 -0
  323. /package/dist/esm/chunks/{chunk.V6JVHYVW.js.map → chunk.44UCSD46.js.map} +0 -0
  324. /package/dist/esm/chunks/{chunk.7JQHQKXN.js.map → chunk.6MPXRRMB.js.map} +0 -0
  325. /package/dist/esm/chunks/{chunk.MXNLCQRB.js.map → chunk.6VDF54LZ.js.map} +0 -0
  326. /package/dist/esm/chunks/{chunk.4EB5NVCK.js.map → chunk.AHHNJSZK.js.map} +0 -0
  327. /package/dist/esm/chunks/{chunk.BSTIDYQJ.js.map → chunk.BBWMSCVG.js.map} +0 -0
  328. /package/dist/esm/chunks/{chunk.BKCEVPKW.js.map → chunk.BDCJIRNK.js.map} +0 -0
  329. /package/dist/esm/chunks/{chunk.SYZB7B4F.js.map → chunk.CL65KLH7.js.map} +0 -0
  330. /package/dist/esm/chunks/{chunk.4LVS2EYJ.js.map → chunk.DFGBVJBE.js.map} +0 -0
  331. /package/dist/esm/chunks/{chunk.YUAU5IWT.js.map → chunk.F776DWXU.js.map} +0 -0
  332. /package/dist/esm/chunks/{chunk.2QFIMTVP.js.map → chunk.GT3XBPZY.js.map} +0 -0
  333. /package/dist/esm/chunks/{chunk.OT6H5NHX.js.map → chunk.HUGRRRQA.js.map} +0 -0
  334. /package/dist/esm/chunks/{chunk.GJW4WS4I.js.map → chunk.HXJCTE47.js.map} +0 -0
  335. /package/dist/esm/chunks/{chunk.RUSHOL23.js.map → chunk.JAAJDT5E.js.map} +0 -0
  336. /package/dist/esm/chunks/{chunk.FAANPQES.js.map → chunk.JL4XB4RI.js.map} +0 -0
  337. /package/dist/esm/chunks/{chunk.2LRDPTHK.js.map → chunk.M2M47T4L.js.map} +0 -0
  338. /package/dist/esm/chunks/{chunk.XMFQFFKR.js.map → chunk.NE4NCRRZ.js.map} +0 -0
  339. /package/dist/esm/chunks/{chunk.GHSAKRYH.js.map → chunk.OKKH7F7M.js.map} +0 -0
  340. /package/dist/esm/chunks/{chunk.CNQESSA3.js.map → chunk.UKFJHDO7.js.map} +0 -0
  341. /package/dist/esm/chunks/{chunk.IGK3VYZG.js.map → chunk.VI2GRQO3.js.map} +0 -0
  342. /package/dist/esm/chunks/{chunk.A5MBSCSQ.js.map → chunk.VNOJO2PF.js.map} +0 -0
  343. /package/dist/esm/chunks/{chunk.2YX7ASSX.js.map → chunk.WXN4S7CN.js.map} +0 -0
  344. /package/dist/esm/chunks/{chunk.ER52NFXX.js.map → chunk.X5BG35YX.js.map} +0 -0
  345. /package/dist/esm/chunks/{chunk.THPU5KBV.js.map → chunk.XRESQBNE.js.map} +0 -0
  346. /package/dist/esm/chunks/{chunk.QYKO543K.js.map → chunk.YWCLKUK7.js.map} +0 -0
  347. /package/styles/core/{style-layer → styles}/circular-progress/_animations.scss +0 -0
  348. /package/styles/core/{style-layer → styles}/circular-progress/_variables.scss +0 -0
  349. /package/styles/core/{style-layer → styles}/circular-progress/index.scss +0 -0
  350. /package/styles/core/{style-layer → styles}/core/_config.scss +0 -0
  351. /package/styles/core/{style-layer → styles}/linear-progress/_animations.scss +0 -0
  352. /package/styles/core/{style-layer → styles}/linear-progress/_core.scss +0 -0
  353. /package/styles/core/{style-layer → styles}/linear-progress/_variables.scss +0 -0
  354. /package/styles/core/{style-layer → styles}/linear-progress/index.scss +0 -0
  355. /package/styles/core/{style-layer → styles}/slider/_functions.scss +0 -0
  356. /package/styles/core/{style-layer → styles}/slider/_variables.scss +0 -0
  357. /package/styles/core/{style-layer → styles}/slider/index.scss +0 -0
  358. /package/styles/core/{style-layer → styles}/tabs/tab/_variables.scss +0 -0
  359. /package/styles/core/{style-layer/tabs/tab-bar → styles/tabs/tab}/index.scss +0 -0
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ export declare const STATE_LAYER_CONSTANTS: {
7
+ elementName: string;
8
+ attributes: {
9
+ TARGET: string;
10
+ DISABLED: string;
11
+ };
12
+ selectors: {
13
+ SURFACE: string;
14
+ };
15
+ classes: {
16
+ HOVERED: string;
17
+ PRESSED: string;
18
+ };
19
+ };
20
+ export declare class StateLayerCoords {
21
+ x: number;
22
+ y: number;
23
+ constructor(x: number, y: number);
24
+ static fromPointerEvent(event: PointerEvent): StateLayerCoords;
25
+ }
26
+ export declare const TOUCH_DELAY_MS = 150;
27
+ export declare const PRESS_GROW_MS = 450;
28
+ export declare const MINIMUM_PRESS_MS = 225;
29
+ export declare const INITIAL_ORIGIN_SCALE = 0.2;
30
+ export declare const PADDING = 10;
31
+ export declare const SOFT_EDGE_MINIMUM_SIZE = 75;
32
+ export declare const SOFT_EDGE_CONTAINER_RATIO = 0.35;
33
+ export declare const PRESS_PSEUDO = "::after";
34
+ export declare const ANIMATION_FILL = "forwards";
35
+ export declare const EASING = "cubic-bezier(0.2, 0, 0, 1)";
36
+ /**
37
+ * Interaction states for the state layer.
38
+ *
39
+ * On Touch:
40
+ * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
41
+ * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
42
+ *
43
+ * On Mouse or Pen:
44
+ * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
45
+ */
46
+ export declare enum PointerState {
47
+ /**
48
+ * Initial state of the control, no touch in progress.
49
+ *
50
+ * Transitions:
51
+ * - on touch down: transition to `TOUCH_DELAY`.
52
+ * - on mouse down: transition to `WAITING_FOR_CLICK`.
53
+ */
54
+ INACTIVE = 0,
55
+ /**
56
+ * Touch down has been received, waiting to determine if it's a swipe or
57
+ * scroll.
58
+ *
59
+ * Transitions:
60
+ * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
61
+ * - on cancel: transition to `INACTIVE`.
62
+ * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.
63
+ */
64
+ TOUCH_DELAY = 1,
65
+ /**
66
+ * A touch has been deemed to be a press
67
+ *
68
+ * Transitions:
69
+ * - on up: transition to `WAITING_FOR_CLICK`.
70
+ */
71
+ HOLDING = 2,
72
+ /**
73
+ * The user touch has finished, transition into rest state.
74
+ *
75
+ * Transitions:
76
+ * - on click end press; transition to `INACTIVE`.
77
+ */
78
+ WAITING_FOR_CLICK = 3
79
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { COMPONENT_NAME_PREFIX } from '../constants';
7
+ const elementName = `${COMPONENT_NAME_PREFIX}state-layer`;
8
+ const observedAttributes = {
9
+ TARGET: 'target',
10
+ DISABLED: 'disabled'
11
+ };
12
+ const attributes = Object.assign({}, observedAttributes);
13
+ const selectors = {
14
+ SURFACE: '.forge-state-layer'
15
+ };
16
+ const classes = {
17
+ HOVERED: 'forge-state-layer--hovered',
18
+ PRESSED: 'forge-state-layer--pressed'
19
+ };
20
+ export const STATE_LAYER_CONSTANTS = {
21
+ elementName,
22
+ attributes,
23
+ selectors,
24
+ classes
25
+ };
26
+ export class StateLayerCoords {
27
+ constructor(x, y) {
28
+ this.x = x;
29
+ this.y = y;
30
+ }
31
+ static fromPointerEvent(event) {
32
+ return new StateLayerCoords(event.pageX, event.pageY);
33
+ }
34
+ }
35
+ export const TOUCH_DELAY_MS = 150;
36
+ export const PRESS_GROW_MS = 450;
37
+ export const MINIMUM_PRESS_MS = 225;
38
+ export const INITIAL_ORIGIN_SCALE = 0.2;
39
+ export const PADDING = 10;
40
+ export const SOFT_EDGE_MINIMUM_SIZE = 75;
41
+ export const SOFT_EDGE_CONTAINER_RATIO = 0.35;
42
+ export const PRESS_PSEUDO = '::after';
43
+ export const ANIMATION_FILL = 'forwards';
44
+ export const EASING = 'cubic-bezier(0.2, 0, 0, 1)';
45
+ /**
46
+ * Interaction states for the state layer.
47
+ *
48
+ * On Touch:
49
+ * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
50
+ * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
51
+ *
52
+ * On Mouse or Pen:
53
+ * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
54
+ */
55
+ export var PointerState;
56
+ (function (PointerState) {
57
+ /**
58
+ * Initial state of the control, no touch in progress.
59
+ *
60
+ * Transitions:
61
+ * - on touch down: transition to `TOUCH_DELAY`.
62
+ * - on mouse down: transition to `WAITING_FOR_CLICK`.
63
+ */
64
+ PointerState[PointerState["INACTIVE"] = 0] = "INACTIVE";
65
+ /**
66
+ * Touch down has been received, waiting to determine if it's a swipe or
67
+ * scroll.
68
+ *
69
+ * Transitions:
70
+ * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
71
+ * - on cancel: transition to `INACTIVE`.
72
+ * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.
73
+ */
74
+ PointerState[PointerState["TOUCH_DELAY"] = 1] = "TOUCH_DELAY";
75
+ /**
76
+ * A touch has been deemed to be a press
77
+ *
78
+ * Transitions:
79
+ * - on up: transition to `WAITING_FOR_CLICK`.
80
+ */
81
+ PointerState[PointerState["HOLDING"] = 2] = "HOLDING";
82
+ /**
83
+ * The user touch has finished, transition into rest state.
84
+ *
85
+ * Transitions:
86
+ * - on click end press; transition to `INACTIVE`.
87
+ */
88
+ PointerState[PointerState["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK";
89
+ })(PointerState || (PointerState = {}));
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { ICustomElementFoundation } from '@tylertech/forge-core';
7
+ import { IStateLayerAdapter } from './state-layer-adapter';
8
+ import { StateLayerCoords } from './state-layer-constants';
9
+ export interface IStateLayerFoundation extends ICustomElementFoundation {
10
+ targetElement: HTMLElement | null;
11
+ target: string | null;
12
+ disabled: boolean;
13
+ playAnimation(coords?: StateLayerCoords): void;
14
+ }
15
+ export declare class StateLayerFoundation implements IStateLayerFoundation {
16
+ private _adapter;
17
+ private _target;
18
+ private _disabled;
19
+ private _attached;
20
+ private _deferred;
21
+ private _pointerStartEvent;
22
+ private _pointerState;
23
+ private _checkBoundsAfterContextMenu;
24
+ private _pointerEnterListener;
25
+ private _pointerLeaveListener;
26
+ private _pointerDownListener;
27
+ private _pointerUpListener;
28
+ private _pointerCancelListener;
29
+ private _clickListener;
30
+ private _contextmenuListener;
31
+ constructor(_adapter: IStateLayerAdapter);
32
+ initialize(): void;
33
+ disconnect(): void;
34
+ playAnimation(coords?: StateLayerCoords): void;
35
+ private _deferInitialization;
36
+ private _applyListeners;
37
+ private _removeListeners;
38
+ private _onDeferredInitialize;
39
+ private _onPointerEnter;
40
+ private _onPointerLeave;
41
+ private _onPointerDown;
42
+ private _onPointerUp;
43
+ private _onClick;
44
+ private _onPointerCancel;
45
+ private _onContextmenu;
46
+ private _startAnimation;
47
+ private _endAnimation;
48
+ private _canHandleEvent;
49
+ private _isTouch;
50
+ get isAttached(): boolean;
51
+ get targetElement(): HTMLElement | null;
52
+ set targetElement(el: HTMLElement | null);
53
+ get target(): string | null;
54
+ set target(value: string | null);
55
+ get disabled(): boolean;
56
+ set disabled(value: boolean);
57
+ }
@@ -0,0 +1,237 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { PointerState, StateLayerCoords, STATE_LAYER_CONSTANTS, TOUCH_DELAY_MS } from './state-layer-constants';
7
+ export class StateLayerFoundation {
8
+ constructor(_adapter) {
9
+ this._adapter = _adapter;
10
+ // State
11
+ this._target = null;
12
+ this._disabled = false;
13
+ this._attached = false;
14
+ this._deferred = true;
15
+ this._pointerState = PointerState.INACTIVE;
16
+ this._checkBoundsAfterContextMenu = false;
17
+ this._pointerEnterListener = (evt) => this._onPointerEnter(evt);
18
+ this._pointerLeaveListener = (evt) => this._onPointerLeave(evt);
19
+ this._pointerDownListener = (evt) => this._onPointerDown(evt);
20
+ this._pointerUpListener = (evt) => this._onPointerUp(evt);
21
+ this._pointerCancelListener = (evt) => this._onPointerCancel(evt);
22
+ this._clickListener = () => this._onClick();
23
+ this._contextmenuListener = () => this._onContextmenu();
24
+ }
25
+ initialize() {
26
+ this._adapter.trySetTarget(this._target);
27
+ // We defer initialization until the first pointerenter event is received.
28
+ //
29
+ // This is a performance optimization to avoid attaching many listeners to the target element
30
+ // until the user is first interacting with it.
31
+ this._deferInitialization();
32
+ }
33
+ disconnect() {
34
+ this._pointerStartEvent = undefined;
35
+ this._pointerState = PointerState.INACTIVE;
36
+ this._adapter.setHovered(false);
37
+ this._adapter.setPressed(false);
38
+ this._adapter.destroy();
39
+ this._removeListeners();
40
+ }
41
+ playAnimation(coords) {
42
+ this._adapter.startAnimation(coords);
43
+ this._endAnimation();
44
+ }
45
+ _deferInitialization() {
46
+ this._adapter.deferInitialization(this._onDeferredInitialize.bind(this));
47
+ }
48
+ _applyListeners() {
49
+ if (this._disabled) {
50
+ return;
51
+ }
52
+ this._adapter.addTargetListener('pointerenter', this._pointerEnterListener);
53
+ this._adapter.addTargetListener('pointerleave', this._pointerLeaveListener);
54
+ this._adapter.addTargetListener('pointerdown', this._pointerDownListener);
55
+ this._adapter.addTargetListener('pointerup', this._pointerUpListener);
56
+ this._adapter.addTargetListener('pointercancel', this._pointerCancelListener);
57
+ this._adapter.addTargetListener('click', this._clickListener);
58
+ this._adapter.addTargetListener('contextmenu', this._contextmenuListener);
59
+ this._attached = true;
60
+ }
61
+ _removeListeners() {
62
+ this._adapter.removeTargetListener('pointerenter', this._pointerEnterListener);
63
+ this._adapter.removeTargetListener('pointerleave', this._pointerLeaveListener);
64
+ this._adapter.removeTargetListener('pointerdown', this._pointerDownListener);
65
+ this._adapter.removeTargetListener('pointerup', this._pointerUpListener);
66
+ this._adapter.removeTargetListener('pointercancel', this._pointerCancelListener);
67
+ this._adapter.removeTargetListener('click', this._clickListener);
68
+ this._adapter.removeTargetListener('contextmenu', this._contextmenuListener);
69
+ this._attached = false;
70
+ }
71
+ _onDeferredInitialize(evt) {
72
+ this._applyListeners();
73
+ if ((evt === null || evt === void 0 ? void 0 : evt.type) === 'pointerenter') {
74
+ // Manually trigger the pointerenter listener since this is in response to a pointerenter event already
75
+ this._pointerEnterListener(evt);
76
+ }
77
+ this._deferred = false;
78
+ }
79
+ _onPointerEnter(evt) {
80
+ if (!this._canHandleEvent(evt)) {
81
+ return;
82
+ }
83
+ this._adapter.setHovered(true);
84
+ }
85
+ _onPointerLeave(evt) {
86
+ if (!this._canHandleEvent(evt)) {
87
+ return;
88
+ }
89
+ this._adapter.setHovered(false);
90
+ if (this._pointerState !== PointerState.INACTIVE) {
91
+ this._adapter.endAnimation();
92
+ }
93
+ }
94
+ async _onPointerDown(evt) {
95
+ this._pointerStartEvent = evt;
96
+ if (!this._canHandleEvent(evt)) {
97
+ return;
98
+ }
99
+ if (!this._isTouch(evt.pointerType)) {
100
+ this._pointerState = PointerState.WAITING_FOR_CLICK;
101
+ this._startAnimation(evt);
102
+ return;
103
+ }
104
+ // after a longpress contextmenu event, an extra `pointerdown` can be
105
+ // dispatched to the pressed element. Check that the down is within
106
+ // bounds of the element in this case.
107
+ if (this._checkBoundsAfterContextMenu && !this._adapter.inBounds(evt.x, evt.y)) {
108
+ return;
109
+ }
110
+ this._checkBoundsAfterContextMenu = false;
111
+ this._pointerState = PointerState.TOUCH_DELAY;
112
+ await new Promise(resolve => setTimeout(resolve, TOUCH_DELAY_MS));
113
+ if (this._pointerState !== PointerState.TOUCH_DELAY) {
114
+ return;
115
+ }
116
+ this._pointerState = PointerState.HOLDING;
117
+ this._startAnimation(evt);
118
+ }
119
+ _onPointerUp(evt) {
120
+ if (!this._canHandleEvent(evt)) {
121
+ return;
122
+ }
123
+ if (this._pointerState === PointerState.HOLDING) {
124
+ this._pointerState = PointerState.WAITING_FOR_CLICK;
125
+ return;
126
+ }
127
+ if (this._pointerState === PointerState.TOUCH_DELAY) {
128
+ this._pointerState = PointerState.WAITING_FOR_CLICK;
129
+ this._startAnimation(this._pointerStartEvent);
130
+ return;
131
+ }
132
+ }
133
+ _onClick() {
134
+ if (this._disabled) {
135
+ return;
136
+ }
137
+ if (this._pointerState === PointerState.WAITING_FOR_CLICK) {
138
+ this._endAnimation();
139
+ return;
140
+ }
141
+ if (this._pointerState === PointerState.INACTIVE) {
142
+ this._startAnimation(this._pointerStartEvent);
143
+ this._endAnimation();
144
+ }
145
+ }
146
+ _onPointerCancel(evt) {
147
+ if (!this._canHandleEvent(evt)) {
148
+ return;
149
+ }
150
+ this._endAnimation();
151
+ }
152
+ _onContextmenu() {
153
+ if (this._disabled) {
154
+ return;
155
+ }
156
+ this._checkBoundsAfterContextMenu = true;
157
+ this._adapter.endAnimation();
158
+ }
159
+ _startAnimation(evt) {
160
+ const coords = evt ? StateLayerCoords.fromPointerEvent(evt) : undefined;
161
+ this._adapter.startAnimation(coords);
162
+ }
163
+ _endAnimation() {
164
+ this._pointerState = PointerState.INACTIVE;
165
+ this._adapter.endAnimation();
166
+ this._pointerStartEvent = undefined;
167
+ }
168
+ _canHandleEvent({ type, isPrimary, buttons, pointerType, pointerId }) {
169
+ if (this._disabled || !isPrimary) {
170
+ return false;
171
+ }
172
+ if (this._pointerStartEvent && this._pointerStartEvent.pointerId !== pointerId) {
173
+ return false;
174
+ }
175
+ if (type === 'pointerenter' || type === 'pointerleave') {
176
+ return !this._isTouch(pointerType);
177
+ }
178
+ const isPrimaryButton = buttons === 1;
179
+ return this._isTouch(pointerType) || isPrimaryButton;
180
+ }
181
+ _isTouch(pointerType) {
182
+ return pointerType === 'touch';
183
+ }
184
+ get isAttached() {
185
+ return this._attached;
186
+ }
187
+ get targetElement() {
188
+ return this._adapter.getTargetElement();
189
+ }
190
+ set targetElement(el) {
191
+ // Always remove the listeners from the previous target element
192
+ if (this._attached) {
193
+ this._removeListeners();
194
+ }
195
+ this._adapter.setTargetElement(el);
196
+ // If we are not already deferring attaching the listeners, then do that now
197
+ if (!this._deferred) {
198
+ this._deferInitialization();
199
+ }
200
+ }
201
+ get target() {
202
+ return this._adapter.getHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET);
203
+ }
204
+ set target(value) {
205
+ if (this._target !== value) {
206
+ this._target = value;
207
+ if (this._adapter.isConnected) {
208
+ if (this._attached) {
209
+ this._removeListeners();
210
+ }
211
+ this._adapter.trySetTarget(value);
212
+ if (!this._deferred) {
213
+ this._deferInitialization();
214
+ }
215
+ }
216
+ this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.TARGET, Boolean(this._target), this._target);
217
+ }
218
+ }
219
+ get disabled() {
220
+ return this._disabled;
221
+ }
222
+ set disabled(value) {
223
+ value = Boolean(value);
224
+ if (this._disabled !== value) {
225
+ this._disabled = value;
226
+ if (this._adapter.isConnected) {
227
+ if (this._disabled) {
228
+ this._removeListeners();
229
+ }
230
+ else if (!this._deferred) {
231
+ this._deferInitialization();
232
+ }
233
+ }
234
+ this._adapter.toggleHostAttribute(STATE_LAYER_CONSTANTS.attributes.DISABLED, this._disabled);
235
+ }
236
+ }
237
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { StateLayerCoords } from './state-layer-constants';
7
+ export declare function calcRippleSize(hostEl: HTMLElement): {
8
+ rippleScale: string;
9
+ rippleSize: string;
10
+ initialSize: number;
11
+ };
12
+ export declare function getTranslationCoordinates(hostEl: HTMLElement, initialSize: number, coords?: StateLayerCoords): {
13
+ startPoint: {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ endPoint: {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ };
22
+ export declare function toNormalizedCoords(hostEl: HTMLElement, coords: StateLayerCoords): {
23
+ x: number;
24
+ y: number;
25
+ };
26
+ export declare function isInBounds(hostEl: HTMLElement, x: number, y: number): boolean;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { INITIAL_ORIGIN_SCALE, PADDING, SOFT_EDGE_CONTAINER_RATIO, SOFT_EDGE_MINIMUM_SIZE, StateLayerCoords } from './state-layer-constants';
7
+ export function calcRippleSize(hostEl) {
8
+ const { height, width } = hostEl.getBoundingClientRect();
9
+ const maxDim = Math.max(height, width);
10
+ const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);
11
+ const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);
12
+ const hypotenuse = Math.sqrt(width ** 2 + height ** 2);
13
+ const maxRadius = hypotenuse + PADDING;
14
+ const rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;
15
+ const rippleSize = `${initialSize}px`;
16
+ return { rippleScale, rippleSize, initialSize };
17
+ }
18
+ export function getTranslationCoordinates(hostEl, initialSize, coords) {
19
+ const { height, width } = hostEl.getBoundingClientRect();
20
+ const endPoint = {
21
+ x: (width - initialSize) / 2,
22
+ y: (height - initialSize) / 2
23
+ };
24
+ let startPoint;
25
+ if (isValidCoords(coords)) {
26
+ startPoint = toNormalizedCoords(hostEl, coords);
27
+ }
28
+ else {
29
+ startPoint = {
30
+ x: width / 2,
31
+ y: height / 2
32
+ };
33
+ }
34
+ startPoint = {
35
+ x: startPoint.x - (initialSize / 2),
36
+ y: startPoint.y - (initialSize / 2)
37
+ };
38
+ return { startPoint, endPoint };
39
+ }
40
+ export function toNormalizedCoords(hostEl, coords) {
41
+ const { scrollX, scrollY } = window;
42
+ const { left, top } = hostEl.getBoundingClientRect();
43
+ const documentX = scrollX + left;
44
+ const documentY = scrollY + top;
45
+ const { x, y } = coords;
46
+ return { x: x - documentX, y: y - documentY };
47
+ }
48
+ export function isInBounds(hostEl, x, y) {
49
+ const { height, width } = hostEl.getBoundingClientRect();
50
+ return x >= 0 && x <= width && y >= 0 && y <= height;
51
+ }
52
+ function isValidCoords(value) {
53
+ return value && (value instanceof StateLayerCoords || ['x', 'y'].every(key => key in value));
54
+ }
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { StateLayerCoords } from './state-layer-constants';
7
+ import { BaseComponent, IBaseComponent } from '../core/base/base-component';
8
+ export interface IStateLayerComponent extends IBaseComponent {
9
+ targetElement: HTMLElement | null;
10
+ target: string | null;
11
+ disabled: boolean;
12
+ playAnimation(coords?: StateLayerCoords): void;
13
+ }
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ 'forge-state-layer': IStateLayerComponent;
17
+ }
18
+ }
19
+ /**
20
+ * @tag forge-state-layer
21
+ *
22
+ * @summary State layers show the interaction status of an element.
23
+ *
24
+ * @description
25
+ * A state layer is a semi-transparent overlay on an element that indicates its interaction
26
+ * state. State layers provide a systematic approach to visualizing states by using opacity.
27
+ * A layer can be applied to an entire element or in a circular shape. Only one state layer
28
+ * can be applied at a given time.
29
+ *
30
+ * @property {HTMLElement} targetElement - The element to attach the state layer to.
31
+ * @property {string} target - The id of the element to attach the state layer to.
32
+ * @property {boolean} disabled - Controls whether the state layer is disabled.
33
+ *
34
+ * @attribute {string} target - The id of the element to attach the state layer to.
35
+ * @attribute {boolean} disabled - Controls whether the state layer is disabled.
36
+ *
37
+ * @cssproperty --forge-state-layer-color - The color of the state layer.
38
+ * @cssproperty --forge-state-layer-hover-color - The color of the state layer when hovered.
39
+ * @cssproperty --forge-state-layer-hover-opacity - The opacity of the state layer when hovered.
40
+ * @cssproperty --forge-state-layer-pressed-color - The color of the state layer when pressed.
41
+ * @cssproperty --forge-state-layer-pressed-opacity - The opacity of the state layer when pressed.
42
+ * @cssproperty --forge-state-layer-hover-duration - The duration of the hover animation.
43
+ * @cssproperty --forge-state-layer-animation-duration - The duration of the animation.
44
+ * @cssproperty --forge-state-layer-pressed-duration - The duration of the pressed animation.
45
+ *
46
+ * @csspart surface - The surface element.
47
+ */
48
+ export declare class StateLayerComponent extends BaseComponent implements IStateLayerComponent {
49
+ static get observedAttributes(): string[];
50
+ private _foundation;
51
+ constructor();
52
+ connectedCallback(): void;
53
+ disconnectedCallback(): void;
54
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
55
+ targetElement: HTMLElement | null;
56
+ target: string | null;
57
+ disabled: boolean;
58
+ /**
59
+ * Triggers the animation to run.
60
+ *
61
+ * Note: If coordinates are not provided, the transition will originate from the center of the target element.
62
+ *
63
+ * @param {StateLayerCoords} [coords] - The coordinates to play the animation from.
64
+ */
65
+ playAnimation(coords?: StateLayerCoords): void;
66
+ }