@api-client/ui 0.2.13 → 0.3.1

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 (326) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/build/src/core/ModalActivity.d.ts +1 -1
  3. package/build/src/core/ModalActivity.d.ts.map +1 -1
  4. package/build/src/core/ModalActivity.js +6 -5
  5. package/build/src/core/ModalActivity.js.map +1 -1
  6. package/build/src/core/ThemeManager.d.ts +4 -2
  7. package/build/src/core/ThemeManager.d.ts.map +1 -1
  8. package/build/src/core/ThemeManager.js.map +1 -1
  9. package/build/src/demo/DemoPage.d.ts +1 -4
  10. package/build/src/demo/DemoPage.d.ts.map +1 -1
  11. package/build/src/demo/DemoPage.js +2 -5
  12. package/build/src/demo/DemoPage.js.map +1 -1
  13. package/build/src/elements/authorization/ui/CcAuthorization.d.ts +1 -1
  14. package/build/src/elements/authorization/ui/CcAuthorization.d.ts.map +1 -1
  15. package/build/src/elements/authorization/ui/CcAuthorization.js +2 -2
  16. package/build/src/elements/authorization/ui/CcAuthorization.js.map +1 -1
  17. package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts +1 -1
  18. package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts.map +1 -1
  19. package/build/src/elements/authorization/ui/OAuth2Authorization.js +11 -5
  20. package/build/src/elements/authorization/ui/OAuth2Authorization.js.map +1 -1
  21. package/build/src/elements/authorization/ui/OidcAuthorization.d.ts +1 -2
  22. package/build/src/elements/authorization/ui/OidcAuthorization.d.ts.map +1 -1
  23. package/build/src/elements/authorization/ui/OidcAuthorization.js +10 -8
  24. package/build/src/elements/authorization/ui/OidcAuthorization.js.map +1 -1
  25. package/build/src/elements/code/HttpSnippets.d.ts +1 -1
  26. package/build/src/elements/code/HttpSnippets.d.ts.map +1 -1
  27. package/build/src/elements/code/HttpSnippets.js +5 -5
  28. package/build/src/elements/code/HttpSnippets.js.map +1 -1
  29. package/build/src/elements/dialog/internals/ConfirmDelete.d.ts +1 -1
  30. package/build/src/elements/dialog/internals/ConfirmDelete.d.ts.map +1 -1
  31. package/build/src/elements/dialog/internals/ConfirmDelete.js +5 -5
  32. package/build/src/elements/dialog/internals/ConfirmDelete.js.map +1 -1
  33. package/build/src/elements/dialog/internals/Rename.d.ts +1 -1
  34. package/build/src/elements/dialog/internals/Rename.d.ts.map +1 -1
  35. package/build/src/elements/dialog/internals/Rename.js +6 -5
  36. package/build/src/elements/dialog/internals/Rename.js.map +1 -1
  37. package/build/src/elements/environment/EnvironmentEditor.d.ts +1 -1
  38. package/build/src/elements/environment/EnvironmentEditor.d.ts.map +1 -1
  39. package/build/src/elements/environment/EnvironmentEditor.js +5 -4
  40. package/build/src/elements/environment/EnvironmentEditor.js.map +1 -1
  41. package/build/src/elements/http/BodyEditor.d.ts +1 -3
  42. package/build/src/elements/http/BodyEditor.d.ts.map +1 -1
  43. package/build/src/elements/http/BodyEditor.js +25 -20
  44. package/build/src/elements/http/BodyEditor.js.map +1 -1
  45. package/build/src/elements/http/BodyMultipartEditor.d.ts +1 -1
  46. package/build/src/elements/http/BodyMultipartEditor.d.ts.map +1 -1
  47. package/build/src/elements/http/BodyMultipartEditor.js +3 -3
  48. package/build/src/elements/http/BodyMultipartEditor.js.map +1 -1
  49. package/build/src/elements/http/CertificateAdd.element.d.ts +1 -3
  50. package/build/src/elements/http/CertificateAdd.element.d.ts.map +1 -1
  51. package/build/src/elements/http/CertificateAdd.element.js +6 -10
  52. package/build/src/elements/http/CertificateAdd.element.js.map +1 -1
  53. package/build/src/elements/http/HeadersForm.d.ts +1 -1
  54. package/build/src/elements/http/HeadersForm.d.ts.map +1 -1
  55. package/build/src/elements/http/HeadersForm.js +3 -3
  56. package/build/src/elements/http/HeadersForm.js.map +1 -1
  57. package/build/src/elements/http/HttpAssertions.element.d.ts +1 -1
  58. package/build/src/elements/http/HttpAssertions.element.d.ts.map +1 -1
  59. package/build/src/elements/http/HttpAssertions.element.js +2 -2
  60. package/build/src/elements/http/HttpAssertions.element.js.map +1 -1
  61. package/build/src/elements/http/HttpFlows.element.d.ts +1 -1
  62. package/build/src/elements/http/HttpFlows.element.d.ts.map +1 -1
  63. package/build/src/elements/http/HttpFlows.element.js +6 -6
  64. package/build/src/elements/http/HttpFlows.element.js.map +1 -1
  65. package/build/src/elements/http/RequestEditor.d.ts +1 -3
  66. package/build/src/elements/http/RequestEditor.d.ts.map +1 -1
  67. package/build/src/elements/http/RequestEditor.js +10 -11
  68. package/build/src/elements/http/RequestEditor.js.map +1 -1
  69. package/build/src/elements/http/UrlParamsForm.d.ts +1 -1
  70. package/build/src/elements/http/UrlParamsForm.d.ts.map +1 -1
  71. package/build/src/elements/http/UrlParamsForm.js +4 -4
  72. package/build/src/elements/http/UrlParamsForm.js.map +1 -1
  73. package/build/src/elements/project/HttpProjectRequest.d.ts +1 -1
  74. package/build/src/elements/project/HttpProjectRequest.d.ts.map +1 -1
  75. package/build/src/elements/project/HttpProjectRequest.js +3 -3
  76. package/build/src/elements/project/HttpProjectRequest.js.map +1 -1
  77. package/build/src/elements/project/HttpProjectRequestHistory.d.ts +1 -2
  78. package/build/src/elements/project/HttpProjectRequestHistory.d.ts.map +1 -1
  79. package/build/src/elements/project/HttpProjectRequestHistory.js +5 -6
  80. package/build/src/elements/project/HttpProjectRequestHistory.js.map +1 -1
  81. package/build/src/elements/project/ProjectRunReport.d.ts +1 -1
  82. package/build/src/elements/project/ProjectRunReport.d.ts.map +1 -1
  83. package/build/src/elements/project/ProjectRunReport.js +7 -7
  84. package/build/src/elements/project/ProjectRunReport.js.map +1 -1
  85. package/build/src/elements/project/ProjectRunner.d.ts +1 -2
  86. package/build/src/elements/project/ProjectRunner.d.ts.map +1 -1
  87. package/build/src/elements/project/ProjectRunner.js +4 -5
  88. package/build/src/elements/project/ProjectRunner.js.map +1 -1
  89. package/build/src/md/button/internals/base.d.ts +98 -0
  90. package/build/src/md/button/internals/base.d.ts.map +1 -0
  91. package/build/src/md/button/internals/base.js +353 -0
  92. package/build/src/md/button/internals/base.js.map +1 -0
  93. package/build/src/md/button/internals/button.d.ts +7 -75
  94. package/build/src/md/button/internals/button.d.ts.map +1 -1
  95. package/build/src/md/button/internals/button.js +18 -247
  96. package/build/src/md/button/internals/button.js.map +1 -1
  97. package/build/src/md/button/internals/{button-styles.d.ts → button.styles.d.ts} +1 -1
  98. package/build/src/md/button/internals/button.styles.d.ts.map +1 -0
  99. package/build/src/md/button/internals/button.styles.js +319 -0
  100. package/build/src/md/button/internals/button.styles.js.map +1 -0
  101. package/build/src/md/button/internals/group.d.ts +54 -0
  102. package/build/src/md/button/internals/group.d.ts.map +1 -0
  103. package/build/src/md/button/internals/group.js +157 -0
  104. package/build/src/md/button/internals/group.js.map +1 -0
  105. package/build/src/md/button/internals/{text-button.styles.d.ts → group.styles.d.ts} +1 -1
  106. package/build/src/md/button/internals/group.styles.d.ts.map +1 -0
  107. package/build/src/md/button/internals/group.styles.js +102 -0
  108. package/build/src/md/button/internals/group.styles.js.map +1 -0
  109. package/build/src/md/button/ui-button-group.d.ts +11 -0
  110. package/build/src/md/button/ui-button-group.d.ts.map +1 -0
  111. package/build/src/md/{icon-button/ui-filled-icon-button.js → button/ui-button-group.js} +10 -11
  112. package/build/src/md/button/ui-button-group.js.map +1 -0
  113. package/build/src/md/button/ui-button.d.ts +14 -0
  114. package/build/src/md/button/ui-button.d.ts.map +1 -0
  115. package/build/src/md/button/{ui-text-button.js → ui-button.js} +10 -11
  116. package/build/src/md/button/ui-button.js.map +1 -0
  117. package/build/src/md/dialog/internals/Dialog.d.ts +5 -5
  118. package/build/src/md/dialog/internals/Dialog.d.ts.map +1 -1
  119. package/build/src/md/dialog/internals/Dialog.js +14 -9
  120. package/build/src/md/dialog/internals/Dialog.js.map +1 -1
  121. package/build/src/md/dropdown-list/internals/UiDropdownList.d.ts +1 -1
  122. package/build/src/md/dropdown-list/internals/UiDropdownList.js +1 -1
  123. package/build/src/md/dropdown-list/internals/UiDropdownList.js.map +1 -1
  124. package/build/src/md/icon-button/internals/IconButton.d.ts +12 -36
  125. package/build/src/md/icon-button/internals/IconButton.d.ts.map +1 -1
  126. package/build/src/md/icon-button/internals/IconButton.js +32 -144
  127. package/build/src/md/icon-button/internals/IconButton.js.map +1 -1
  128. package/build/src/md/{button/internals/filled-button.styles.d.ts → icon-button/internals/IconButton.styles.d.ts} +1 -1
  129. package/build/src/md/icon-button/internals/IconButton.styles.d.ts.map +1 -0
  130. package/build/src/md/icon-button/internals/IconButton.styles.js +286 -0
  131. package/build/src/md/icon-button/internals/IconButton.styles.js.map +1 -0
  132. package/build/src/md/icon-button/ui-icon-button.d.ts.map +1 -1
  133. package/build/src/md/icon-button/ui-icon-button.js +2 -3
  134. package/build/src/md/icon-button/ui-icon-button.js.map +1 -1
  135. package/build/src/md/input/Input.d.ts +4 -3
  136. package/build/src/md/input/Input.d.ts.map +1 -1
  137. package/build/src/md/input/Input.js +15 -11
  138. package/build/src/md/input/Input.js.map +1 -1
  139. package/build/src/md/ripple/internals/ripple.d.ts +2 -0
  140. package/build/src/md/ripple/internals/ripple.d.ts.map +1 -1
  141. package/build/src/md/ripple/internals/ripple.js +20 -10
  142. package/build/src/md/ripple/internals/ripple.js.map +1 -1
  143. package/build/src/md/ripple/internals/ripple.styles.d.ts.map +1 -1
  144. package/build/src/md/ripple/internals/ripple.styles.js +8 -20
  145. package/build/src/md/ripple/internals/ripple.styles.js.map +1 -1
  146. package/build/src/md/snackbar/internals/Snackbar.d.ts +1 -1
  147. package/build/src/md/snackbar/internals/Snackbar.d.ts.map +1 -1
  148. package/build/src/md/snackbar/internals/Snackbar.js +4 -2
  149. package/build/src/md/snackbar/internals/Snackbar.js.map +1 -1
  150. package/build/src/md/text-field/internals/common.styles.d.ts.map +1 -1
  151. package/build/src/md/text-field/internals/common.styles.js +11 -5
  152. package/build/src/md/text-field/internals/common.styles.js.map +1 -1
  153. package/build/src/md/text-field/internals/filled.styles.d.ts.map +1 -1
  154. package/build/src/md/text-field/internals/filled.styles.js +7 -0
  155. package/build/src/md/text-field/internals/filled.styles.js.map +1 -1
  156. package/build/src/md/text-field/internals/outlined.styles.d.ts.map +1 -1
  157. package/build/src/md/text-field/internals/outlined.styles.js +29 -9
  158. package/build/src/md/text-field/internals/outlined.styles.js.map +1 -1
  159. package/build/src/styles/m3/dialog.module.d.ts +2 -2
  160. package/build/src/styles/m3/dialog.module.js +2 -2
  161. package/build/src/styles/m3/dialog.module.js.map +1 -1
  162. package/build/src/styles/m3/tokens.d.ts.map +1 -1
  163. package/build/src/styles/m3/tokens.js +208 -182
  164. package/build/src/styles/m3/tokens.js.map +1 -1
  165. package/demo/elements/authorization/oauth-authorize.html +1 -1
  166. package/demo/elements/authorization/oauth-authorize.ts +1 -1
  167. package/demo/elements/environment/variables-editor.ts +2 -2
  168. package/demo/elements/http/url-editing.ts +3 -3
  169. package/demo/elements/project/request-editor.ts +4 -4
  170. package/demo/layout/index.ts +5 -5
  171. package/demo/md/buttons/button.html +121 -0
  172. package/demo/md/buttons/button.ts +246 -0
  173. package/demo/md/buttons/{index.html → group.html} +15 -2
  174. package/demo/md/buttons/group.ts +171 -0
  175. package/demo/md/checkbox/index.ts +1 -1
  176. package/demo/md/dialog/dialog.ts +8 -9
  177. package/demo/md/dropdown-list/index.ts +68 -71
  178. package/demo/md/icon-button/index.html +97 -7
  179. package/demo/md/icon-button/index.ts +97 -201
  180. package/demo/md/index.html +3 -1
  181. package/demo/md/inputs/input.html +39 -0
  182. package/demo/md/inputs/input.ts +204 -419
  183. package/demo/md/inputs/radio.ts +1 -1
  184. package/demo/md/inputs/switch.ts +1 -1
  185. package/demo/md/notification/snack.ts +5 -5
  186. package/demo/md/progress/progress.ts +4 -3
  187. package/package.json +2 -2
  188. package/src/core/ModalActivity.ts +6 -5
  189. package/src/core/ThemeManager.ts +5 -4
  190. package/src/demo/DemoPage.ts +2 -5
  191. package/src/elements/authorization/ui/CcAuthorization.ts +2 -2
  192. package/src/elements/authorization/ui/OAuth2Authorization.ts +11 -5
  193. package/src/elements/authorization/ui/OidcAuthorization.ts +10 -8
  194. package/src/elements/code/HttpSnippets.ts +5 -5
  195. package/src/elements/dialog/internals/ConfirmDelete.ts +5 -5
  196. package/src/elements/dialog/internals/Rename.ts +6 -5
  197. package/src/elements/environment/EnvironmentEditor.ts +5 -4
  198. package/src/elements/http/BodyEditor.ts +25 -20
  199. package/src/elements/http/BodyMultipartEditor.ts +3 -3
  200. package/src/elements/http/CertificateAdd.element.ts +6 -10
  201. package/src/elements/http/HeadersForm.ts +3 -3
  202. package/src/elements/http/HttpAssertions.element.ts +2 -2
  203. package/src/elements/http/HttpFlows.element.ts +6 -6
  204. package/src/elements/http/RequestEditor.ts +10 -11
  205. package/src/elements/http/UrlParamsForm.ts +4 -4
  206. package/src/elements/project/HttpProjectRequest.ts +3 -3
  207. package/src/elements/project/HttpProjectRequestHistory.ts +5 -6
  208. package/src/elements/project/ProjectRunReport.ts +7 -7
  209. package/src/elements/project/ProjectRunner.ts +4 -5
  210. package/src/md/button/internals/base.ts +299 -0
  211. package/src/md/button/internals/button.styles.ts +319 -0
  212. package/src/md/button/internals/button.ts +8 -234
  213. package/src/md/button/internals/group.styles.ts +102 -0
  214. package/src/md/button/internals/group.ts +121 -0
  215. package/src/md/button/ui-button-group.ts +15 -0
  216. package/src/md/button/ui-button.ts +18 -0
  217. package/src/md/dialog/internals/Dialog.ts +14 -9
  218. package/src/md/dropdown-list/internals/UiDropdownList.ts +1 -1
  219. package/src/md/icon-button/internals/IconButton.styles.ts +286 -0
  220. package/src/md/icon-button/internals/IconButton.ts +15 -139
  221. package/src/md/icon-button/ui-icon-button.ts +2 -3
  222. package/src/md/input/Input.ts +16 -11
  223. package/src/md/ripple/internals/ripple.styles.ts +8 -20
  224. package/src/md/ripple/internals/ripple.ts +21 -13
  225. package/src/md/snackbar/internals/Snackbar.ts +4 -2
  226. package/src/md/text-field/internals/common.styles.ts +11 -5
  227. package/src/md/text-field/internals/filled.styles.ts +7 -0
  228. package/src/md/text-field/internals/outlined.styles.ts +29 -9
  229. package/src/styles/m3/dialog.module.ts +2 -2
  230. package/src/styles/m3/native.css +270 -0
  231. package/src/styles/m3/tokens.css +208 -182
  232. package/src/styles/m3/tokens.ts +208 -182
  233. package/test/ui/button/UiButton.test.ts +51 -29
  234. package/test/ui/button/UiIconButton.test.ts +25 -19
  235. package/test/ui/dialog/UiDialog.test.ts +10 -10
  236. package/build/src/md/button/internals/button-styles.d.ts.map +0 -1
  237. package/build/src/md/button/internals/button-styles.js +0 -143
  238. package/build/src/md/button/internals/button-styles.js.map +0 -1
  239. package/build/src/md/button/internals/elevated-button.d.ts +0 -4
  240. package/build/src/md/button/internals/elevated-button.d.ts.map +0 -1
  241. package/build/src/md/button/internals/elevated-button.js +0 -4
  242. package/build/src/md/button/internals/elevated-button.js.map +0 -1
  243. package/build/src/md/button/internals/elevated-button.styles.d.ts +0 -3
  244. package/build/src/md/button/internals/elevated-button.styles.d.ts.map +0 -1
  245. package/build/src/md/button/internals/elevated-button.styles.js +0 -38
  246. package/build/src/md/button/internals/elevated-button.styles.js.map +0 -1
  247. package/build/src/md/button/internals/filled-button.d.ts +0 -4
  248. package/build/src/md/button/internals/filled-button.d.ts.map +0 -1
  249. package/build/src/md/button/internals/filled-button.js +0 -4
  250. package/build/src/md/button/internals/filled-button.js.map +0 -1
  251. package/build/src/md/button/internals/filled-button.styles.d.ts.map +0 -1
  252. package/build/src/md/button/internals/filled-button.styles.js +0 -30
  253. package/build/src/md/button/internals/filled-button.styles.js.map +0 -1
  254. package/build/src/md/button/internals/filled-tonal-button.d.ts +0 -4
  255. package/build/src/md/button/internals/filled-tonal-button.d.ts.map +0 -1
  256. package/build/src/md/button/internals/filled-tonal-button.js +0 -4
  257. package/build/src/md/button/internals/filled-tonal-button.js.map +0 -1
  258. package/build/src/md/button/internals/filled-tonal-button.styles.d.ts +0 -3
  259. package/build/src/md/button/internals/filled-tonal-button.styles.d.ts.map +0 -1
  260. package/build/src/md/button/internals/filled-tonal-button.styles.js +0 -30
  261. package/build/src/md/button/internals/filled-tonal-button.styles.js.map +0 -1
  262. package/build/src/md/button/internals/outlined-button.d.ts +0 -4
  263. package/build/src/md/button/internals/outlined-button.d.ts.map +0 -1
  264. package/build/src/md/button/internals/outlined-button.js +0 -4
  265. package/build/src/md/button/internals/outlined-button.js.map +0 -1
  266. package/build/src/md/button/internals/outlined-button.styles.d.ts +0 -3
  267. package/build/src/md/button/internals/outlined-button.styles.d.ts.map +0 -1
  268. package/build/src/md/button/internals/outlined-button.styles.js +0 -31
  269. package/build/src/md/button/internals/outlined-button.styles.js.map +0 -1
  270. package/build/src/md/button/internals/text-button.d.ts +0 -4
  271. package/build/src/md/button/internals/text-button.d.ts.map +0 -1
  272. package/build/src/md/button/internals/text-button.js +0 -4
  273. package/build/src/md/button/internals/text-button.js.map +0 -1
  274. package/build/src/md/button/internals/text-button.styles.d.ts.map +0 -1
  275. package/build/src/md/button/internals/text-button.styles.js +0 -30
  276. package/build/src/md/button/internals/text-button.styles.js.map +0 -1
  277. package/build/src/md/button/ui-elevated-button.d.ts +0 -14
  278. package/build/src/md/button/ui-elevated-button.d.ts.map +0 -1
  279. package/build/src/md/button/ui-elevated-button.js +0 -31
  280. package/build/src/md/button/ui-elevated-button.js.map +0 -1
  281. package/build/src/md/button/ui-filled-button.d.ts +0 -14
  282. package/build/src/md/button/ui-filled-button.d.ts.map +0 -1
  283. package/build/src/md/button/ui-filled-button.js +0 -31
  284. package/build/src/md/button/ui-filled-button.js.map +0 -1
  285. package/build/src/md/button/ui-filled-tonal-button.d.ts +0 -14
  286. package/build/src/md/button/ui-filled-tonal-button.d.ts.map +0 -1
  287. package/build/src/md/button/ui-filled-tonal-button.js +0 -31
  288. package/build/src/md/button/ui-filled-tonal-button.js.map +0 -1
  289. package/build/src/md/button/ui-outlined-button.d.ts +0 -14
  290. package/build/src/md/button/ui-outlined-button.d.ts.map +0 -1
  291. package/build/src/md/button/ui-outlined-button.js +0 -31
  292. package/build/src/md/button/ui-outlined-button.js.map +0 -1
  293. package/build/src/md/button/ui-text-button.d.ts +0 -14
  294. package/build/src/md/button/ui-text-button.d.ts.map +0 -1
  295. package/build/src/md/button/ui-text-button.js.map +0 -1
  296. package/build/src/md/icon-button/ui-filled-icon-button.d.ts +0 -11
  297. package/build/src/md/icon-button/ui-filled-icon-button.d.ts.map +0 -1
  298. package/build/src/md/icon-button/ui-filled-icon-button.js.map +0 -1
  299. package/build/src/md/icon-button/ui-filled-tonal-icon-button.d.ts +0 -11
  300. package/build/src/md/icon-button/ui-filled-tonal-icon-button.d.ts.map +0 -1
  301. package/build/src/md/icon-button/ui-filled-tonal-icon-button.js +0 -28
  302. package/build/src/md/icon-button/ui-filled-tonal-icon-button.js.map +0 -1
  303. package/build/src/md/icon-button/ui-outlined-icon-button.d.ts +0 -11
  304. package/build/src/md/icon-button/ui-outlined-icon-button.d.ts.map +0 -1
  305. package/build/src/md/icon-button/ui-outlined-icon-button.js +0 -28
  306. package/build/src/md/icon-button/ui-outlined-icon-button.js.map +0 -1
  307. package/demo/md/buttons/index.ts +0 -279
  308. package/src/md/button/internals/button-styles.ts +0 -143
  309. package/src/md/button/internals/elevated-button.styles.ts +0 -38
  310. package/src/md/button/internals/elevated-button.ts +0 -3
  311. package/src/md/button/internals/filled-button.styles.ts +0 -30
  312. package/src/md/button/internals/filled-button.ts +0 -3
  313. package/src/md/button/internals/filled-tonal-button.styles.ts +0 -30
  314. package/src/md/button/internals/filled-tonal-button.ts +0 -3
  315. package/src/md/button/internals/outlined-button.styles.ts +0 -31
  316. package/src/md/button/internals/outlined-button.ts +0 -3
  317. package/src/md/button/internals/text-button.styles.ts +0 -30
  318. package/src/md/button/internals/text-button.ts +0 -3
  319. package/src/md/button/ui-elevated-button.ts +0 -19
  320. package/src/md/button/ui-filled-button.ts +0 -19
  321. package/src/md/button/ui-filled-tonal-button.ts +0 -19
  322. package/src/md/button/ui-outlined-button.ts +0 -19
  323. package/src/md/button/ui-text-button.ts +0 -19
  324. package/src/md/icon-button/ui-filled-icon-button.ts +0 -16
  325. package/src/md/icon-button/ui-filled-tonal-icon-button.ts +0 -16
  326. package/src/md/icon-button/ui-outlined-icon-button.ts +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"ui-icon-button.js","sourceRoot":"","sources":["../../../../src/md/icon-button/ui-icon-button.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,OAAO,MAAM,2BAA2B,CAAA;AAC/C,OAAO,IAAI,MAAM,4BAA4B,CAAA;AAC7C,OAAO,MAAM,MAAM,gCAAgC,CAAA;IAGtC,mBAAmB;4BAD/B,aAAa,CAAC,gBAAgB,CAAC;;;;sBACS,OAAO;mCAAf,SAAQ,WAAO;;;;YAAhD,6KAEC;;;;QADC,MAAM,CAAU,MAAM,GAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;;YADjD,uDAAmB;;;;;SAAnB,mBAAmB","sourcesContent":["import type { CSSResultOrNative } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport Element from './internals/IconButton.js'\nimport base from './internals/base.styles.js'\nimport styles from './internals/standard.styles.js'\n\n@customElement('ui-icon-button')\nexport class UiIconButtonElement extends Element {\n static override styles: CSSResultOrNative[] = [base, styles]\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui-icon-button': UiIconButtonElement\n }\n}\n"]}
