@vincentgraul/react-components 1.0.2 → 1.0.4

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 (966) hide show
  1. package/build/cjs/_virtual/AsymmetricMatcher.js +7 -0
  2. package/build/cjs/_virtual/ConvertAnsi.js +7 -0
  3. package/build/cjs/_virtual/DOMCollection.js +7 -0
  4. package/build/cjs/_virtual/DOMElement.js +7 -0
  5. package/build/cjs/_virtual/Immutable.js +7 -0
  6. package/build/cjs/_virtual/ReactElement.js +7 -0
  7. package/build/cjs/_virtual/ReactTestComponent.js +7 -0
  8. package/build/cjs/_virtual/_commonjsHelpers.js +12 -0
  9. package/build/cjs/_virtual/alertRole.js +7 -0
  10. package/build/cjs/_virtual/alertdialogRole.js +7 -0
  11. package/build/cjs/_virtual/applicationRole.js +7 -0
  12. package/build/cjs/_virtual/ariaAbstractRoles.js +7 -0
  13. package/build/cjs/_virtual/ariaDpubRoles.js +7 -0
  14. package/build/cjs/_virtual/ariaLiteralRoles.js +7 -0
  15. package/build/cjs/_virtual/ariaPropsMap.js +7 -0
  16. package/build/cjs/_virtual/articleRole.js +7 -0
  17. package/build/cjs/_virtual/bannerRole.js +7 -0
  18. package/build/cjs/_virtual/blockquoteRole.js +7 -0
  19. package/build/cjs/_virtual/buttonRole.js +7 -0
  20. package/build/cjs/_virtual/captionRole.js +7 -0
  21. package/build/cjs/_virtual/cellRole.js +7 -0
  22. package/build/cjs/_virtual/checkboxRole.js +7 -0
  23. package/build/cjs/_virtual/codeRole.js +7 -0
  24. package/build/cjs/_virtual/collections.js +7 -0
  25. package/build/cjs/_virtual/columnheaderRole.js +7 -0
  26. package/build/cjs/_virtual/comboboxRole.js +7 -0
  27. package/build/cjs/_virtual/commandRole.js +7 -0
  28. package/build/cjs/_virtual/complementaryRole.js +7 -0
  29. package/build/cjs/_virtual/compositeRole.js +7 -0
  30. package/build/cjs/_virtual/contentinfoRole.js +7 -0
  31. package/build/cjs/_virtual/definitionRole.js +7 -0
  32. package/build/cjs/_virtual/deletionRole.js +7 -0
  33. package/build/cjs/_virtual/dialogRole.js +7 -0
  34. package/build/cjs/_virtual/directoryRole.js +7 -0
  35. package/build/cjs/_virtual/docAbstractRole.js +7 -0
  36. package/build/cjs/_virtual/docAcknowledgmentsRole.js +7 -0
  37. package/build/cjs/_virtual/docAfterwordRole.js +7 -0
  38. package/build/cjs/_virtual/docAppendixRole.js +7 -0
  39. package/build/cjs/_virtual/docBacklinkRole.js +7 -0
  40. package/build/cjs/_virtual/docBiblioentryRole.js +7 -0
  41. package/build/cjs/_virtual/docBibliographyRole.js +7 -0
  42. package/build/cjs/_virtual/docBibliorefRole.js +7 -0
  43. package/build/cjs/_virtual/docChapterRole.js +7 -0
  44. package/build/cjs/_virtual/docColophonRole.js +7 -0
  45. package/build/cjs/_virtual/docConclusionRole.js +7 -0
  46. package/build/cjs/_virtual/docCoverRole.js +7 -0
  47. package/build/cjs/_virtual/docCreditRole.js +7 -0
  48. package/build/cjs/_virtual/docCreditsRole.js +7 -0
  49. package/build/cjs/_virtual/docDedicationRole.js +7 -0
  50. package/build/cjs/_virtual/docEndnoteRole.js +7 -0
  51. package/build/cjs/_virtual/docEndnotesRole.js +7 -0
  52. package/build/cjs/_virtual/docEpigraphRole.js +7 -0
  53. package/build/cjs/_virtual/docEpilogueRole.js +7 -0
  54. package/build/cjs/_virtual/docErrataRole.js +7 -0
  55. package/build/cjs/_virtual/docExampleRole.js +7 -0
  56. package/build/cjs/_virtual/docFootnoteRole.js +7 -0
  57. package/build/cjs/_virtual/docForewordRole.js +7 -0
  58. package/build/cjs/_virtual/docGlossaryRole.js +7 -0
  59. package/build/cjs/_virtual/docGlossrefRole.js +7 -0
  60. package/build/cjs/_virtual/docIndexRole.js +7 -0
  61. package/build/cjs/_virtual/docIntroductionRole.js +7 -0
  62. package/build/cjs/_virtual/docNoterefRole.js +7 -0
  63. package/build/cjs/_virtual/docNoticeRole.js +7 -0
  64. package/build/cjs/_virtual/docPagebreakRole.js +7 -0
  65. package/build/cjs/_virtual/docPagelistRole.js +7 -0
  66. package/build/cjs/_virtual/docPartRole.js +7 -0
  67. package/build/cjs/_virtual/docPrefaceRole.js +7 -0
  68. package/build/cjs/_virtual/docPrologueRole.js +7 -0
  69. package/build/cjs/_virtual/docPullquoteRole.js +7 -0
  70. package/build/cjs/_virtual/docQnaRole.js +7 -0
  71. package/build/cjs/_virtual/docSubtitleRole.js +7 -0
  72. package/build/cjs/_virtual/docTipRole.js +7 -0
  73. package/build/cjs/_virtual/docTocRole.js +7 -0
  74. package/build/cjs/_virtual/documentRole.js +7 -0
  75. package/build/cjs/_virtual/domMap.js +7 -0
  76. package/build/cjs/_virtual/elementRoleMap.js +7 -0
  77. package/build/cjs/_virtual/emphasisRole.js +7 -0
  78. package/build/cjs/_virtual/escapeHTML.js +7 -0
  79. package/build/cjs/_virtual/feedRole.js +7 -0
  80. package/build/cjs/_virtual/figureRole.js +7 -0
  81. package/build/cjs/_virtual/formRole.js +7 -0
  82. package/build/cjs/_virtual/genericRole.js +7 -0
  83. package/build/cjs/_virtual/gridRole.js +7 -0
  84. package/build/cjs/_virtual/gridcellRole.js +7 -0
  85. package/build/cjs/_virtual/groupRole.js +7 -0
  86. package/build/cjs/_virtual/headingRole.js +7 -0
  87. package/build/cjs/_virtual/imgRole.js +7 -0
  88. package/build/cjs/_virtual/implementation.js +7 -0
  89. package/build/cjs/_virtual/index.js +7 -0
  90. package/build/cjs/_virtual/index10.js +7 -0
  91. package/build/cjs/_virtual/index11.js +7 -0
  92. package/build/cjs/_virtual/index12.js +7 -0
  93. package/build/cjs/_virtual/index13.js +7 -0
  94. package/build/cjs/_virtual/index14.js +7 -0
  95. package/build/cjs/_virtual/index2.js +7 -0
  96. package/build/cjs/_virtual/index3.js +7 -0
  97. package/build/cjs/_virtual/index4.js +7 -0
  98. package/build/cjs/_virtual/index5.js +7 -0
  99. package/build/cjs/_virtual/index6.js +7 -0
  100. package/build/cjs/_virtual/index7.js +7 -0
  101. package/build/cjs/_virtual/index8.js +7 -0
  102. package/build/cjs/_virtual/index9.js +7 -0
  103. package/build/cjs/_virtual/inherits.js +7 -0
  104. package/build/cjs/_virtual/inherits_browser.js +7 -0
  105. package/build/cjs/_virtual/inputRole.js +7 -0
  106. package/build/cjs/_virtual/insertionRole.js +7 -0
  107. package/build/cjs/_virtual/iterationDecorator.js +7 -0
  108. package/build/cjs/_virtual/iteratorProxy.js +7 -0
  109. package/build/cjs/_virtual/jsx-runtime.js +7 -0
  110. package/build/cjs/_virtual/landmarkRole.js +7 -0
  111. package/build/cjs/_virtual/linkRole.js +7 -0
  112. package/build/cjs/_virtual/listRole.js +7 -0
  113. package/build/cjs/_virtual/listboxRole.js +7 -0
  114. package/build/cjs/_virtual/listitemRole.js +7 -0
  115. package/build/cjs/_virtual/logRole.js +7 -0
  116. package/build/cjs/_virtual/lz-string.js +7 -0
  117. package/build/cjs/_virtual/mainRole.js +7 -0
  118. package/build/cjs/_virtual/markup.js +7 -0
  119. package/build/cjs/_virtual/marqueeRole.js +7 -0
  120. package/build/cjs/_virtual/mathRole.js +7 -0
  121. package/build/cjs/_virtual/menuRole.js +7 -0
  122. package/build/cjs/_virtual/menubarRole.js +7 -0
  123. package/build/cjs/_virtual/menuitemRole.js +7 -0
  124. package/build/cjs/_virtual/menuitemcheckboxRole.js +7 -0
  125. package/build/cjs/_virtual/menuitemradioRole.js +7 -0
  126. package/build/cjs/_virtual/meterRole.js +7 -0
  127. package/build/cjs/_virtual/navigationRole.js +7 -0
  128. package/build/cjs/_virtual/noneRole.js +7 -0
  129. package/build/cjs/_virtual/noteRole.js +7 -0
  130. package/build/cjs/_virtual/optionRole.js +7 -0
  131. package/build/cjs/_virtual/paragraphRole.js +7 -0
  132. package/build/cjs/_virtual/presentationRole.js +7 -0
  133. package/build/cjs/_virtual/progressbarRole.js +7 -0
  134. package/build/cjs/_virtual/radioRole.js +7 -0
  135. package/build/cjs/_virtual/radiogroupRole.js +7 -0
  136. package/build/cjs/_virtual/rangeRole.js +7 -0
  137. package/build/cjs/_virtual/react-dom-test-utils.development.js +7 -0
  138. package/build/cjs/_virtual/react-dom-test-utils.production.min.js +7 -0
  139. package/build/cjs/_virtual/react-dom.development.js +7 -0
  140. package/build/cjs/_virtual/react-dom.production.min.js +7 -0
  141. package/build/cjs/_virtual/react-is.development.js +7 -0
  142. package/build/cjs/_virtual/react-is.development2.js +7 -0
  143. package/build/cjs/_virtual/react-is.development3.js +7 -0
  144. package/build/cjs/_virtual/react-is.production.min.js +7 -0
  145. package/build/cjs/_virtual/react-is.production.min2.js +7 -0
  146. package/build/cjs/_virtual/react-is.production.min3.js +7 -0
  147. package/build/cjs/_virtual/react-jsx-runtime.development.js +7 -0
  148. package/build/cjs/_virtual/react-jsx-runtime.production.min.js +7 -0
  149. package/build/cjs/_virtual/react.development.js +7 -0
  150. package/build/cjs/_virtual/react.production.min.js +7 -0
  151. package/build/cjs/_virtual/regionRole.js +7 -0
  152. package/build/cjs/_virtual/roleElementMap.js +7 -0
  153. package/build/cjs/_virtual/rolesMap.js +7 -0
  154. package/build/cjs/_virtual/roletypeRole.js +7 -0
  155. package/build/cjs/_virtual/rowRole.js +7 -0
  156. package/build/cjs/_virtual/rowgroupRole.js +7 -0
  157. package/build/cjs/_virtual/rowheaderRole.js +7 -0
  158. package/build/cjs/_virtual/scheduler.development.js +7 -0
  159. package/build/cjs/_virtual/scheduler.production.min.js +7 -0
  160. package/build/cjs/_virtual/scrollbarRole.js +7 -0
  161. package/build/cjs/_virtual/searchRole.js +7 -0
  162. package/build/cjs/_virtual/searchboxRole.js +7 -0
  163. package/build/cjs/_virtual/sectionRole.js +7 -0
  164. package/build/cjs/_virtual/sectionheadRole.js +7 -0
  165. package/build/cjs/_virtual/selectRole.js +7 -0
  166. package/build/cjs/_virtual/separatorRole.js +7 -0
  167. package/build/cjs/_virtual/sliderRole.js +7 -0
  168. package/build/cjs/_virtual/spinbuttonRole.js +7 -0
  169. package/build/cjs/_virtual/statusRole.js +7 -0
  170. package/build/cjs/_virtual/strongRole.js +7 -0
  171. package/build/cjs/_virtual/structureRole.js +7 -0
  172. package/build/cjs/_virtual/subscriptRole.js +7 -0
  173. package/build/cjs/_virtual/superscriptRole.js +7 -0
  174. package/build/cjs/_virtual/switchRole.js +7 -0
  175. package/build/cjs/_virtual/tabRole.js +7 -0
  176. package/build/cjs/_virtual/tableRole.js +7 -0
  177. package/build/cjs/_virtual/tablistRole.js +7 -0
  178. package/build/cjs/_virtual/tabpanelRole.js +7 -0
  179. package/build/cjs/_virtual/termRole.js +7 -0
  180. package/build/cjs/_virtual/test-utils.js +7 -0
  181. package/build/cjs/_virtual/textboxRole.js +7 -0
  182. package/build/cjs/_virtual/timeRole.js +7 -0
  183. package/build/cjs/_virtual/timerRole.js +7 -0
  184. package/build/cjs/_virtual/toolbarRole.js +7 -0
  185. package/build/cjs/_virtual/tooltipRole.js +7 -0
  186. package/build/cjs/_virtual/treeRole.js +7 -0
  187. package/build/cjs/_virtual/treegridRole.js +7 -0
  188. package/build/cjs/_virtual/treeitemRole.js +7 -0
  189. package/build/cjs/_virtual/ua-parser.js +7 -0
  190. package/build/cjs/_virtual/unitless.cjs.dev.js +7 -0
  191. package/build/cjs/_virtual/unitless.cjs.js +7 -0
  192. package/build/cjs/_virtual/unitless.cjs.prod.js +7 -0
  193. package/build/cjs/_virtual/util.js +7 -0
  194. package/build/cjs/_virtual/widgetRole.js +7 -0
  195. package/build/cjs/_virtual/windowRole.js +7 -0
  196. package/build/cjs/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +17 -0
  197. package/build/cjs/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +11 -0
  198. package/build/cjs/node_modules/@emotion/stylis/dist/stylis.esm.js +617 -0
  199. package/build/cjs/node_modules/@emotion/unitless/dist/unitless.cjs.dev.js +68 -0
  200. package/build/cjs/node_modules/@emotion/unitless/dist/unitless.cjs.js +19 -0
  201. package/build/cjs/node_modules/@emotion/unitless/dist/unitless.cjs.prod.js +69 -0
  202. package/build/cjs/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js +2987 -0
  203. package/build/cjs/node_modules/@testing-library/react/dist/@testing-library/react.esm.js +440 -0
  204. package/build/cjs/node_modules/ansi-regex/index.js +12 -0
  205. package/build/cjs/node_modules/aria-query/lib/ariaPropsMap.js +193 -0
  206. package/build/cjs/node_modules/aria-query/lib/domMap.js +342 -0
  207. package/build/cjs/node_modules/aria-query/lib/elementRoleMap.js +143 -0
  208. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/commandRole.js +30 -0
  209. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/compositeRole.js +28 -0
  210. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/inputRole.js +32 -0
  211. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.js +25 -0
  212. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/rangeRole.js +29 -0
  213. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.js +58 -0
  214. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/sectionRole.js +40 -0
  215. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.js +25 -0
  216. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/selectRole.js +27 -0
  217. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/structureRole.js +25 -0
  218. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/widgetRole.js +25 -0
  219. package/build/cjs/node_modules/aria-query/lib/etc/roles/abstract/windowRole.js +27 -0
  220. package/build/cjs/node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.js +62 -0
  221. package/build/cjs/node_modules/aria-query/lib/etc/roles/ariaDpubRoles.js +170 -0
  222. package/build/cjs/node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.js +342 -0
  223. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.js +36 -0
  224. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.js +36 -0
  225. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.js +36 -0
  226. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.js +36 -0
  227. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.js +33 -0
  228. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.js +36 -0
  229. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.js +36 -0
  230. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.js +33 -0
  231. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.js +36 -0
  232. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.js +36 -0
  233. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.js +36 -0
  234. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.js +36 -0
  235. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.js +36 -0
  236. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.js +36 -0
  237. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.js +36 -0
  238. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.js +36 -0
  239. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.js +36 -0
  240. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.js +36 -0
  241. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.js +36 -0
  242. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.js +36 -0
  243. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.js +31 -0
  244. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.js +36 -0
  245. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.js +36 -0
  246. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.js +36 -0
  247. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.js +33 -0
  248. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.js +36 -0
  249. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.js +36 -0
  250. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.js +33 -0
  251. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.js +36 -0
  252. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.js +35 -0
  253. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.js +36 -0
  254. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docPartRole.js +36 -0
  255. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.js +36 -0
  256. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.js +36 -0
  257. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.js +30 -0
  258. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.js +36 -0
  259. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.js +36 -0
  260. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docTipRole.js +36 -0
  261. package/build/cjs/node_modules/aria-query/lib/etc/roles/dpub/docTocRole.js +36 -0
  262. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/alertRole.js +33 -0
  263. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.js +30 -0
  264. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/applicationRole.js +36 -0
  265. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/articleRole.js +33 -0
  266. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/bannerRole.js +31 -0
  267. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.js +25 -0
  268. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/buttonRole.js +107 -0
  269. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/captionRole.js +25 -0
  270. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/cellRole.js +36 -0
  271. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/checkboxRole.js +48 -0
  272. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/codeRole.js +25 -0
  273. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.js +36 -0
  274. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/comboboxRole.js +138 -0
  275. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/complementaryRole.js +30 -0
  276. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.js +31 -0
  277. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/definitionRole.js +30 -0
  278. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/deletionRole.js +25 -0
  279. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/dialogRole.js +30 -0
  280. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/directoryRole.js +27 -0
  281. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/documentRole.js +34 -0
  282. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/emphasisRole.js +25 -0
  283. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/feedRole.js +25 -0
  284. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/figureRole.js +30 -0
  285. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/formRole.js +52 -0
  286. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/genericRole.js +35 -0
  287. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/gridRole.js +37 -0
  288. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/gridcellRole.js +43 -0
  289. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/groupRole.js +43 -0
  290. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/headingRole.js +59 -0
  291. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/imgRole.js +48 -0
  292. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/insertionRole.js +25 -0
  293. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/linkRole.js +53 -0
  294. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/listRole.js +40 -0
  295. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/listboxRole.js +76 -0
  296. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/listitemRole.js +40 -0
  297. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/logRole.js +27 -0
  298. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/mainRole.js +30 -0
  299. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/marqueeRole.js +25 -0
  300. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/mathRole.js +30 -0
  301. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/menuRole.js +47 -0
  302. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/menubarRole.js +32 -0
  303. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/menuitemRole.js +51 -0
  304. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.js +32 -0
  305. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.js +32 -0
  306. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/meterRole.js +31 -0
  307. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/navigationRole.js +30 -0
  308. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/noneRole.js +25 -0
  309. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/noteRole.js +25 -0
  310. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/optionRole.js +47 -0
  311. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/paragraphRole.js +25 -0
  312. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/presentationRole.js +25 -0
  313. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/progressbarRole.js +37 -0
  314. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/radioRole.js +40 -0
  315. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.js +35 -0
  316. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/regionRole.js +52 -0
  317. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/rowRole.js +38 -0
  318. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.js +40 -0
  319. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.js +45 -0
  320. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.js +34 -0
  321. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/searchRole.js +25 -0
  322. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/searchboxRole.js +37 -0
  323. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/separatorRole.js +37 -0
  324. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/sliderRole.js +45 -0
  325. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.js +41 -0
  326. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/statusRole.js +33 -0
  327. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/strongRole.js +25 -0
  328. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/subscriptRole.js +25 -0
  329. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/superscriptRole.js +25 -0
  330. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/switchRole.js +32 -0
  331. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/tabRole.js +32 -0
  332. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/tableRole.js +33 -0
  333. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/tablistRole.js +34 -0
  334. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.js +25 -0
  335. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/termRole.js +35 -0
  336. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/textboxRole.js +105 -0
  337. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/timeRole.js +25 -0
  338. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/timerRole.js +25 -0
  339. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/toolbarRole.js +32 -0
  340. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/tooltipRole.js +25 -0
  341. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/treeRole.js +31 -0
  342. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/treegridRole.js +25 -0
  343. package/build/cjs/node_modules/aria-query/lib/etc/roles/literal/treeitemRole.js +30 -0
  344. package/build/cjs/node_modules/aria-query/lib/index.js +45 -0
  345. package/build/cjs/node_modules/aria-query/lib/roleElementMap.js +129 -0
  346. package/build/cjs/node_modules/aria-query/lib/rolesMap.js +152 -0
  347. package/build/cjs/node_modules/aria-query/lib/util/iterationDecorator.js +26 -0
  348. package/build/cjs/node_modules/aria-query/lib/util/iteratorProxy.js +36 -0
  349. package/build/cjs/node_modules/available-typed-arrays/index.js +31 -0
  350. package/build/cjs/node_modules/call-bind/callBound.js +21 -0
  351. package/build/cjs/node_modules/call-bind/index.js +54 -0
  352. package/build/cjs/node_modules/deep-equal/index.js +381 -0
  353. package/build/cjs/node_modules/define-properties/index.js +52 -0
  354. package/build/cjs/node_modules/dom-accessibility-api/dist/accessible-description.mjs.js +39 -0
  355. package/build/cjs/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs.js +599 -0
  356. package/build/cjs/node_modules/dom-accessibility-api/dist/accessible-name.mjs.js +33 -0
  357. package/build/cjs/node_modules/dom-accessibility-api/dist/getRole.mjs.js +215 -0
  358. package/build/cjs/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.js +72 -0
  359. package/build/cjs/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.js +97 -0
  360. package/build/cjs/node_modules/dom-accessibility-api/dist/util.mjs.js +103 -0
  361. package/build/cjs/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js +30 -0
  362. package/build/cjs/node_modules/es-get-iterator/index.js +220 -0
  363. package/build/cjs/node_modules/for-each/index.js +66 -0
  364. package/build/cjs/node_modules/function-bind/implementation.js +54 -0
  365. package/build/cjs/node_modules/function-bind/index.js +9 -0
  366. package/build/cjs/node_modules/functions-have-names/index.js +33 -0
  367. package/build/cjs/node_modules/get-intrinsic/index.js +340 -0
  368. package/build/cjs/node_modules/has/src/index.js +9 -0
  369. package/build/cjs/node_modules/has-bigints/index.js +12 -0
  370. package/build/cjs/node_modules/has-property-descriptors/index.js +37 -0
  371. package/build/cjs/node_modules/has-symbols/index.js +17 -0
  372. package/build/cjs/node_modules/has-symbols/shams.js +44 -0
  373. package/build/cjs/node_modules/has-tostringtag/shams.js +11 -0
  374. package/build/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +108 -0
  375. package/build/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +194 -0
  376. package/build/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +30 -0
  377. package/build/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +14 -0
  378. package/build/cjs/node_modules/is-arguments/index.js +38 -0
  379. package/build/cjs/node_modules/is-bigint/index.js +43 -0
  380. package/build/cjs/node_modules/is-boolean-object/index.js +31 -0
  381. package/build/cjs/node_modules/is-callable/index.js +103 -0
  382. package/build/cjs/node_modules/is-date-object/index.js +26 -0
  383. package/build/cjs/node_modules/is-map/index.js +44 -0
  384. package/build/cjs/node_modules/is-number-object/index.js +28 -0
  385. package/build/cjs/node_modules/is-regex/index.js +63 -0
  386. package/build/cjs/node_modules/is-set/index.js +44 -0
  387. package/build/cjs/node_modules/is-string/index.js +28 -0
  388. package/build/cjs/node_modules/is-symbol/index.js +40 -0
  389. package/build/cjs/node_modules/is-typed-array/index.js +80 -0
  390. package/build/cjs/node_modules/is-weakmap/index.js +44 -0
  391. package/build/cjs/node_modules/is-weakset/index.js +42 -0
  392. package/build/cjs/node_modules/isarray/index.js +9 -0
  393. package/build/cjs/node_modules/lz-string/libs/lz-string.js +508 -0
  394. package/build/cjs/node_modules/object-inspect/index.js +518 -0
  395. package/build/cjs/node_modules/object-inspect/util.inspect.js +7 -0
  396. package/build/cjs/node_modules/object-is/implementation.js +20 -0
  397. package/build/cjs/node_modules/object-is/index.js +27 -0
  398. package/build/cjs/node_modules/object-is/polyfill.js +11 -0
  399. package/build/cjs/node_modules/object-is/shim.js +19 -0
  400. package/build/cjs/node_modules/object-keys/implementation.js +137 -0
  401. package/build/cjs/node_modules/object-keys/index.js +37 -0
  402. package/build/cjs/node_modules/object-keys/isArguments.js +19 -0
  403. package/build/cjs/node_modules/object.assign/implementation.js +52 -0
  404. package/build/cjs/node_modules/object.assign/index.js +31 -0
  405. package/build/cjs/node_modules/object.assign/polyfill.js +59 -0
  406. package/build/cjs/node_modules/object.assign/shim.js +19 -0
  407. package/build/cjs/node_modules/pretty-format/build/collections.js +191 -0
  408. package/build/cjs/node_modules/pretty-format/build/index.js +621 -0
  409. package/build/cjs/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +121 -0
  410. package/build/cjs/node_modules/pretty-format/build/plugins/ConvertAnsi.js +101 -0
  411. package/build/cjs/node_modules/pretty-format/build/plugins/DOMCollection.js +84 -0
  412. package/build/cjs/node_modules/pretty-format/build/plugins/DOMElement.js +132 -0
  413. package/build/cjs/node_modules/pretty-format/build/plugins/Immutable.js +251 -0
  414. package/build/cjs/node_modules/pretty-format/build/plugins/ReactElement.js +172 -0
  415. package/build/cjs/node_modules/pretty-format/build/plugins/ReactTestComponent.js +83 -0
  416. package/build/cjs/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +18 -0
  417. package/build/cjs/node_modules/pretty-format/build/plugins/lib/markup.js +159 -0
  418. package/build/cjs/node_modules/pretty-format/node_modules/ansi-styles/index.js +169 -0
  419. package/build/cjs/node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js +236 -0
  420. package/build/cjs/node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js +30 -0
  421. package/build/cjs/node_modules/pretty-format/node_modules/react-is/index.js +14 -0
  422. package/build/cjs/node_modules/react/cjs/react-jsx-runtime.development.js +1329 -0
  423. package/build/cjs/node_modules/react/cjs/react-jsx-runtime.production.min.js +29 -0
  424. package/build/cjs/node_modules/react/cjs/react.development.js +2753 -0
  425. package/build/cjs/node_modules/react/cjs/react.production.min.js +42 -0
  426. package/build/cjs/node_modules/react/index.js +19 -0
  427. package/build/cjs/node_modules/react/jsx-runtime.js +14 -0
  428. package/build/cjs/node_modules/react-dom/cjs/react-dom-test-utils.development.js +1758 -0
  429. package/build/cjs/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +60 -0
  430. package/build/cjs/node_modules/react-dom/cjs/react-dom.development.js +29859 -0
  431. package/build/cjs/node_modules/react-dom/cjs/react-dom.production.min.js +338 -0
  432. package/build/cjs/node_modules/react-dom/client.js +33 -0
  433. package/build/cjs/node_modules/react-dom/index.js +50 -0
  434. package/build/cjs/node_modules/react-dom/test-utils.js +14 -0
  435. package/build/cjs/node_modules/react-is/cjs/react-is.development.js +234 -0
  436. package/build/cjs/node_modules/react-is/cjs/react-is.production.min.js +30 -0
  437. package/build/cjs/node_modules/react-is/index.js +14 -0
  438. package/build/cjs/node_modules/regexp.prototype.flags/implementation.js +45 -0
  439. package/build/cjs/node_modules/regexp.prototype.flags/index.js +28 -0
  440. package/build/cjs/node_modules/regexp.prototype.flags/polyfill.js +42 -0
  441. package/build/cjs/node_modules/regexp.prototype.flags/shim.js +31 -0
  442. package/build/cjs/node_modules/scheduler/cjs/scheduler.development.js +636 -0
  443. package/build/cjs/node_modules/scheduler/cjs/scheduler.production.min.js +37 -0
  444. package/build/cjs/node_modules/scheduler/index.js +25 -0
  445. package/build/cjs/node_modules/side-channel/index.js +130 -0
  446. package/build/cjs/node_modules/styled-components/dist/styled-components.esm.js +20 -0
  447. package/build/cjs/node_modules/ua-parser-js/src/ua-parser.js +881 -0
  448. package/build/cjs/node_modules/util/node_modules/inherits/inherits.js +26 -0
  449. package/build/cjs/node_modules/util/node_modules/inherits/inherits_browser.js +38 -0
  450. package/build/cjs/node_modules/util/support/isBuffer.js +7 -0
  451. package/build/cjs/node_modules/util/util.js +720 -0
  452. package/build/cjs/node_modules/which-boxed-primitive/index.js +40 -0
  453. package/build/cjs/node_modules/which-collection/index.js +32 -0
  454. package/build/cjs/node_modules/which-typed-array/index.js +65 -0
  455. package/build/cjs/src/index.d.ts +17 -0
  456. package/build/cjs/src/index.d.ts.map +1 -0
  457. package/build/cjs/src/index.js +31 -0
  458. package/build/cjs/src/match-device/useMatchDevice.d.ts +8 -0
  459. package/build/cjs/src/match-device/useMatchDevice.d.ts.map +1 -0
  460. package/build/cjs/src/match-device/useMatchDevice.js +31 -0
  461. package/build/cjs/src/match-resolution/useMatchResolution.d.ts +38 -0
  462. package/build/cjs/src/match-resolution/useMatchResolution.d.ts.map +1 -0
  463. package/build/cjs/src/match-resolution/useMatchResolution.js +58 -0
  464. package/build/cjs/src/mount-react-hook/mountReactHook.d.ts +8 -0
  465. package/build/cjs/src/mount-react-hook/mountReactHook.d.ts.map +1 -0
  466. package/build/cjs/src/mount-react-hook/mountReactHook.js +16 -0
  467. package/build/cjs/src/numbered-pagination/NumberedPagination.d.ts +13 -0
  468. package/build/cjs/src/numbered-pagination/NumberedPagination.d.ts.map +1 -0
  469. package/build/cjs/src/numbered-pagination/NumberedPagination.js +33 -0
  470. package/build/cjs/src/pagination/usePagination.d.ts +20 -0
  471. package/build/cjs/src/pagination/usePagination.d.ts.map +1 -0
  472. package/build/cjs/src/pagination/usePagination.js +55 -0
  473. package/build/cjs/src/scroll-to/useScrollTo.d.ts +6 -0
  474. package/build/cjs/src/scroll-to/useScrollTo.d.ts.map +1 -0
  475. package/build/cjs/src/scroll-to/useScrollTo.js +16 -0
  476. package/build/cjs/src/table/Table.d.ts +24 -0
  477. package/build/cjs/src/table/Table.d.ts.map +1 -0
  478. package/build/cjs/src/table/Table.js +55 -0
  479. package/build/cjs/src/visible/useVisible.d.ts +3 -0
  480. package/build/cjs/src/visible/useVisible.d.ts.map +1 -0
  481. package/build/cjs/src/visible/useVisible.js +25 -0
  482. package/build/esm/_virtual/AsymmetricMatcher.js +3 -0
  483. package/build/esm/_virtual/ConvertAnsi.js +3 -0
  484. package/build/esm/_virtual/DOMCollection.js +3 -0
  485. package/build/esm/_virtual/DOMElement.js +3 -0
  486. package/build/esm/_virtual/Immutable.js +3 -0
  487. package/build/esm/_virtual/ReactElement.js +3 -0
  488. package/build/esm/_virtual/ReactTestComponent.js +3 -0
  489. package/build/esm/_virtual/_commonjsHelpers.js +7 -0
  490. package/build/esm/_virtual/alertRole.js +3 -0
  491. package/build/esm/_virtual/alertdialogRole.js +3 -0
  492. package/build/esm/_virtual/applicationRole.js +3 -0
  493. package/build/esm/_virtual/ariaAbstractRoles.js +3 -0
  494. package/build/esm/_virtual/ariaDpubRoles.js +3 -0
  495. package/build/esm/_virtual/ariaLiteralRoles.js +3 -0
  496. package/build/esm/_virtual/ariaPropsMap.js +3 -0
  497. package/build/esm/_virtual/articleRole.js +3 -0
  498. package/build/esm/_virtual/bannerRole.js +3 -0
  499. package/build/esm/_virtual/blockquoteRole.js +3 -0
  500. package/build/esm/_virtual/buttonRole.js +3 -0
  501. package/build/esm/_virtual/captionRole.js +3 -0
  502. package/build/esm/_virtual/cellRole.js +3 -0
  503. package/build/esm/_virtual/checkboxRole.js +3 -0
  504. package/build/esm/_virtual/codeRole.js +3 -0
  505. package/build/esm/_virtual/collections.js +3 -0
  506. package/build/esm/_virtual/columnheaderRole.js +3 -0
  507. package/build/esm/_virtual/comboboxRole.js +3 -0
  508. package/build/esm/_virtual/commandRole.js +3 -0
  509. package/build/esm/_virtual/complementaryRole.js +3 -0
  510. package/build/esm/_virtual/compositeRole.js +3 -0
  511. package/build/esm/_virtual/contentinfoRole.js +3 -0
  512. package/build/esm/_virtual/definitionRole.js +3 -0
  513. package/build/esm/_virtual/deletionRole.js +3 -0
  514. package/build/esm/_virtual/dialogRole.js +3 -0
  515. package/build/esm/_virtual/directoryRole.js +3 -0
  516. package/build/esm/_virtual/docAbstractRole.js +3 -0
  517. package/build/esm/_virtual/docAcknowledgmentsRole.js +3 -0
  518. package/build/esm/_virtual/docAfterwordRole.js +3 -0
  519. package/build/esm/_virtual/docAppendixRole.js +3 -0
  520. package/build/esm/_virtual/docBacklinkRole.js +3 -0
  521. package/build/esm/_virtual/docBiblioentryRole.js +3 -0
  522. package/build/esm/_virtual/docBibliographyRole.js +3 -0
  523. package/build/esm/_virtual/docBibliorefRole.js +3 -0
  524. package/build/esm/_virtual/docChapterRole.js +3 -0
  525. package/build/esm/_virtual/docColophonRole.js +3 -0
  526. package/build/esm/_virtual/docConclusionRole.js +3 -0
  527. package/build/esm/_virtual/docCoverRole.js +3 -0
  528. package/build/esm/_virtual/docCreditRole.js +3 -0
  529. package/build/esm/_virtual/docCreditsRole.js +3 -0
  530. package/build/esm/_virtual/docDedicationRole.js +3 -0
  531. package/build/esm/_virtual/docEndnoteRole.js +3 -0
  532. package/build/esm/_virtual/docEndnotesRole.js +3 -0
  533. package/build/esm/_virtual/docEpigraphRole.js +3 -0
  534. package/build/esm/_virtual/docEpilogueRole.js +3 -0
  535. package/build/esm/_virtual/docErrataRole.js +3 -0
  536. package/build/esm/_virtual/docExampleRole.js +3 -0
  537. package/build/esm/_virtual/docFootnoteRole.js +3 -0
  538. package/build/esm/_virtual/docForewordRole.js +3 -0
  539. package/build/esm/_virtual/docGlossaryRole.js +3 -0
  540. package/build/esm/_virtual/docGlossrefRole.js +3 -0
  541. package/build/esm/_virtual/docIndexRole.js +3 -0
  542. package/build/esm/_virtual/docIntroductionRole.js +3 -0
  543. package/build/esm/_virtual/docNoterefRole.js +3 -0
  544. package/build/esm/_virtual/docNoticeRole.js +3 -0
  545. package/build/esm/_virtual/docPagebreakRole.js +3 -0
  546. package/build/esm/_virtual/docPagelistRole.js +3 -0
  547. package/build/esm/_virtual/docPartRole.js +3 -0
  548. package/build/esm/_virtual/docPrefaceRole.js +3 -0
  549. package/build/esm/_virtual/docPrologueRole.js +3 -0
  550. package/build/esm/_virtual/docPullquoteRole.js +3 -0
  551. package/build/esm/_virtual/docQnaRole.js +3 -0
  552. package/build/esm/_virtual/docSubtitleRole.js +3 -0
  553. package/build/esm/_virtual/docTipRole.js +3 -0
  554. package/build/esm/_virtual/docTocRole.js +3 -0
  555. package/build/esm/_virtual/documentRole.js +3 -0
  556. package/build/esm/_virtual/domMap.js +3 -0
  557. package/build/esm/_virtual/elementRoleMap.js +3 -0
  558. package/build/esm/_virtual/emphasisRole.js +3 -0
  559. package/build/esm/_virtual/escapeHTML.js +3 -0
  560. package/build/esm/_virtual/feedRole.js +3 -0
  561. package/build/esm/_virtual/figureRole.js +3 -0
  562. package/build/esm/_virtual/formRole.js +3 -0
  563. package/build/esm/_virtual/genericRole.js +3 -0
  564. package/build/esm/_virtual/gridRole.js +3 -0
  565. package/build/esm/_virtual/gridcellRole.js +3 -0
  566. package/build/esm/_virtual/groupRole.js +3 -0
  567. package/build/esm/_virtual/headingRole.js +3 -0
  568. package/build/esm/_virtual/imgRole.js +3 -0
  569. package/build/esm/_virtual/implementation.js +3 -0
  570. package/build/esm/_virtual/index.js +3 -0
  571. package/build/esm/_virtual/index10.js +3 -0
  572. package/build/esm/_virtual/index11.js +3 -0
  573. package/build/esm/_virtual/index12.js +3 -0
  574. package/build/esm/_virtual/index13.js +3 -0
  575. package/build/esm/_virtual/index14.js +3 -0
  576. package/build/esm/_virtual/index2.js +3 -0
  577. package/build/esm/_virtual/index3.js +3 -0
  578. package/build/esm/_virtual/index4.js +3 -0
  579. package/build/esm/_virtual/index5.js +3 -0
  580. package/build/esm/_virtual/index6.js +3 -0
  581. package/build/esm/_virtual/index7.js +3 -0
  582. package/build/esm/_virtual/index8.js +3 -0
  583. package/build/esm/_virtual/index9.js +3 -0
  584. package/build/esm/_virtual/inherits.js +3 -0
  585. package/build/esm/_virtual/inherits_browser.js +3 -0
  586. package/build/esm/_virtual/inputRole.js +3 -0
  587. package/build/esm/_virtual/insertionRole.js +3 -0
  588. package/build/esm/_virtual/iterationDecorator.js +3 -0
  589. package/build/esm/_virtual/iteratorProxy.js +3 -0
  590. package/build/esm/_virtual/jsx-runtime.js +3 -0
  591. package/build/esm/_virtual/landmarkRole.js +3 -0
  592. package/build/esm/_virtual/linkRole.js +3 -0
  593. package/build/esm/_virtual/listRole.js +3 -0
  594. package/build/esm/_virtual/listboxRole.js +3 -0
  595. package/build/esm/_virtual/listitemRole.js +3 -0
  596. package/build/esm/_virtual/logRole.js +3 -0
  597. package/build/esm/_virtual/lz-string.js +3 -0
  598. package/build/esm/_virtual/mainRole.js +3 -0
  599. package/build/esm/_virtual/markup.js +3 -0
  600. package/build/esm/_virtual/marqueeRole.js +3 -0
  601. package/build/esm/_virtual/mathRole.js +3 -0
  602. package/build/esm/_virtual/menuRole.js +3 -0
  603. package/build/esm/_virtual/menubarRole.js +3 -0
  604. package/build/esm/_virtual/menuitemRole.js +3 -0
  605. package/build/esm/_virtual/menuitemcheckboxRole.js +3 -0
  606. package/build/esm/_virtual/menuitemradioRole.js +3 -0
  607. package/build/esm/_virtual/meterRole.js +3 -0
  608. package/build/esm/_virtual/navigationRole.js +3 -0
  609. package/build/esm/_virtual/noneRole.js +3 -0
  610. package/build/esm/_virtual/noteRole.js +3 -0
  611. package/build/esm/_virtual/optionRole.js +3 -0
  612. package/build/esm/_virtual/paragraphRole.js +3 -0
  613. package/build/esm/_virtual/presentationRole.js +3 -0
  614. package/build/esm/_virtual/progressbarRole.js +3 -0
  615. package/build/esm/_virtual/radioRole.js +3 -0
  616. package/build/esm/_virtual/radiogroupRole.js +3 -0
  617. package/build/esm/_virtual/rangeRole.js +3 -0
  618. package/build/esm/_virtual/react-dom-test-utils.development.js +3 -0
  619. package/build/esm/_virtual/react-dom-test-utils.production.min.js +3 -0
  620. package/build/esm/_virtual/react-dom.development.js +3 -0
  621. package/build/esm/_virtual/react-dom.production.min.js +3 -0
  622. package/build/esm/_virtual/react-is.development.js +3 -0
  623. package/build/esm/_virtual/react-is.development2.js +3 -0
  624. package/build/esm/_virtual/react-is.development3.js +3 -0
  625. package/build/esm/_virtual/react-is.production.min.js +3 -0
  626. package/build/esm/_virtual/react-is.production.min2.js +3 -0
  627. package/build/esm/_virtual/react-is.production.min3.js +3 -0
  628. package/build/esm/_virtual/react-jsx-runtime.development.js +3 -0
  629. package/build/esm/_virtual/react-jsx-runtime.production.min.js +3 -0
  630. package/build/esm/_virtual/react.development.js +3 -0
  631. package/build/esm/_virtual/react.production.min.js +3 -0
  632. package/build/esm/_virtual/regionRole.js +3 -0
  633. package/build/esm/_virtual/roleElementMap.js +3 -0
  634. package/build/esm/_virtual/rolesMap.js +3 -0
  635. package/build/esm/_virtual/roletypeRole.js +3 -0
  636. package/build/esm/_virtual/rowRole.js +3 -0
  637. package/build/esm/_virtual/rowgroupRole.js +3 -0
  638. package/build/esm/_virtual/rowheaderRole.js +3 -0
  639. package/build/esm/_virtual/scheduler.development.js +3 -0
  640. package/build/esm/_virtual/scheduler.production.min.js +3 -0
  641. package/build/esm/_virtual/scrollbarRole.js +3 -0
  642. package/build/esm/_virtual/searchRole.js +3 -0
  643. package/build/esm/_virtual/searchboxRole.js +3 -0
  644. package/build/esm/_virtual/sectionRole.js +3 -0
  645. package/build/esm/_virtual/sectionheadRole.js +3 -0
  646. package/build/esm/_virtual/selectRole.js +3 -0
  647. package/build/esm/_virtual/separatorRole.js +3 -0
  648. package/build/esm/_virtual/sliderRole.js +3 -0
  649. package/build/esm/_virtual/spinbuttonRole.js +3 -0
  650. package/build/esm/_virtual/statusRole.js +3 -0
  651. package/build/esm/_virtual/strongRole.js +3 -0
  652. package/build/esm/_virtual/structureRole.js +3 -0
  653. package/build/esm/_virtual/subscriptRole.js +3 -0
  654. package/build/esm/_virtual/superscriptRole.js +3 -0
  655. package/build/esm/_virtual/switchRole.js +3 -0
  656. package/build/esm/_virtual/tabRole.js +3 -0
  657. package/build/esm/_virtual/tableRole.js +3 -0
  658. package/build/esm/_virtual/tablistRole.js +3 -0
  659. package/build/esm/_virtual/tabpanelRole.js +3 -0
  660. package/build/esm/_virtual/termRole.js +3 -0
  661. package/build/esm/_virtual/test-utils.js +3 -0
  662. package/build/esm/_virtual/textboxRole.js +3 -0
  663. package/build/esm/_virtual/timeRole.js +3 -0
  664. package/build/esm/_virtual/timerRole.js +3 -0
  665. package/build/esm/_virtual/toolbarRole.js +3 -0
  666. package/build/esm/_virtual/tooltipRole.js +3 -0
  667. package/build/esm/_virtual/treeRole.js +3 -0
  668. package/build/esm/_virtual/treegridRole.js +3 -0
  669. package/build/esm/_virtual/treeitemRole.js +3 -0
  670. package/build/esm/_virtual/ua-parser.js +3 -0
  671. package/build/esm/_virtual/unitless.cjs.dev.js +3 -0
  672. package/build/esm/_virtual/unitless.cjs.js +3 -0
  673. package/build/esm/_virtual/unitless.cjs.prod.js +3 -0
  674. package/build/esm/_virtual/util.js +3 -0
  675. package/build/esm/_virtual/widgetRole.js +3 -0
  676. package/build/esm/_virtual/windowRole.js +3 -0
  677. package/build/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +15 -0
  678. package/build/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
  679. package/build/esm/node_modules/@emotion/stylis/dist/stylis.esm.js +615 -0
  680. package/build/esm/node_modules/@emotion/unitless/dist/unitless.cjs.dev.js +64 -0
  681. package/build/esm/node_modules/@emotion/unitless/dist/unitless.cjs.js +17 -0
  682. package/build/esm/node_modules/@emotion/unitless/dist/unitless.cjs.prod.js +65 -0
  683. package/build/esm/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js +2912 -0
  684. package/build/esm/node_modules/@testing-library/react/dist/@testing-library/react.esm.js +364 -0
  685. package/build/esm/node_modules/ansi-regex/index.js +10 -0
  686. package/build/esm/node_modules/aria-query/lib/ariaPropsMap.js +191 -0
  687. package/build/esm/node_modules/aria-query/lib/domMap.js +340 -0
  688. package/build/esm/node_modules/aria-query/lib/elementRoleMap.js +141 -0
  689. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/commandRole.js +28 -0
  690. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/compositeRole.js +26 -0
  691. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/inputRole.js +30 -0
  692. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.js +23 -0
  693. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/rangeRole.js +27 -0
  694. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.js +56 -0
  695. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/sectionRole.js +38 -0
  696. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.js +23 -0
  697. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/selectRole.js +25 -0
  698. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/structureRole.js +23 -0
  699. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/widgetRole.js +23 -0
  700. package/build/esm/node_modules/aria-query/lib/etc/roles/abstract/windowRole.js +25 -0
  701. package/build/esm/node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.js +60 -0
  702. package/build/esm/node_modules/aria-query/lib/etc/roles/ariaDpubRoles.js +168 -0
  703. package/build/esm/node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.js +340 -0
  704. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.js +34 -0
  705. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.js +34 -0
  706. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.js +34 -0
  707. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.js +34 -0
  708. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.js +31 -0
  709. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.js +34 -0
  710. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.js +34 -0
  711. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.js +31 -0
  712. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.js +34 -0
  713. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.js +34 -0
  714. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.js +34 -0
  715. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.js +34 -0
  716. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.js +34 -0
  717. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.js +34 -0
  718. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.js +34 -0
  719. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.js +34 -0
  720. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.js +34 -0
  721. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.js +34 -0
  722. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.js +34 -0
  723. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.js +34 -0
  724. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.js +29 -0
  725. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.js +34 -0
  726. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.js +34 -0
  727. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.js +34 -0
  728. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.js +31 -0
  729. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.js +34 -0
  730. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.js +34 -0
  731. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.js +31 -0
  732. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.js +34 -0
  733. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.js +33 -0
  734. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.js +34 -0
  735. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docPartRole.js +34 -0
  736. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.js +34 -0
  737. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.js +34 -0
  738. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.js +28 -0
  739. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.js +34 -0
  740. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.js +34 -0
  741. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docTipRole.js +34 -0
  742. package/build/esm/node_modules/aria-query/lib/etc/roles/dpub/docTocRole.js +34 -0
  743. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/alertRole.js +31 -0
  744. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.js +28 -0
  745. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/applicationRole.js +34 -0
  746. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/articleRole.js +31 -0
  747. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/bannerRole.js +29 -0
  748. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.js +23 -0
  749. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/buttonRole.js +105 -0
  750. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/captionRole.js +23 -0
  751. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/cellRole.js +34 -0
  752. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/checkboxRole.js +46 -0
  753. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/codeRole.js +23 -0
  754. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.js +34 -0
  755. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/comboboxRole.js +136 -0
  756. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/complementaryRole.js +28 -0
  757. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.js +29 -0
  758. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/definitionRole.js +28 -0
  759. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/deletionRole.js +23 -0
  760. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/dialogRole.js +28 -0
  761. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/directoryRole.js +25 -0
  762. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/documentRole.js +32 -0
  763. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/emphasisRole.js +23 -0
  764. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/feedRole.js +23 -0
  765. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/figureRole.js +28 -0
  766. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/formRole.js +50 -0
  767. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/genericRole.js +33 -0
  768. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/gridRole.js +35 -0
  769. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/gridcellRole.js +41 -0
  770. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/groupRole.js +41 -0
  771. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/headingRole.js +57 -0
  772. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/imgRole.js +46 -0
  773. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/insertionRole.js +23 -0
  774. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/linkRole.js +51 -0
  775. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/listRole.js +38 -0
  776. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/listboxRole.js +74 -0
  777. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/listitemRole.js +38 -0
  778. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/logRole.js +25 -0
  779. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/mainRole.js +28 -0
  780. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/marqueeRole.js +23 -0
  781. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/mathRole.js +28 -0
  782. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/menuRole.js +45 -0
  783. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/menubarRole.js +30 -0
  784. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/menuitemRole.js +49 -0
  785. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.js +30 -0
  786. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.js +30 -0
  787. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/meterRole.js +29 -0
  788. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/navigationRole.js +28 -0
  789. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/noneRole.js +23 -0
  790. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/noteRole.js +23 -0
  791. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/optionRole.js +45 -0
  792. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/paragraphRole.js +23 -0
  793. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/presentationRole.js +23 -0
  794. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/progressbarRole.js +35 -0
  795. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/radioRole.js +38 -0
  796. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.js +33 -0
  797. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/regionRole.js +50 -0
  798. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/rowRole.js +36 -0
  799. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.js +38 -0
  800. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.js +43 -0
  801. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.js +32 -0
  802. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/searchRole.js +23 -0
  803. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/searchboxRole.js +35 -0
  804. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/separatorRole.js +35 -0
  805. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/sliderRole.js +43 -0
  806. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.js +39 -0
  807. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/statusRole.js +31 -0
  808. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/strongRole.js +23 -0
  809. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/subscriptRole.js +23 -0
  810. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/superscriptRole.js +23 -0
  811. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/switchRole.js +30 -0
  812. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/tabRole.js +30 -0
  813. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/tableRole.js +31 -0
  814. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/tablistRole.js +32 -0
  815. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.js +23 -0
  816. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/termRole.js +33 -0
  817. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/textboxRole.js +103 -0
  818. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/timeRole.js +23 -0
  819. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/timerRole.js +23 -0
  820. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/toolbarRole.js +30 -0
  821. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/tooltipRole.js +23 -0
  822. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/treeRole.js +29 -0
  823. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/treegridRole.js +23 -0
  824. package/build/esm/node_modules/aria-query/lib/etc/roles/literal/treeitemRole.js +28 -0
  825. package/build/esm/node_modules/aria-query/lib/index.js +42 -0
  826. package/build/esm/node_modules/aria-query/lib/roleElementMap.js +127 -0
  827. package/build/esm/node_modules/aria-query/lib/rolesMap.js +150 -0
  828. package/build/esm/node_modules/aria-query/lib/util/iterationDecorator.js +24 -0
  829. package/build/esm/node_modules/aria-query/lib/util/iteratorProxy.js +34 -0
  830. package/build/esm/node_modules/available-typed-arrays/index.js +29 -0
  831. package/build/esm/node_modules/call-bind/callBound.js +19 -0
  832. package/build/esm/node_modules/call-bind/index.js +52 -0
  833. package/build/esm/node_modules/deep-equal/index.js +379 -0
  834. package/build/esm/node_modules/define-properties/index.js +50 -0
  835. package/build/esm/node_modules/dom-accessibility-api/dist/accessible-description.mjs.js +35 -0
  836. package/build/esm/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs.js +595 -0
  837. package/build/esm/node_modules/dom-accessibility-api/dist/accessible-name.mjs.js +29 -0
  838. package/build/esm/node_modules/dom-accessibility-api/dist/getRole.mjs.js +210 -0
  839. package/build/esm/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.js +70 -0
  840. package/build/esm/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.js +95 -0
  841. package/build/esm/node_modules/dom-accessibility-api/dist/util.mjs.js +84 -0
  842. package/build/esm/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js +26 -0
  843. package/build/esm/node_modules/es-get-iterator/index.js +219 -0
  844. package/build/esm/node_modules/for-each/index.js +64 -0
  845. package/build/esm/node_modules/function-bind/implementation.js +52 -0
  846. package/build/esm/node_modules/function-bind/index.js +7 -0
  847. package/build/esm/node_modules/functions-have-names/index.js +31 -0
  848. package/build/esm/node_modules/get-intrinsic/index.js +338 -0
  849. package/build/esm/node_modules/has/src/index.js +7 -0
  850. package/build/esm/node_modules/has-bigints/index.js +10 -0
  851. package/build/esm/node_modules/has-property-descriptors/index.js +35 -0
  852. package/build/esm/node_modules/has-symbols/index.js +15 -0
  853. package/build/esm/node_modules/has-symbols/shams.js +42 -0
  854. package/build/esm/node_modules/has-tostringtag/shams.js +9 -0
  855. package/build/esm/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +106 -0
  856. package/build/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +190 -0
  857. package/build/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +26 -0
  858. package/build/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +12 -0
  859. package/build/esm/node_modules/is-arguments/index.js +36 -0
  860. package/build/esm/node_modules/is-bigint/index.js +42 -0
  861. package/build/esm/node_modules/is-boolean-object/index.js +29 -0
  862. package/build/esm/node_modules/is-callable/index.js +101 -0
  863. package/build/esm/node_modules/is-date-object/index.js +24 -0
  864. package/build/esm/node_modules/is-map/index.js +42 -0
  865. package/build/esm/node_modules/is-number-object/index.js +26 -0
  866. package/build/esm/node_modules/is-regex/index.js +61 -0
  867. package/build/esm/node_modules/is-set/index.js +42 -0
  868. package/build/esm/node_modules/is-string/index.js +26 -0
  869. package/build/esm/node_modules/is-symbol/index.js +39 -0
  870. package/build/esm/node_modules/is-typed-array/index.js +76 -0
  871. package/build/esm/node_modules/is-weakmap/index.js +42 -0
  872. package/build/esm/node_modules/is-weakset/index.js +41 -0
  873. package/build/esm/node_modules/isarray/index.js +7 -0
  874. package/build/esm/node_modules/lz-string/libs/lz-string.js +506 -0
  875. package/build/esm/node_modules/object-inspect/index.js +516 -0
  876. package/build/esm/node_modules/object-inspect/util.inspect.js +5 -0
  877. package/build/esm/node_modules/object-is/implementation.js +18 -0
  878. package/build/esm/node_modules/object-is/index.js +25 -0
  879. package/build/esm/node_modules/object-is/polyfill.js +9 -0
  880. package/build/esm/node_modules/object-is/shim.js +17 -0
  881. package/build/esm/node_modules/object-keys/implementation.js +133 -0
  882. package/build/esm/node_modules/object-keys/index.js +35 -0
  883. package/build/esm/node_modules/object-keys/isArguments.js +17 -0
  884. package/build/esm/node_modules/object.assign/implementation.js +50 -0
  885. package/build/esm/node_modules/object.assign/index.js +29 -0
  886. package/build/esm/node_modules/object.assign/polyfill.js +57 -0
  887. package/build/esm/node_modules/object.assign/shim.js +17 -0
  888. package/build/esm/node_modules/pretty-format/build/collections.js +188 -0
  889. package/build/esm/node_modules/pretty-format/build/index.js +617 -0
  890. package/build/esm/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +119 -0
  891. package/build/esm/node_modules/pretty-format/build/plugins/ConvertAnsi.js +99 -0
  892. package/build/esm/node_modules/pretty-format/build/plugins/DOMCollection.js +82 -0
  893. package/build/esm/node_modules/pretty-format/build/plugins/DOMElement.js +130 -0
  894. package/build/esm/node_modules/pretty-format/build/plugins/Immutable.js +249 -0
  895. package/build/esm/node_modules/pretty-format/build/plugins/ReactElement.js +170 -0
  896. package/build/esm/node_modules/pretty-format/build/plugins/ReactTestComponent.js +81 -0
  897. package/build/esm/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +16 -0
  898. package/build/esm/node_modules/pretty-format/build/plugins/lib/markup.js +156 -0
  899. package/build/esm/node_modules/pretty-format/node_modules/ansi-styles/index.js +167 -0
  900. package/build/esm/node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js +232 -0
  901. package/build/esm/node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js +26 -0
  902. package/build/esm/node_modules/pretty-format/node_modules/react-is/index.js +12 -0
  903. package/build/esm/node_modules/react/cjs/react-jsx-runtime.development.js +1325 -0
  904. package/build/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +25 -0
  905. package/build/esm/node_modules/react/cjs/react.development.js +2749 -0
  906. package/build/esm/node_modules/react/cjs/react.production.min.js +38 -0
  907. package/build/esm/node_modules/react/index.js +17 -0
  908. package/build/esm/node_modules/react/jsx-runtime.js +12 -0
  909. package/build/esm/node_modules/react-dom/cjs/react-dom-test-utils.development.js +1754 -0
  910. package/build/esm/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +56 -0
  911. package/build/esm/node_modules/react-dom/cjs/react-dom.development.js +29855 -0
  912. package/build/esm/node_modules/react-dom/cjs/react-dom.production.min.js +334 -0
  913. package/build/esm/node_modules/react-dom/client.js +31 -0
  914. package/build/esm/node_modules/react-dom/index.js +48 -0
  915. package/build/esm/node_modules/react-dom/test-utils.js +12 -0
  916. package/build/esm/node_modules/react-is/cjs/react-is.development.js +230 -0
  917. package/build/esm/node_modules/react-is/cjs/react-is.production.min.js +26 -0
  918. package/build/esm/node_modules/react-is/index.js +12 -0
  919. package/build/esm/node_modules/regexp.prototype.flags/implementation.js +43 -0
  920. package/build/esm/node_modules/regexp.prototype.flags/index.js +26 -0
  921. package/build/esm/node_modules/regexp.prototype.flags/polyfill.js +40 -0
  922. package/build/esm/node_modules/regexp.prototype.flags/shim.js +29 -0
  923. package/build/esm/node_modules/scheduler/cjs/scheduler.development.js +632 -0
  924. package/build/esm/node_modules/scheduler/cjs/scheduler.production.min.js +33 -0
  925. package/build/esm/node_modules/scheduler/index.js +21 -0
  926. package/build/esm/node_modules/side-channel/index.js +128 -0
  927. package/build/esm/node_modules/styled-components/dist/styled-components.esm.js +12 -0
  928. package/build/esm/node_modules/ua-parser-js/src/ua-parser.js +879 -0
  929. package/build/esm/node_modules/util/node_modules/inherits/inherits.js +22 -0
  930. package/build/esm/node_modules/util/node_modules/inherits/inherits_browser.js +34 -0
  931. package/build/esm/node_modules/util/support/isBuffer.js +5 -0
  932. package/build/esm/node_modules/util/util.js +716 -0
  933. package/build/esm/node_modules/which-boxed-primitive/index.js +38 -0
  934. package/build/esm/node_modules/which-collection/index.js +30 -0
  935. package/build/esm/node_modules/which-typed-array/index.js +63 -0
  936. package/build/esm/src/index.d.ts +17 -0
  937. package/build/esm/src/index.d.ts.map +1 -0
  938. package/build/esm/src/index.js +8 -0
  939. package/build/esm/src/match-device/useMatchDevice.d.ts +8 -0
  940. package/build/esm/src/match-device/useMatchDevice.d.ts.map +1 -0
  941. package/build/esm/src/match-device/useMatchDevice.js +29 -0
  942. package/build/esm/src/match-resolution/useMatchResolution.d.ts +38 -0
  943. package/build/esm/src/match-resolution/useMatchResolution.d.ts.map +1 -0
  944. package/build/esm/src/match-resolution/useMatchResolution.js +53 -0
  945. package/build/esm/src/mount-react-hook/mountReactHook.d.ts +8 -0
  946. package/build/esm/src/mount-react-hook/mountReactHook.d.ts.map +1 -0
  947. package/build/esm/src/mount-react-hook/mountReactHook.js +14 -0
  948. package/build/esm/src/numbered-pagination/NumberedPagination.d.ts +13 -0
  949. package/build/esm/src/numbered-pagination/NumberedPagination.d.ts.map +1 -0
  950. package/build/esm/src/numbered-pagination/NumberedPagination.js +29 -0
  951. package/build/esm/src/pagination/usePagination.d.ts +20 -0
  952. package/build/esm/src/pagination/usePagination.d.ts.map +1 -0
  953. package/build/esm/src/pagination/usePagination.js +53 -0
  954. package/build/esm/src/scroll-to/useScrollTo.d.ts +6 -0
  955. package/build/esm/src/scroll-to/useScrollTo.d.ts.map +1 -0
  956. package/build/esm/src/scroll-to/useScrollTo.js +14 -0
  957. package/build/esm/src/table/Table.d.ts +24 -0
  958. package/build/esm/src/table/Table.d.ts.map +1 -0
  959. package/build/esm/src/table/Table.js +48 -0
  960. package/build/esm/src/visible/useVisible.d.ts +3 -0
  961. package/build/esm/src/visible/useVisible.d.ts.map +1 -0
  962. package/build/esm/src/visible/useVisible.js +23 -0
  963. package/package.json +99 -33
  964. package/build/bundle.d.ts +0 -198
  965. package/build/bundle.js +0 -37
  966. package/build/bundle.js.map +0 -1
@@ -0,0 +1,2912 @@
1
+ import { format as format_1, plugins as plugins_1 } from '../../../../pretty-format/build/index.js';
2
+ import { computeAccessibleDescription } from '../../../../dom-accessibility-api/dist/accessible-description.mjs.js';
3
+ import { computeAccessibleName } from '../../../../dom-accessibility-api/dist/accessible-name.mjs.js';
4
+ import { elementRoles as elementRoles_1, roles as roles_1, roleElements as roleElements_1 } from '../../../../aria-query/lib/index.js';
5
+ import lzString from '../../../../lz-string/libs/lz-string.js';
6
+
7
+ /**
8
+ * Source: https://github.com/facebook/jest/blob/e7bb6a1e26ffab90611b2593912df15b69315611/packages/pretty-format/src/plugins/DOMElement.ts
9
+ */
10
+
11
+ /* eslint-disable -- trying to stay as close to the original as possible */
12
+
13
+ /* istanbul ignore file */
14
+ function escapeHTML(str) {
15
+ return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');
16
+ } // Return empty string if keys is empty.
17
+
18
+
19
+ const printProps = (keys, props, config, indentation, depth, refs, printer) => {
20
+ const indentationNext = indentation + config.indent;
21
+ const colors = config.colors;
22
+ return keys.map(key => {
23
+ const value = props[key];
24
+ let printed = printer(value, config, indentationNext, depth, refs);
25
+
26
+ if (typeof value !== 'string') {
27
+ if (printed.indexOf('\n') !== -1) {
28
+ printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;
29
+ }
30
+
31
+ printed = '{' + printed + '}';
32
+ }
33
+
34
+ return config.spacingInner + indentation + colors.prop.open + key + colors.prop.close + '=' + colors.value.open + printed + colors.value.close;
35
+ }).join('');
36
+ }; // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants
37
+
38
+
39
+ const NodeTypeTextNode = 3; // Return empty string if children is empty.
40
+
41
+ const printChildren = (children, config, indentation, depth, refs, printer) => children.map(child => {
42
+ const printedChild = typeof child === 'string' ? printText(child, config) : printer(child, config, indentation, depth, refs);
43
+
44
+ if (printedChild === '' && typeof child === 'object' && child !== null && child.nodeType !== NodeTypeTextNode) {
45
+ // A plugin serialized this Node to '' meaning we should ignore it.
46
+ return '';
47
+ }
48
+
49
+ return config.spacingOuter + indentation + printedChild;
50
+ }).join('');
51
+
52
+ const printText = (text, config) => {
53
+ const contentColor = config.colors.content;
54
+ return contentColor.open + escapeHTML(text) + contentColor.close;
55
+ };
56
+
57
+ const printComment = (comment, config) => {
58
+ const commentColor = config.colors.comment;
59
+ return commentColor.open + '<!--' + escapeHTML(comment) + '-->' + commentColor.close;
60
+ }; // Separate the functions to format props, children, and element,
61
+ // so a plugin could override a particular function, if needed.
62
+ // Too bad, so sad: the traditional (but unnecessary) space
63
+ // in a self-closing tagColor requires a second test of printedProps.
64
+
65
+
66
+ const printElement = (type, printedProps, printedChildren, config, indentation) => {
67
+ const tagColor = config.colors.tag;
68
+ return tagColor.open + '<' + type + (printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open) + (printedChildren ? '>' + tagColor.close + printedChildren + config.spacingOuter + indentation + tagColor.open + '</' + type : (printedProps && !config.min ? '' : ' ') + '/') + '>' + tagColor.close;
69
+ };
70
+
71
+ const printElementAsLeaf = (type, config) => {
72
+ const tagColor = config.colors.tag;
73
+ return tagColor.open + '<' + type + tagColor.close + ' …' + tagColor.open + ' />' + tagColor.close;
74
+ };
75
+
76
+ const ELEMENT_NODE$1 = 1;
77
+ const TEXT_NODE$1 = 3;
78
+ const COMMENT_NODE$1 = 8;
79
+ const FRAGMENT_NODE = 11;
80
+ const ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;
81
+
82
+ const testNode = val => {
83
+ const constructorName = val.constructor.name;
84
+ const {
85
+ nodeType,
86
+ tagName
87
+ } = val;
88
+ const isCustomElement = typeof tagName === 'string' && tagName.includes('-') || typeof val.hasAttribute === 'function' && val.hasAttribute('is');
89
+ return nodeType === ELEMENT_NODE$1 && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE$1 && constructorName === 'Text' || nodeType === COMMENT_NODE$1 && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment';
90
+ };
91
+
92
+ function nodeIsText(node) {
93
+ return node.nodeType === TEXT_NODE$1;
94
+ }
95
+
96
+ function nodeIsComment(node) {
97
+ return node.nodeType === COMMENT_NODE$1;
98
+ }
99
+
100
+ function nodeIsFragment(node) {
101
+ return node.nodeType === FRAGMENT_NODE;
102
+ }
103
+
104
+ function createDOMElementFilter(filterNode) {
105
+ return {
106
+ test: val => {
107
+ var _val$constructor2;
108
+
109
+ return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
110
+ },
111
+ serialize: (node, config, indentation, depth, refs, printer) => {
112
+ if (nodeIsText(node)) {
113
+ return printText(node.data, config);
114
+ }
115
+
116
+ if (nodeIsComment(node)) {
117
+ return printComment(node.data, config);
118
+ }
119
+
120
+ const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
121
+
122
+ if (++depth > config.maxDepth) {
123
+ return printElementAsLeaf(type, config);
124
+ }
125
+
126
+ return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes).map(attr => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {
127
+ props[attribute.name] = attribute.value;
128
+ return props;
129
+ }, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children).filter(filterNode), config, indentation + config.indent, depth, refs, printer), config, indentation);
130
+ }
131
+ };
132
+ }
133
+
134
+ // We try to load node dependencies
135
+ let chalk = null;
136
+ let readFileSync = null;
137
+ let codeFrameColumns = null;
138
+
139
+ try {
140
+ const nodeRequire = module && module.require;
141
+ readFileSync = nodeRequire.call(module, 'fs').readFileSync;
142
+ codeFrameColumns = nodeRequire.call(module, '@babel/code-frame').codeFrameColumns;
143
+ chalk = nodeRequire.call(module, 'chalk');
144
+ } catch {// We're in a browser environment
145
+ } // frame has the form "at myMethod (location/to/my/file.js:10:2)"
146
+
147
+
148
+ function getCodeFrame(frame) {
149
+ const locationStart = frame.indexOf('(') + 1;
150
+ const locationEnd = frame.indexOf(')');
151
+ const frameLocation = frame.slice(locationStart, locationEnd);
152
+ const frameLocationElements = frameLocation.split(':');
153
+ const [filename, line, column] = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)];
154
+ let rawFileContents = '';
155
+
156
+ try {
157
+ rawFileContents = readFileSync(filename, 'utf-8');
158
+ } catch {
159
+ return '';
160
+ }
161
+
162
+ const codeFrame = codeFrameColumns(rawFileContents, {
163
+ start: {
164
+ line,
165
+ column
166
+ }
167
+ }, {
168
+ highlightCode: true,
169
+ linesBelow: 0
170
+ });
171
+ return chalk.dim(frameLocation) + "\n" + codeFrame + "\n";
172
+ }
173
+
174
+ function getUserCodeFrame() {
175
+ // If we couldn't load dependencies, we can't generate the user trace
176
+
177
+ /* istanbul ignore next */
178
+ if (!readFileSync || !codeFrameColumns) {
179
+ return '';
180
+ }
181
+
182
+ const err = new Error();
183
+ const firstClientCodeFrame = err.stack.split('\n').slice(1) // Remove first line which has the form "Error: TypeError"
184
+ .find(frame => !frame.includes('node_modules/')); // Ignore frames from 3rd party libraries
185
+
186
+ return getCodeFrame(firstClientCodeFrame);
187
+ }
188
+
189
+ // Constant node.nodeType for text nodes, see:
190
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants
191
+ const TEXT_NODE = 3;
192
+
193
+ function jestFakeTimersAreEnabled() {
194
+ /* istanbul ignore else */
195
+ // eslint-disable-next-line
196
+ if (typeof jest !== 'undefined' && jest !== null) {
197
+ return (// legacy timers
198
+ setTimeout._isMockFunction === true || // modern timers
199
+ Object.prototype.hasOwnProperty.call(setTimeout, 'clock')
200
+ );
201
+ } // istanbul ignore next
202
+
203
+
204
+ return false;
205
+ }
206
+
207
+ function getDocument() {
208
+ /* istanbul ignore if */
209
+ if (typeof window === 'undefined') {
210
+ throw new Error('Could not find default container');
211
+ }
212
+
213
+ return window.document;
214
+ }
215
+
216
+ function getWindowFromNode(node) {
217
+ if (node.defaultView) {
218
+ // node is document
219
+ return node.defaultView;
220
+ } else if (node.ownerDocument && node.ownerDocument.defaultView) {
221
+ // node is a DOM node
222
+ return node.ownerDocument.defaultView;
223
+ } else if (node.window) {
224
+ // node is window
225
+ return node.window;
226
+ } else if (node.ownerDocument && node.ownerDocument.defaultView === null) {
227
+ throw new Error("It looks like the window object is not available for the provided node.");
228
+ } else if (node.then instanceof Function) {
229
+ throw new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?");
230
+ } else if (Array.isArray(node)) {
231
+ throw new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?");
232
+ } else if (typeof node.debug === 'function' && typeof node.logTestingPlaygroundURL === 'function') {
233
+ throw new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?");
234
+ } else {
235
+ // The user passed something unusual to a calling function
236
+ throw new Error("The given node is not an Element, the node type is: " + typeof node + ".");
237
+ }
238
+ }
239
+
240
+ function checkContainerType(container) {
241
+ if (!container || !(typeof container.querySelector === 'function') || !(typeof container.querySelectorAll === 'function')) {
242
+ throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got " + getTypeName(container) + ".");
243
+ }
244
+
245
+ function getTypeName(object) {
246
+ if (typeof object === 'object') {
247
+ return object === null ? 'null' : object.constructor.name;
248
+ }
249
+
250
+ return typeof object;
251
+ }
252
+ }
253
+
254
+ const shouldHighlight = () => {
255
+ let colors;
256
+
257
+ try {
258
+ var _process, _process$env;
259
+
260
+ colors = JSON.parse((_process = process) == null ? void 0 : (_process$env = _process.env) == null ? void 0 : _process$env.COLORS);
261
+ } catch (e) {// If this throws, process?.env?.COLORS wasn't parsable. Since we only
262
+ // care about `true` or `false`, we can safely ignore the error.
263
+ }
264
+
265
+ if (typeof colors === 'boolean') {
266
+ // If `colors` is set explicitly (both `true` and `false`), use that value.
267
+ return colors;
268
+ } else {
269
+ // If `colors` is not set, colorize if we're in node.
270
+ return typeof process !== 'undefined' && process.versions !== undefined && process.versions.node !== undefined;
271
+ }
272
+ };
273
+
274
+ const {
275
+ DOMCollection
276
+ } = plugins_1; // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants
277
+
278
+ const ELEMENT_NODE = 1;
279
+ const COMMENT_NODE = 8; // https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50
280
+
281
+ function filterCommentsAndDefaultIgnoreTagsTags(value) {
282
+ return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));
283
+ }
284
+
285
+ function prettyDOM(dom, maxLength, options) {
286
+ if (options === void 0) {
287
+ options = {};
288
+ }
289
+
290
+ if (!dom) {
291
+ dom = getDocument().body;
292
+ }
293
+
294
+ if (typeof maxLength !== 'number') {
295
+ maxLength = typeof process !== 'undefined' && process.env.DEBUG_PRINT_LIMIT || 7000;
296
+ }
297
+
298
+ if (maxLength === 0) {
299
+ return '';
300
+ }
301
+
302
+ if (dom.documentElement) {
303
+ dom = dom.documentElement;
304
+ }
305
+
306
+ let domTypeName = typeof dom;
307
+
308
+ if (domTypeName === 'object') {
309
+ domTypeName = dom.constructor.name;
310
+ } else {
311
+ // To don't fall with `in` operator
312
+ dom = {};
313
+ }
314
+
315
+ if (!('outerHTML' in dom)) {
316
+ throw new TypeError("Expected an element or document but got " + domTypeName);
317
+ }
318
+
319
+ const {
320
+ filterNode = filterCommentsAndDefaultIgnoreTagsTags,
321
+ ...prettyFormatOptions
322
+ } = options;
323
+ const debugContent = format_1(dom, {
324
+ plugins: [createDOMElementFilter(filterNode), DOMCollection],
325
+ printFunctionName: false,
326
+ highlight: shouldHighlight(),
327
+ ...prettyFormatOptions
328
+ });
329
+ return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + "..." : debugContent;
330
+ }
331
+
332
+ const logDOM = function () {
333
+ const userCodeFrame = getUserCodeFrame();
334
+
335
+ if (userCodeFrame) {
336
+ console.log(prettyDOM(...arguments) + "\n\n" + userCodeFrame);
337
+ } else {
338
+ console.log(prettyDOM(...arguments));
339
+ }
340
+ };
341
+
342
+ // It would be cleaner for this to live inside './queries', but
343
+ // other parts of the code assume that all exports from
344
+ // './queries' are query functions.
345
+ let config = {
346
+ testIdAttribute: 'data-testid',
347
+ asyncUtilTimeout: 1000,
348
+ // asyncWrapper and advanceTimersWrapper is to support React's async `act` function.
349
+ // forcing react-testing-library to wrap all async functions would've been
350
+ // a total nightmare (consider wrapping every findBy* query and then also
351
+ // updating `within` so those would be wrapped too. Total nightmare).
352
+ // so we have this config option that's really only intended for
353
+ // react-testing-library to use. For that reason, this feature will remain
354
+ // undocumented.
355
+ asyncWrapper: cb => cb(),
356
+ unstable_advanceTimersWrapper: cb => cb(),
357
+ eventWrapper: cb => cb(),
358
+ // default value for the `hidden` option in `ByRole` queries
359
+ defaultHidden: false,
360
+ // default value for the `ignore` option in `ByText` queries
361
+ defaultIgnore: 'script, style',
362
+ // showOriginalStackTrace flag to show the full error stack traces for async errors
363
+ showOriginalStackTrace: false,
364
+ // throw errors w/ suggestions for better queries. Opt in so off by default.
365
+ throwSuggestions: false,
366
+
367
+ // called when getBy* queries fail. (message, container) => Error
368
+ getElementError(message, container) {
369
+ const prettifiedDOM = prettyDOM(container);
370
+ const error = new Error([message, "Ignored nodes: comments, " + config.defaultIgnore + "\n" + prettifiedDOM].filter(Boolean).join('\n\n'));
371
+ error.name = 'TestingLibraryElementError';
372
+ return error;
373
+ },
374
+
375
+ _disableExpensiveErrorDiagnostics: false,
376
+ computedStyleSupportsPseudoElements: false
377
+ };
378
+ function runWithExpensiveErrorDiagnosticsDisabled(callback) {
379
+ try {
380
+ config._disableExpensiveErrorDiagnostics = true;
381
+ return callback();
382
+ } finally {
383
+ config._disableExpensiveErrorDiagnostics = false;
384
+ }
385
+ }
386
+ function configure(newConfig) {
387
+ if (typeof newConfig === 'function') {
388
+ // Pass the existing config out to the provided function
389
+ // and accept a delta in return
390
+ newConfig = newConfig(config);
391
+ } // Merge the incoming config delta
392
+
393
+
394
+ config = { ...config,
395
+ ...newConfig
396
+ };
397
+ }
398
+ function getConfig() {
399
+ return config;
400
+ }
401
+
402
+ const labelledNodeNames = ['button', 'meter', 'output', 'progress', 'select', 'textarea', 'input'];
403
+
404
+ function getTextContent(node) {
405
+ if (labelledNodeNames.includes(node.nodeName.toLowerCase())) {
406
+ return '';
407
+ }
408
+
409
+ if (node.nodeType === TEXT_NODE) return node.textContent;
410
+ return Array.from(node.childNodes).map(childNode => getTextContent(childNode)).join('');
411
+ }
412
+
413
+ function getLabelContent(element) {
414
+ let textContent;
415
+
416
+ if (element.tagName.toLowerCase() === 'label') {
417
+ textContent = getTextContent(element);
418
+ } else {
419
+ textContent = element.value || element.textContent;
420
+ }
421
+
422
+ return textContent;
423
+ } // Based on https://github.com/eps1lon/dom-accessibility-api/pull/352
424
+
425
+
426
+ function getRealLabels(element) {
427
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- types are not aware of older browsers that don't implement `labels`
428
+ if (element.labels !== undefined) {
429
+ var _labels;
430
+
431
+ return (_labels = element.labels) != null ? _labels : [];
432
+ }
433
+
434
+ if (!isLabelable(element)) return [];
435
+ const labels = element.ownerDocument.querySelectorAll('label');
436
+ return Array.from(labels).filter(label => label.control === element);
437
+ }
438
+
439
+ function isLabelable(element) {
440
+ return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === 'INPUT' && element.getAttribute('type') !== 'hidden';
441
+ }
442
+
443
+ function getLabels(container, element, _temp) {
444
+ let {
445
+ selector = '*'
446
+ } = _temp === void 0 ? {} : _temp;
447
+ const ariaLabelledBy = element.getAttribute('aria-labelledby');
448
+ const labelsId = ariaLabelledBy ? ariaLabelledBy.split(' ') : [];
449
+ return labelsId.length ? labelsId.map(labelId => {
450
+ const labellingElement = container.querySelector("[id=\"" + labelId + "\"]");
451
+ return labellingElement ? {
452
+ content: getLabelContent(labellingElement),
453
+ formControl: null
454
+ } : {
455
+ content: '',
456
+ formControl: null
457
+ };
458
+ }) : Array.from(getRealLabels(element)).map(label => {
459
+ const textToMatch = getLabelContent(label);
460
+ const formControlSelector = 'button, input, meter, output, progress, select, textarea';
461
+ const labelledFormControl = Array.from(label.querySelectorAll(formControlSelector)).filter(formControlElement => formControlElement.matches(selector))[0];
462
+ return {
463
+ content: textToMatch,
464
+ formControl: labelledFormControl
465
+ };
466
+ });
467
+ }
468
+
469
+ function assertNotNullOrUndefined(matcher) {
470
+ if (matcher === null || matcher === undefined) {
471
+ throw new Error( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`
472
+ "It looks like " + matcher + " was passed instead of a matcher. Did you do something like getByText(" + matcher + ")?");
473
+ }
474
+ }
475
+
476
+ function fuzzyMatches(textToMatch, node, matcher, normalizer) {
477
+ if (typeof textToMatch !== 'string') {
478
+ return false;
479
+ }
480
+
481
+ assertNotNullOrUndefined(matcher);
482
+ const normalizedText = normalizer(textToMatch);
483
+
484
+ if (typeof matcher === 'string' || typeof matcher === 'number') {
485
+ return normalizedText.toLowerCase().includes(matcher.toString().toLowerCase());
486
+ } else if (typeof matcher === 'function') {
487
+ return matcher(normalizedText, node);
488
+ } else {
489
+ return matchRegExp(matcher, normalizedText);
490
+ }
491
+ }
492
+
493
+ function matches(textToMatch, node, matcher, normalizer) {
494
+ if (typeof textToMatch !== 'string') {
495
+ return false;
496
+ }
497
+
498
+ assertNotNullOrUndefined(matcher);
499
+ const normalizedText = normalizer(textToMatch);
500
+
501
+ if (matcher instanceof Function) {
502
+ return matcher(normalizedText, node);
503
+ } else if (matcher instanceof RegExp) {
504
+ return matchRegExp(matcher, normalizedText);
505
+ } else {
506
+ return normalizedText === String(matcher);
507
+ }
508
+ }
509
+
510
+ function getDefaultNormalizer(_temp) {
511
+ let {
512
+ trim = true,
513
+ collapseWhitespace = true
514
+ } = _temp === void 0 ? {} : _temp;
515
+ return text => {
516
+ let normalizedText = text;
517
+ normalizedText = trim ? normalizedText.trim() : normalizedText;
518
+ normalizedText = collapseWhitespace ? normalizedText.replace(/\s+/g, ' ') : normalizedText;
519
+ return normalizedText;
520
+ };
521
+ }
522
+ /**
523
+ * Constructs a normalizer to pass to functions in matches.js
524
+ * @param {boolean|undefined} trim The user-specified value for `trim`, without
525
+ * any defaulting having been applied
526
+ * @param {boolean|undefined} collapseWhitespace The user-specified value for
527
+ * `collapseWhitespace`, without any defaulting having been applied
528
+ * @param {Function|undefined} normalizer The user-specified normalizer
529
+ * @returns {Function} A normalizer
530
+ */
531
+
532
+
533
+ function makeNormalizer(_ref) {
534
+ let {
535
+ trim,
536
+ collapseWhitespace,
537
+ normalizer
538
+ } = _ref;
539
+
540
+ if (!normalizer) {
541
+ // No custom normalizer specified. Just use default.
542
+ return getDefaultNormalizer({
543
+ trim,
544
+ collapseWhitespace
545
+ });
546
+ }
547
+
548
+ if (typeof trim !== 'undefined' || typeof collapseWhitespace !== 'undefined') {
549
+ // They've also specified a value for trim or collapseWhitespace
550
+ throw new Error('trim and collapseWhitespace are not supported with a normalizer. ' + 'If you want to use the default trim and collapseWhitespace logic in your normalizer, ' + 'use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');
551
+ }
552
+
553
+ return normalizer;
554
+ }
555
+
556
+ function matchRegExp(matcher, text) {
557
+ const match = matcher.test(text);
558
+
559
+ if (matcher.global && matcher.lastIndex !== 0) {
560
+ console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.");
561
+ matcher.lastIndex = 0;
562
+ }
563
+
564
+ return match;
565
+ }
566
+
567
+ function getNodeText(node) {
568
+ if (node.matches('input[type=submit], input[type=button], input[type=reset]')) {
569
+ return node.value;
570
+ }
571
+
572
+ return Array.from(node.childNodes).filter(child => child.nodeType === TEXT_NODE && Boolean(child.textContent)).map(c => c.textContent).join('');
573
+ }
574
+
575
+ const elementRoleList = buildElementRoleList(elementRoles_1);
576
+ /**
577
+ * @param {Element} element -
578
+ * @returns {boolean} - `true` if `element` and its subtree are inaccessible
579
+ */
580
+
581
+ function isSubtreeInaccessible(element) {
582
+ if (element.hidden === true) {
583
+ return true;
584
+ }
585
+
586
+ if (element.getAttribute('aria-hidden') === 'true') {
587
+ return true;
588
+ }
589
+
590
+ const window = element.ownerDocument.defaultView;
591
+
592
+ if (window.getComputedStyle(element).display === 'none') {
593
+ return true;
594
+ }
595
+
596
+ return false;
597
+ }
598
+ /**
599
+ * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
600
+ * which should only be used for elements with a non-presentational role i.e.
601
+ * `role="none"` and `role="presentation"` will not be excluded.
602
+ *
603
+ * Implements aria-hidden semantics (i.e. parent overrides child)
604
+ * Ignores "Child Presentational: True" characteristics
605
+ *
606
+ * @param {Element} element -
607
+ * @param {object} [options] -
608
+ * @param {function (element: Element): boolean} options.isSubtreeInaccessible -
609
+ * can be used to return cached results from previous isSubtreeInaccessible calls
610
+ * @returns {boolean} true if excluded, otherwise false
611
+ */
612
+
613
+
614
+ function isInaccessible(element, options) {
615
+ if (options === void 0) {
616
+ options = {};
617
+ }
618
+
619
+ const {
620
+ isSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible
621
+ } = options;
622
+ const window = element.ownerDocument.defaultView; // since visibility is inherited we can exit early
623
+
624
+ if (window.getComputedStyle(element).visibility === 'hidden') {
625
+ return true;
626
+ }
627
+
628
+ let currentElement = element;
629
+
630
+ while (currentElement) {
631
+ if (isSubtreeInaccessibleImpl(currentElement)) {
632
+ return true;
633
+ }
634
+
635
+ currentElement = currentElement.parentElement;
636
+ }
637
+
638
+ return false;
639
+ }
640
+
641
+ function getImplicitAriaRoles(currentNode) {
642
+ // eslint bug here:
643
+ // eslint-disable-next-line no-unused-vars
644
+ for (const {
645
+ match,
646
+ roles
647
+ } of elementRoleList) {
648
+ if (match(currentNode)) {
649
+ return [...roles];
650
+ }
651
+ }
652
+
653
+ return [];
654
+ }
655
+
656
+ function buildElementRoleList(elementRolesMap) {
657
+ function makeElementSelector(_ref) {
658
+ let {
659
+ name,
660
+ attributes
661
+ } = _ref;
662
+ return "" + name + attributes.map(_ref2 => {
663
+ let {
664
+ name: attributeName,
665
+ value,
666
+ constraints = []
667
+ } = _ref2;
668
+ const shouldNotExist = constraints.indexOf('undefined') !== -1;
669
+
670
+ if (shouldNotExist) {
671
+ return ":not([" + attributeName + "])";
672
+ } else if (value) {
673
+ return "[" + attributeName + "=\"" + value + "\"]";
674
+ } else {
675
+ return "[" + attributeName + "]";
676
+ }
677
+ }).join('');
678
+ }
679
+
680
+ function getSelectorSpecificity(_ref3) {
681
+ let {
682
+ attributes = []
683
+ } = _ref3;
684
+ return attributes.length;
685
+ }
686
+
687
+ function bySelectorSpecificity(_ref4, _ref5) {
688
+ let {
689
+ specificity: leftSpecificity
690
+ } = _ref4;
691
+ let {
692
+ specificity: rightSpecificity
693
+ } = _ref5;
694
+ return rightSpecificity - leftSpecificity;
695
+ }
696
+
697
+ function match(element) {
698
+ let {
699
+ attributes = []
700
+ } = element; // https://github.com/testing-library/dom-testing-library/issues/814
701
+
702
+ const typeTextIndex = attributes.findIndex(attribute => attribute.value && attribute.name === 'type' && attribute.value === 'text');
703
+
704
+ if (typeTextIndex >= 0) {
705
+ // not using splice to not mutate the attributes array
706
+ attributes = [...attributes.slice(0, typeTextIndex), ...attributes.slice(typeTextIndex + 1)];
707
+ }
708
+
709
+ const selector = makeElementSelector({ ...element,
710
+ attributes
711
+ });
712
+ return node => {
713
+ if (typeTextIndex >= 0 && node.type !== 'text') {
714
+ return false;
715
+ }
716
+
717
+ return node.matches(selector);
718
+ };
719
+ }
720
+
721
+ let result = []; // eslint bug here:
722
+ // eslint-disable-next-line no-unused-vars
723
+
724
+ for (const [element, roles] of elementRolesMap.entries()) {
725
+ result = [...result, {
726
+ match: match(element),
727
+ roles: Array.from(roles),
728
+ specificity: getSelectorSpecificity(element)
729
+ }];
730
+ }
731
+
732
+ return result.sort(bySelectorSpecificity);
733
+ }
734
+
735
+ function getRoles(container, _temp) {
736
+ let {
737
+ hidden = false
738
+ } = _temp === void 0 ? {} : _temp;
739
+
740
+ function flattenDOM(node) {
741
+ return [node, ...Array.from(node.children).reduce((acc, child) => [...acc, ...flattenDOM(child)], [])];
742
+ }
743
+
744
+ return flattenDOM(container).filter(element => {
745
+ return hidden === false ? isInaccessible(element) === false : true;
746
+ }).reduce((acc, node) => {
747
+ let roles = []; // TODO: This violates html-aria which does not allow any role on every element
748
+
749
+ if (node.hasAttribute('role')) {
750
+ roles = node.getAttribute('role').split(' ').slice(0, 1);
751
+ } else {
752
+ roles = getImplicitAriaRoles(node);
753
+ }
754
+
755
+ return roles.reduce((rolesAcc, role) => Array.isArray(rolesAcc[role]) ? { ...rolesAcc,
756
+ [role]: [...rolesAcc[role], node]
757
+ } : { ...rolesAcc,
758
+ [role]: [node]
759
+ }, acc);
760
+ }, {});
761
+ }
762
+
763
+ function prettyRoles(dom, _ref6) {
764
+ let {
765
+ hidden,
766
+ includeDescription
767
+ } = _ref6;
768
+ const roles = getRoles(dom, {
769
+ hidden
770
+ }); // We prefer to skip generic role, we don't recommend it
771
+
772
+ return Object.entries(roles).filter(_ref7 => {
773
+ let [role] = _ref7;
774
+ return role !== 'generic';
775
+ }).map(_ref8 => {
776
+ let [role, elements] = _ref8;
777
+ const delimiterBar = '-'.repeat(50);
778
+ const elementsString = elements.map(el => {
779
+ const nameString = "Name \"" + computeAccessibleName(el, {
780
+ computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
781
+ }) + "\":\n";
782
+ const domString = prettyDOM(el.cloneNode(false));
783
+
784
+ if (includeDescription) {
785
+ const descriptionString = "Description \"" + computeAccessibleDescription(el, {
786
+ computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
787
+ }) + "\":\n";
788
+ return "" + nameString + descriptionString + domString;
789
+ }
790
+
791
+ return "" + nameString + domString;
792
+ }).join('\n\n');
793
+ return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
794
+ }).join('\n');
795
+ }
796
+ /**
797
+ * @param {Element} element -
798
+ * @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable
799
+ */
800
+
801
+
802
+ function computeAriaSelected(element) {
803
+ // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
804
+ // https://www.w3.org/TR/html-aam-1.0/#details-id-97
805
+ if (element.tagName === 'OPTION') {
806
+ return element.selected;
807
+ } // explicit value
808
+
809
+
810
+ return checkBooleanAttribute(element, 'aria-selected');
811
+ }
812
+ /**
813
+ * @param {Element} element -
814
+ * @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able
815
+ */
816
+
817
+
818
+ function computeAriaChecked(element) {
819
+ // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
820
+ // https://www.w3.org/TR/html-aam-1.0/#details-id-56
821
+ // https://www.w3.org/TR/html-aam-1.0/#details-id-67
822
+ if ('indeterminate' in element && element.indeterminate) {
823
+ return undefined;
824
+ }
825
+
826
+ if ('checked' in element) {
827
+ return element.checked;
828
+ } // explicit value
829
+
830
+
831
+ return checkBooleanAttribute(element, 'aria-checked');
832
+ }
833
+ /**
834
+ * @param {Element} element -
835
+ * @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able
836
+ */
837
+
838
+
839
+ function computeAriaPressed(element) {
840
+ // https://www.w3.org/TR/wai-aria-1.1/#aria-pressed
841
+ return checkBooleanAttribute(element, 'aria-pressed');
842
+ }
843
+ /**
844
+ * @param {Element} element -
845
+ * @returns {boolean | string | null} -
846
+ */
847
+
848
+
849
+ function computeAriaCurrent(element) {
850
+ var _ref9, _checkBooleanAttribut;
851
+
852
+ // https://www.w3.org/TR/wai-aria-1.1/#aria-current
853
+ return (_ref9 = (_checkBooleanAttribut = checkBooleanAttribute(element, 'aria-current')) != null ? _checkBooleanAttribut : element.getAttribute('aria-current')) != null ? _ref9 : false;
854
+ }
855
+ /**
856
+ * @param {Element} element -
857
+ * @returns {boolean | undefined} - false/true if (not)expanded, undefined if not expand-able
858
+ */
859
+
860
+
861
+ function computeAriaExpanded(element) {
862
+ // https://www.w3.org/TR/wai-aria-1.1/#aria-expanded
863
+ return checkBooleanAttribute(element, 'aria-expanded');
864
+ }
865
+
866
+ function checkBooleanAttribute(element, attribute) {
867
+ const attributeValue = element.getAttribute(attribute);
868
+
869
+ if (attributeValue === 'true') {
870
+ return true;
871
+ }
872
+
873
+ if (attributeValue === 'false') {
874
+ return false;
875
+ }
876
+
877
+ return undefined;
878
+ }
879
+ /**
880
+ * @param {Element} element -
881
+ * @returns {number | undefined} - number if implicit heading or aria-level present, otherwise undefined
882
+ */
883
+
884
+
885
+ function computeHeadingLevel(element) {
886
+ // https://w3c.github.io/html-aam/#el-h1-h6
887
+ // https://w3c.github.io/html-aam/#el-h1-h6
888
+ const implicitHeadingLevels = {
889
+ H1: 1,
890
+ H2: 2,
891
+ H3: 3,
892
+ H4: 4,
893
+ H5: 5,
894
+ H6: 6
895
+ }; // explicit aria-level value
896
+ // https://www.w3.org/TR/wai-aria-1.2/#aria-level
897
+
898
+ const ariaLevelAttribute = element.getAttribute('aria-level') && Number(element.getAttribute('aria-level'));
899
+ return ariaLevelAttribute || implicitHeadingLevels[element.tagName];
900
+ }
901
+
902
+ const normalize = getDefaultNormalizer();
903
+
904
+ function escapeRegExp(string) {
905
+ return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
906
+ }
907
+
908
+ function getRegExpMatcher(string) {
909
+ return new RegExp(escapeRegExp(string.toLowerCase()), 'i');
910
+ }
911
+
912
+ function makeSuggestion(queryName, element, content, _ref) {
913
+ let {
914
+ variant,
915
+ name
916
+ } = _ref;
917
+ let warning = '';
918
+ const queryOptions = {};
919
+ const queryArgs = [['Role', 'TestId'].includes(queryName) ? content : getRegExpMatcher(content)];
920
+
921
+ if (name) {
922
+ queryOptions.name = getRegExpMatcher(name);
923
+ }
924
+
925
+ if (queryName === 'Role' && isInaccessible(element)) {
926
+ queryOptions.hidden = true;
927
+ warning = "Element is inaccessible. This means that the element and all its children are invisible to screen readers.\n If you are using the aria-hidden prop, make sure this is the right choice for your case.\n ";
928
+ }
929
+
930
+ if (Object.keys(queryOptions).length > 0) {
931
+ queryArgs.push(queryOptions);
932
+ }
933
+
934
+ const queryMethod = variant + "By" + queryName;
935
+ return {
936
+ queryName,
937
+ queryMethod,
938
+ queryArgs,
939
+ variant,
940
+ warning,
941
+
942
+ toString() {
943
+ if (warning) {
944
+ console.warn(warning);
945
+ }
946
+
947
+ let [text, options] = queryArgs;
948
+ text = typeof text === 'string' ? "'" + text + "'" : text;
949
+ options = options ? ", { " + Object.entries(options).map(_ref2 => {
950
+ let [k, v] = _ref2;
951
+ return k + ": " + v;
952
+ }).join(', ') + " }" : '';
953
+ return queryMethod + "(" + text + options + ")";
954
+ }
955
+
956
+ };
957
+ }
958
+
959
+ function canSuggest(currentMethod, requestedMethod, data) {
960
+ return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());
961
+ }
962
+
963
+ function getSuggestedQuery(element, variant, method) {
964
+ var _element$getAttribute, _getImplicitAriaRoles;
965
+
966
+ if (variant === void 0) {
967
+ variant = 'get';
968
+ }
969
+
970
+ // don't create suggestions for script and style elements
971
+ if (element.matches(getConfig().defaultIgnore)) {
972
+ return undefined;
973
+ } //We prefer to suggest something else if the role is generic
974
+
975
+
976
+ const role = (_element$getAttribute = element.getAttribute('role')) != null ? _element$getAttribute : (_getImplicitAriaRoles = getImplicitAriaRoles(element)) == null ? void 0 : _getImplicitAriaRoles[0];
977
+
978
+ if (role !== 'generic' && canSuggest('Role', method, role)) {
979
+ return makeSuggestion('Role', element, role, {
980
+ variant,
981
+ name: computeAccessibleName(element, {
982
+ computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
983
+ })
984
+ });
985
+ }
986
+
987
+ const labelText = getLabels(document, element).map(label => label.content).join(' ');
988
+
989
+ if (canSuggest('LabelText', method, labelText)) {
990
+ return makeSuggestion('LabelText', element, labelText, {
991
+ variant
992
+ });
993
+ }
994
+
995
+ const placeholderText = element.getAttribute('placeholder');
996
+
997
+ if (canSuggest('PlaceholderText', method, placeholderText)) {
998
+ return makeSuggestion('PlaceholderText', element, placeholderText, {
999
+ variant
1000
+ });
1001
+ }
1002
+
1003
+ const textContent = normalize(getNodeText(element));
1004
+
1005
+ if (canSuggest('Text', method, textContent)) {
1006
+ return makeSuggestion('Text', element, textContent, {
1007
+ variant
1008
+ });
1009
+ }
1010
+
1011
+ if (canSuggest('DisplayValue', method, element.value)) {
1012
+ return makeSuggestion('DisplayValue', element, normalize(element.value), {
1013
+ variant
1014
+ });
1015
+ }
1016
+
1017
+ const alt = element.getAttribute('alt');
1018
+
1019
+ if (canSuggest('AltText', method, alt)) {
1020
+ return makeSuggestion('AltText', element, alt, {
1021
+ variant
1022
+ });
1023
+ }
1024
+
1025
+ const title = element.getAttribute('title');
1026
+
1027
+ if (canSuggest('Title', method, title)) {
1028
+ return makeSuggestion('Title', element, title, {
1029
+ variant
1030
+ });
1031
+ }
1032
+
1033
+ const testId = element.getAttribute(getConfig().testIdAttribute);
1034
+
1035
+ if (canSuggest('TestId', method, testId)) {
1036
+ return makeSuggestion('TestId', element, testId, {
1037
+ variant
1038
+ });
1039
+ }
1040
+
1041
+ return undefined;
1042
+ }
1043
+
1044
+ // closer to their code (because async stack traces are hard to follow).
1045
+
1046
+ function copyStackTrace(target, source) {
1047
+ target.stack = source.stack.replace(source.message, target.message);
1048
+ }
1049
+
1050
+ function waitFor(callback, _ref) {
1051
+ let {
1052
+ container = getDocument(),
1053
+ timeout = getConfig().asyncUtilTimeout,
1054
+ showOriginalStackTrace = getConfig().showOriginalStackTrace,
1055
+ stackTraceError,
1056
+ interval = 50,
1057
+ onTimeout = error => {
1058
+ error.message = getConfig().getElementError(error.message, container).message;
1059
+ return error;
1060
+ },
1061
+ mutationObserverOptions = {
1062
+ subtree: true,
1063
+ childList: true,
1064
+ attributes: true,
1065
+ characterData: true
1066
+ }
1067
+ } = _ref;
1068
+
1069
+ if (typeof callback !== 'function') {
1070
+ throw new TypeError('Received `callback` arg must be a function');
1071
+ }
1072
+
1073
+ return new Promise(async (resolve, reject) => {
1074
+ let lastError, intervalId, observer;
1075
+ let finished = false;
1076
+ let promiseStatus = 'idle';
1077
+ const overallTimeoutTimer = setTimeout(handleTimeout, timeout);
1078
+ const usingJestFakeTimers = jestFakeTimersAreEnabled();
1079
+
1080
+ if (usingJestFakeTimers) {
1081
+ const {
1082
+ unstable_advanceTimersWrapper: advanceTimersWrapper
1083
+ } = getConfig();
1084
+ checkCallback(); // this is a dangerous rule to disable because it could lead to an
1085
+ // infinite loop. However, eslint isn't smart enough to know that we're
1086
+ // setting finished inside `onDone` which will be called when we're done
1087
+ // waiting or when we've timed out.
1088
+ // eslint-disable-next-line no-unmodified-loop-condition
1089
+
1090
+ while (!finished) {
1091
+ if (!jestFakeTimersAreEnabled()) {
1092
+ const error = new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
1093
+ if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);
1094
+ reject(error);
1095
+ return;
1096
+ } // we *could* (maybe should?) use `advanceTimersToNextTimer` but it's
1097
+ // possible that could make this loop go on forever if someone is using
1098
+ // third party code that's setting up recursive timers so rapidly that
1099
+ // the user's timer's don't get a chance to resolve. So we'll advance
1100
+ // by an interval instead. (We have a test for this case).
1101
+
1102
+
1103
+ advanceTimersWrapper(() => {
1104
+ jest.advanceTimersByTime(interval);
1105
+ }); // It's really important that checkCallback is run *before* we flush
1106
+ // in-flight promises. To be honest, I'm not sure why, and I can't quite
1107
+ // think of a way to reproduce the problem in a test, but I spent
1108
+ // an entire day banging my head against a wall on this.
1109
+
1110
+ checkCallback();
1111
+
1112
+ if (finished) {
1113
+ break;
1114
+ } // In this rare case, we *need* to wait for in-flight promises
1115
+ // to resolve before continuing. We don't need to take advantage
1116
+ // of parallelization so we're fine.
1117
+ // https://stackoverflow.com/a/59243586/971592
1118
+ // eslint-disable-next-line no-await-in-loop
1119
+
1120
+
1121
+ await advanceTimersWrapper(async () => {
1122
+ await new Promise(r => {
1123
+ setTimeout(r, 0);
1124
+ jest.advanceTimersByTime(0);
1125
+ });
1126
+ });
1127
+ }
1128
+ } else {
1129
+ try {
1130
+ checkContainerType(container);
1131
+ } catch (e) {
1132
+ reject(e);
1133
+ return;
1134
+ }
1135
+
1136
+ intervalId = setInterval(checkRealTimersCallback, interval);
1137
+ const {
1138
+ MutationObserver
1139
+ } = getWindowFromNode(container);
1140
+ observer = new MutationObserver(checkRealTimersCallback);
1141
+ observer.observe(container, mutationObserverOptions);
1142
+ checkCallback();
1143
+ }
1144
+
1145
+ function onDone(error, result) {
1146
+ finished = true;
1147
+ clearTimeout(overallTimeoutTimer);
1148
+
1149
+ if (!usingJestFakeTimers) {
1150
+ clearInterval(intervalId);
1151
+ observer.disconnect();
1152
+ }
1153
+
1154
+ if (error) {
1155
+ reject(error);
1156
+ } else {
1157
+ resolve(result);
1158
+ }
1159
+ }
1160
+
1161
+ function checkRealTimersCallback() {
1162
+ if (jestFakeTimersAreEnabled()) {
1163
+ const error = new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
1164
+ if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);
1165
+ return reject(error);
1166
+ } else {
1167
+ return checkCallback();
1168
+ }
1169
+ }
1170
+
1171
+ function checkCallback() {
1172
+ if (promiseStatus === 'pending') return;
1173
+
1174
+ try {
1175
+ const result = runWithExpensiveErrorDiagnosticsDisabled(callback);
1176
+
1177
+ if (typeof (result == null ? void 0 : result.then) === 'function') {
1178
+ promiseStatus = 'pending';
1179
+ result.then(resolvedValue => {
1180
+ promiseStatus = 'resolved';
1181
+ onDone(null, resolvedValue);
1182
+ }, rejectedValue => {
1183
+ promiseStatus = 'rejected';
1184
+ lastError = rejectedValue;
1185
+ });
1186
+ } else {
1187
+ onDone(null, result);
1188
+ } // If `callback` throws, wait for the next mutation, interval, or timeout.
1189
+
1190
+ } catch (error) {
1191
+ // Save the most recent callback error to reject the promise with it in the event of a timeout
1192
+ lastError = error;
1193
+ }
1194
+ }
1195
+
1196
+ function handleTimeout() {
1197
+ let error;
1198
+
1199
+ if (lastError) {
1200
+ error = lastError;
1201
+
1202
+ if (!showOriginalStackTrace && error.name === 'TestingLibraryElementError') {
1203
+ copyStackTrace(error, stackTraceError);
1204
+ }
1205
+ } else {
1206
+ error = new Error('Timed out in waitFor.');
1207
+
1208
+ if (!showOriginalStackTrace) {
1209
+ copyStackTrace(error, stackTraceError);
1210
+ }
1211
+ }
1212
+
1213
+ onDone(onTimeout(error), null);
1214
+ }
1215
+ });
1216
+ }
1217
+
1218
+ function waitForWrapper(callback, options) {
1219
+ // create the error here so its stack trace is as close to the
1220
+ // calling code as possible
1221
+ const stackTraceError = new Error('STACK_TRACE_MESSAGE');
1222
+ return getConfig().asyncWrapper(() => waitFor(callback, {
1223
+ stackTraceError,
1224
+ ...options
1225
+ }));
1226
+ }
1227
+ /*
1228
+ eslint
1229
+ max-lines-per-function: ["error", {"max": 200}],
1230
+ */
1231
+
1232
+ function getElementError(message, container) {
1233
+ return getConfig().getElementError(message, container);
1234
+ }
1235
+
1236
+ function getMultipleElementsFoundError(message, container) {
1237
+ return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);
1238
+ }
1239
+
1240
+ function queryAllByAttribute(attribute, container, text, _temp) {
1241
+ let {
1242
+ exact = true,
1243
+ collapseWhitespace,
1244
+ trim,
1245
+ normalizer
1246
+ } = _temp === void 0 ? {} : _temp;
1247
+ const matcher = exact ? matches : fuzzyMatches;
1248
+ const matchNormalizer = makeNormalizer({
1249
+ collapseWhitespace,
1250
+ trim,
1251
+ normalizer
1252
+ });
1253
+ return Array.from(container.querySelectorAll("[" + attribute + "]")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
1254
+ }
1255
+ // if more than one elements is returned, otherwise it returns the first
1256
+ // element or null
1257
+
1258
+
1259
+ function makeSingleQuery(allQuery, getMultipleError) {
1260
+ return function (container) {
1261
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1262
+ args[_key - 1] = arguments[_key];
1263
+ }
1264
+
1265
+ const els = allQuery(container, ...args);
1266
+
1267
+ if (els.length > 1) {
1268
+ const elementStrings = els.map(element => getElementError(null, element).message).join('\n\n');
1269
+ throw getMultipleElementsFoundError(getMultipleError(container, ...args) + "\n\nHere are the matching elements:\n\n" + elementStrings, container);
1270
+ }
1271
+
1272
+ return els[0] || null;
1273
+ };
1274
+ }
1275
+
1276
+ function getSuggestionError(suggestion, container) {
1277
+ return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
1278
+ } // this accepts a query function and returns a function which throws an error
1279
+ // if an empty list of elements is returned
1280
+
1281
+
1282
+ function makeGetAllQuery(allQuery, getMissingError) {
1283
+ return function (container) {
1284
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1285
+ args[_key2 - 1] = arguments[_key2];
1286
+ }
1287
+
1288
+ const els = allQuery(container, ...args);
1289
+
1290
+ if (!els.length) {
1291
+ throw getConfig().getElementError(getMissingError(container, ...args), container);
1292
+ }
1293
+
1294
+ return els;
1295
+ };
1296
+ } // this accepts a getter query function and returns a function which calls
1297
+ // waitFor and passing a function which invokes the getter.
1298
+
1299
+
1300
+ function makeFindQuery(getter) {
1301
+ return (container, text, options, waitForOptions) => {
1302
+ return waitForWrapper(() => {
1303
+ return getter(container, text, options);
1304
+ }, {
1305
+ container,
1306
+ ...waitForOptions
1307
+ });
1308
+ };
1309
+ }
1310
+
1311
+ const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function (container) {
1312
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
1313
+ args[_key3 - 1] = arguments[_key3];
1314
+ }
1315
+
1316
+ const element = query(container, ...args);
1317
+ const [{
1318
+ suggest = getConfig().throwSuggestions
1319
+ } = {}] = args.slice(-1);
1320
+
1321
+ if (element && suggest) {
1322
+ const suggestion = getSuggestedQuery(element, variant);
1323
+
1324
+ if (suggestion && !queryAllByName.endsWith(suggestion.queryName)) {
1325
+ throw getSuggestionError(suggestion.toString(), container);
1326
+ }
1327
+ }
1328
+
1329
+ return element;
1330
+ };
1331
+
1332
+ const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => function (container) {
1333
+ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
1334
+ args[_key4 - 1] = arguments[_key4];
1335
+ }
1336
+
1337
+ const els = query(container, ...args);
1338
+ const [{
1339
+ suggest = getConfig().throwSuggestions
1340
+ } = {}] = args.slice(-1);
1341
+
1342
+ if (els.length && suggest) {
1343
+ // get a unique list of all suggestion messages. We are only going to make a suggestion if
1344
+ // all the suggestions are the same
1345
+ const uniqueSuggestionMessages = [...new Set(els.map(element => {
1346
+ var _getSuggestedQuery;
1347
+
1348
+ return (_getSuggestedQuery = getSuggestedQuery(element, variant)) == null ? void 0 : _getSuggestedQuery.toString();
1349
+ }))];
1350
+
1351
+ if ( // only want to suggest if all the els have the same suggestion.
1352
+ uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?
1353
+ getSuggestedQuery(els[0], variant).queryName)) {
1354
+ throw getSuggestionError(uniqueSuggestionMessages[0], container);
1355
+ }
1356
+ }
1357
+
1358
+ return els;
1359
+ }; // TODO: This deviates from the published declarations
1360
+ // However, the implementation always required a dyadic (after `container`) not variadic `queryAllBy` considering the implementation of `makeFindQuery`
1361
+ // This is at least statically true and can be verified by accepting `QueryMethod<Arguments, HTMLElement[]>`
1362
+
1363
+
1364
+ function buildQueries(queryAllBy, getMultipleError, getMissingError) {
1365
+ const queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError), queryAllBy.name, 'query');
1366
+ const getAllBy = makeGetAllQuery(queryAllBy, getMissingError);
1367
+ const getBy = makeSingleQuery(getAllBy, getMultipleError);
1368
+ const getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'get');
1369
+ const getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace('query', 'get'), 'getAll');
1370
+ const findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, 'findAll'));
1371
+ const findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'find'));
1372
+ return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
1373
+ }
1374
+
1375
+ function queryAllLabels(container) {
1376
+ return Array.from(container.querySelectorAll('label,input')).map(node => {
1377
+ return {
1378
+ node,
1379
+ textToMatch: getLabelContent(node)
1380
+ };
1381
+ }).filter(_ref => {
1382
+ let {
1383
+ textToMatch
1384
+ } = _ref;
1385
+ return textToMatch !== null;
1386
+ });
1387
+ }
1388
+
1389
+ const queryAllLabelsByText = function (container, text, _temp) {
1390
+ let {
1391
+ exact = true,
1392
+ trim,
1393
+ collapseWhitespace,
1394
+ normalizer
1395
+ } = _temp === void 0 ? {} : _temp;
1396
+ const matcher = exact ? matches : fuzzyMatches;
1397
+ const matchNormalizer = makeNormalizer({
1398
+ collapseWhitespace,
1399
+ trim,
1400
+ normalizer
1401
+ });
1402
+ const textToMatchByLabels = queryAllLabels(container);
1403
+ return textToMatchByLabels.filter(_ref2 => {
1404
+ let {
1405
+ node,
1406
+ textToMatch
1407
+ } = _ref2;
1408
+ return matcher(textToMatch, node, text, matchNormalizer);
1409
+ }).map(_ref3 => {
1410
+ let {
1411
+ node
1412
+ } = _ref3;
1413
+ return node;
1414
+ });
1415
+ };
1416
+
1417
+ const queryAllByLabelText = function (container, text, _temp2) {
1418
+ let {
1419
+ selector = '*',
1420
+ exact = true,
1421
+ collapseWhitespace,
1422
+ trim,
1423
+ normalizer
1424
+ } = _temp2 === void 0 ? {} : _temp2;
1425
+ checkContainerType(container);
1426
+ const matcher = exact ? matches : fuzzyMatches;
1427
+ const matchNormalizer = makeNormalizer({
1428
+ collapseWhitespace,
1429
+ trim,
1430
+ normalizer
1431
+ });
1432
+ const matchingLabelledElements = Array.from(container.querySelectorAll('*')).filter(element => {
1433
+ return getRealLabels(element).length || element.hasAttribute('aria-labelledby');
1434
+ }).reduce((labelledElements, labelledElement) => {
1435
+ const labelList = getLabels(container, labelledElement, {
1436
+ selector
1437
+ });
1438
+ labelList.filter(label => Boolean(label.formControl)).forEach(label => {
1439
+ if (matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl) labelledElements.push(label.formControl);
1440
+ });
1441
+ const labelsValue = labelList.filter(label => Boolean(label.content)).map(label => label.content);
1442
+ if (matcher(labelsValue.join(' '), labelledElement, text, matchNormalizer)) labelledElements.push(labelledElement);
1443
+
1444
+ if (labelsValue.length > 1) {
1445
+ labelsValue.forEach((labelValue, index) => {
1446
+ if (matcher(labelValue, labelledElement, text, matchNormalizer)) labelledElements.push(labelledElement);
1447
+ const labelsFiltered = [...labelsValue];
1448
+ labelsFiltered.splice(index, 1);
1449
+
1450
+ if (labelsFiltered.length > 1) {
1451
+ if (matcher(labelsFiltered.join(' '), labelledElement, text, matchNormalizer)) labelledElements.push(labelledElement);
1452
+ }
1453
+ });
1454
+ }
1455
+
1456
+ return labelledElements;
1457
+ }, []).concat(queryAllByAttribute('aria-label', container, text, {
1458
+ exact,
1459
+ normalizer: matchNormalizer
1460
+ }));
1461
+ return Array.from(new Set(matchingLabelledElements)).filter(element => element.matches(selector));
1462
+ }; // the getAll* query would normally look like this:
1463
+ // const getAllByLabelText = makeGetAllQuery(
1464
+ // queryAllByLabelText,
1465
+ // (c, text) => `Unable to find a label with the text of: ${text}`,
1466
+ // )
1467
+ // however, we can give a more helpful error message than the generic one,
1468
+ // so we're writing this one out by hand.
1469
+
1470
+
1471
+ const getAllByLabelText = function (container, text) {
1472
+ for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1473
+ rest[_key - 2] = arguments[_key];
1474
+ }
1475
+
1476
+ const els = queryAllByLabelText(container, text, ...rest);
1477
+
1478
+ if (!els.length) {
1479
+ const labels = queryAllLabelsByText(container, text, ...rest);
1480
+
1481
+ if (labels.length) {
1482
+ const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);
1483
+
1484
+ if (tagNames.length) {
1485
+ throw getConfig().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
1486
+ } else {
1487
+ throw getConfig().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
1488
+ }
1489
+ } else {
1490
+ throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);
1491
+ }
1492
+ }
1493
+
1494
+ return els;
1495
+ };
1496
+
1497
+ function getTagNameOfElementAssociatedWithLabelViaFor(container, label) {
1498
+ const htmlFor = label.getAttribute('for');
1499
+
1500
+ if (!htmlFor) {
1501
+ return null;
1502
+ }
1503
+
1504
+ const element = container.querySelector("[id=\"" + htmlFor + "\"]");
1505
+ return element ? element.tagName.toLowerCase() : null;
1506
+ } // the reason mentioned above is the same reason we're not using buildQueries
1507
+
1508
+
1509
+ const getMultipleError$7 = (c, text) => "Found multiple elements with the text of: " + text;
1510
+
1511
+ const queryByLabelText = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText, getMultipleError$7), queryAllByLabelText.name, 'query');
1512
+ const getByLabelText = makeSingleQuery(getAllByLabelText, getMultipleError$7);
1513
+ const findAllByLabelText = makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'findAll'));
1514
+ const findByLabelText = makeFindQuery(wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'find'));
1515
+ const getAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'getAll');
1516
+ const getByLabelTextWithSuggestions = wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'get');
1517
+ const queryAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByLabelText, queryAllByLabelText.name, 'queryAll');
1518
+
1519
+ const queryAllByPlaceholderText = function () {
1520
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1521
+ args[_key] = arguments[_key];
1522
+ }
1523
+
1524
+ checkContainerType(args[0]);
1525
+ return queryAllByAttribute('placeholder', ...args);
1526
+ };
1527
+
1528
+ const getMultipleError$6 = (c, text) => "Found multiple elements with the placeholder text of: " + text;
1529
+
1530
+ const getMissingError$6 = (c, text) => "Unable to find an element with the placeholder text of: " + text;
1531
+
1532
+ const queryAllByPlaceholderTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByPlaceholderText, queryAllByPlaceholderText.name, 'queryAll');
1533
+ const [queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText] = buildQueries(queryAllByPlaceholderText, getMultipleError$6, getMissingError$6);
1534
+
1535
+ const queryAllByText = function (container, text, _temp) {
1536
+ let {
1537
+ selector = '*',
1538
+ exact = true,
1539
+ collapseWhitespace,
1540
+ trim,
1541
+ ignore = getConfig().defaultIgnore,
1542
+ normalizer
1543
+ } = _temp === void 0 ? {} : _temp;
1544
+ checkContainerType(container);
1545
+ const matcher = exact ? matches : fuzzyMatches;
1546
+ const matchNormalizer = makeNormalizer({
1547
+ collapseWhitespace,
1548
+ trim,
1549
+ normalizer
1550
+ });
1551
+ let baseArray = [];
1552
+
1553
+ if (typeof container.matches === 'function' && container.matches(selector)) {
1554
+ baseArray = [container];
1555
+ }
1556
+
1557
+ return [...baseArray, ...Array.from(container.querySelectorAll(selector))] // TODO: `matches` according lib.dom.d.ts can get only `string` but according our code it can handle also boolean :)
1558
+ .filter(node => !ignore || !node.matches(ignore)).filter(node => matcher(getNodeText(node), node, text, matchNormalizer));
1559
+ };
1560
+
1561
+ const getMultipleError$5 = (c, text) => "Found multiple elements with the text: " + text;
1562
+
1563
+ const getMissingError$5 = function (c, text, options) {
1564
+ if (options === void 0) {
1565
+ options = {};
1566
+ }
1567
+
1568
+ const {
1569
+ collapseWhitespace,
1570
+ trim,
1571
+ normalizer,
1572
+ selector
1573
+ } = options;
1574
+ const matchNormalizer = makeNormalizer({
1575
+ collapseWhitespace,
1576
+ trim,
1577
+ normalizer
1578
+ });
1579
+ const normalizedText = matchNormalizer(text.toString());
1580
+ const isNormalizedDifferent = normalizedText !== text.toString();
1581
+ const isCustomSelector = (selector != null ? selector : '*') !== '*';
1582
+ return "Unable to find an element with the text: " + (isNormalizedDifferent ? normalizedText + " (normalized from '" + text + "')" : text) + (isCustomSelector ? ", which matches selector '" + selector + "'" : '') + ". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.";
1583
+ };
1584
+
1585
+ const queryAllByTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByText, queryAllByText.name, 'queryAll');
1586
+ const [queryByText, getAllByText, getByText, findAllByText, findByText] = buildQueries(queryAllByText, getMultipleError$5, getMissingError$5);
1587
+
1588
+ const queryAllByDisplayValue = function (container, value, _temp) {
1589
+ let {
1590
+ exact = true,
1591
+ collapseWhitespace,
1592
+ trim,
1593
+ normalizer
1594
+ } = _temp === void 0 ? {} : _temp;
1595
+ checkContainerType(container);
1596
+ const matcher = exact ? matches : fuzzyMatches;
1597
+ const matchNormalizer = makeNormalizer({
1598
+ collapseWhitespace,
1599
+ trim,
1600
+ normalizer
1601
+ });
1602
+ return Array.from(container.querySelectorAll("input,textarea,select")).filter(node => {
1603
+ if (node.tagName === 'SELECT') {
1604
+ const selectedOptions = Array.from(node.options).filter(option => option.selected);
1605
+ return selectedOptions.some(optionNode => matcher(getNodeText(optionNode), optionNode, value, matchNormalizer));
1606
+ } else {
1607
+ return matcher(node.value, node, value, matchNormalizer);
1608
+ }
1609
+ });
1610
+ };
1611
+
1612
+ const getMultipleError$4 = (c, value) => "Found multiple elements with the display value: " + value + ".";
1613
+
1614
+ const getMissingError$4 = (c, value) => "Unable to find an element with the display value: " + value + ".";
1615
+
1616
+ const queryAllByDisplayValueWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByDisplayValue, queryAllByDisplayValue.name, 'queryAll');
1617
+ const [queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue] = buildQueries(queryAllByDisplayValue, getMultipleError$4, getMissingError$4);
1618
+
1619
+ const VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i;
1620
+
1621
+ const queryAllByAltText = function (container, alt, options) {
1622
+ if (options === void 0) {
1623
+ options = {};
1624
+ }
1625
+
1626
+ checkContainerType(container);
1627
+ return queryAllByAttribute('alt', container, alt, options).filter(node => VALID_TAG_REGEXP.test(node.tagName));
1628
+ };
1629
+
1630
+ const getMultipleError$3 = (c, alt) => "Found multiple elements with the alt text: " + alt;
1631
+
1632
+ const getMissingError$3 = (c, alt) => "Unable to find an element with the alt text: " + alt;
1633
+
1634
+ const queryAllByAltTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByAltText, queryAllByAltText.name, 'queryAll');
1635
+ const [queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText] = buildQueries(queryAllByAltText, getMultipleError$3, getMissingError$3);
1636
+
1637
+ const isSvgTitle = node => {
1638
+ var _node$parentElement;
1639
+
1640
+ return node.tagName.toLowerCase() === 'title' && ((_node$parentElement = node.parentElement) == null ? void 0 : _node$parentElement.tagName.toLowerCase()) === 'svg';
1641
+ };
1642
+
1643
+ const queryAllByTitle = function (container, text, _temp) {
1644
+ let {
1645
+ exact = true,
1646
+ collapseWhitespace,
1647
+ trim,
1648
+ normalizer
1649
+ } = _temp === void 0 ? {} : _temp;
1650
+ checkContainerType(container);
1651
+ const matcher = exact ? matches : fuzzyMatches;
1652
+ const matchNormalizer = makeNormalizer({
1653
+ collapseWhitespace,
1654
+ trim,
1655
+ normalizer
1656
+ });
1657
+ return Array.from(container.querySelectorAll('[title], svg > title')).filter(node => matcher(node.getAttribute('title'), node, text, matchNormalizer) || isSvgTitle(node) && matcher(getNodeText(node), node, text, matchNormalizer));
1658
+ };
1659
+
1660
+ const getMultipleError$2 = (c, title) => "Found multiple elements with the title: " + title + ".";
1661
+
1662
+ const getMissingError$2 = (c, title) => "Unable to find an element with the title: " + title + ".";
1663
+
1664
+ const queryAllByTitleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTitle, queryAllByTitle.name, 'queryAll');
1665
+ const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = buildQueries(queryAllByTitle, getMultipleError$2, getMissingError$2);
1666
+
1667
+ function queryAllByRole(container, role, _temp) {
1668
+ let {
1669
+ exact = true,
1670
+ collapseWhitespace,
1671
+ hidden = getConfig().defaultHidden,
1672
+ name,
1673
+ description,
1674
+ trim,
1675
+ normalizer,
1676
+ queryFallbacks = false,
1677
+ selected,
1678
+ checked,
1679
+ pressed,
1680
+ current,
1681
+ level,
1682
+ expanded
1683
+ } = _temp === void 0 ? {} : _temp;
1684
+ checkContainerType(container);
1685
+ const matcher = exact ? matches : fuzzyMatches;
1686
+ const matchNormalizer = makeNormalizer({
1687
+ collapseWhitespace,
1688
+ trim,
1689
+ normalizer
1690
+ });
1691
+
1692
+ if (selected !== undefined) {
1693
+ var _allRoles$get;
1694
+
1695
+ // guard against unknown roles
1696
+ if (((_allRoles$get = roles_1.get(role)) == null ? void 0 : _allRoles$get.props['aria-selected']) === undefined) {
1697
+ throw new Error("\"aria-selected\" is not supported on role \"" + role + "\".");
1698
+ }
1699
+ }
1700
+
1701
+ if (checked !== undefined) {
1702
+ var _allRoles$get2;
1703
+
1704
+ // guard against unknown roles
1705
+ if (((_allRoles$get2 = roles_1.get(role)) == null ? void 0 : _allRoles$get2.props['aria-checked']) === undefined) {
1706
+ throw new Error("\"aria-checked\" is not supported on role \"" + role + "\".");
1707
+ }
1708
+ }
1709
+
1710
+ if (pressed !== undefined) {
1711
+ var _allRoles$get3;
1712
+
1713
+ // guard against unknown roles
1714
+ if (((_allRoles$get3 = roles_1.get(role)) == null ? void 0 : _allRoles$get3.props['aria-pressed']) === undefined) {
1715
+ throw new Error("\"aria-pressed\" is not supported on role \"" + role + "\".");
1716
+ }
1717
+ }
1718
+
1719
+ if (current !== undefined) {
1720
+ var _allRoles$get4;
1721
+
1722
+ /* istanbul ignore next */
1723
+ // guard against unknown roles
1724
+ // All currently released ARIA versions support `aria-current` on all roles.
1725
+ // Leaving this for symetry and forward compatibility
1726
+ if (((_allRoles$get4 = roles_1.get(role)) == null ? void 0 : _allRoles$get4.props['aria-current']) === undefined) {
1727
+ throw new Error("\"aria-current\" is not supported on role \"" + role + "\".");
1728
+ }
1729
+ }
1730
+
1731
+ if (level !== undefined) {
1732
+ // guard against using `level` option with any role other than `heading`
1733
+ if (role !== 'heading') {
1734
+ throw new Error("Role \"" + role + "\" cannot have \"level\" property.");
1735
+ }
1736
+ }
1737
+
1738
+ if (expanded !== undefined) {
1739
+ var _allRoles$get5;
1740
+
1741
+ // guard against unknown roles
1742
+ if (((_allRoles$get5 = roles_1.get(role)) == null ? void 0 : _allRoles$get5.props['aria-expanded']) === undefined) {
1743
+ throw new Error("\"aria-expanded\" is not supported on role \"" + role + "\".");
1744
+ }
1745
+ }
1746
+
1747
+ const subtreeIsInaccessibleCache = new WeakMap();
1748
+
1749
+ function cachedIsSubtreeInaccessible(element) {
1750
+ if (!subtreeIsInaccessibleCache.has(element)) {
1751
+ subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element));
1752
+ }
1753
+
1754
+ return subtreeIsInaccessibleCache.get(element);
1755
+ }
1756
+
1757
+ return Array.from(container.querySelectorAll( // Only query elements that can be matched by the following filters
1758
+ makeRoleSelector(role, exact, normalizer ? matchNormalizer : undefined))).filter(node => {
1759
+ const isRoleSpecifiedExplicitly = node.hasAttribute('role');
1760
+
1761
+ if (isRoleSpecifiedExplicitly) {
1762
+ const roleValue = node.getAttribute('role');
1763
+
1764
+ if (queryFallbacks) {
1765
+ return roleValue.split(' ').filter(Boolean).some(text => matcher(text, node, role, matchNormalizer));
1766
+ } // if a custom normalizer is passed then let normalizer handle the role value
1767
+
1768
+
1769
+ if (normalizer) {
1770
+ return matcher(roleValue, node, role, matchNormalizer);
1771
+ } // other wise only send the first word to match
1772
+
1773
+
1774
+ const [firstWord] = roleValue.split(' ');
1775
+ return matcher(firstWord, node, role, matchNormalizer);
1776
+ }
1777
+
1778
+ const implicitRoles = getImplicitAriaRoles(node);
1779
+ return implicitRoles.some(implicitRole => matcher(implicitRole, node, role, matchNormalizer));
1780
+ }).filter(element => {
1781
+ if (selected !== undefined) {
1782
+ return selected === computeAriaSelected(element);
1783
+ }
1784
+
1785
+ if (checked !== undefined) {
1786
+ return checked === computeAriaChecked(element);
1787
+ }
1788
+
1789
+ if (pressed !== undefined) {
1790
+ return pressed === computeAriaPressed(element);
1791
+ }
1792
+
1793
+ if (current !== undefined) {
1794
+ return current === computeAriaCurrent(element);
1795
+ }
1796
+
1797
+ if (expanded !== undefined) {
1798
+ return expanded === computeAriaExpanded(element);
1799
+ }
1800
+
1801
+ if (level !== undefined) {
1802
+ return level === computeHeadingLevel(element);
1803
+ } // don't care if aria attributes are unspecified
1804
+
1805
+
1806
+ return true;
1807
+ }).filter(element => {
1808
+ if (name === undefined) {
1809
+ // Don't care
1810
+ return true;
1811
+ }
1812
+
1813
+ return matches(computeAccessibleName(element, {
1814
+ computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
1815
+ }), element, name, text => text);
1816
+ }).filter(element => {
1817
+ if (description === undefined) {
1818
+ // Don't care
1819
+ return true;
1820
+ }
1821
+
1822
+ return matches(computeAccessibleDescription(element, {
1823
+ computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
1824
+ }), element, description, text => text);
1825
+ }).filter(element => {
1826
+ return hidden === false ? isInaccessible(element, {
1827
+ isSubtreeInaccessible: cachedIsSubtreeInaccessible
1828
+ }) === false : true;
1829
+ });
1830
+ }
1831
+
1832
+ function makeRoleSelector(role, exact, customNormalizer) {
1833
+ var _roleElements$get;
1834
+
1835
+ if (typeof role !== 'string') {
1836
+ // For non-string role parameters we can not determine the implicitRoleSelectors.
1837
+ return '*';
1838
+ }
1839
+
1840
+ const explicitRoleSelector = exact && !customNormalizer ? "*[role~=\"" + role + "\"]" : '*[role]';
1841
+ const roleRelations = (_roleElements$get = roleElements_1.get(role)) != null ? _roleElements$get : new Set();
1842
+ const implicitRoleSelectors = new Set(Array.from(roleRelations).map(_ref => {
1843
+ let {
1844
+ name
1845
+ } = _ref;
1846
+ return name;
1847
+ })); // Current transpilation config sometimes assumes `...` is always applied to arrays.
1848
+ // `...` is equivalent to `Array.prototype.concat` for arrays.
1849
+ // If you replace this code with `[explicitRoleSelector, ...implicitRoleSelectors]`, make sure every transpilation target retains the `...` in favor of `Array.prototype.concat`.
1850
+
1851
+ return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(',');
1852
+ }
1853
+
1854
+ const getNameHint = name => {
1855
+ let nameHint = '';
1856
+
1857
+ if (name === undefined) {
1858
+ nameHint = '';
1859
+ } else if (typeof name === 'string') {
1860
+ nameHint = " and name \"" + name + "\"";
1861
+ } else {
1862
+ nameHint = " and name `" + name + "`";
1863
+ }
1864
+
1865
+ return nameHint;
1866
+ };
1867
+
1868
+ const getMultipleError$1 = function (c, role, _temp2) {
1869
+ let {
1870
+ name
1871
+ } = _temp2 === void 0 ? {} : _temp2;
1872
+ return "Found multiple elements with the role \"" + role + "\"" + getNameHint(name);
1873
+ };
1874
+
1875
+ const getMissingError$1 = function (container, role, _temp3) {
1876
+ let {
1877
+ hidden = getConfig().defaultHidden,
1878
+ name,
1879
+ description
1880
+ } = _temp3 === void 0 ? {} : _temp3;
1881
+
1882
+ if (getConfig()._disableExpensiveErrorDiagnostics) {
1883
+ return "Unable to find role=\"" + role + "\"" + getNameHint(name);
1884
+ }
1885
+
1886
+ let roles = '';
1887
+ Array.from(container.children).forEach(childElement => {
1888
+ roles += prettyRoles(childElement, {
1889
+ hidden,
1890
+ includeDescription: description !== undefined
1891
+ });
1892
+ });
1893
+ let roleMessage;
1894
+
1895
+ if (roles.length === 0) {
1896
+ if (hidden === false) {
1897
+ roleMessage = 'There are no accessible roles. But there might be some inaccessible roles. ' + 'If you wish to access them, then set the `hidden` option to `true`. ' + 'Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole';
1898
+ } else {
1899
+ roleMessage = 'There are no available roles.';
1900
+ }
1901
+ } else {
1902
+ roleMessage = ("\nHere are the " + (hidden === false ? 'accessible' : 'available') + " roles:\n\n " + roles.replace(/\n/g, '\n ').replace(/\n\s\s\n/g, '\n\n') + "\n").trim();
1903
+ }
1904
+
1905
+ let nameHint = '';
1906
+
1907
+ if (name === undefined) {
1908
+ nameHint = '';
1909
+ } else if (typeof name === 'string') {
1910
+ nameHint = " and name \"" + name + "\"";
1911
+ } else {
1912
+ nameHint = " and name `" + name + "`";
1913
+ }
1914
+
1915
+ let descriptionHint = '';
1916
+
1917
+ if (description === undefined) {
1918
+ descriptionHint = '';
1919
+ } else if (typeof description === 'string') {
1920
+ descriptionHint = " and description \"" + description + "\"";
1921
+ } else {
1922
+ descriptionHint = " and description `" + description + "`";
1923
+ }
1924
+
1925
+ return ("\nUnable to find an " + (hidden === false ? 'accessible ' : '') + "element with the role \"" + role + "\"" + nameHint + descriptionHint + "\n\n" + roleMessage).trim();
1926
+ };
1927
+
1928
+ const queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');
1929
+ const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);
1930
+
1931
+ const getTestIdAttribute = () => getConfig().testIdAttribute;
1932
+
1933
+ const queryAllByTestId = function () {
1934
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1935
+ args[_key] = arguments[_key];
1936
+ }
1937
+
1938
+ checkContainerType(args[0]);
1939
+ return queryAllByAttribute(getTestIdAttribute(), ...args);
1940
+ };
1941
+
1942
+ const getMultipleError = (c, id) => "Found multiple elements by: [" + getTestIdAttribute() + "=\"" + id + "\"]";
1943
+
1944
+ const getMissingError = (c, id) => "Unable to find an element by: [" + getTestIdAttribute() + "=\"" + id + "\"]";
1945
+
1946
+ const queryAllByTestIdWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTestId, queryAllByTestId.name, 'queryAll');
1947
+ const [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = buildQueries(queryAllByTestId, getMultipleError, getMissingError);
1948
+
1949
+ var queries = /*#__PURE__*/Object.freeze({
1950
+ __proto__: null,
1951
+ queryAllByLabelText: queryAllByLabelTextWithSuggestions,
1952
+ queryByLabelText: queryByLabelText,
1953
+ getAllByLabelText: getAllByLabelTextWithSuggestions,
1954
+ getByLabelText: getByLabelTextWithSuggestions,
1955
+ findAllByLabelText: findAllByLabelText,
1956
+ findByLabelText: findByLabelText,
1957
+ queryByPlaceholderText: queryByPlaceholderText,
1958
+ queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
1959
+ getByPlaceholderText: getByPlaceholderText,
1960
+ getAllByPlaceholderText: getAllByPlaceholderText,
1961
+ findAllByPlaceholderText: findAllByPlaceholderText,
1962
+ findByPlaceholderText: findByPlaceholderText,
1963
+ queryByText: queryByText,
1964
+ queryAllByText: queryAllByTextWithSuggestions,
1965
+ getByText: getByText,
1966
+ getAllByText: getAllByText,
1967
+ findAllByText: findAllByText,
1968
+ findByText: findByText,
1969
+ queryByDisplayValue: queryByDisplayValue,
1970
+ queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
1971
+ getByDisplayValue: getByDisplayValue,
1972
+ getAllByDisplayValue: getAllByDisplayValue,
1973
+ findAllByDisplayValue: findAllByDisplayValue,
1974
+ findByDisplayValue: findByDisplayValue,
1975
+ queryByAltText: queryByAltText,
1976
+ queryAllByAltText: queryAllByAltTextWithSuggestions,
1977
+ getByAltText: getByAltText,
1978
+ getAllByAltText: getAllByAltText,
1979
+ findAllByAltText: findAllByAltText,
1980
+ findByAltText: findByAltText,
1981
+ queryByTitle: queryByTitle,
1982
+ queryAllByTitle: queryAllByTitleWithSuggestions,
1983
+ getByTitle: getByTitle,
1984
+ getAllByTitle: getAllByTitle,
1985
+ findAllByTitle: findAllByTitle,
1986
+ findByTitle: findByTitle,
1987
+ queryByRole: queryByRole,
1988
+ queryAllByRole: queryAllByRoleWithSuggestions,
1989
+ getAllByRole: getAllByRole,
1990
+ getByRole: getByRole,
1991
+ findAllByRole: findAllByRole,
1992
+ findByRole: findByRole,
1993
+ queryByTestId: queryByTestId,
1994
+ queryAllByTestId: queryAllByTestIdWithSuggestions,
1995
+ getByTestId: getByTestId,
1996
+ getAllByTestId: getAllByTestId,
1997
+ findAllByTestId: findAllByTestId,
1998
+ findByTestId: findByTestId
1999
+ });
2000
+
2001
+ /**
2002
+ * @typedef {{[key: string]: Function}} FuncMap
2003
+ */
2004
+
2005
+ /**
2006
+ * @param {HTMLElement} element container
2007
+ * @param {FuncMap} queries object of functions
2008
+ * @param {Object} initialValue for reducer
2009
+ * @returns {FuncMap} returns object of functions bound to container
2010
+ */
2011
+
2012
+ function getQueriesForElement(element, queries$1, initialValue) {
2013
+ if (queries$1 === void 0) {
2014
+ queries$1 = queries;
2015
+ }
2016
+
2017
+ if (initialValue === void 0) {
2018
+ initialValue = {};
2019
+ }
2020
+
2021
+ return Object.keys(queries$1).reduce((helpers, key) => {
2022
+ const fn = queries$1[key];
2023
+ helpers[key] = fn.bind(null, element);
2024
+ return helpers;
2025
+ }, initialValue);
2026
+ }
2027
+ /*
2028
+ eslint
2029
+ require-await: "off"
2030
+ */
2031
+
2032
+ const eventMap = {
2033
+ // Clipboard Events
2034
+ copy: {
2035
+ EventType: 'ClipboardEvent',
2036
+ defaultInit: {
2037
+ bubbles: true,
2038
+ cancelable: true,
2039
+ composed: true
2040
+ }
2041
+ },
2042
+ cut: {
2043
+ EventType: 'ClipboardEvent',
2044
+ defaultInit: {
2045
+ bubbles: true,
2046
+ cancelable: true,
2047
+ composed: true
2048
+ }
2049
+ },
2050
+ paste: {
2051
+ EventType: 'ClipboardEvent',
2052
+ defaultInit: {
2053
+ bubbles: true,
2054
+ cancelable: true,
2055
+ composed: true
2056
+ }
2057
+ },
2058
+ // Composition Events
2059
+ compositionEnd: {
2060
+ EventType: 'CompositionEvent',
2061
+ defaultInit: {
2062
+ bubbles: true,
2063
+ cancelable: true,
2064
+ composed: true
2065
+ }
2066
+ },
2067
+ compositionStart: {
2068
+ EventType: 'CompositionEvent',
2069
+ defaultInit: {
2070
+ bubbles: true,
2071
+ cancelable: true,
2072
+ composed: true
2073
+ }
2074
+ },
2075
+ compositionUpdate: {
2076
+ EventType: 'CompositionEvent',
2077
+ defaultInit: {
2078
+ bubbles: true,
2079
+ cancelable: true,
2080
+ composed: true
2081
+ }
2082
+ },
2083
+ // Keyboard Events
2084
+ keyDown: {
2085
+ EventType: 'KeyboardEvent',
2086
+ defaultInit: {
2087
+ bubbles: true,
2088
+ cancelable: true,
2089
+ charCode: 0,
2090
+ composed: true
2091
+ }
2092
+ },
2093
+ keyPress: {
2094
+ EventType: 'KeyboardEvent',
2095
+ defaultInit: {
2096
+ bubbles: true,
2097
+ cancelable: true,
2098
+ charCode: 0,
2099
+ composed: true
2100
+ }
2101
+ },
2102
+ keyUp: {
2103
+ EventType: 'KeyboardEvent',
2104
+ defaultInit: {
2105
+ bubbles: true,
2106
+ cancelable: true,
2107
+ charCode: 0,
2108
+ composed: true
2109
+ }
2110
+ },
2111
+ // Focus Events
2112
+ focus: {
2113
+ EventType: 'FocusEvent',
2114
+ defaultInit: {
2115
+ bubbles: false,
2116
+ cancelable: false,
2117
+ composed: true
2118
+ }
2119
+ },
2120
+ blur: {
2121
+ EventType: 'FocusEvent',
2122
+ defaultInit: {
2123
+ bubbles: false,
2124
+ cancelable: false,
2125
+ composed: true
2126
+ }
2127
+ },
2128
+ focusIn: {
2129
+ EventType: 'FocusEvent',
2130
+ defaultInit: {
2131
+ bubbles: true,
2132
+ cancelable: false,
2133
+ composed: true
2134
+ }
2135
+ },
2136
+ focusOut: {
2137
+ EventType: 'FocusEvent',
2138
+ defaultInit: {
2139
+ bubbles: true,
2140
+ cancelable: false,
2141
+ composed: true
2142
+ }
2143
+ },
2144
+ // Form Events
2145
+ change: {
2146
+ EventType: 'Event',
2147
+ defaultInit: {
2148
+ bubbles: true,
2149
+ cancelable: false
2150
+ }
2151
+ },
2152
+ input: {
2153
+ EventType: 'InputEvent',
2154
+ defaultInit: {
2155
+ bubbles: true,
2156
+ cancelable: false,
2157
+ composed: true
2158
+ }
2159
+ },
2160
+ invalid: {
2161
+ EventType: 'Event',
2162
+ defaultInit: {
2163
+ bubbles: false,
2164
+ cancelable: true
2165
+ }
2166
+ },
2167
+ submit: {
2168
+ EventType: 'Event',
2169
+ defaultInit: {
2170
+ bubbles: true,
2171
+ cancelable: true
2172
+ }
2173
+ },
2174
+ reset: {
2175
+ EventType: 'Event',
2176
+ defaultInit: {
2177
+ bubbles: true,
2178
+ cancelable: true
2179
+ }
2180
+ },
2181
+ // Mouse Events
2182
+ click: {
2183
+ EventType: 'MouseEvent',
2184
+ defaultInit: {
2185
+ bubbles: true,
2186
+ cancelable: true,
2187
+ button: 0,
2188
+ composed: true
2189
+ }
2190
+ },
2191
+ contextMenu: {
2192
+ EventType: 'MouseEvent',
2193
+ defaultInit: {
2194
+ bubbles: true,
2195
+ cancelable: true,
2196
+ composed: true
2197
+ }
2198
+ },
2199
+ dblClick: {
2200
+ EventType: 'MouseEvent',
2201
+ defaultInit: {
2202
+ bubbles: true,
2203
+ cancelable: true,
2204
+ composed: true
2205
+ }
2206
+ },
2207
+ drag: {
2208
+ EventType: 'DragEvent',
2209
+ defaultInit: {
2210
+ bubbles: true,
2211
+ cancelable: true,
2212
+ composed: true
2213
+ }
2214
+ },
2215
+ dragEnd: {
2216
+ EventType: 'DragEvent',
2217
+ defaultInit: {
2218
+ bubbles: true,
2219
+ cancelable: false,
2220
+ composed: true
2221
+ }
2222
+ },
2223
+ dragEnter: {
2224
+ EventType: 'DragEvent',
2225
+ defaultInit: {
2226
+ bubbles: true,
2227
+ cancelable: true,
2228
+ composed: true
2229
+ }
2230
+ },
2231
+ dragExit: {
2232
+ EventType: 'DragEvent',
2233
+ defaultInit: {
2234
+ bubbles: true,
2235
+ cancelable: false,
2236
+ composed: true
2237
+ }
2238
+ },
2239
+ dragLeave: {
2240
+ EventType: 'DragEvent',
2241
+ defaultInit: {
2242
+ bubbles: true,
2243
+ cancelable: false,
2244
+ composed: true
2245
+ }
2246
+ },
2247
+ dragOver: {
2248
+ EventType: 'DragEvent',
2249
+ defaultInit: {
2250
+ bubbles: true,
2251
+ cancelable: true,
2252
+ composed: true
2253
+ }
2254
+ },
2255
+ dragStart: {
2256
+ EventType: 'DragEvent',
2257
+ defaultInit: {
2258
+ bubbles: true,
2259
+ cancelable: true,
2260
+ composed: true
2261
+ }
2262
+ },
2263
+ drop: {
2264
+ EventType: 'DragEvent',
2265
+ defaultInit: {
2266
+ bubbles: true,
2267
+ cancelable: true,
2268
+ composed: true
2269
+ }
2270
+ },
2271
+ mouseDown: {
2272
+ EventType: 'MouseEvent',
2273
+ defaultInit: {
2274
+ bubbles: true,
2275
+ cancelable: true,
2276
+ composed: true
2277
+ }
2278
+ },
2279
+ mouseEnter: {
2280
+ EventType: 'MouseEvent',
2281
+ defaultInit: {
2282
+ bubbles: false,
2283
+ cancelable: false,
2284
+ composed: true
2285
+ }
2286
+ },
2287
+ mouseLeave: {
2288
+ EventType: 'MouseEvent',
2289
+ defaultInit: {
2290
+ bubbles: false,
2291
+ cancelable: false,
2292
+ composed: true
2293
+ }
2294
+ },
2295
+ mouseMove: {
2296
+ EventType: 'MouseEvent',
2297
+ defaultInit: {
2298
+ bubbles: true,
2299
+ cancelable: true,
2300
+ composed: true
2301
+ }
2302
+ },
2303
+ mouseOut: {
2304
+ EventType: 'MouseEvent',
2305
+ defaultInit: {
2306
+ bubbles: true,
2307
+ cancelable: true,
2308
+ composed: true
2309
+ }
2310
+ },
2311
+ mouseOver: {
2312
+ EventType: 'MouseEvent',
2313
+ defaultInit: {
2314
+ bubbles: true,
2315
+ cancelable: true,
2316
+ composed: true
2317
+ }
2318
+ },
2319
+ mouseUp: {
2320
+ EventType: 'MouseEvent',
2321
+ defaultInit: {
2322
+ bubbles: true,
2323
+ cancelable: true,
2324
+ composed: true
2325
+ }
2326
+ },
2327
+ // Selection Events
2328
+ select: {
2329
+ EventType: 'Event',
2330
+ defaultInit: {
2331
+ bubbles: true,
2332
+ cancelable: false
2333
+ }
2334
+ },
2335
+ // Touch Events
2336
+ touchCancel: {
2337
+ EventType: 'TouchEvent',
2338
+ defaultInit: {
2339
+ bubbles: true,
2340
+ cancelable: false,
2341
+ composed: true
2342
+ }
2343
+ },
2344
+ touchEnd: {
2345
+ EventType: 'TouchEvent',
2346
+ defaultInit: {
2347
+ bubbles: true,
2348
+ cancelable: true,
2349
+ composed: true
2350
+ }
2351
+ },
2352
+ touchMove: {
2353
+ EventType: 'TouchEvent',
2354
+ defaultInit: {
2355
+ bubbles: true,
2356
+ cancelable: true,
2357
+ composed: true
2358
+ }
2359
+ },
2360
+ touchStart: {
2361
+ EventType: 'TouchEvent',
2362
+ defaultInit: {
2363
+ bubbles: true,
2364
+ cancelable: true,
2365
+ composed: true
2366
+ }
2367
+ },
2368
+ // UI Events
2369
+ resize: {
2370
+ EventType: 'UIEvent',
2371
+ defaultInit: {
2372
+ bubbles: false,
2373
+ cancelable: false
2374
+ }
2375
+ },
2376
+ scroll: {
2377
+ EventType: 'UIEvent',
2378
+ defaultInit: {
2379
+ bubbles: false,
2380
+ cancelable: false
2381
+ }
2382
+ },
2383
+ // Wheel Events
2384
+ wheel: {
2385
+ EventType: 'WheelEvent',
2386
+ defaultInit: {
2387
+ bubbles: true,
2388
+ cancelable: true,
2389
+ composed: true
2390
+ }
2391
+ },
2392
+ // Media Events
2393
+ abort: {
2394
+ EventType: 'Event',
2395
+ defaultInit: {
2396
+ bubbles: false,
2397
+ cancelable: false
2398
+ }
2399
+ },
2400
+ canPlay: {
2401
+ EventType: 'Event',
2402
+ defaultInit: {
2403
+ bubbles: false,
2404
+ cancelable: false
2405
+ }
2406
+ },
2407
+ canPlayThrough: {
2408
+ EventType: 'Event',
2409
+ defaultInit: {
2410
+ bubbles: false,
2411
+ cancelable: false
2412
+ }
2413
+ },
2414
+ durationChange: {
2415
+ EventType: 'Event',
2416
+ defaultInit: {
2417
+ bubbles: false,
2418
+ cancelable: false
2419
+ }
2420
+ },
2421
+ emptied: {
2422
+ EventType: 'Event',
2423
+ defaultInit: {
2424
+ bubbles: false,
2425
+ cancelable: false
2426
+ }
2427
+ },
2428
+ encrypted: {
2429
+ EventType: 'Event',
2430
+ defaultInit: {
2431
+ bubbles: false,
2432
+ cancelable: false
2433
+ }
2434
+ },
2435
+ ended: {
2436
+ EventType: 'Event',
2437
+ defaultInit: {
2438
+ bubbles: false,
2439
+ cancelable: false
2440
+ }
2441
+ },
2442
+ loadedData: {
2443
+ EventType: 'Event',
2444
+ defaultInit: {
2445
+ bubbles: false,
2446
+ cancelable: false
2447
+ }
2448
+ },
2449
+ loadedMetadata: {
2450
+ EventType: 'Event',
2451
+ defaultInit: {
2452
+ bubbles: false,
2453
+ cancelable: false
2454
+ }
2455
+ },
2456
+ loadStart: {
2457
+ EventType: 'ProgressEvent',
2458
+ defaultInit: {
2459
+ bubbles: false,
2460
+ cancelable: false
2461
+ }
2462
+ },
2463
+ pause: {
2464
+ EventType: 'Event',
2465
+ defaultInit: {
2466
+ bubbles: false,
2467
+ cancelable: false
2468
+ }
2469
+ },
2470
+ play: {
2471
+ EventType: 'Event',
2472
+ defaultInit: {
2473
+ bubbles: false,
2474
+ cancelable: false
2475
+ }
2476
+ },
2477
+ playing: {
2478
+ EventType: 'Event',
2479
+ defaultInit: {
2480
+ bubbles: false,
2481
+ cancelable: false
2482
+ }
2483
+ },
2484
+ progress: {
2485
+ EventType: 'ProgressEvent',
2486
+ defaultInit: {
2487
+ bubbles: false,
2488
+ cancelable: false
2489
+ }
2490
+ },
2491
+ rateChange: {
2492
+ EventType: 'Event',
2493
+ defaultInit: {
2494
+ bubbles: false,
2495
+ cancelable: false
2496
+ }
2497
+ },
2498
+ seeked: {
2499
+ EventType: 'Event',
2500
+ defaultInit: {
2501
+ bubbles: false,
2502
+ cancelable: false
2503
+ }
2504
+ },
2505
+ seeking: {
2506
+ EventType: 'Event',
2507
+ defaultInit: {
2508
+ bubbles: false,
2509
+ cancelable: false
2510
+ }
2511
+ },
2512
+ stalled: {
2513
+ EventType: 'Event',
2514
+ defaultInit: {
2515
+ bubbles: false,
2516
+ cancelable: false
2517
+ }
2518
+ },
2519
+ suspend: {
2520
+ EventType: 'Event',
2521
+ defaultInit: {
2522
+ bubbles: false,
2523
+ cancelable: false
2524
+ }
2525
+ },
2526
+ timeUpdate: {
2527
+ EventType: 'Event',
2528
+ defaultInit: {
2529
+ bubbles: false,
2530
+ cancelable: false
2531
+ }
2532
+ },
2533
+ volumeChange: {
2534
+ EventType: 'Event',
2535
+ defaultInit: {
2536
+ bubbles: false,
2537
+ cancelable: false
2538
+ }
2539
+ },
2540
+ waiting: {
2541
+ EventType: 'Event',
2542
+ defaultInit: {
2543
+ bubbles: false,
2544
+ cancelable: false
2545
+ }
2546
+ },
2547
+ // Events
2548
+ load: {
2549
+ // TODO: load events can be UIEvent or Event depending on what generated them
2550
+ // This is were this abstraction breaks down.
2551
+ // But the common targets are <img />, <script /> and window.
2552
+ // Neither of these targets receive a UIEvent
2553
+ EventType: 'Event',
2554
+ defaultInit: {
2555
+ bubbles: false,
2556
+ cancelable: false
2557
+ }
2558
+ },
2559
+ error: {
2560
+ EventType: 'Event',
2561
+ defaultInit: {
2562
+ bubbles: false,
2563
+ cancelable: false
2564
+ }
2565
+ },
2566
+ // Animation Events
2567
+ animationStart: {
2568
+ EventType: 'AnimationEvent',
2569
+ defaultInit: {
2570
+ bubbles: true,
2571
+ cancelable: false
2572
+ }
2573
+ },
2574
+ animationEnd: {
2575
+ EventType: 'AnimationEvent',
2576
+ defaultInit: {
2577
+ bubbles: true,
2578
+ cancelable: false
2579
+ }
2580
+ },
2581
+ animationIteration: {
2582
+ EventType: 'AnimationEvent',
2583
+ defaultInit: {
2584
+ bubbles: true,
2585
+ cancelable: false
2586
+ }
2587
+ },
2588
+ // Transition Events
2589
+ transitionCancel: {
2590
+ EventType: 'TransitionEvent',
2591
+ defaultInit: {
2592
+ bubbles: true,
2593
+ cancelable: false
2594
+ }
2595
+ },
2596
+ transitionEnd: {
2597
+ EventType: 'TransitionEvent',
2598
+ defaultInit: {
2599
+ bubbles: true,
2600
+ cancelable: true
2601
+ }
2602
+ },
2603
+ transitionRun: {
2604
+ EventType: 'TransitionEvent',
2605
+ defaultInit: {
2606
+ bubbles: true,
2607
+ cancelable: false
2608
+ }
2609
+ },
2610
+ transitionStart: {
2611
+ EventType: 'TransitionEvent',
2612
+ defaultInit: {
2613
+ bubbles: true,
2614
+ cancelable: false
2615
+ }
2616
+ },
2617
+ // pointer events
2618
+ pointerOver: {
2619
+ EventType: 'PointerEvent',
2620
+ defaultInit: {
2621
+ bubbles: true,
2622
+ cancelable: true,
2623
+ composed: true
2624
+ }
2625
+ },
2626
+ pointerEnter: {
2627
+ EventType: 'PointerEvent',
2628
+ defaultInit: {
2629
+ bubbles: false,
2630
+ cancelable: false
2631
+ }
2632
+ },
2633
+ pointerDown: {
2634
+ EventType: 'PointerEvent',
2635
+ defaultInit: {
2636
+ bubbles: true,
2637
+ cancelable: true,
2638
+ composed: true
2639
+ }
2640
+ },
2641
+ pointerMove: {
2642
+ EventType: 'PointerEvent',
2643
+ defaultInit: {
2644
+ bubbles: true,
2645
+ cancelable: true,
2646
+ composed: true
2647
+ }
2648
+ },
2649
+ pointerUp: {
2650
+ EventType: 'PointerEvent',
2651
+ defaultInit: {
2652
+ bubbles: true,
2653
+ cancelable: true,
2654
+ composed: true
2655
+ }
2656
+ },
2657
+ pointerCancel: {
2658
+ EventType: 'PointerEvent',
2659
+ defaultInit: {
2660
+ bubbles: true,
2661
+ cancelable: false,
2662
+ composed: true
2663
+ }
2664
+ },
2665
+ pointerOut: {
2666
+ EventType: 'PointerEvent',
2667
+ defaultInit: {
2668
+ bubbles: true,
2669
+ cancelable: true,
2670
+ composed: true
2671
+ }
2672
+ },
2673
+ pointerLeave: {
2674
+ EventType: 'PointerEvent',
2675
+ defaultInit: {
2676
+ bubbles: false,
2677
+ cancelable: false
2678
+ }
2679
+ },
2680
+ gotPointerCapture: {
2681
+ EventType: 'PointerEvent',
2682
+ defaultInit: {
2683
+ bubbles: true,
2684
+ cancelable: false,
2685
+ composed: true
2686
+ }
2687
+ },
2688
+ lostPointerCapture: {
2689
+ EventType: 'PointerEvent',
2690
+ defaultInit: {
2691
+ bubbles: true,
2692
+ cancelable: false,
2693
+ composed: true
2694
+ }
2695
+ },
2696
+ // history events
2697
+ popState: {
2698
+ EventType: 'PopStateEvent',
2699
+ defaultInit: {
2700
+ bubbles: true,
2701
+ cancelable: false
2702
+ }
2703
+ }
2704
+ };
2705
+ const eventAliasMap = {
2706
+ doubleClick: 'dblClick'
2707
+ };
2708
+
2709
+ function fireEvent(element, event) {
2710
+ return getConfig().eventWrapper(() => {
2711
+ if (!event) {
2712
+ throw new Error("Unable to fire an event - please provide an event object.");
2713
+ }
2714
+
2715
+ if (!element) {
2716
+ throw new Error("Unable to fire a \"" + event.type + "\" event - please provide a DOM element.");
2717
+ }
2718
+
2719
+ return element.dispatchEvent(event);
2720
+ });
2721
+ }
2722
+
2723
+ function createEvent(eventName, node, init, _temp) {
2724
+ let {
2725
+ EventType = 'Event',
2726
+ defaultInit = {}
2727
+ } = _temp === void 0 ? {} : _temp;
2728
+
2729
+ if (!node) {
2730
+ throw new Error("Unable to fire a \"" + eventName + "\" event - please provide a DOM element.");
2731
+ }
2732
+
2733
+ const eventInit = { ...defaultInit,
2734
+ ...init
2735
+ };
2736
+ const {
2737
+ target: {
2738
+ value,
2739
+ files,
2740
+ ...targetProperties
2741
+ } = {}
2742
+ } = eventInit;
2743
+
2744
+ if (value !== undefined) {
2745
+ setNativeValue(node, value);
2746
+ }
2747
+
2748
+ if (files !== undefined) {
2749
+ // input.files is a read-only property so this is not allowed:
2750
+ // input.files = [file]
2751
+ // so we have to use this workaround to set the property
2752
+ Object.defineProperty(node, 'files', {
2753
+ configurable: true,
2754
+ enumerable: true,
2755
+ writable: true,
2756
+ value: files
2757
+ });
2758
+ }
2759
+
2760
+ Object.assign(node, targetProperties);
2761
+ const window = getWindowFromNode(node);
2762
+ const EventConstructor = window[EventType] || window.Event;
2763
+ let event;
2764
+ /* istanbul ignore else */
2765
+
2766
+ if (typeof EventConstructor === 'function') {
2767
+ event = new EventConstructor(eventName, eventInit);
2768
+ } else {
2769
+ // IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
2770
+ event = window.document.createEvent(EventType);
2771
+ const {
2772
+ bubbles,
2773
+ cancelable,
2774
+ detail,
2775
+ ...otherInit
2776
+ } = eventInit;
2777
+ event.initEvent(eventName, bubbles, cancelable, detail);
2778
+ Object.keys(otherInit).forEach(eventKey => {
2779
+ event[eventKey] = otherInit[eventKey];
2780
+ });
2781
+ } // DataTransfer is not supported in jsdom: https://github.com/jsdom/jsdom/issues/1568
2782
+
2783
+
2784
+ const dataTransferProperties = ['dataTransfer', 'clipboardData'];
2785
+ dataTransferProperties.forEach(dataTransferKey => {
2786
+ const dataTransferValue = eventInit[dataTransferKey];
2787
+
2788
+ if (typeof dataTransferValue === 'object') {
2789
+ /* istanbul ignore if */
2790
+ if (typeof window.DataTransfer === 'function') {
2791
+ Object.defineProperty(event, dataTransferKey, {
2792
+ value: Object.getOwnPropertyNames(dataTransferValue).reduce((acc, propName) => {
2793
+ Object.defineProperty(acc, propName, {
2794
+ value: dataTransferValue[propName]
2795
+ });
2796
+ return acc;
2797
+ }, new window.DataTransfer())
2798
+ });
2799
+ } else {
2800
+ Object.defineProperty(event, dataTransferKey, {
2801
+ value: dataTransferValue
2802
+ });
2803
+ }
2804
+ }
2805
+ });
2806
+ return event;
2807
+ }
2808
+
2809
+ Object.keys(eventMap).forEach(key => {
2810
+ const {
2811
+ EventType,
2812
+ defaultInit
2813
+ } = eventMap[key];
2814
+ const eventName = key.toLowerCase();
2815
+
2816
+ createEvent[key] = (node, init) => createEvent(eventName, node, init, {
2817
+ EventType,
2818
+ defaultInit
2819
+ });
2820
+
2821
+ fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));
2822
+ }); // function written after some investigation here:
2823
+ // https://github.com/facebook/react/issues/10135#issuecomment-401496776
2824
+
2825
+ function setNativeValue(element, value) {
2826
+ const {
2827
+ set: valueSetter
2828
+ } = Object.getOwnPropertyDescriptor(element, 'value') || {};
2829
+ const prototype = Object.getPrototypeOf(element);
2830
+ const {
2831
+ set: prototypeValueSetter
2832
+ } = Object.getOwnPropertyDescriptor(prototype, 'value') || {};
2833
+
2834
+ if (prototypeValueSetter && valueSetter !== prototypeValueSetter) {
2835
+ prototypeValueSetter.call(element, value);
2836
+ } else {
2837
+ /* istanbul ignore if */
2838
+ // eslint-disable-next-line no-lonely-if -- Can't be ignored by istanbul otherwise
2839
+ if (valueSetter) {
2840
+ valueSetter.call(element, value);
2841
+ } else {
2842
+ throw new Error('The given element does not have a value setter');
2843
+ }
2844
+ }
2845
+ }
2846
+
2847
+ Object.keys(eventAliasMap).forEach(aliasKey => {
2848
+ const key = eventAliasMap[aliasKey];
2849
+
2850
+ fireEvent[aliasKey] = function () {
2851
+ return fireEvent[key](...arguments);
2852
+ };
2853
+ });
2854
+ /* eslint complexity:["error", 9] */
2855
+
2856
+ // WARNING: `lz-string` only has a default export but statically we assume named exports are allowd
2857
+
2858
+ function unindent(string) {
2859
+ // remove white spaces first, to save a few bytes.
2860
+ // testing-playground will reformat on load any ways.
2861
+ return string.replace(/[ \t]*[\n][ \t]*/g, '\n');
2862
+ }
2863
+
2864
+ function encode(value) {
2865
+ return lzString.compressToEncodedURIComponent(unindent(value));
2866
+ }
2867
+
2868
+ function getPlaygroundUrl(markup) {
2869
+ return "https://testing-playground.com/#markup=" + encode(markup);
2870
+ }
2871
+
2872
+ const debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach(el => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options);
2873
+
2874
+ const logTestingPlaygroundURL = function (element) {
2875
+ if (element === void 0) {
2876
+ element = getDocument().body;
2877
+ }
2878
+
2879
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2880
+ if (!element || !('innerHTML' in element)) {
2881
+ console.log("The element you're providing isn't a valid DOM element.");
2882
+ return;
2883
+ } // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2884
+
2885
+
2886
+ if (!element.innerHTML) {
2887
+ console.log("The provided element doesn't have any children.");
2888
+ return;
2889
+ }
2890
+
2891
+ const playgroundUrl = getPlaygroundUrl(element.innerHTML);
2892
+ console.log("Open this URL in your browser\n\n" + playgroundUrl);
2893
+ return playgroundUrl;
2894
+ };
2895
+
2896
+ const initialValue = {
2897
+ debug,
2898
+ logTestingPlaygroundURL
2899
+ };
2900
+ typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
2901
+ ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
2902
+ // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`
2903
+ // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary
2904
+ // see https://stackoverflow.com/questions/55012174/why-doesnt-object-keys-return-a-keyof-type-in-typescript
2905
+ helpers[key] = () => {
2906
+ throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error');
2907
+ };
2908
+
2909
+ return helpers;
2910
+ }, initialValue);
2911
+
2912
+ export { buildQueries, configure, createEvent, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelTextWithSuggestions as getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelTextWithSuggestions as getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getConfig, getDefaultNormalizer, getElementError, getMultipleElementsFoundError, getNodeText, getQueriesForElement, getRoles, getSuggestedQuery, isInaccessible, logDOM, makeFindQuery, makeGetAllQuery, makeSingleQuery, prettyDOM, queries, queryAllByAltTextWithSuggestions as queryAllByAltText, queryAllByAttribute, queryAllByDisplayValueWithSuggestions as queryAllByDisplayValue, queryAllByLabelTextWithSuggestions as queryAllByLabelText, queryAllByPlaceholderTextWithSuggestions as queryAllByPlaceholderText, queryAllByRoleWithSuggestions as queryAllByRole, queryAllByTestIdWithSuggestions as queryAllByTestId, queryAllByTextWithSuggestions as queryAllByText, queryAllByTitleWithSuggestions as queryAllByTitle, queryByAltText, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, waitForWrapper as waitFor, getQueriesForElement as within, wrapAllByQueryWithSuggestion, wrapSingleQueryWithSuggestion };