1
+ {"version":3,"file":"ui-icon-button.js","sourceRoot":"","sources":["../../../../src/md/icon-button/ui-icon-button.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,OAAO,MAAM,2BAA2B,CAAA;AAC/C,OAAO,MAAM,MAAM,kCAAkC,CAAA;IAGxC,mBAAmB;4BAD/B,aAAa,CAAC,gBAAgB,CAAC;;;;sBACS,OAAO;mCAAf,SAAQ,WAAO;;;;YAAhD,6KAEC;;;;QADC,MAAM,CAAU,MAAM,GAAwB,CAAC,MAAM,CAAC,CAAA;;YAD3C,uDAAmB;;;;;SAAnB,mBAAmB","sourcesContent":["import type { CSSResultOrNative } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport Element from './internals/IconButton.js'\nimport styles from './internals/IconButton.styles.js'\n\n@customElement('ui-icon-button')\nexport class UiIconButtonElement extends Element {\n static override styles: CSSResultOrNative[] = [styles]\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui-icon-button': UiIconButtonElement\n }\n}\n"]}
@@ -157,7 +157,7 @@ export default abstract class Input extends UiElement {
157
157
  *
158
158
  * Possible values are:
159
159
  *
160
- * - `off` or `none`: No autocapitalization is applied (all letters default to lowercase)
160
+ * - `off` or `none`: No auto-capitalization is applied (all letters default to lowercase)
161
161
  * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;
162
162
  * all other letters default to lowercase
163
163
  * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
@@ -326,7 +326,7 @@ export default abstract class Input extends UiElement {
326
326
  */
327
327
  focus(): void;
328
328
  /**
329
- * Unfocuses the text field.
329
+ * Un-focuses the text field.
330
330
  */
331
331
  blur(): void;
332
332
  /**
@@ -410,6 +410,7 @@ export default abstract class Input extends UiElement {
410
410
  handleClick(): void;
411
411
  protected handleFocus(): void;
412
412
  protected handleBlur(): void;
413
+ private checkNativeValidity;
413
414
  private checkValidityAndDispatch;
414
415
  /**
415
416
  * @returns `true` when the label is in resting state.
@@ -436,7 +437,7 @@ export default abstract class Input extends UiElement {
436
437
  protected renderHighlight(): TemplateResult;
437
438
  protected abstract renderInput(): TemplateResult;
438
439
  protected renderSupportingText(): TemplateResult;
439
- protected renderSupportingTextValue(): TemplateResult;
440
+ protected renderSupportingTextValue(): TemplateResult | typeof nothing;
440
441
  protected renderCounter(): TemplateResult;
441
442
  protected renderPasswordControl(): TemplateResult | typeof nothing;
442
443
  protected renderDataList(): TemplateResult | typeof nothing;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/md/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O,CAAC,wBAAwB;IAShC;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,OAAO;IAWjC;;OAEG;IACH,SAAS,CAAC,WAAW,IAAI,OAAO;IAKhC,SAAS,CAAC,eAAe,IAAI,MAAM;IAMnC,SAAS,CAAC,iBAAiB,IAAI,MAAM;IAKrC,SAAS,CAAC,QAAQ,IAAI,OAAO;IAI7B,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAc9C,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAO9C,SAAS,CAAC,UAAU,IAAI,OAAO;IAI/B,SAAS,CAAC,cAAc,IAAI,MAAM;IAKlC,SAAS,CAAC,kBAAkB,IAAI,MAAM;IAiBtC,SAAS,KAAK,aAAa,IAAI,mBAAmB,CAOjD;cAEkB,MAAM,IAAI,cAAc;IAsB3C,SAAS,CAAC,YAAY,IAAI,cAAc;IAUxC,SAAS,CAAC,YAAY,IAAI,cAAc;IAUxC,SAAS,CAAC,UAAU,IAAI,cAAc;IAItC,SAAS,CAAC,WAAW,IAAI,cAAc;IAQvC,SAAS,CAAC,eAAe,IAAI,cAAc;IAI3C,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,cAAc;IAEhD,SAAS,CAAC,oBAAoB,IAAI,cAAc;IAIhD,SAAS,CAAC,yBAAyB,IAAI,cAAc,GAAG,OAAO,OAAO;IAiBtE,SAAS,CAAC,aAAa,IAAI,cAAc;IAQzC,SAAS,CAAC,qBAAqB,IAAI,cAAc,GAAG,OAAO,OAAO;IAkBlE,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,OAAO,OAAO;CAO5D"}
@@ -510,7 +510,7 @@ let Input = (() => {
510
510
  *
511
511
  * Possible values are:
512
512
  *
513
- * - `off` or `none`: No autocapitalization is applied (all letters default to lowercase)
513
+ * - `off` or `none`: No auto-capitalization is applied (all letters default to lowercase)
514
514
  * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;
515
515
  * all other letters default to lowercase
516
516
  * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
@@ -531,7 +531,7 @@ let Input = (() => {
531
531
  *
532
532
  * Possible values are:
533
533
  *
534
- * - `off` or `none`: No autocapitalization is applied (all letters default to lowercase)
534
+ * - `off` or `none`: No auto-capitalization is applied (all letters default to lowercase)
535
535
  * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;
536
536
  * all other letters default to lowercase
537
537
  * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
@@ -905,7 +905,7 @@ let Input = (() => {
905
905
  this.input?.focus();
906
906
  }
907
907
  /**
908
- * Unfocuses the text field.
908
+ * Un-focuses the text field.
909
909
  */
910
910
  blur() {
911
911
  this.input?.blur();
@@ -952,7 +952,7 @@ let Input = (() => {
952
952
  return this.getError() && !!this.getErrorText() && !this.refreshErrorAlert;
953
953
  }
954
954
  getErrorText() {
955
- return this.invalid ? this.invalidText : this.nativeErrorText;
955
+ return this.invalidText || this.nativeErrorText;
956
956
  }
957
957
  /**
958
958
  * Selects all the text in the text field.
@@ -1046,14 +1046,16 @@ let Input = (() => {
1046
1046
  return;
1047
1047
  }
1048
1048
  this.focused = true;
1049
- this.#_userInteracted = true;
1050
1049
  this.removingTabindex = true;
1051
1050
  // Note, the input is automatically focused when form is being submitted and
1052
1051
  // it won't pass validation. In this case the form will throw an error
1053
1052
  // as the input is not focusable. In overall, this still works with forms and validation.
1054
- this.dataset.tabindex = this.getAttribute('tabindex') || '0';
1055
- this.removeAttribute('tabindex');
1053
+ if (this.checkNativeValidity()) {
1054
+ this.dataset.tabindex = this.getAttribute('tabindex') || '0';
1055
+ this.removeAttribute('tabindex');
1056
+ }
1056
1057
  input.focus();
1058
+ this.#_userInteracted = true;
1057
1059
  setTimeout(() => {
1058
1060
  this.removingTabindex = false;
1059
1061
  }, 1);
@@ -1068,9 +1070,11 @@ let Input = (() => {
1068
1070
  delete this.dataset.tabindex;
1069
1071
  this.setAttribute('tabindex', index);
1070
1072
  }
1073
+ checkNativeValidity() {
1074
+ return this.input?.validity.valid ?? true;
1075
+ }
1071
1076
  checkValidityAndDispatch() {
1072
- const { input } = this;
1073
- const valid = input?.checkValidity() ?? true;
1077
+ const valid = this.input?.checkValidity() ?? true;
1074
1078
  let canceled = false;
1075
1079
  if (!valid) {
1076
1080
  canceled = !this.dispatchEvent(new Event('invalid', { cancelable: true }));
@@ -1135,10 +1139,10 @@ let Input = (() => {
1135
1139
  }
1136
1140
  getAriaDescribedBy() {
1137
1141
  const hasSupport = !!this.getSupportingText();
1138
- const hasCounter = this.hasCounter();
1139
1142
  if (hasSupport) {
1140
1143
  return this.supportingTextId;
1141
1144
  }
1145
+ const hasCounter = this.hasCounter();
1142
1146
  if (hasCounter) {
1143
1147
  return this.counterId;
1144
1148
  }
@@ -1214,7 +1218,7 @@ let Input = (() => {
1214
1218
  renderSupportingTextValue() {
1215
1219
  const text = this.getSupportingText();
1216
1220
  if (!text) {
1217
- return html ``;
1221
+ return nothing;
1218
1222
  }
1219
1223
  const shouldAlert = this.shouldErrorAnnounce();
1220
1224
  return html `
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/md/input/Input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkC,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGxD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,kCAAkC,CAAA;AACzC,OAAO,qBAAqB,CAAA;AAE5B,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAA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YACrB,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;gBACxB,OAAO,OAAO,CAAA;YAChB,CAAC;YACD,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAA;YAClC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAA;YACrD,OAAO,IAAI,CAAA;;;kBAGG,IAAI,CAAC,qBAAqB;;;yBAGnB,IAAI;;KAExB,CAAA;QACH,CAAC;QAES,cAAc;YACtB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;YACrB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACzC,OAAO,OAAO,CAAA;YAChB,CAAC;YACD,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAA,kBAAkB,CAAC,aAAa,CAAC,cAAc,CAAA;QAC9G,CAAC;;;AAn9BH;;;GAGG;AACH","sourcesContent":["import { html, nothing, PropertyValues, TemplateResult } from 'lit'\nimport { property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { SupportedAutocapitalize, SupportedAutocomplete, SupportedInputTypes } from '../../types/input.js'\nimport { ARIAAutoComplete, ARIAExpanded, ARIARole } from '../../types/role.js'\nimport { isDisabled, setDisabled } from '../../lib/disabled.js'\nimport { UiElement } from '../UiElement.js'\nimport '../icon-button/ui-icon-button.js'\nimport '../icons/ui-icon.js'\n\nconst floatTypes = ['date', 'color', 'datetime-local', 'file', 'month', 'time', 'week']\n\n/**\n * @slot prefix - A slot in which to render prefixes of the input\n * @slot suffix - A slot in which to render suffixes of the input\n */\nexport default abstract class Input extends UiElement {\n #_userInteracted: boolean\n\n // static override shadowRootOptions: ShadowRootInit = {mode: 'open', delegatesFocus: true};\n\n static readonly formAssociated = true\n\n #_internals = this.attachInternals()\n\n get form(): HTMLFormElement | null {\n return this.#_internals && this.#_internals.form\n }\n\n /**\n * @attribute\n */\n @property({ type: String, reflect: true }) accessor type: SupportedInputTypes\n\n /**\n * Disables the input.\n * @attribute\n */\n get disabled(): boolean {\n return isDisabled(this)\n }\n\n @property({ reflect: true, type: Boolean })\n set disabled(value: boolean) {\n const old = isDisabled(this)\n setDisabled(this, value)\n this.requestUpdate('disabled', old)\n this._updateFormValue()\n if (value) {\n this.dataset.tabindex = this.getAttribute('tabindex') || '0'\n this.removeAttribute('tabindex')\n } else {\n const index = this.dataset.tabindex || '0'\n this.setAttribute('tabindex', index)\n this.blur()\n }\n }\n\n /**\n * The name of the form control, submitted as a pair with the control's value as part of the form data.\n * @attribute\n */\n @property({ type: String }) accessor name: string | undefined\n\n /**\n * When a form is submitted, only checkboxes which are currently checked are submitted to the server,\n * and the reported value is the `value` of the value attribute.\n * If the `value` is not otherwise specified, it is the string `on` by default.\n * @attribute\n */\n @property({ type: String }) accessor value = ''\n\n /**\n * Set to true to mark the input element as required.\n * @attribute\n */\n @property({ reflect: true, type: Boolean })\n accessor required: boolean | undefined\n\n /**\n * While the element can be easily styled with the `:valid` and `:invalid` pseudo classes\n * it also exposes an attribute to style the element as invalid. This attribute changes\n * when the element validation is performed.\n *\n * Calling `reportValidity()` will automatically update `invalid`.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) accessor invalid: boolean | undefined\n\n /**\n * The error message that replaces supporting text when `error` is true. If\n * `errorText` is an empty string, then the supporting text will continue to\n * show.\n *\n * Calling `reportValidity()` will automatically update `errorText` to the\n * native `validationMessage`.\n * @attribute\n */\n @property({ type: String }) accessor invalidText = ''\n\n /**\n * The label to be rendered with the input.\n * @attribute\n */\n @property({ type: String }) accessor label: string | undefined\n\n /**\n * Whether or not the text field has a leading icon. Used for SSR.\n * @attribute\n */\n @property({ type: Boolean }) accessor hasPrefix = false\n\n /**\n * Whether or not the text field has a trailing icon. Used for SSR.\n * @attribute\n */\n @property({ type: Boolean }) accessor hasSuffix = false\n\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n * @attribute\n */\n @property({ type: String }) accessor supportingText = ''\n\n /**\n * Override the input text CSS `direction`. Useful for RTL languages that use\n * LTR notation for fractions.\n * @attribute\n */\n @property({ type: String }) accessor textDirection = ''\n\n /**\n * When set the label of the input disappears after input rather than float over the input.\n * @attribute\n */\n @property({ type: Boolean }) accessor noFloating: boolean | undefined\n\n /**\n * Defines the greatest value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max\n * @attribute\n */\n @property({ type: String }) accessor max = ''\n\n /**\n * The maximum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength\n * @attribute\n */\n @property({ type: Number }) accessor maxLength = -1\n\n /**\n * Defines the most negative value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min\n * @attribute\n */\n @property({ type: String }) accessor min = ''\n\n /**\n * The minimum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength\n * @attribute\n */\n @property({ type: Number }) accessor minLength = -1\n\n /**\n * A regular expression that the text field's value must match to pass\n * constraint validation.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern\n * @attribute\n */\n @property({ type: String }) accessor pattern = ''\n\n /**\n * @attribute\n */\n @property({ type: String }) accessor placeholder = ''\n\n /**\n * Indicates whether or not a user should be able to edit the text field's\n * value.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly\n *\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) accessor readOnly = false\n\n /**\n * Bind the `<input>`'s `autocomplete` property.\n * @default off\n * @attribute\n */\n @property({ type: String }) accessor autocomplete: SupportedAutocomplete = 'off'\n\n /**\n * Binds this to the `<input>`'s `inputMode` property.\n * @attribute\n */\n @property({ type: String }) override accessor inputMode = ''\n\n /**\n * Binds this to the `<input>`'s `autocapitalize` property.\n *\n * Possible values are:\n *\n * - `off` or `none`: No autocapitalization is applied (all letters default to lowercase)\n * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;\n * all other letters default to lowercase\n * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase\n * - `characters`: All letters should default to uppercase\n *\n * @default off\n * @attr\n */\n override autocapitalize: SupportedAutocapitalize = 'off'\n\n /**\n * Binds this to the `<input>`'s `accept` property,\n * used with type=file.\n * @attribute\n */\n @property({ type: String }) accessor accept: string | undefined\n\n /**\n * Binds this to the`<input>`'s `multiple` property,\n * used with type=file.\n * @attribute\n */\n @property({ type: Boolean }) accessor multiple: boolean | undefined\n\n /**\n * Binds this to the `<input>`'s `size` property.\n * @attribute\n */\n @property({ type: Number }) accessor size: number | undefined\n\n protected pendingSetters = new Map<keyof HTMLInputElement, unknown>()\n\n private setNativeValue(key: keyof HTMLInputElement, value: unknown): void {\n const { input } = this\n if (input) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(input as any)[key] = value\n } else {\n this.pendingSetters.set(key, value)\n }\n }\n\n private getNativeValue(key: keyof HTMLInputElement): unknown {\n const { input } = this\n if (input) {\n return input[key]\n }\n return this.pendingSetters.get(key) || null\n }\n\n /**\n * Gets or sets the direction in which selection occurred.\n */\n get selectionDirection(): 'forward' | 'backward' | 'none' | null {\n return this.getNativeValue('selectionDirection') as 'forward' | 'backward' | 'none' | null\n }\n\n set selectionDirection(value: 'forward' | 'backward' | 'none' | null) {\n this.setNativeValue('selectionDirection', value)\n }\n\n /**\n * Gets or sets the end position or offset of a text selection.\n */\n get selectionEnd(): number | null {\n return this.getNativeValue('selectionEnd') as number | null\n }\n\n set selectionEnd(value: number | null) {\n this.setNativeValue('selectionEnd', value)\n }\n\n /**\n * Gets or sets the starting position or offset of a text selection.\n */\n get selectionStart(): number | null {\n return this.getNativeValue('selectionStart') as number | null\n }\n\n set selectionStart(value: number | null) {\n this.setNativeValue('selectionStart', value)\n }\n\n /**\n * Returns or sets the element's step attribute, which works with min and max\n * to limit the increments at which a numeric or date-time value can be set.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n * @attribute\n */\n @property({ type: String }) accessor step = ''\n\n /**\n * Returns the native validation error message that would be displayed upon\n * calling `reportValidity()`.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage\n */\n get validationMessage(): string {\n return (this.getNativeValue('validationMessage') as string | null) ?? ''\n }\n\n /**\n * Returns a ValidityState object that represents the validity states of the\n * text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity\n */\n get validity(): ValidityState {\n return (this.getNativeValue('validity') as ValidityState | null) ?? this.#_internals.validity\n }\n\n /**\n * The text field's value as a number.\n */\n get valueAsNumber(): number {\n return (this.getNativeValue('valueAsNumber') as number | null) ?? 0\n }\n\n set valueAsNumber(value: number) {\n this.setNativeValue('valueAsNumber', value)\n }\n\n /**\n * The text field's value as a Date.\n */\n get valueAsDate(): Date | null {\n return this.getNativeValue('valueAsDate') as Date | null\n }\n\n set valueAsDate(value: Date | null) {\n this.setNativeValue('valueAsDate', value)\n }\n\n /**\n * Returns whether an element will successfully validate based on forms\n * validation rules and constraints.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/willValidate\n */\n get willValidate(): boolean {\n return (this.getNativeValue('willValidate') as boolean | null) ?? false\n }\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() protected accessor dirty = false\n\n @state() protected accessor focused = false\n\n get input(): HTMLInputElement | null {\n return this.shadowRoot?.querySelector('.input') ?? null\n }\n\n @queryAssignedElements({ slot: 'prefix' }) private accessor prefixes!: Element[]\n\n @queryAssignedElements({ slot: 'suffix' }) private accessor suffixes!: Element[]\n\n /**\n * The validation message displayed from a native error via\n * `reportValidity()`.\n */\n @state() protected accessor nativeErrorText = ''\n\n /**\n * Whether or not a native error has been reported via `reportValidity()`.\n */\n @state() protected accessor nativeError = false\n\n private readonly counterId = 'counter'\n\n private readonly supportingTextId = 'support'\n\n private readonly labelId = 'support'\n\n @property({ type: String, attribute: 'data-aria-autocomplete', noAccessor: true })\n override accessor ariaAutoComplete: ARIAAutoComplete | null = null\n\n @property({ type: String, attribute: 'data-aria-controls', noAccessor: true })\n accessor ariaControls: string | null = null\n\n @property({ type: String, attribute: 'data-aria-activedescendant', noAccessor: true })\n accessor ariaActiveDescendant: string | null = null\n\n @property({ type: String, attribute: 'data-aria-expanded', noAccessor: true })\n override accessor ariaExpanded: ARIAExpanded | null = null\n\n /**\n * The `aria-label` of the text field's input.\n */\n @property({ type: String, attribute: 'data-aria-label', noAccessor: true })\n override accessor ariaLabel!: string\n\n /**\n * The `aria-labelledby` of the text field's input.\n *\n * Note: currently only usable in SSR light DOM.\n */\n @property({ type: String, attribute: 'data-aria-labelledby', noAccessor: true })\n accessor ariaLabelledBy!: string\n\n @property({ type: String, attribute: 'data-role', noAccessor: true })\n accessor dataRole: ARIARole | null = null\n\n /**\n * When set to true, the error text's `role=\"alert\"` will be removed, then\n * re-added after an animation frame. This will re-announce an error message\n * to screen readers.\n */\n @state() protected accessor refreshErrorAlert = false\n\n /**\n * When set is shows password in the `password` input.\n * This is private so the password can be viewed only through user interaction.\n */\n #showPassword = false\n\n protected removingTabindex = false\n\n get files(): FileList | null {\n return this.getNativeValue('files') as FileList | null\n }\n\n /**\n * When set it adds a `<datalist>` element to the input.\n */\n @property({ type: Array }) accessor list: string[] | undefined\n\n constructor() {\n super()\n this.type = 'text'\n this.#_userInteracted = false\n this.actionController.cancelKeyboardEvents = false\n this.addEventListener('click', this.handleClick.bind(this))\n this.addEventListener('focus', this.handleFocus.bind(this))\n this.addEventListener('blur', this.handleBlur.bind(this))\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n if (!this.hasAttribute('tabindex') && !this.disabled) {\n this.setAttribute('tabindex', '0')\n }\n this.handleSlotChange()\n }\n\n /**\n * When form-associated custom elements are supported in the browser it\n * is called when the form has been reset\n */\n formResetCallback(): void {\n this.value = ''\n }\n\n /**\n * When form-associated custom elements are supported in the browser it\n * is called when the form state has been restored\n *\n * @param formState Restored value\n */\n formStateRestoreCallback(formState?: string): void {\n this.value = formState ?? ''\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('required')) {\n this._updateFormValue()\n }\n }\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties)\n if (changedProperties.has('value')) {\n this._updateFormValue()\n }\n if (this.refreshErrorAlert) {\n // The past render cycle removed the role=\"alert\" from the error message.\n // Re-add it after an animation frame to re-announce the error.\n requestAnimationFrame(() => {\n this.refreshErrorAlert = false\n })\n }\n }\n\n protected _updateFormValue(): void {\n const { value = '', disabled } = this\n if (!value || disabled) {\n this.#_internals.setFormValue(null)\n } else {\n this.#_internals.setFormValue(value)\n }\n this._updateValidationState()\n }\n\n protected _updateValidationState(): void {\n const { input } = this\n if (!input) {\n return\n }\n const { validationMessage, validity } = input\n if (!validity.valid) {\n this.#_internals.setValidity(\n {\n valueMissing: validity.valueMissing,\n badInput: validity.badInput,\n patternMismatch: validity.patternMismatch,\n rangeOverflow: validity.rangeOverflow,\n rangeUnderflow: validity.rangeUnderflow,\n stepMismatch: validity.stepMismatch,\n tooLong: validity.tooLong,\n tooShort: validity.tooShort,\n typeMismatch: validity.typeMismatch,\n customError: validity.customError,\n },\n validationMessage\n )\n return\n }\n\n this.#_internals.setValidity({})\n }\n\n protected invalidHandler(e: Event): void {\n this.retargetEvent(e)\n if (!this.#_userInteracted) {\n return\n }\n this.invalid = true\n }\n\n protected handleSlotChange(): void {\n this.hasPrefix = this.prefixes.length > 0\n this.hasSuffix = this.suffixes.length > 0\n }\n\n protected getInputValue(): string {\n if (this.type === 'color') {\n return this.value || '#000000'\n }\n return this.value || ''\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n checkValidity(): boolean {\n this.#_userInteracted = true\n const { valid } = this.checkValidityAndDispatch()\n this.invalid = !valid\n return valid\n }\n\n /**\n * Focuses the text field's input text.\n */\n override focus(): void {\n if (this.disabled || this.matches(':focus-within')) {\n return\n }\n this.input?.focus()\n }\n\n /**\n * Unfocuses the text field.\n */\n override blur(): void {\n this.input?.blur()\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * This method will display or clear an error text message equal to the text\n * field's `validationMessage`, unless the invalid event is canceled.\n *\n * Use `setCustomValidity()` to customize the `validationMessage`.\n *\n * This method can also be used to re-announce error messages to screen\n * readers.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n reportValidity(): boolean {\n this.#_userInteracted = true\n const { valid, canceled } = this.checkValidityAndDispatch()\n this._updateValidationState()\n if (!canceled) {\n this.invalid = !valid\n const prevMessage = this.getErrorText()\n this.nativeError = !valid\n this.nativeErrorText = this.validationMessage\n\n const needsRefresh = this.shouldErrorAnnounce() && prevMessage === this.getErrorText()\n if (needsRefresh) {\n this.refreshErrorAlert = true\n }\n }\n\n return valid\n }\n\n protected shouldErrorAnnounce(): boolean {\n // Announce if there is an error and error text visible.\n // If refreshErrorAlert is true, do not announce. This will remove the\n // role=\"alert\" attribute. Another render cycle will happen after an\n // animation frame to re-add the role.\n return this.getError() && !!this.getErrorText() && !this.refreshErrorAlert\n }\n\n protected getErrorText(): string {\n return this.invalid ? this.invalidText : this.nativeErrorText\n }\n\n /**\n * Selects all the text in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select\n */\n select(): void {\n this.input?.select()\n }\n\n /**\n * Sets the text field's native validation error message. This is used to\n * customize `validationMessage`.\n *\n * When the error is not an empty string, the text field is considered invalid\n * and `validity.customError` will be true.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity\n *\n * @param error The error message to display.\n */\n setCustomValidity(error: string): void {\n this.input?.setCustomValidity(error)\n }\n\n /**\n * Replaces a range of text with a new string.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setRangeText\n */\n setRangeText(replacement: string): void\n\n setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void\n\n setRangeText(...args: unknown[]): void {\n const { input } = this\n if (!input) {\n return\n }\n // Calling setRangeText with 1 vs 3-4 arguments has different behavior.\n // Use spread syntax and type casting to ensure correct usage.\n input.setRangeText(...(args as Parameters<HTMLInputElement['setRangeText']>))\n this.value = input.value\n }\n\n /**\n * Sets the start and end positions of a selection in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n *\n * @param start The offset into the text field for the start of the selection.\n * @param end The offset into the text field for the end of the selection.\n * @param direction The direction in which the selection is performed.\n */\n setSelectionRange(start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none'): void {\n this.input?.setSelectionRange(start, end, direction)\n }\n\n /**\n * Decrements the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown\n *\n * @param stepDecrement The number of steps to decrement, defaults to 1.\n */\n stepDown(stepDecrement?: number): void {\n const { input } = this\n if (!input) {\n return\n }\n input.stepDown(stepDecrement)\n this.value = input.value\n }\n\n /**\n * Increments the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp\n *\n * @param stepIncrement The number of steps to increment, defaults to 1.\n */\n stepUp(stepIncrement?: number): void {\n const { input } = this\n if (!input) {\n return\n }\n input.stepUp(stepIncrement)\n this.value = input.value\n }\n\n /**\n * Reset the text field to its default value.\n */\n reset(): void {\n this.dirty = false\n this.value = ''\n }\n\n override handleClick(): void {\n this.focus()\n }\n\n protected handleFocus(): void {\n const { input } = this\n if (this.disabled || !input) {\n return\n }\n this.focused = true\n this.#_userInteracted = true\n this.removingTabindex = true\n // Note, the input is automatically focused when form is being submitted and\n // it won't pass validation. In this case the form will throw an error\n // as the input is not focusable. In overall, this still works with forms and validation.\n this.dataset.tabindex = this.getAttribute('tabindex') || '0'\n this.removeAttribute('tabindex')\n input.focus()\n setTimeout(() => {\n this.removingTabindex = false\n }, 1)\n }\n\n protected handleBlur(): void {\n if (this.matches(':focus-within') || this.removingTabindex) {\n // Changing focus to another child within the text field, like a button\n return\n }\n this.focused = false\n const index = this.dataset.tabindex || '0'\n delete this.dataset.tabindex\n this.setAttribute('tabindex', index)\n }\n\n private checkValidityAndDispatch(): { valid: boolean; canceled: boolean } {\n const { input } = this\n const valid = input?.checkValidity() ?? true\n let canceled = false\n if (!valid) {\n canceled = !this.dispatchEvent(new Event('invalid', { cancelable: true }))\n }\n return { valid, canceled }\n }\n\n /**\n * @returns `true` when the label is in resting state.\n */\n protected labelResting(): boolean {\n const { value } = this\n if (!!value || String(value) === '0') {\n return false\n }\n if (floatTypes.includes(this.type || '')) {\n return false\n }\n return !this.placeholder && !this.focused\n }\n\n /**\n * @returns `true` when the label should be hidden\n */\n protected labelHidden(): boolean {\n const { noFloating } = this\n return !this.labelResting() && !!noFloating\n }\n\n protected renderLabelText(): string {\n const labelText = this.label ?? ''\n const optionalAsterisk = this.required && labelText ? '*' : ''\n return labelText + optionalAsterisk\n }\n\n protected getSupportingText(): string {\n const errorText = this.getErrorText()\n return this.getError() && errorText ? errorText : this.supportingText\n }\n\n protected getError(): boolean {\n return this.invalid || this.nativeError\n }\n\n protected retargetEvent(event: Event): boolean {\n if (event.bubbles && (!this.shadowRoot || event.composed)) {\n event.stopPropagation()\n }\n\n const copy = Reflect.construct(event.constructor, [event.type, event])\n const dispatched = this.dispatchEvent(copy)\n if (!dispatched) {\n event.preventDefault()\n }\n\n return dispatched\n }\n\n protected handleInput(event: InputEvent): void {\n this.dirty = true\n this.value = (event.target as HTMLInputElement).value\n this.retargetEvent(event)\n this.reportValidity()\n }\n\n protected hasCounter(): boolean {\n return this.maxLength > -1\n }\n\n protected getCounterText(): string {\n const { length } = this.value || ''\n return `${length} / ${this.maxLength || 0}`\n }\n\n protected getAriaDescribedBy(): string {\n const hasSupport = !!this.getSupportingText()\n const hasCounter = this.hasCounter()\n if (hasSupport) {\n return this.supportingTextId\n }\n if (hasCounter) {\n return this.counterId\n }\n return ''\n }\n\n #handlePasswordToggle(): void {\n this.#showPassword = !this.#showPassword\n this.requestUpdate()\n }\n\n protected get effectiveType(): SupportedInputTypes {\n const { type } = this\n if (type !== 'password') {\n return type\n }\n const visible = this.#showPassword\n return visible ? 'text' : 'password'\n }\n\n protected override render(): TemplateResult {\n const { pressed = false } = this\n const labelResting = this.labelResting()\n const containerClasses = classMap({\n surface: true,\n pressed,\n labelResting,\n labelActive: !labelResting,\n labelHidden: this.labelHidden(),\n })\n return html`\n <div class=\"${containerClasses}\">\n <div class=\"container\"></div>\n <div class=\"content\">\n ${this.renderPrefix()} ${this.renderBody()} ${this.renderPasswordControl()} ${this.renderSuffix()}\n ${this.renderHighlight()}\n </div>\n </div>\n ${this.renderSupportingText()} ${this.renderDataList()}\n `\n }\n\n protected renderPrefix(): TemplateResult {\n const classes = classMap({\n start: true,\n prefixed: this.hasPrefix,\n })\n return html` <div class=\"${classes}\">\n <slot name=\"prefix\" @slotchange=${this.handleSlotChange}></slot>\n </div>`\n }\n\n protected renderSuffix(): TemplateResult {\n const classes = classMap({\n end: true,\n suffixed: this.hasSuffix,\n })\n return html` <div class=\"${classes}\">\n <slot name=\"suffix\" @slotchange=${this.handleSlotChange}></slot>\n </div>`\n }\n\n protected renderBody(): TemplateResult {\n return html` <div class=\"body\">${this.renderLabel()} ${this.renderInput()}</div> `\n }\n\n protected renderLabel(): TemplateResult {\n const label = this.renderLabelText()\n if (!label) {\n return html``\n }\n return html` <span class=\"label\" id=\"${this.labelId}\" title=\"label\">${label}</span> `\n }\n\n protected renderHighlight(): TemplateResult {\n return html` <span class=\"highlight\"></span> `\n }\n\n protected abstract renderInput(): TemplateResult\n\n protected renderSupportingText(): TemplateResult {\n return html` <span class=\"supporting-text\"> ${this.renderSupportingTextValue()} ${this.renderCounter()} </span> `\n }\n\n protected renderSupportingTextValue(): TemplateResult {\n const text = this.getSupportingText()\n if (!text) {\n return html``\n }\n const shouldAlert = this.shouldErrorAnnounce()\n return html`\n <span\n class=\"supporting-text-start\"\n id=\"${this.supportingTextId}\"\n role=${ifDefined(shouldAlert ? 'alert' : undefined)}\n >\n ${text}\n </span>\n `\n }\n\n protected renderCounter(): TemplateResult {\n if (!this.hasCounter()) {\n return html``\n }\n // TODO: add aria-label and announcements\n return html`<span id=${this.counterId} class=\"supporting-text-end\">${this.getCounterText()}</span>`\n }\n\n protected renderPasswordControl(): TemplateResult | typeof nothing {\n const { type } = this\n if (type !== 'password') {\n return nothing\n }\n const visible = this.#showPassword\n const icon = visible ? 'visibilityOff' : 'visibility'\n return html`\n <ui-icon-button\n aria-label=\"Toggle password visibility\"\n @click=\"${this.#handlePasswordToggle}\"\n title=\"Shows or hides the password\"\n >\n <ui-icon icon=\"${icon}\"></ui-icon>\n </ui-icon-button>\n `\n }\n\n protected renderDataList(): TemplateResult | typeof nothing {\n const { list } = this\n if (!Array.isArray(list) || !list.length) {\n return nothing\n }\n return html` <datalist id=\"input-list\">${list.map((i) => html`<option value=\"${i}\"></option>`)}</datalist> `\n }\n}\n"]}
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/md/input/Input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkC,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,Q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,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;;UAEjD,IAAI;;KAET,CAAA;QACH,CAAC;QAES,aAAa;YACrB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAA,EAAE,CAAA;YACf,CAAC;YACD,yCAAyC;YACzC,OAAO,IAAI,CAAA,YAAY,IAAI,CAAC,SAAS,gCAAgC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAA;QACrG,CAAC;QAES,qBAAqB;YAC7B,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;YACrB,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;gBACxB,OAAO,OAAO,CAAA;YAChB,CAAC;YACD,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAA;YAClC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAA;YACrD,OAAO,IAAI,CAAA;;;kBAGG,IAAI,CAAC,qBAAqB;;;yBAGnB,IAAI;;KAExB,CAAA;QACH,CAAC;QAES,cAAc;YACtB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;YACrB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACzC,OAAO,OAAO,CAAA;YAChB,CAAC;YACD,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAA,kBAAkB,CAAC,aAAa,CAAC,cAAc,CAAA;QAC9G,CAAC;;;AAx9BH;;;GAGG;AACH","sourcesContent":["import { html, nothing, PropertyValues, TemplateResult } from 'lit'\nimport { property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { SupportedAutocapitalize, SupportedAutocomplete, SupportedInputTypes } from '../../types/input.js'\nimport { ARIAAutoComplete, ARIAExpanded, ARIARole } from '../../types/role.js'\nimport { isDisabled, setDisabled } from '../../lib/disabled.js'\nimport { UiElement } from '../UiElement.js'\nimport '../icon-button/ui-icon-button.js'\nimport '../icons/ui-icon.js'\n\nconst floatTypes = ['date', 'color', 'datetime-local', 'file', 'month', 'time', 'week']\n\n/**\n * @slot prefix - A slot in which to render prefixes of the input\n * @slot suffix - A slot in which to render suffixes of the input\n */\nexport default abstract class Input extends UiElement {\n #_userInteracted: boolean\n\n // static override shadowRootOptions: ShadowRootInit = {mode: 'open', delegatesFocus: true};\n\n static readonly formAssociated = true\n\n #_internals = this.attachInternals()\n\n get form(): HTMLFormElement | null {\n return this.#_internals && this.#_internals.form\n }\n\n /**\n * @attribute\n */\n @property({ type: String, reflect: true }) accessor type: SupportedInputTypes\n\n /**\n * Disables the input.\n * @attribute\n */\n get disabled(): boolean {\n return isDisabled(this)\n }\n\n @property({ reflect: true, type: Boolean })\n set disabled(value: boolean) {\n const old = isDisabled(this)\n setDisabled(this, value)\n this.requestUpdate('disabled', old)\n this._updateFormValue()\n if (value) {\n this.dataset.tabindex = this.getAttribute('tabindex') || '0'\n this.removeAttribute('tabindex')\n } else {\n const index = this.dataset.tabindex || '0'\n this.setAttribute('tabindex', index)\n this.blur()\n }\n }\n\n /**\n * The name of the form control, submitted as a pair with the control's value as part of the form data.\n * @attribute\n */\n @property({ type: String }) accessor name: string | undefined\n\n /**\n * When a form is submitted, only checkboxes which are currently checked are submitted to the server,\n * and the reported value is the `value` of the value attribute.\n * If the `value` is not otherwise specified, it is the string `on` by default.\n * @attribute\n */\n @property({ type: String }) accessor value = ''\n\n /**\n * Set to true to mark the input element as required.\n * @attribute\n */\n @property({ reflect: true, type: Boolean })\n accessor required: boolean | undefined\n\n /**\n * While the element can be easily styled with the `:valid` and `:invalid` pseudo classes\n * it also exposes an attribute to style the element as invalid. This attribute changes\n * when the element validation is performed.\n *\n * Calling `reportValidity()` will automatically update `invalid`.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) accessor invalid: boolean | undefined\n\n /**\n * The error message that replaces supporting text when `error` is true. If\n * `errorText` is an empty string, then the supporting text will continue to\n * show.\n *\n * Calling `reportValidity()` will automatically update `errorText` to the\n * native `validationMessage`.\n * @attribute\n */\n @property({ type: String }) accessor invalidText = ''\n\n /**\n * The label to be rendered with the input.\n * @attribute\n */\n @property({ type: String }) accessor label: string | undefined\n\n /**\n * Whether or not the text field has a leading icon. Used for SSR.\n * @attribute\n */\n @property({ type: Boolean }) accessor hasPrefix = false\n\n /**\n * Whether or not the text field has a trailing icon. Used for SSR.\n * @attribute\n */\n @property({ type: Boolean }) accessor hasSuffix = false\n\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n * @attribute\n */\n @property({ type: String }) accessor supportingText = ''\n\n /**\n * Override the input text CSS `direction`. Useful for RTL languages that use\n * LTR notation for fractions.\n * @attribute\n */\n @property({ type: String }) accessor textDirection = ''\n\n /**\n * When set the label of the input disappears after input rather than float over the input.\n * @attribute\n */\n @property({ type: Boolean }) accessor noFloating: boolean | undefined\n\n /**\n * Defines the greatest value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max\n * @attribute\n */\n @property({ type: String }) accessor max = ''\n\n /**\n * The maximum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength\n * @attribute\n */\n @property({ type: Number }) accessor maxLength = -1\n\n /**\n * Defines the most negative value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min\n * @attribute\n */\n @property({ type: String }) accessor min = ''\n\n /**\n * The minimum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength\n * @attribute\n */\n @property({ type: Number }) accessor minLength = -1\n\n /**\n * A regular expression that the text field's value must match to pass\n * constraint validation.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern\n * @attribute\n */\n @property({ type: String }) accessor pattern = ''\n\n /**\n * @attribute\n */\n @property({ type: String }) accessor placeholder = ''\n\n /**\n * Indicates whether or not a user should be able to edit the text field's\n * value.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly\n *\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) accessor readOnly = false\n\n /**\n * Bind the `<input>`'s `autocomplete` property.\n * @default off\n * @attribute\n */\n @property({ type: String }) accessor autocomplete: SupportedAutocomplete = 'off'\n\n /**\n * Binds this to the `<input>`'s `inputMode` property.\n * @attribute\n */\n @property({ type: String }) override accessor inputMode = ''\n\n /**\n * Binds this to the `<input>`'s `autocapitalize` property.\n *\n * Possible values are:\n *\n * - `off` or `none`: No auto-capitalization is applied (all letters default to lowercase)\n * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;\n * all other letters default to lowercase\n * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase\n * - `characters`: All letters should default to uppercase\n *\n * @default off\n * @attr\n */\n override autocapitalize: SupportedAutocapitalize = 'off'\n\n /**\n * Binds this to the `<input>`'s `accept` property,\n * used with type=file.\n * @attribute\n */\n @property({ type: String }) accessor accept: string | undefined\n\n /**\n * Binds this to the`<input>`'s `multiple` property,\n * used with type=file.\n * @attribute\n */\n @property({ type: Boolean }) accessor multiple: boolean | undefined\n\n /**\n * Binds this to the `<input>`'s `size` property.\n * @attribute\n */\n @property({ type: Number }) accessor size: number | undefined\n\n protected pendingSetters = new Map<keyof HTMLInputElement, unknown>()\n\n private setNativeValue(key: keyof HTMLInputElement, value: unknown): void {\n const { input } = this\n if (input) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(input as any)[key] = value\n } else {\n this.pendingSetters.set(key, value)\n }\n }\n\n private getNativeValue(key: keyof HTMLInputElement): unknown {\n const { input } = this\n if (input) {\n return input[key]\n }\n return this.pendingSetters.get(key) || null\n }\n\n /**\n * Gets or sets the direction in which selection occurred.\n */\n get selectionDirection(): 'forward' | 'backward' | 'none' | null {\n return this.getNativeValue('selectionDirection') as 'forward' | 'backward' | 'none' | null\n }\n\n set selectionDirection(value: 'forward' | 'backward' | 'none' | null) {\n this.setNativeValue('selectionDirection', value)\n }\n\n /**\n * Gets or sets the end position or offset of a text selection.\n */\n get selectionEnd(): number | null {\n return this.getNativeValue('selectionEnd') as number | null\n }\n\n set selectionEnd(value: number | null) {\n this.setNativeValue('selectionEnd', value)\n }\n\n /**\n * Gets or sets the starting position or offset of a text selection.\n */\n get selectionStart(): number | null {\n return this.getNativeValue('selectionStart') as number | null\n }\n\n set selectionStart(value: number | null) {\n this.setNativeValue('selectionStart', value)\n }\n\n /**\n * Returns or sets the element's step attribute, which works with min and max\n * to limit the increments at which a numeric or date-time value can be set.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n * @attribute\n */\n @property({ type: String }) accessor step = ''\n\n /**\n * Returns the native validation error message that would be displayed upon\n * calling `reportValidity()`.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage\n */\n get validationMessage(): string {\n return (this.getNativeValue('validationMessage') as string | null) ?? ''\n }\n\n /**\n * Returns a ValidityState object that represents the validity states of the\n * text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity\n */\n get validity(): ValidityState {\n return (this.getNativeValue('validity') as ValidityState | null) ?? this.#_internals.validity\n }\n\n /**\n * The text field's value as a number.\n */\n get valueAsNumber(): number {\n return (this.getNativeValue('valueAsNumber') as number | null) ?? 0\n }\n\n set valueAsNumber(value: number) {\n this.setNativeValue('valueAsNumber', value)\n }\n\n /**\n * The text field's value as a Date.\n */\n get valueAsDate(): Date | null {\n return this.getNativeValue('valueAsDate') as Date | null\n }\n\n set valueAsDate(value: Date | null) {\n this.setNativeValue('valueAsDate', value)\n }\n\n /**\n * Returns whether an element will successfully validate based on forms\n * validation rules and constraints.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/willValidate\n */\n get willValidate(): boolean {\n return (this.getNativeValue('willValidate') as boolean | null) ?? false\n }\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() protected accessor dirty = false\n\n @state() protected accessor focused = false\n\n get input(): HTMLInputElement | null {\n return this.shadowRoot?.querySelector('.input') ?? null\n }\n\n @queryAssignedElements({ slot: 'prefix' }) private accessor prefixes!: Element[]\n\n @queryAssignedElements({ slot: 'suffix' }) private accessor suffixes!: Element[]\n\n /**\n * The validation message displayed from a native error via\n * `reportValidity()`.\n */\n @state() protected accessor nativeErrorText = ''\n\n /**\n * Whether or not a native error has been reported via `reportValidity()`.\n */\n @state() protected accessor nativeError = false\n\n private readonly counterId = 'counter'\n\n private readonly supportingTextId = 'support'\n\n private readonly labelId = 'support'\n\n @property({ type: String, attribute: 'data-aria-autocomplete', noAccessor: true })\n override accessor ariaAutoComplete: ARIAAutoComplete | null = null\n\n @property({ type: String, attribute: 'data-aria-controls', noAccessor: true })\n accessor ariaControls: string | null = null\n\n @property({ type: String, attribute: 'data-aria-activedescendant', noAccessor: true })\n accessor ariaActiveDescendant: string | null = null\n\n @property({ type: String, attribute: 'data-aria-expanded', noAccessor: true })\n override accessor ariaExpanded: ARIAExpanded | null = null\n\n /**\n * The `aria-label` of the text field's input.\n */\n @property({ type: String, attribute: 'data-aria-label', noAccessor: true })\n override accessor ariaLabel!: string\n\n /**\n * The `aria-labelledby` of the text field's input.\n *\n * Note: currently only usable in SSR light DOM.\n */\n @property({ type: String, attribute: 'data-aria-labelledby', noAccessor: true })\n accessor ariaLabelledBy!: string\n\n @property({ type: String, attribute: 'data-role', noAccessor: true })\n accessor dataRole: ARIARole | null = null\n\n /**\n * When set to true, the error text's `role=\"alert\"` will be removed, then\n * re-added after an animation frame. This will re-announce an error message\n * to screen readers.\n */\n @state() protected accessor refreshErrorAlert = false\n\n /**\n * When set is shows password in the `password` input.\n * This is private so the password can be viewed only through user interaction.\n */\n #showPassword = false\n\n protected removingTabindex = false\n\n get files(): FileList | null {\n return this.getNativeValue('files') as FileList | null\n }\n\n /**\n * When set it adds a `<datalist>` element to the input.\n */\n @property({ type: Array }) accessor list: string[] | undefined\n\n constructor() {\n super()\n this.type = 'text'\n this.#_userInteracted = false\n this.actionController.cancelKeyboardEvents = false\n this.addEventListener('click', this.handleClick.bind(this))\n this.addEventListener('focus', this.handleFocus.bind(this))\n this.addEventListener('blur', this.handleBlur.bind(this))\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n if (!this.hasAttribute('tabindex') && !this.disabled) {\n this.setAttribute('tabindex', '0')\n }\n this.handleSlotChange()\n }\n\n /**\n * When form-associated custom elements are supported in the browser it\n * is called when the form has been reset\n */\n formResetCallback(): void {\n this.value = ''\n }\n\n /**\n * When form-associated custom elements are supported in the browser it\n * is called when the form state has been restored\n *\n * @param formState Restored value\n */\n formStateRestoreCallback(formState?: string): void {\n this.value = formState ?? ''\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('required')) {\n this._updateFormValue()\n }\n }\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties)\n if (changedProperties.has('value')) {\n this._updateFormValue()\n }\n if (this.refreshErrorAlert) {\n // The past render cycle removed the role=\"alert\" from the error message.\n // Re-add it after an animation frame to re-announce the error.\n requestAnimationFrame(() => {\n this.refreshErrorAlert = false\n })\n }\n }\n\n protected _updateFormValue(): void {\n const { value = '', disabled } = this\n if (!value || disabled) {\n this.#_internals.setFormValue(null)\n } else {\n this.#_internals.setFormValue(value)\n }\n this._updateValidationState()\n }\n\n protected _updateValidationState(): void {\n const { input } = this\n if (!input) {\n return\n }\n const { validationMessage, validity } = input\n if (!validity.valid) {\n this.#_internals.setValidity(\n {\n valueMissing: validity.valueMissing,\n badInput: validity.badInput,\n patternMismatch: validity.patternMismatch,\n rangeOverflow: validity.rangeOverflow,\n rangeUnderflow: validity.rangeUnderflow,\n stepMismatch: validity.stepMismatch,\n tooLong: validity.tooLong,\n tooShort: validity.tooShort,\n typeMismatch: validity.typeMismatch,\n customError: validity.customError,\n },\n validationMessage\n )\n return\n }\n\n this.#_internals.setValidity({})\n }\n\n protected invalidHandler(e: Event): void {\n this.retargetEvent(e)\n if (!this.#_userInteracted) {\n return\n }\n this.invalid = true\n }\n\n protected handleSlotChange(): void {\n this.hasPrefix = this.prefixes.length > 0\n this.hasSuffix = this.suffixes.length > 0\n }\n\n protected getInputValue(): string {\n if (this.type === 'color') {\n return this.value || '#000000'\n }\n return this.value || ''\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n checkValidity(): boolean {\n this.#_userInteracted = true\n const { valid } = this.checkValidityAndDispatch()\n this.invalid = !valid\n return valid\n }\n\n /**\n * Focuses the text field's input text.\n */\n override focus(): void {\n if (this.disabled || this.matches(':focus-within')) {\n return\n }\n this.input?.focus()\n }\n\n /**\n * Un-focuses the text field.\n */\n override blur(): void {\n this.input?.blur()\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * This method will display or clear an error text message equal to the text\n * field's `validationMessage`, unless the invalid event is canceled.\n *\n * Use `setCustomValidity()` to customize the `validationMessage`.\n *\n * This method can also be used to re-announce error messages to screen\n * readers.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n reportValidity(): boolean {\n this.#_userInteracted = true\n const { valid, canceled } = this.checkValidityAndDispatch()\n this._updateValidationState()\n if (!canceled) {\n this.invalid = !valid\n const prevMessage = this.getErrorText()\n this.nativeError = !valid\n this.nativeErrorText = this.validationMessage\n\n const needsRefresh = this.shouldErrorAnnounce() && prevMessage === this.getErrorText()\n if (needsRefresh) {\n this.refreshErrorAlert = true\n }\n }\n\n return valid\n }\n\n protected shouldErrorAnnounce(): boolean {\n // Announce if there is an error and error text visible.\n // If refreshErrorAlert is true, do not announce. This will remove the\n // role=\"alert\" attribute. Another render cycle will happen after an\n // animation frame to re-add the role.\n return this.getError() && !!this.getErrorText() && !this.refreshErrorAlert\n }\n\n protected getErrorText(): string {\n return this.invalidText || this.nativeErrorText\n }\n\n /**\n * Selects all the text in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select\n */\n select(): void {\n this.input?.select()\n }\n\n /**\n * Sets the text field's native validation error message. This is used to\n * customize `validationMessage`.\n *\n * When the error is not an empty string, the text field is considered invalid\n * and `validity.customError` will be true.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity\n *\n * @param error The error message to display.\n */\n setCustomValidity(error: string): void {\n this.input?.setCustomValidity(error)\n }\n\n /**\n * Replaces a range of text with a new string.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setRangeText\n */\n setRangeText(replacement: string): void\n\n setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void\n\n setRangeText(...args: unknown[]): void {\n const { input } = this\n if (!input) {\n return\n }\n // Calling setRangeText with 1 vs 3-4 arguments has different behavior.\n // Use spread syntax and type casting to ensure correct usage.\n input.setRangeText(...(args as Parameters<HTMLInputElement['setRangeText']>))\n this.value = input.value\n }\n\n /**\n * Sets the start and end positions of a selection in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n *\n * @param start The offset into the text field for the start of the selection.\n * @param end The offset into the text field for the end of the selection.\n * @param direction The direction in which the selection is performed.\n */\n setSelectionRange(start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none'): void {\n this.input?.setSelectionRange(start, end, direction)\n }\n\n /**\n * Decrements the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown\n *\n * @param stepDecrement The number of steps to decrement, defaults to 1.\n */\n stepDown(stepDecrement?: number): void {\n const { input } = this\n if (!input) {\n return\n }\n input.stepDown(stepDecrement)\n this.value = input.value\n }\n\n /**\n * Increments the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp\n *\n * @param stepIncrement The number of steps to increment, defaults to 1.\n */\n stepUp(stepIncrement?: number): void {\n const { input } = this\n if (!input) {\n return\n }\n input.stepUp(stepIncrement)\n this.value = input.value\n }\n\n /**\n * Reset the text field to its default value.\n */\n reset(): void {\n this.dirty = false\n this.value = ''\n }\n\n override handleClick(): void {\n this.focus()\n }\n\n protected handleFocus(): void {\n const { input } = this\n if (this.disabled || !input) {\n return\n }\n this.focused = true\n this.removingTabindex = true\n // Note, the input is automatically focused when form is being submitted and\n // it won't pass validation. In this case the form will throw an error\n // as the input is not focusable. In overall, this still works with forms and validation.\n if (this.checkNativeValidity()) {\n this.dataset.tabindex = this.getAttribute('tabindex') || '0'\n this.removeAttribute('tabindex')\n }\n input.focus()\n this.#_userInteracted = true\n setTimeout(() => {\n this.removingTabindex = false\n }, 1)\n }\n\n protected handleBlur(): void {\n if (this.matches(':focus-within') || this.removingTabindex) {\n // Changing focus to another child within the text field, like a button\n return\n }\n this.focused = false\n const index = this.dataset.tabindex || '0'\n delete this.dataset.tabindex\n this.setAttribute('tabindex', index)\n }\n\n private checkNativeValidity(): boolean {\n return this.input?.validity.valid ?? true\n }\n\n private checkValidityAndDispatch(): { valid: boolean; canceled: boolean } {\n const valid = this.input?.checkValidity() ?? true\n let canceled = false\n if (!valid) {\n canceled = !this.dispatchEvent(new Event('invalid', { cancelable: true }))\n }\n return { valid, canceled }\n }\n\n /**\n * @returns `true` when the label is in resting state.\n */\n protected labelResting(): boolean {\n const { value } = this\n if (!!value || String(value) === '0') {\n return false\n }\n if (floatTypes.includes(this.type || '')) {\n return false\n }\n return !this.placeholder && !this.focused\n }\n\n /**\n * @returns `true` when the label should be hidden\n */\n protected labelHidden(): boolean {\n const { noFloating } = this\n return !this.labelResting() && !!noFloating\n }\n\n protected renderLabelText(): string {\n const labelText = this.label ?? ''\n const optionalAsterisk = this.required && labelText ? '*' : ''\n return labelText + optionalAsterisk\n }\n\n protected getSupportingText(): string {\n const errorText = this.getErrorText()\n return this.getError() && errorText ? errorText : this.supportingText\n }\n\n protected getError(): boolean {\n return this.invalid || this.nativeError\n }\n\n protected retargetEvent(event: Event): boolean {\n if (event.bubbles && (!this.shadowRoot || event.composed)) {\n event.stopPropagation()\n }\n\n const copy = Reflect.construct(event.constructor, [event.type, event])\n const dispatched = this.dispatchEvent(copy)\n if (!dispatched) {\n event.preventDefault()\n }\n\n return dispatched\n }\n\n protected handleInput(event: InputEvent): void {\n this.dirty = true\n this.value = (event.target as HTMLInputElement).value\n this.retargetEvent(event)\n this.reportValidity()\n }\n\n protected hasCounter(): boolean {\n return this.maxLength > -1\n }\n\n protected getCounterText(): string {\n const { length } = this.value || ''\n return `${length} / ${this.maxLength || 0}`\n }\n\n protected getAriaDescribedBy(): string {\n const hasSupport = !!this.getSupportingText()\n if (hasSupport) {\n return this.supportingTextId\n }\n const hasCounter = this.hasCounter()\n if (hasCounter) {\n return this.counterId\n }\n return ''\n }\n\n #handlePasswordToggle(): void {\n this.#showPassword = !this.#showPassword\n this.requestUpdate()\n }\n\n protected get effectiveType(): SupportedInputTypes {\n const { type } = this\n if (type !== 'password') {\n return type\n }\n const visible = this.#showPassword\n return visible ? 'text' : 'password'\n }\n\n protected override render(): TemplateResult {\n const { pressed = false } = this\n const labelResting = this.labelResting()\n const containerClasses = classMap({\n surface: true,\n pressed,\n labelResting,\n labelActive: !labelResting,\n labelHidden: this.labelHidden(),\n })\n return html`\n <div class=\"${containerClasses}\">\n <div class=\"container\"></div>\n <div class=\"content\">\n ${this.renderPrefix()} ${this.renderBody()} ${this.renderPasswordControl()} ${this.renderSuffix()}\n ${this.renderHighlight()}\n </div>\n </div>\n ${this.renderSupportingText()} ${this.renderDataList()}\n `\n }\n\n protected renderPrefix(): TemplateResult {\n const classes = classMap({\n start: true,\n prefixed: this.hasPrefix,\n })\n return html` <div class=\"${classes}\">\n <slot name=\"prefix\" @slotchange=${this.handleSlotChange}></slot>\n </div>`\n }\n\n protected renderSuffix(): TemplateResult {\n const classes = classMap({\n end: true,\n suffixed: this.hasSuffix,\n })\n return html` <div class=\"${classes}\">\n <slot name=\"suffix\" @slotchange=${this.handleSlotChange}></slot>\n </div>`\n }\n\n protected renderBody(): TemplateResult {\n return html` <div class=\"body\">${this.renderLabel()} ${this.renderInput()}</div> `\n }\n\n protected renderLabel(): TemplateResult {\n const label = this.renderLabelText()\n if (!label) {\n return html``\n }\n return html` <span class=\"label\" id=\"${this.labelId}\" title=\"label\">${label}</span> `\n }\n\n protected renderHighlight(): TemplateResult {\n return html` <span class=\"highlight\"></span> `\n }\n\n protected abstract renderInput(): TemplateResult\n\n protected renderSupportingText(): TemplateResult {\n return html` <span class=\"supporting-text\"> ${this.renderSupportingTextValue()} ${this.renderCounter()} </span> `\n }\n\n protected renderSupportingTextValue(): TemplateResult | typeof nothing {\n const text = this.getSupportingText()\n if (!text) {\n return nothing\n }\n const shouldAlert = this.shouldErrorAnnounce()\n return html`\n <span\n class=\"supporting-text-start\"\n id=\"${this.supportingTextId}\"\n role=${ifDefined(shouldAlert ? 'alert' : undefined)}\n >\n ${text}\n </span>\n `\n }\n\n protected renderCounter(): TemplateResult {\n if (!this.hasCounter()) {\n return html``\n }\n // TODO: add aria-label and announcements\n return html`<span id=${this.counterId} class=\"supporting-text-end\">${this.getCounterText()}</span>`\n }\n\n protected renderPasswordControl(): TemplateResult | typeof nothing {\n const { type } = this\n if (type !== 'password') {\n return nothing\n }\n const visible = this.#showPassword\n const icon = visible ? 'visibilityOff' : 'visibility'\n return html`\n <ui-icon-button\n aria-label=\"Toggle password visibility\"\n @click=\"${this.#handlePasswordToggle}\"\n title=\"Shows or hides the password\"\n >\n <ui-icon icon=\"${icon}\"></ui-icon>\n </ui-icon-button>\n `\n }\n\n protected renderDataList(): TemplateResult | typeof nothing {\n const { list } = this\n if (!Array.isArray(list) || !list.length) {\n return nothing\n }\n return html` <datalist id=\"input-list\">${list.map((i) => html`<option value=\"${i}\"></option>`)}</datalist> `\n }\n}\n"]}
@@ -32,6 +32,7 @@ export default class UiRipple extends LitElement {
32
32
  protected render(): TemplateResult;
33
33
  /** @soyTemplate */
34
34
  protected getRenderRippleClasses(): ClassInfo;
35
+ protected willUpdate(changed: PropertyValues): void;
35
36
  protected update(changedProps: PropertyValues<this>): void;
36
37
  protected getDimensions(): DOMRect;
37
38
  protected determineRippleSize(): void;
@@ -48,6 +49,7 @@ export default class UiRipple extends LitElement {
48
49
  endFocus(): void;
49
50
  beginPress(positionEvent?: Event | null): void;
50
51
  endPress(): void;
52
+ protected manageActivated(): void;
51
53
  }
52
54
  export {};
53
55
  //# sourceMappingURL=ripple.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ripple.d.ts","sourceRoot":"","sources":["../../../../../src/md/ripple/internals/ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAY,MAAM,6BAA6B,CAAA;AAYjE,UAAU,MAAM;IACd,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAC3B,QAAQ,CAAC,MAAM,EAAG,WAAW,CAAA;IAEhD;;OAEG;IAC0B,QAAQ,CAAC,SAAS,UAAQ;IAEvD;;OAEG;IACyC,QAAQ,CAAC,QAAQ,UAAQ;IAE5D,SAAS,CAAC,QAAQ,CAAC,OAAO,UAAQ;IAElC,SAAS,CAAC,QAAQ,CAAC,OAAO,UAAQ;IAElC,SAAS,CAAC,QAAQ,CAA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3G,SAAS,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI;YA+BnD,iBAAiB;IA4B/B,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,GAAG,IAAI;IAOpC,QAAQ,IAAI,IAAI;IAKhB,UAAU,IAAI,IAAI;IAKlB,QAAQ,IAAI,IAAI;IAKhB,UAAU,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI;IAW9C,QAAQ,IAAI,IAAI;IAchB,SAAS,CAAC,eAAe,IAAI,IAAI;CAOlC"}
@@ -103,6 +103,12 @@ let UiRipple = (() => {
103
103
  unbounded: this.unbounded,
104
104
  };
105
105
  }
106
+ willUpdate(changed) {
107
+ super.willUpdate(changed);
108
+ if (changed.has('hovered') || changed.has('focused') || changed.has('pressed')) {
109
+ this.manageActivated();
110
+ }
111
+ }
106
112
  update(changedProps) {
107
113
  if (changedProps.has('disabled') && this.disabled) {
108
114
  this.endHover();
@@ -173,7 +179,6 @@ let UiRipple = (() => {
173
179
  const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);
174
180
  const translateStart = `${startPoint.x}px, ${startPoint.y}px`;
175
181
  const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;
176
- // const signal = this.pressAnimationSignal.start()
177
182
  const growAnimation = mdRoot.animate({
178
183
  top: [0, 0],
179
184
  left: [0, 0],
@@ -186,19 +191,10 @@ let UiRipple = (() => {
186
191
  easing: Easing.STANDARD,
187
192
  fill: ANIMATION_FILL,
188
193
  });
189
- // growAnimation.addEventListener('finish', () => {
190
- // this.pressAnimationSignal.finish()
191
- // this.growAnimation = null
192
- // })
193
- // signal.addEventListener('abort', () => {
194
- // growAnimation.cancel()
195
- // this.growAnimation = null
196
- // })
197
194
  this.growAnimation = growAnimation;
198
195
  }
199
196
  async endPressAnimation() {
200
197
  this.rippleStartEvent = undefined;
201
- // this.state = State.INACTIVE
202
198
  const animation = this.growAnimation;
203
199
  let pressAnimationPlayState = Infinity;
204
200
  if (typeof animation?.currentTime === 'number') {
@@ -224,16 +220,20 @@ let UiRipple = (() => {
224
220
  beginHover(hoverEvent) {
225
221
  if (hoverEvent?.pointerType !== 'touch') {
226
222
  this.hovered = true;
223
+ this.manageActivated();
227
224
  }
228
225
  }
229
226
  endHover() {
230
227
  this.hovered = false;
228
+ this.manageActivated();
231
229
  }
232
230
  beginFocus() {
233
231
  this.focused = true;
232
+ this.manageActivated();
234
233
  }
235
234
  endFocus() {
236
235
  this.focused = false;
236
+ this.manageActivated();
237
237
  }
238
238
  beginPress(positionEvent) {
239
239
  this.pressed = true;
@@ -243,6 +243,7 @@ let UiRipple = (() => {
243
243
  this.delayedEndPressHandle = null;
244
244
  }
245
245
  this.startPressAnimation(positionEvent);
246
+ this.manageActivated();
246
247
  }
247
248
  endPress() {
248
249
  const pressAnimationPlayState = (this.growAnimation?.currentTime ?? Infinity);
@@ -256,6 +257,15 @@ let UiRipple = (() => {
256
257
  }, MINIMUM_PRESS_MS - pressAnimationPlayState);
257
258
  }
258
259
  this.endPressAnimation();
260
+ this.manageActivated();
261
+ }
262
+ manageActivated() {
263
+ if (this.pressed || this.hovered || this.focused) {
264
+ this.classList.add('activated');
265
+ }
266
+ else {
267
+ this.classList.remove('activated');
268
+ }
259
269
  }
260
270
  };
261
271
  })();
@@ -1 +1 @@
1
- {"version":3,"file":"ripple.js","sourceRoot":"","sources":["../../../../../src/md/ripple/internals/ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkC,MAAM,KAAK,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,MAAM,aAAa,GAAG,GAAG,CAAA;AACzB,MAAM,gBAAgB,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AO,GAAG,KAAK,CAAA;YACtB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,qBAAqB,GAAG,UAAU,CAAC,GAAG,EAAE;oBAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;oBACpB,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAA;gBACnC,CAAC,EAAE,gBAAgB,GAAG,uBAAuB,CAAsB,CAAA;YACrE,CAAC;YACD,IAAI,CAAC,iBAAiB,EAAE,CAAA;QAC1B,CAAC;;;AAxOH,wBAyOC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { html, LitElement, PropertyValues, TemplateResult } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { ClassInfo, classMap } from 'lit/directives/class-map.js'\nimport { Easing } from '../../motion/animation.js'\n\nconst PRESS_GROW_MS = 450\nconst MINIMUM_PRESS_MS = 80\nconst INITIAL_ORIGIN_SCALE = 0.2\nconst PADDING = 10\nconst SOFT_EDGE_MINIMUM_SIZE = 75\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35\nconst PRESS_PSEUDO = '::after'\nconst ANIMATION_FILL = 'forwards'\n\ninterface IPoint {\n x: number\n y: number\n}\n\nexport default class UiRipple extends LitElement {\n @query('.surface') accessor mdRoot!: HTMLElement\n\n /**\n * @attribute\n */\n @property({ type: Boolean }) accessor unbounded = false\n\n /**\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) accessor disabled = false\n\n @state() protected accessor hovered = false\n\n @state() protected accessor focused = false\n\n @state() protected accessor pressed = false\n\n get isPressed(): boolean {\n return this.pressed\n }\n\n protected rippleSize = ''\n\n protected rippleScale = ''\n\n protected initialSize = 0\n\n private rippleStartEvent?: Event | null\n\n // protected pressAnimationSignal = createAnimationSignal()\n\n protected growAnimation: Animation | null = null\n\n protected delayedEndPressHandle: number | null = null\n\n protected override render(): TemplateResult {\n return html`<div class=\"surface ${classMap(this.getRenderRippleClasses())}\"></div>`\n }\n\n /** @soyTemplate */\n protected getRenderRippleClasses(): ClassInfo {\n return {\n hovered: this.hovered,\n focused: this.focused,\n pressed: this.pressed,\n unbounded: this.unbounded,\n }\n }\n\n protected override update(changedProps: PropertyValues<this>): void {\n if (changedProps.has('disabled') && this.disabled) {\n this.endHover()\n this.endFocus()\n this.endPress()\n }\n super.update(changedProps)\n }\n\n protected getDimensions(): DOMRect {\n return (this.parentElement ?? this).getBoundingClientRect()\n }\n\n protected determineRippleSize(): void {\n const { height, width } = this.getDimensions()\n const maxDim = Math.max(height, width)\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE)\n\n let maxRadius = maxDim\n let initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE)\n\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2)\n maxRadius = hypotenuse + PADDING\n\n // ensure `initialSize` is even for unbounded\n if (this.unbounded) {\n initialSize -= initialSize % 2\n }\n\n this.initialSize = initialSize\n this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`\n this.rippleSize = `${this.initialSize}px`\n }\n\n protected getNormalizedPointerEventCoords(pointerEvent: PointerEvent): IPoint {\n const { scrollX, scrollY } = window\n const { left, top } = this.getDimensions()\n const documentX = scrollX + left\n const documentY = scrollY + top\n const { pageX, pageY } = pointerEvent\n return { x: pageX - documentX, y: pageY - documentY }\n }\n\n protected getTranslationCoordinates(positionEvent?: Event | null): { startPoint: IPoint; endPoint: IPoint } {\n const { height, width } = this.getDimensions()\n // end in the center\n const endPoint = {\n x: (width - this.initialSize) / 2,\n y: (height - this.initialSize) / 2,\n }\n\n let startPoint\n if (positionEvent instanceof PointerEvent) {\n startPoint = this.getNormalizedPointerEventCoords(positionEvent)\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2,\n }\n }\n\n // center around start point\n startPoint = {\n x: startPoint.x - this.initialSize / 2,\n y: startPoint.y - this.initialSize / 2,\n }\n\n return { startPoint, endPoint }\n }\n\n protected startPressAnimation(positionEvent?: Event | null): void {\n const { mdRoot } = this\n if (!mdRoot) {\n return\n }\n this.pressed = true\n this.growAnimation?.cancel()\n this.determineRippleSize()\n const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent)\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`\n\n // const signal = this.pressAnimationSignal.start()\n\n const growAnimation = mdRoot.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [this.rippleSize, this.rippleSize],\n width: [this.rippleSize, this.rippleSize],\n transform: [`translate(${translateStart}) scale(1)`, `translate(${translateEnd}) scale(${this.rippleScale})`],\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: Easing.STANDARD,\n fill: ANIMATION_FILL,\n }\n )\n\n // growAnimation.addEventListener('finish', () => {\n // this.pressAnimationSignal.finish()\n // this.growAnimation = null\n // })\n\n // signal.addEventListener('abort', () => {\n // growAnimation.cancel()\n // this.growAnimation = null\n // })\n\n this.growAnimation = growAnimation\n }\n\n private async endPressAnimation() {\n this.rippleStartEvent = undefined\n // this.state = State.INACTIVE\n const animation = this.growAnimation\n let pressAnimationPlayState = Infinity\n if (typeof animation?.currentTime === 'number') {\n pressAnimationPlayState = animation.currentTime\n } else if (animation?.currentTime) {\n pressAnimationPlayState = animation.currentTime.to('ms').value\n }\n\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false\n return\n }\n\n await new Promise((resolve) => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState)\n })\n\n if (this.growAnimation !== animation) {\n // A new press animation was started. The old animation was canceled and\n // should not finish the pressed state.\n return\n }\n\n this.pressed = false\n }\n\n beginHover(hoverEvent?: Event): void {\n if ((hoverEvent as PointerEvent)?.pointerType !== 'touch') {\n this.hovered = true\n }\n }\n\n endHover(): void {\n this.hovered = false\n }\n\n beginFocus(): void {\n this.focused = true\n }\n\n endFocus(): void {\n this.focused = false\n }\n\n beginPress(positionEvent?: Event | null): void {\n this.pressed = true\n this.rippleStartEvent = positionEvent\n if (this.delayedEndPressHandle !== null) {\n clearTimeout(this.delayedEndPressHandle)\n this.delayedEndPressHandle = null\n }\n this.startPressAnimation(positionEvent)\n }\n\n endPress(): void {\n const pressAnimationPlayState = (this.growAnimation?.currentTime ?? Infinity) as number\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false\n } else {\n this.delayedEndPressHandle = setTimeout(() => {\n this.pressed = false\n this.delayedEndPressHandle = null\n }, MINIMUM_PRESS_MS - pressAnimationPlayState) as unknown as number\n }\n this.endPressAnimation()\n }\n}\n"]}
1
+ {"version":3,"file":"ripple.js","sourceRoot":"","sources":["../../../../../src/md/ripple/internals/ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkC,MAAM,KAAK,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,MAAM,aAAa,GAAG,GAAG,CAAA;AACzB,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAC3B,MAAM,oBAAoB,GAAG,GAAG,CAAA;AAChC,MAAM,OAAO,GAAG,EAAE,CAAA;AAClB,MAAM,sBAAsB,GAAG,EAAE,CAAA;AACjC,MAAM,yBAAyB,GAAG,IAAI,CAAA;AACtC,MAAM,YAAY,GAAG,SAAS,CAAA;AAC9B,MAAM,cAAc,GAAG,UAAU,CAAA;;sBAOK,UAAU;;;;;;;;;;;;;;;;;;;iBAA3B,QAAS,SAAQ,WAAU;;;kCAC7C,KAAK,CAAC,UAAU,CAAC;qCAKjB,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oCAK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,GAAG,EAAE;oBAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;oBACpB,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAA;gBACnC,CAAC,EAAE,gBAAgB,GAAG,uBAAuB,CAAsB,CAAA;YACrE,CAAC;YACD,IAAI,CAAC,iBAAiB,EAAE,CAAA;YACxB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC;QAES,eAAe;YACvB,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;YACpC,CAAC;QACH,CAAC;;;AAhPH,wBAiPC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { html, LitElement, PropertyValues, TemplateResult } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { ClassInfo, classMap } from 'lit/directives/class-map.js'\nimport { Easing } from '../../motion/animation.js'\n\nconst PRESS_GROW_MS = 450\nconst MINIMUM_PRESS_MS = 80\nconst INITIAL_ORIGIN_SCALE = 0.2\nconst PADDING = 10\nconst SOFT_EDGE_MINIMUM_SIZE = 75\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35\nconst PRESS_PSEUDO = '::after'\nconst ANIMATION_FILL = 'forwards'\n\ninterface IPoint {\n x: number\n y: number\n}\n\nexport default class UiRipple extends LitElement {\n @query('.surface') accessor mdRoot!: HTMLElement\n\n /**\n * @attribute\n */\n @property({ type: Boolean }) accessor unbounded = false\n\n /**\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) accessor disabled = false\n\n @state() protected accessor hovered = false\n\n @state() protected accessor focused = false\n\n @state() protected accessor pressed = false\n\n get isPressed(): boolean {\n return this.pressed\n }\n\n protected rippleSize = ''\n\n protected rippleScale = ''\n\n protected initialSize = 0\n\n private rippleStartEvent?: Event | null\n\n // protected pressAnimationSignal = createAnimationSignal()\n\n protected growAnimation: Animation | null = null\n\n protected delayedEndPressHandle: number | null = null\n\n protected override render(): TemplateResult {\n return html`<div class=\"surface ${classMap(this.getRenderRippleClasses())}\"></div>`\n }\n\n /** @soyTemplate */\n protected getRenderRippleClasses(): ClassInfo {\n return {\n hovered: this.hovered,\n focused: this.focused,\n pressed: this.pressed,\n unbounded: this.unbounded,\n }\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed)\n if (changed.has('hovered') || changed.has('focused') || changed.has('pressed')) {\n this.manageActivated()\n }\n }\n\n protected override update(changedProps: PropertyValues<this>): void {\n if (changedProps.has('disabled') && this.disabled) {\n this.endHover()\n this.endFocus()\n this.endPress()\n }\n super.update(changedProps)\n }\n\n protected getDimensions(): DOMRect {\n return (this.parentElement ?? this).getBoundingClientRect()\n }\n\n protected determineRippleSize(): void {\n const { height, width } = this.getDimensions()\n const maxDim = Math.max(height, width)\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE)\n\n let maxRadius = maxDim\n let initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE)\n\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2)\n maxRadius = hypotenuse + PADDING\n\n // ensure `initialSize` is even for unbounded\n if (this.unbounded) {\n initialSize -= initialSize % 2\n }\n\n this.initialSize = initialSize\n this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`\n this.rippleSize = `${this.initialSize}px`\n }\n\n protected getNormalizedPointerEventCoords(pointerEvent: PointerEvent): IPoint {\n const { scrollX, scrollY } = window\n const { left, top } = this.getDimensions()\n const documentX = scrollX + left\n const documentY = scrollY + top\n const { pageX, pageY } = pointerEvent\n return { x: pageX - documentX, y: pageY - documentY }\n }\n\n protected getTranslationCoordinates(positionEvent?: Event | null): { startPoint: IPoint; endPoint: IPoint } {\n const { height, width } = this.getDimensions()\n // end in the center\n const endPoint = {\n x: (width - this.initialSize) / 2,\n y: (height - this.initialSize) / 2,\n }\n\n let startPoint\n if (positionEvent instanceof PointerEvent) {\n startPoint = this.getNormalizedPointerEventCoords(positionEvent)\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2,\n }\n }\n\n // center around start point\n startPoint = {\n x: startPoint.x - this.initialSize / 2,\n y: startPoint.y - this.initialSize / 2,\n }\n\n return { startPoint, endPoint }\n }\n\n protected startPressAnimation(positionEvent?: Event | null): void {\n const { mdRoot } = this\n if (!mdRoot) {\n return\n }\n this.pressed = true\n this.growAnimation?.cancel()\n this.determineRippleSize()\n const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent)\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`\n\n const growAnimation = mdRoot.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [this.rippleSize, this.rippleSize],\n width: [this.rippleSize, this.rippleSize],\n transform: [`translate(${translateStart}) scale(1)`, `translate(${translateEnd}) scale(${this.rippleScale})`],\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: Easing.STANDARD,\n fill: ANIMATION_FILL,\n }\n )\n\n this.growAnimation = growAnimation\n }\n\n private async endPressAnimation() {\n this.rippleStartEvent = undefined\n const animation = this.growAnimation\n let pressAnimationPlayState = Infinity\n if (typeof animation?.currentTime === 'number') {\n pressAnimationPlayState = animation.currentTime\n } else if (animation?.currentTime) {\n pressAnimationPlayState = animation.currentTime.to('ms').value\n }\n\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false\n return\n }\n\n await new Promise((resolve) => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState)\n })\n\n if (this.growAnimation !== animation) {\n // A new press animation was started. The old animation was canceled and\n // should not finish the pressed state.\n return\n }\n\n this.pressed = false\n }\n\n beginHover(hoverEvent?: Event): void {\n if ((hoverEvent as PointerEvent)?.pointerType !== 'touch') {\n this.hovered = true\n this.manageActivated()\n }\n }\n\n endHover(): void {\n this.hovered = false\n this.manageActivated()\n }\n\n beginFocus(): void {\n this.focused = true\n this.manageActivated()\n }\n\n endFocus(): void {\n this.focused = false\n this.manageActivated()\n }\n\n beginPress(positionEvent?: Event | null): void {\n this.pressed = true\n this.rippleStartEvent = positionEvent\n if (this.delayedEndPressHandle !== null) {\n clearTimeout(this.delayedEndPressHandle)\n this.delayedEndPressHandle = null\n }\n this.startPressAnimation(positionEvent)\n this.manageActivated()\n }\n\n endPress(): void {\n const pressAnimationPlayState = (this.growAnimation?.currentTime ?? Infinity) as number\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false\n } else {\n this.delayedEndPressHandle = setTimeout(() => {\n this.pressed = false\n this.delayedEndPressHandle = null\n }, MINIMUM_PRESS_MS - pressAnimationPlayState) as unknown as number\n }\n this.endPressAnimation()\n this.manageActivated()\n }\n\n protected manageActivated(): void {\n if (this.pressed || this.hovered || this.focused) {\n this.classList.add('activated')\n } else {\n this.classList.remove('activated')\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ripple.styles.d.ts","sourceRoot":"","sources":["../../../../../src/md/ripple/internals/ripple.styles.ts"],"names":[],"mappings":";AAEA,wBAoFC"}
1
+ {"version":3,"file":"ripple.styles.d.ts","sourceRoot":"","sources":["../../../../../src/md/ripple/internals/ripple.styles.ts"],"names":[],"mappings":";AAEA,wBAwEC"}