@databricks/design-system 1.12.7 → 1.12.8

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 (449) hide show
  1. package/dist/Typography-1b037412.js +2074 -0
  2. package/dist/Typography-1b037412.js.map +1 -0
  3. package/dist/Typography-e3d5ff23.js +2083 -0
  4. package/dist/Typography-e3d5ff23.js.map +1 -0
  5. package/dist/common-1fb3eeb9.js.map +1 -1
  6. package/dist/design-system/Accordion/Accordion.d.ts.map +1 -1
  7. package/dist/design-system/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  8. package/dist/design-system/Button/Button.d.ts +1 -2
  9. package/dist/design-system/Button/Button.d.ts.map +1 -1
  10. package/dist/design-system/Button/styles.d.ts.map +1 -1
  11. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
  12. package/dist/design-system/DialogCombobox/DialogCombobox.d.ts +4 -2
  13. package/dist/design-system/DialogCombobox/DialogCombobox.d.ts.map +1 -1
  14. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
  15. package/dist/design-system/DialogCombobox/DialogComboboxCountBadge.d.ts.map +1 -1
  16. package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts +2 -0
  17. package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts.map +1 -0
  18. package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts.map +1 -1
  19. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts +2 -2
  20. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts.map +1 -1
  21. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts +2 -0
  22. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
  23. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
  24. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +2 -0
  25. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
  26. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +8 -1
  27. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
  28. package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts +4 -1
  29. package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts.map +1 -1
  30. package/dist/design-system/DialogCombobox/providers/DialogComboboxOptionListContext.d.ts +2 -0
  31. package/dist/design-system/DialogCombobox/providers/DialogComboboxOptionListContext.d.ts.map +1 -1
  32. package/dist/design-system/DialogCombobox/shared.d.ts +11 -1
  33. package/dist/design-system/DialogCombobox/shared.d.ts.map +1 -1
  34. package/dist/design-system/Drawer/Drawer.d.ts +6 -1
  35. package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
  36. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  37. package/dist/design-system/Form/Form.d.ts.map +1 -1
  38. package/dist/design-system/Header/Header.d.ts.map +1 -1
  39. package/dist/design-system/Icon/Icon.d.ts.map +1 -1
  40. package/dist/design-system/Icon/__generated/icons/AlignCenterIcon.d.ts.map +1 -1
  41. package/dist/design-system/Icon/__generated/icons/AlignLeftIcon.d.ts.map +1 -1
  42. package/dist/design-system/Icon/__generated/icons/AlignRightIcon.d.ts.map +1 -1
  43. package/dist/design-system/Icon/__generated/icons/AppIcon.d.ts +4 -0
  44. package/dist/design-system/Icon/__generated/icons/AppIcon.d.ts.map +1 -0
  45. package/dist/design-system/Icon/__generated/icons/ArrowDownIcon.d.ts.map +1 -1
  46. package/dist/design-system/Icon/__generated/icons/ArrowLeftIcon.d.ts.map +1 -1
  47. package/dist/design-system/Icon/__generated/icons/ArrowRightIcon.d.ts.map +1 -1
  48. package/dist/design-system/Icon/__generated/icons/ArrowUpIcon.d.ts.map +1 -1
  49. package/dist/design-system/Icon/__generated/icons/ArrowsUpDownIcon.d.ts.map +1 -1
  50. package/dist/design-system/Icon/__generated/icons/BarChartIcon.d.ts.map +1 -1
  51. package/dist/design-system/Icon/__generated/icons/BeakerIcon.d.ts.map +1 -1
  52. package/dist/design-system/Icon/__generated/icons/BinaryIcon.d.ts +4 -0
  53. package/dist/design-system/Icon/__generated/icons/BinaryIcon.d.ts.map +1 -0
  54. package/dist/design-system/Icon/__generated/icons/BoldIcon.d.ts +4 -0
  55. package/dist/design-system/Icon/__generated/icons/BoldIcon.d.ts.map +1 -0
  56. package/dist/design-system/Icon/__generated/icons/BookIcon.d.ts.map +1 -1
  57. package/dist/design-system/Icon/__generated/icons/BookmarkFillIcon.d.ts.map +1 -1
  58. package/dist/design-system/Icon/__generated/icons/BookmarkIcon.d.ts.map +1 -1
  59. package/dist/design-system/Icon/__generated/icons/BooksIcon.d.ts +4 -0
  60. package/dist/design-system/Icon/__generated/icons/BooksIcon.d.ts.map +1 -0
  61. package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.d.ts +4 -0
  62. package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.d.ts.map +1 -0
  63. package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.d.ts +4 -0
  64. package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.d.ts.map +1 -0
  65. package/dist/design-system/Icon/__generated/icons/BracketsXIcon.d.ts +4 -0
  66. package/dist/design-system/Icon/__generated/icons/BracketsXIcon.d.ts.map +1 -0
  67. package/dist/design-system/Icon/__generated/icons/BranchIcon.d.ts +4 -0
  68. package/dist/design-system/Icon/__generated/icons/BranchIcon.d.ts.map +1 -0
  69. package/dist/design-system/Icon/__generated/icons/BriefcaseFillIcon.d.ts.map +1 -1
  70. package/dist/design-system/Icon/__generated/icons/BriefcaseIcon.d.ts.map +1 -1
  71. package/dist/design-system/Icon/__generated/icons/CalendarEventIcon.d.ts.map +1 -1
  72. package/dist/design-system/Icon/__generated/icons/CalendarIcon.d.ts.map +1 -1
  73. package/dist/design-system/Icon/__generated/icons/CaretDownSquareIcon.d.ts.map +1 -1
  74. package/dist/design-system/Icon/__generated/icons/CaretUpSquareIcon.d.ts.map +1 -1
  75. package/dist/design-system/Icon/__generated/icons/CatalogIcon.d.ts +4 -0
  76. package/dist/design-system/Icon/__generated/icons/CatalogIcon.d.ts.map +1 -0
  77. package/dist/design-system/Icon/__generated/icons/ChartLineIcon.d.ts +4 -0
  78. package/dist/design-system/Icon/__generated/icons/ChartLineIcon.d.ts.map +1 -0
  79. package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.d.ts +4 -0
  80. package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.d.ts.map +1 -0
  81. package/dist/design-system/Icon/__generated/icons/CheckCircleFillIcon.d.ts.map +1 -1
  82. package/dist/design-system/Icon/__generated/icons/CheckCircleIcon.d.ts.map +1 -1
  83. package/dist/design-system/Icon/__generated/icons/CheckIcon.d.ts.map +1 -1
  84. package/dist/design-system/Icon/__generated/icons/CheckLineIcon.d.ts.map +1 -1
  85. package/dist/design-system/Icon/__generated/icons/ChecklistIcon.d.ts.map +1 -1
  86. package/dist/design-system/Icon/__generated/icons/ChevronDoubleDownIcon.d.ts.map +1 -1
  87. package/dist/design-system/Icon/__generated/icons/ChevronDoubleLeftIcon.d.ts.map +1 -1
  88. package/dist/design-system/Icon/__generated/icons/ChevronDoubleRightIcon.d.ts.map +1 -1
  89. package/dist/design-system/Icon/__generated/icons/ChevronDoubleUpIcon.d.ts.map +1 -1
  90. package/dist/design-system/Icon/__generated/icons/ChevronDownIcon.d.ts.map +1 -1
  91. package/dist/design-system/Icon/__generated/icons/ChevronLeftIcon.d.ts.map +1 -1
  92. package/dist/design-system/Icon/__generated/icons/ChevronRightIcon.d.ts.map +1 -1
  93. package/dist/design-system/Icon/__generated/icons/ChevronUpIcon.d.ts.map +1 -1
  94. package/dist/design-system/Icon/__generated/icons/CircleIcon.d.ts.map +1 -1
  95. package/dist/design-system/Icon/__generated/icons/ClipboardIcon.d.ts.map +1 -1
  96. package/dist/design-system/Icon/__generated/icons/ClockIcon.d.ts.map +1 -1
  97. package/dist/design-system/Icon/__generated/icons/CloseIcon.d.ts.map +1 -1
  98. package/dist/design-system/Icon/__generated/icons/CloudDownloadIcon.d.ts.map +1 -1
  99. package/dist/design-system/Icon/__generated/icons/CloudIcon.d.ts.map +1 -1
  100. package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.d.ts +4 -0
  101. package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.d.ts.map +1 -0
  102. package/dist/design-system/Icon/__generated/icons/CloudModelIcon.d.ts +4 -0
  103. package/dist/design-system/Icon/__generated/icons/CloudModelIcon.d.ts.map +1 -0
  104. package/dist/design-system/Icon/__generated/icons/CloudOffIcon.d.ts.map +1 -1
  105. package/dist/design-system/Icon/__generated/icons/CloudUploadIcon.d.ts.map +1 -1
  106. package/dist/design-system/Icon/__generated/icons/CodeIcon.d.ts.map +1 -1
  107. package/dist/design-system/Icon/__generated/icons/ColorFillIcon.d.ts +4 -0
  108. package/dist/design-system/Icon/__generated/icons/ColorFillIcon.d.ts.map +1 -0
  109. package/dist/design-system/Icon/__generated/icons/ColumnIcon.d.ts +4 -0
  110. package/dist/design-system/Icon/__generated/icons/ColumnIcon.d.ts.map +1 -0
  111. package/dist/design-system/Icon/__generated/icons/ConnectIcon.d.ts +4 -0
  112. package/dist/design-system/Icon/__generated/icons/ConnectIcon.d.ts.map +1 -0
  113. package/dist/design-system/Icon/__generated/icons/CopyIcon.d.ts.map +1 -1
  114. package/dist/design-system/Icon/__generated/icons/CursorIcon.d.ts +4 -0
  115. package/dist/design-system/Icon/__generated/icons/CursorIcon.d.ts.map +1 -0
  116. package/dist/design-system/Icon/__generated/icons/CursorTypeIcon.d.ts +4 -0
  117. package/dist/design-system/Icon/__generated/icons/CursorTypeIcon.d.ts.map +1 -0
  118. package/dist/design-system/Icon/__generated/icons/DIcon.d.ts.map +1 -1
  119. package/dist/design-system/Icon/__generated/icons/DagIcon.d.ts +4 -0
  120. package/dist/design-system/Icon/__generated/icons/DagIcon.d.ts.map +1 -0
  121. package/dist/design-system/Icon/__generated/icons/DangerFillIcon.d.ts.map +1 -1
  122. package/dist/design-system/Icon/__generated/icons/DangerIcon.d.ts.map +1 -1
  123. package/dist/design-system/Icon/__generated/icons/DashIcon.d.ts.map +1 -1
  124. package/dist/design-system/Icon/__generated/icons/DashboardIcon.d.ts.map +1 -1
  125. package/dist/design-system/Icon/__generated/icons/DataIcon.d.ts.map +1 -1
  126. package/dist/design-system/Icon/__generated/icons/DatabaseIcon.d.ts.map +1 -1
  127. package/dist/design-system/Icon/__generated/icons/DecimalIcon.d.ts +4 -0
  128. package/dist/design-system/Icon/__generated/icons/DecimalIcon.d.ts.map +1 -0
  129. package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.d.ts +4 -0
  130. package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.d.ts.map +1 -0
  131. package/dist/design-system/Icon/__generated/icons/DownloadIcon.d.ts.map +1 -1
  132. package/dist/design-system/Icon/__generated/icons/DragIcon.d.ts.map +1 -1
  133. package/dist/design-system/Icon/__generated/icons/ExpandLessIcon.d.ts.map +1 -1
  134. package/dist/design-system/Icon/__generated/icons/ExpandMoreIcon.d.ts.map +1 -1
  135. package/dist/design-system/Icon/__generated/icons/FaceFrownIcon.d.ts +4 -0
  136. package/dist/design-system/Icon/__generated/icons/FaceFrownIcon.d.ts.map +1 -0
  137. package/dist/design-system/Icon/__generated/icons/FaceNeutralIcon.d.ts +4 -0
  138. package/dist/design-system/Icon/__generated/icons/FaceNeutralIcon.d.ts.map +1 -0
  139. package/dist/design-system/Icon/__generated/icons/FaceSmileIcon.d.ts +4 -0
  140. package/dist/design-system/Icon/__generated/icons/FaceSmileIcon.d.ts.map +1 -0
  141. package/dist/design-system/Icon/__generated/icons/FileCodeIcon.d.ts.map +1 -1
  142. package/dist/design-system/Icon/__generated/icons/FileDocumentIcon.d.ts.map +1 -1
  143. package/dist/design-system/Icon/__generated/icons/FileIcon.d.ts.map +1 -1
  144. package/dist/design-system/Icon/__generated/icons/FileImageIcon.d.ts.map +1 -1
  145. package/dist/design-system/Icon/__generated/icons/FileModelIcon.d.ts.map +1 -1
  146. package/dist/design-system/Icon/__generated/icons/FilterIcon.d.ts.map +1 -1
  147. package/dist/design-system/Icon/__generated/icons/FolderBranchIcon.d.ts +4 -0
  148. package/dist/design-system/Icon/__generated/icons/FolderBranchIcon.d.ts.map +1 -0
  149. package/dist/design-system/Icon/__generated/icons/FolderFillIcon.d.ts.map +1 -1
  150. package/dist/design-system/Icon/__generated/icons/FolderIcon.d.ts.map +1 -1
  151. package/dist/design-system/Icon/__generated/icons/FontIcon.d.ts +4 -0
  152. package/dist/design-system/Icon/__generated/icons/FontIcon.d.ts.map +1 -0
  153. package/dist/design-system/Icon/__generated/icons/ForkIcon.d.ts.map +1 -1
  154. package/dist/design-system/Icon/__generated/icons/FullscreenExitIcon.d.ts.map +1 -1
  155. package/dist/design-system/Icon/__generated/icons/FullscreenIcon.d.ts.map +1 -1
  156. package/dist/design-system/Icon/__generated/icons/FunctionIcon.d.ts +4 -0
  157. package/dist/design-system/Icon/__generated/icons/FunctionIcon.d.ts.map +1 -0
  158. package/dist/design-system/Icon/__generated/icons/FunctionIcon.v2.d.ts +4 -0
  159. package/dist/design-system/Icon/__generated/icons/FunctionIcon.v2.d.ts.map +1 -0
  160. package/dist/design-system/Icon/__generated/icons/GearFillIcon.d.ts.map +1 -1
  161. package/dist/design-system/Icon/__generated/icons/GearIcon.d.ts.map +1 -1
  162. package/dist/design-system/Icon/__generated/icons/GiftIcon.d.ts +4 -0
  163. package/dist/design-system/Icon/__generated/icons/GiftIcon.d.ts.map +1 -0
  164. package/dist/design-system/Icon/__generated/icons/GitCommitIcon.d.ts +4 -0
  165. package/dist/design-system/Icon/__generated/icons/GitCommitIcon.d.ts.map +1 -0
  166. package/dist/design-system/Icon/__generated/icons/GlobeIcon.d.ts +4 -0
  167. package/dist/design-system/Icon/__generated/icons/GlobeIcon.d.ts.map +1 -0
  168. package/dist/design-system/Icon/__generated/icons/GridDashIcon.d.ts.map +1 -1
  169. package/dist/design-system/Icon/__generated/icons/GridIcon.d.ts.map +1 -1
  170. package/dist/design-system/Icon/__generated/icons/H1Icon.d.ts.map +1 -1
  171. package/dist/design-system/Icon/__generated/icons/H2Icon.d.ts.map +1 -1
  172. package/dist/design-system/Icon/__generated/icons/H3Icon.d.ts.map +1 -1
  173. package/dist/design-system/Icon/__generated/icons/HistoryIcon.d.ts.map +1 -1
  174. package/dist/design-system/Icon/__generated/icons/HomeIcon.d.ts.map +1 -1
  175. package/dist/design-system/Icon/__generated/icons/ImageIcon.d.ts.map +1 -1
  176. package/dist/design-system/Icon/__generated/icons/IndentDecreaseIcon.d.ts.map +1 -1
  177. package/dist/design-system/Icon/__generated/icons/IndentIncreaseIcon.d.ts.map +1 -1
  178. package/dist/design-system/Icon/__generated/icons/InfinityIcon.d.ts.map +1 -1
  179. package/dist/design-system/Icon/__generated/icons/InfoFillIcon.d.ts.map +1 -1
  180. package/dist/design-system/Icon/__generated/icons/InfoIcon.d.ts.map +1 -1
  181. package/dist/design-system/Icon/__generated/icons/ItalicIcon.d.ts +4 -0
  182. package/dist/design-system/Icon/__generated/icons/ItalicIcon.d.ts.map +1 -0
  183. package/dist/design-system/Icon/__generated/icons/KeyIcon.d.ts +4 -0
  184. package/dist/design-system/Icon/__generated/icons/KeyIcon.d.ts.map +1 -0
  185. package/dist/design-system/Icon/__generated/icons/KeyboardIcon.d.ts.map +1 -1
  186. package/dist/design-system/Icon/__generated/icons/LayerIcon.d.ts.map +1 -1
  187. package/dist/design-system/Icon/__generated/icons/LettersIcon.d.ts +4 -0
  188. package/dist/design-system/Icon/__generated/icons/LettersIcon.d.ts.map +1 -0
  189. package/dist/design-system/Icon/__generated/icons/LightningIcon.d.ts.map +1 -1
  190. package/dist/design-system/Icon/__generated/icons/LinkIcon.d.ts.map +1 -1
  191. package/dist/design-system/Icon/__generated/icons/LinkOffIcon.d.ts.map +1 -1
  192. package/dist/design-system/Icon/__generated/icons/ListBorderIcon.d.ts.map +1 -1
  193. package/dist/design-system/Icon/__generated/icons/ListIcon.d.ts.map +1 -1
  194. package/dist/design-system/Icon/__generated/icons/LoadingIcon.d.ts.map +1 -1
  195. package/dist/design-system/Icon/__generated/icons/LockFillIcon.d.ts.map +1 -1
  196. package/dist/design-system/Icon/__generated/icons/LockIcon.d.ts.map +1 -1
  197. package/dist/design-system/Icon/__generated/icons/LockUnlockedIcon.d.ts.map +1 -1
  198. package/dist/design-system/Icon/__generated/icons/MIcon.d.ts.map +1 -1
  199. package/dist/design-system/Icon/__generated/icons/MenuIcon.d.ts +4 -0
  200. package/dist/design-system/Icon/__generated/icons/MenuIcon.d.ts.map +1 -0
  201. package/dist/design-system/Icon/__generated/icons/MinusBoxIcon.d.ts.map +1 -1
  202. package/dist/design-system/Icon/__generated/icons/MinusCircleFillIcon.d.ts.map +1 -1
  203. package/dist/design-system/Icon/__generated/icons/MinusCircleIcon.d.ts.map +1 -1
  204. package/dist/design-system/Icon/__generated/icons/ModelsIcon.d.ts.map +1 -1
  205. package/dist/design-system/Icon/__generated/icons/NewWindowIcon.d.ts.map +1 -1
  206. package/dist/design-system/Icon/__generated/icons/NoIcon.d.ts.map +1 -1
  207. package/dist/design-system/Icon/__generated/icons/NotebookIcon.d.ts.map +1 -1
  208. package/dist/design-system/Icon/__generated/icons/NotificationIcon.d.ts.map +1 -1
  209. package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.d.ts +4 -0
  210. package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.d.ts.map +1 -0
  211. package/dist/design-system/Icon/__generated/icons/NumbersIcon.d.ts +4 -0
  212. package/dist/design-system/Icon/__generated/icons/NumbersIcon.d.ts.map +1 -0
  213. package/dist/design-system/Icon/__generated/icons/OfficeIcon.d.ts.map +1 -1
  214. package/dist/design-system/Icon/__generated/icons/OverflowIcon.d.ts.map +1 -1
  215. package/dist/design-system/Icon/__generated/icons/PageBottomIcon.d.ts.map +1 -1
  216. package/dist/design-system/Icon/__generated/icons/PageFirstIcon.d.ts.map +1 -1
  217. package/dist/design-system/Icon/__generated/icons/PageLastIcon.d.ts.map +1 -1
  218. package/dist/design-system/Icon/__generated/icons/PageTopIcon.d.ts.map +1 -1
  219. package/dist/design-system/Icon/__generated/icons/PencilIcon.d.ts.map +1 -1
  220. package/dist/design-system/Icon/__generated/icons/PinCancelIcon.d.ts.map +1 -1
  221. package/dist/design-system/Icon/__generated/icons/PinFillIcon.d.ts.map +1 -1
  222. package/dist/design-system/Icon/__generated/icons/PinIcon.d.ts.map +1 -1
  223. package/dist/design-system/Icon/__generated/icons/PipelineIcon.d.ts +4 -0
  224. package/dist/design-system/Icon/__generated/icons/PipelineIcon.d.ts.map +1 -0
  225. package/dist/design-system/Icon/__generated/icons/PipelineIcon.v2.d.ts +4 -0
  226. package/dist/design-system/Icon/__generated/icons/PipelineIcon.v2.d.ts.map +1 -0
  227. package/dist/design-system/Icon/__generated/icons/PlayCircleFillIcon.d.ts.map +1 -1
  228. package/dist/design-system/Icon/__generated/icons/PlayCircleIcon.d.ts.map +1 -1
  229. package/dist/design-system/Icon/__generated/icons/PlayIcon.d.ts.map +1 -1
  230. package/dist/design-system/Icon/__generated/icons/PlugIcon.d.ts +4 -0
  231. package/dist/design-system/Icon/__generated/icons/PlugIcon.d.ts.map +1 -0
  232. package/dist/design-system/Icon/__generated/icons/PlusCircleFillIcon.d.ts.map +1 -1
  233. package/dist/design-system/Icon/__generated/icons/PlusCircleIcon.d.ts.map +1 -1
  234. package/dist/design-system/Icon/__generated/icons/PlusIcon.d.ts.map +1 -1
  235. package/dist/design-system/Icon/__generated/icons/PlusSquareIcon.d.ts.map +1 -1
  236. package/dist/design-system/Icon/__generated/icons/QueryEditorIcon.d.ts.map +1 -1
  237. package/dist/design-system/Icon/__generated/icons/QueryIcon.d.ts.map +1 -1
  238. package/dist/design-system/Icon/__generated/icons/QuestionMarkFillIcon.d.ts.map +1 -1
  239. package/dist/design-system/Icon/__generated/icons/QuestionMarkIcon.d.ts.map +1 -1
  240. package/dist/design-system/Icon/__generated/icons/ReaderModeIcon.d.ts.map +1 -1
  241. package/dist/design-system/Icon/__generated/icons/RedoIcon.d.ts.map +1 -1
  242. package/dist/design-system/Icon/__generated/icons/RefreshIcon.d.ts.map +1 -1
  243. package/dist/design-system/Icon/__generated/icons/ReposIcon.d.ts.map +1 -1
  244. package/dist/design-system/Icon/__generated/icons/SaveIcon.d.ts +4 -0
  245. package/dist/design-system/Icon/__generated/icons/SaveIcon.d.ts.map +1 -0
  246. package/dist/design-system/Icon/__generated/icons/SchoolIcon.d.ts.map +1 -1
  247. package/dist/design-system/Icon/__generated/icons/SearchIcon.d.ts.map +1 -1
  248. package/dist/design-system/Icon/__generated/icons/SecurityIcon.d.ts.map +1 -1
  249. package/dist/design-system/Icon/__generated/icons/ShareIcon.d.ts.map +1 -1
  250. package/dist/design-system/Icon/__generated/icons/SidebarAutoIcon.d.ts.map +1 -1
  251. package/dist/design-system/Icon/__generated/icons/SidebarCollapseIcon.d.ts.map +1 -1
  252. package/dist/design-system/Icon/__generated/icons/SidebarExpandIcon.d.ts.map +1 -1
  253. package/dist/design-system/Icon/__generated/icons/SidebarIcon.d.ts.map +1 -1
  254. package/dist/design-system/Icon/__generated/icons/SlidersIcon.d.ts +4 -0
  255. package/dist/design-system/Icon/__generated/icons/SlidersIcon.d.ts.map +1 -0
  256. package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.d.ts +4 -0
  257. package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.d.ts.map +1 -0
  258. package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.d.ts +4 -0
  259. package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.d.ts.map +1 -0
  260. package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.d.ts +4 -0
  261. package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.d.ts.map +1 -0
  262. package/dist/design-system/Icon/__generated/icons/SpeechBubbleIcon.d.ts.map +1 -1
  263. package/dist/design-system/Icon/__generated/icons/SpeechBubblePlusIcon.d.ts.map +1 -1
  264. package/dist/design-system/Icon/__generated/icons/StarFillIcon.d.ts.map +1 -1
  265. package/dist/design-system/Icon/__generated/icons/StarIcon.d.ts.map +1 -1
  266. package/dist/design-system/Icon/__generated/icons/StopCircleFillIcon.d.ts.map +1 -1
  267. package/dist/design-system/Icon/__generated/icons/StopCircleIcon.d.ts.map +1 -1
  268. package/dist/design-system/Icon/__generated/icons/StopIcon.d.ts.map +1 -1
  269. package/dist/design-system/Icon/__generated/icons/StorefrontIcon.d.ts +4 -0
  270. package/dist/design-system/Icon/__generated/icons/StorefrontIcon.d.ts.map +1 -0
  271. package/dist/design-system/Icon/__generated/icons/StreamIcon.d.ts.map +1 -1
  272. package/dist/design-system/Icon/__generated/icons/SyncIcon.d.ts.map +1 -1
  273. package/dist/design-system/Icon/__generated/icons/TableIcon.d.ts.map +1 -1
  274. package/dist/design-system/Icon/__generated/icons/TableInfinityIcon.d.ts +4 -0
  275. package/dist/design-system/Icon/__generated/icons/TableInfinityIcon.d.ts.map +1 -0
  276. package/dist/design-system/Icon/__generated/icons/TableLightningIcon.d.ts +4 -0
  277. package/dist/design-system/Icon/__generated/icons/TableLightningIcon.d.ts.map +1 -0
  278. package/dist/design-system/Icon/__generated/icons/TableViewIcon.d.ts +4 -0
  279. package/dist/design-system/Icon/__generated/icons/TableViewIcon.d.ts.map +1 -0
  280. package/dist/design-system/Icon/__generated/icons/TextBoxIcon.d.ts +4 -0
  281. package/dist/design-system/Icon/__generated/icons/TextBoxIcon.d.ts.map +1 -0
  282. package/dist/design-system/Icon/__generated/icons/TextBoxIcon.v2.d.ts +4 -0
  283. package/dist/design-system/Icon/__generated/icons/TextBoxIcon.v2.d.ts.map +1 -0
  284. package/dist/design-system/Icon/__generated/icons/ThumbsDownIcon.d.ts +4 -0
  285. package/dist/design-system/Icon/__generated/icons/ThumbsDownIcon.d.ts.map +1 -0
  286. package/dist/design-system/Icon/__generated/icons/ThumbsUpIcon.d.ts +4 -0
  287. package/dist/design-system/Icon/__generated/icons/ThumbsUpIcon.d.ts.map +1 -0
  288. package/dist/design-system/Icon/__generated/icons/TrashIcon.d.ts.map +1 -1
  289. package/dist/design-system/Icon/__generated/icons/TreeIcon.d.ts.map +1 -1
  290. package/dist/design-system/Icon/__generated/icons/UnderlineIcon.d.ts +4 -0
  291. package/dist/design-system/Icon/__generated/icons/UnderlineIcon.d.ts.map +1 -0
  292. package/dist/design-system/Icon/__generated/icons/UndoIcon.d.ts.map +1 -1
  293. package/dist/design-system/Icon/__generated/icons/UploadIcon.d.ts.map +1 -1
  294. package/dist/design-system/Icon/__generated/icons/UsbIcon.d.ts.map +1 -1
  295. package/dist/design-system/Icon/__generated/icons/UserBadgeIcon.d.ts.map +1 -1
  296. package/dist/design-system/Icon/__generated/icons/UserCircleIcon.d.ts.map +1 -1
  297. package/dist/design-system/Icon/__generated/icons/UserGroupIcon.d.ts.map +1 -1
  298. package/dist/design-system/Icon/__generated/icons/UserIcon.d.ts.map +1 -1
  299. package/dist/design-system/Icon/__generated/icons/VariableIcon.d.ts +4 -0
  300. package/dist/design-system/Icon/__generated/icons/VariableIcon.d.ts.map +1 -0
  301. package/dist/design-system/Icon/__generated/icons/VisibleIcon.d.ts.map +1 -1
  302. package/dist/design-system/Icon/__generated/icons/VisibleOffIcon.d.ts.map +1 -1
  303. package/dist/design-system/Icon/__generated/icons/WarningFillIcon.d.ts.map +1 -1
  304. package/dist/design-system/Icon/__generated/icons/WarningIcon.d.ts.map +1 -1
  305. package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.d.ts +4 -0
  306. package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.d.ts.map +1 -0
  307. package/dist/design-system/Icon/__generated/icons/XCircleFillIcon.d.ts.map +1 -1
  308. package/dist/design-system/Icon/__generated/icons/XCircleIcon.d.ts.map +1 -1
  309. package/dist/design-system/Icon/__generated/icons/ZoomInIcon.d.ts.map +1 -1
  310. package/dist/design-system/Icon/__generated/icons/ZoomOutIcon.d.ts.map +1 -1
  311. package/dist/design-system/Icon/__generated/icons/index.d.ts +53 -35
  312. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  313. package/dist/design-system/Input/Input.d.ts +1 -0
  314. package/dist/design-system/Input/Input.d.ts.map +1 -1
  315. package/dist/design-system/Input/Input.test.d.ts +2 -0
  316. package/dist/design-system/Input/Input.test.d.ts.map +1 -0
  317. package/dist/design-system/LegacyNotification/LegacyNotification.d.ts +42 -0
  318. package/dist/design-system/LegacyNotification/LegacyNotification.d.ts.map +1 -0
  319. package/dist/design-system/LegacyNotification/LegacyNotification.test.d.ts +2 -0
  320. package/dist/design-system/LegacyNotification/LegacyNotification.test.d.ts.map +1 -0
  321. package/dist/design-system/LegacyNotification/index.d.ts +2 -0
  322. package/dist/design-system/LegacyNotification/index.d.ts.map +1 -0
  323. package/dist/design-system/LegacyPopover/LegacyPopover.d.ts +16 -0
  324. package/dist/design-system/LegacyPopover/LegacyPopover.d.ts.map +1 -0
  325. package/dist/design-system/LegacyPopover/index.d.ts +2 -0
  326. package/dist/design-system/LegacyPopover/index.d.ts.map +1 -0
  327. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  328. package/dist/design-system/Notification/Notification.d.ts +20 -30
  329. package/dist/design-system/Notification/Notification.d.ts.map +1 -1
  330. package/dist/design-system/Notification/index.d.ts +1 -1
  331. package/dist/design-system/Notification/index.d.ts.map +1 -1
  332. package/dist/design-system/Pagination/index.d.ts +2 -3
  333. package/dist/design-system/Pagination/index.d.ts.map +1 -1
  334. package/dist/design-system/Popover/Popover.d.ts +9 -5
  335. package/dist/design-system/Popover/Popover.d.ts.map +1 -1
  336. package/dist/design-system/Popover/Popover.test.d.ts +2 -0
  337. package/dist/design-system/Popover/Popover.test.d.ts.map +1 -0
  338. package/dist/design-system/Popover/index.d.ts +1 -1
  339. package/dist/design-system/Popover/index.d.ts.map +1 -1
  340. package/dist/design-system/Radio/Radio.d.ts.map +1 -1
  341. package/dist/design-system/SegmentedControl/SegmentedControl.d.ts +3 -1
  342. package/dist/design-system/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  343. package/dist/design-system/Select/Select.d.ts +25 -6
  344. package/dist/design-system/Select/Select.d.ts.map +1 -1
  345. package/dist/design-system/Skeleton/Skeleton.d.ts +1 -0
  346. package/dist/design-system/Skeleton/Skeleton.d.ts.map +1 -1
  347. package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts +1 -1
  348. package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts.map +1 -1
  349. package/dist/design-system/SplitButton/SplitButton.d.ts.map +1 -1
  350. package/dist/design-system/TableUI/Table.d.ts +31 -0
  351. package/dist/design-system/TableUI/Table.d.ts.map +1 -0
  352. package/dist/design-system/TableUI/TableCell.d.ts +20 -0
  353. package/dist/design-system/TableUI/TableCell.d.ts.map +1 -0
  354. package/dist/design-system/TableUI/TableFilterInput.d.ts +11 -0
  355. package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -0
  356. package/dist/design-system/TableUI/TableFilterLayout.d.ts +15 -0
  357. package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -0
  358. package/dist/design-system/TableUI/TableHeader.d.ts +32 -0
  359. package/dist/design-system/TableUI/TableHeader.d.ts.map +1 -0
  360. package/dist/design-system/TableUI/TableRow.d.ts +20 -0
  361. package/dist/design-system/TableUI/TableRow.d.ts.map +1 -0
  362. package/dist/design-system/TableUI/TableRowAction.d.ts +15 -0
  363. package/dist/design-system/TableUI/TableRowAction.d.ts.map +1 -0
  364. package/dist/design-system/TableUI/TableRowSelectCell.d.ts +17 -0
  365. package/dist/design-system/TableUI/TableRowSelectCell.d.ts.map +1 -0
  366. package/dist/design-system/TableUI/TableSkeleton.d.ts +27 -0
  367. package/dist/design-system/TableUI/TableSkeleton.d.ts.map +1 -0
  368. package/dist/design-system/TableUI/index.d.ts +9 -123
  369. package/dist/design-system/TableUI/index.d.ts.map +1 -1
  370. package/dist/design-system/TableUI/tableStyles.d.ts +22 -0
  371. package/dist/design-system/TableUI/tableStyles.d.ts.map +1 -0
  372. package/dist/design-system/Tabs/index.d.ts.map +1 -1
  373. package/dist/design-system/Tag/index.d.ts.map +1 -1
  374. package/dist/design-system/Typography/Link.d.ts.map +1 -1
  375. package/dist/design-system/Typography/Text.d.ts.map +1 -1
  376. package/dist/design-system/index.d.ts +3 -2
  377. package/dist/design-system/index.d.ts.map +1 -1
  378. package/dist/design-system/utils/accessibility.d.ts +9 -0
  379. package/dist/design-system/utils/accessibility.d.ts.map +1 -0
  380. package/dist/design-system/utils/accessibility.test.d.ts +2 -0
  381. package/dist/design-system/utils/accessibility.test.d.ts.map +1 -0
  382. package/dist/design-system/utils/index.d.ts +2 -0
  383. package/dist/design-system/utils/index.d.ts.map +1 -0
  384. package/dist/design-system/utils/safex.d.ts +15 -0
  385. package/dist/design-system/utils/safex.d.ts.map +1 -0
  386. package/dist/design-system/utils/safex.test.d.ts +2 -0
  387. package/dist/design-system/utils/safex.test.d.ts.map +1 -0
  388. package/dist/development/ChatUI/ChatInput.d.ts +11 -0
  389. package/dist/development/ChatUI/ChatInput.d.ts.map +1 -0
  390. package/dist/development/ChatUI/CodeSnippet.d.ts +9 -0
  391. package/dist/development/ChatUI/CodeSnippet.d.ts.map +1 -0
  392. package/dist/development/ChatUI/Feedback.d.ts +6 -0
  393. package/dist/development/ChatUI/Feedback.d.ts.map +1 -0
  394. package/dist/development/ChatUI/Message.d.ts +8 -0
  395. package/dist/development/ChatUI/Message.d.ts.map +1 -0
  396. package/dist/development/ChatUI/MessageBody.d.ts +7 -0
  397. package/dist/development/ChatUI/MessageBody.d.ts.map +1 -0
  398. package/dist/development/ChatUI/MessageHeader.d.ts +10 -0
  399. package/dist/development/ChatUI/MessageHeader.d.ts.map +1 -0
  400. package/dist/development/ChatUI/MessagePagination.d.ts +9 -0
  401. package/dist/development/ChatUI/MessagePagination.d.ts.map +1 -0
  402. package/dist/development/ChatUI/index.d.ts +37 -0
  403. package/dist/development/ChatUI/index.d.ts.map +1 -0
  404. package/dist/development/SelectV2/Select.d.ts +7 -0
  405. package/dist/development/SelectV2/Select.d.ts.map +1 -0
  406. package/dist/development/SelectV2/SelectContent.d.ts +6 -0
  407. package/dist/development/SelectV2/SelectContent.d.ts.map +1 -0
  408. package/dist/development/SelectV2/SelectOption.d.ts +6 -0
  409. package/dist/development/SelectV2/SelectOption.d.ts.map +1 -0
  410. package/dist/development/SelectV2/SelectOptionGroup.d.ts +7 -0
  411. package/dist/development/SelectV2/SelectOptionGroup.d.ts.map +1 -0
  412. package/dist/development/SelectV2/SelectTrigger.d.ts +6 -0
  413. package/dist/development/SelectV2/SelectTrigger.d.ts.map +1 -0
  414. package/dist/development/SelectV2/hooks/useSelectContext.d.ts +2 -0
  415. package/dist/development/SelectV2/hooks/useSelectContext.d.ts.map +1 -0
  416. package/dist/development/SelectV2/index.d.ts +6 -0
  417. package/dist/development/SelectV2/index.d.ts.map +1 -0
  418. package/dist/development/SelectV2/providers/SelectContext.d.ts +11 -0
  419. package/dist/development/SelectV2/providers/SelectContext.d.ts.map +1 -0
  420. package/dist/development/index.d.ts +1 -0
  421. package/dist/development/index.d.ts.map +1 -1
  422. package/dist/development.js +452 -6
  423. package/dist/development.js.map +1 -1
  424. package/dist/dubois-colors.less +202 -0
  425. package/dist/flags.d.ts +0 -1
  426. package/dist/flags.d.ts.map +1 -1
  427. package/dist/index-mfe.css +1 -1
  428. package/dist/index.css +1 -1
  429. package/dist/index.js +3845 -7649
  430. package/dist/index.js.map +1 -1
  431. package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
  432. package/dist/test-utils/enzyme.js +5 -6
  433. package/dist/test-utils/enzyme.js.map +1 -1
  434. package/dist/test-utils/rtl.js.map +1 -1
  435. package/dist/theme/breakpoints.d.ts +14 -0
  436. package/dist/theme/breakpoints.d.ts.map +1 -0
  437. package/dist/theme/generalVariables.d.ts +0 -1
  438. package/dist/theme/generalVariables.d.ts.map +1 -1
  439. package/dist/theme/index.d.ts +2 -0
  440. package/dist/theme/index.d.ts.map +1 -1
  441. package/dist/tsconfig.build.tsbuildinfo +1 -0
  442. package/dist/useDesignSystemTheme-3d2c1acb.js.map +1 -1
  443. package/dist/useDesignSystemTheme-c859571c.js +468 -0
  444. package/dist/useDesignSystemTheme-c859571c.js.map +1 -0
  445. package/dist/useDesignSystemTheme-c867a35d.js +470 -0
  446. package/dist/useDesignSystemTheme-c867a35d.js.map +1 -0
  447. package/dist/useDesignSystemTheme-ef39204e.js +468 -0
  448. package/dist/useDesignSystemTheme-ef39204e.js.map +1 -0
  449. package/package.json +21 -21
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/test-utils/enzyme/utils.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,UAAU,YAAY;IACpB,iFAAiF;IACjF,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC9B,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,YAAY,CAAC,EAAE,YAAY,kEAS5B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACnC,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC9B,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,EAAE,IAAY,EAAE,GAAE,YAAiB,oEA0BpC;AAkBD,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,KAAK,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAmED;;;;;;;GAOG;AACH,wBAAsB,OA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AAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAKjF"}
@@ -24,7 +24,7 @@ function findAllByText(wrapper, text) {
24
24
  trim = false
25
25
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
26
26
  const textNodes = wrapper.findWhere(n => {
27
- if (n.type() !== undefined) {
27
+ if (typeof n.type() !== 'string' || n.getDOMNode().children.length !== 0) {
28
28
  return false;
29
29
  }
30
30
  let nodeText = n.text();
@@ -34,14 +34,13 @@ function findAllByText(wrapper, text) {
34
34
  return typeof text === 'string' ? nodeText === text : text.test(nodeText);
35
35
  });
36
36
  const newWrappers = textNodes.map(n => {
37
- const textNodeParent = n.parents().first();
38
- if (textNodeParent.name() === 'FormattedMessage') {
37
+ if (n.name() === 'FormattedMessage') {
39
38
  // Try not to return FormattedMessage since it breaks `simulate` due to a bug in `enzyme-adapter-react-17`
40
39
  // Similar to https://github.com/wojtekmaj/enzyme-adapter-react-17/issues/45
41
- const formattedMessageParents = textNodeParent.parents();
42
- return formattedMessageParents.length > 0 ? formattedMessageParents.first() : textNodeParent;
40
+ const formattedMessageParents = n.parents();
41
+ return formattedMessageParents.length > 0 ? formattedMessageParents.first() : n;
43
42
  } else {
44
- return textNodeParent;
43
+ return n;
45
44
  }
46
45
  });
47
46
  return newWrappers;
@@ -1 +1 @@
1
- {"version":3,"file":"enzyme.js","sources":["../../src/test-utils/enzyme/utils.ts","../../src/test-utils/enzyme/selectEvent.ts","../../src/test-utils/enzyme/table.ts","../../src/test-utils/enzyme/index.ts"],"sourcesContent":["// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\nimport { act } from 'react-dom/test-utils';\n\ninterface QueryOptions {\n /** Whether to trim the whitespace from DOM text using `String.prototype.trim` */\n trim?: boolean;\n}\n\n/**\n * Finds a single element that contains the specified text in the wrapper. If\n * there are 0 or more than 1 element that contains the specified text, an error\n * is thrown. Returns the element in an enzyme wrapper.\n */\nexport function findByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n queryOptions?: QueryOptions\n) {\n const newWrappers = findAllByText<P, S, C>(wrapper, text, queryOptions);\n if (newWrappers.length !== 1) {\n throw new Error(\n `Expected to find 1 node but found ${newWrappers.length} nodes for text \"${text}\".\\n${wrapper.debug()}`\n );\n }\n return newWrappers[0];\n}\n\n/**\n * Finds all elements that contain the specified text. To avoid duplicate results,\n * only the parents of text nodes are returned.\n */\nexport function findAllByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n { trim = false }: QueryOptions = {}\n) {\n const textNodes = wrapper.findWhere((n) => {\n if (n.type() !== undefined) {\n return false;\n }\n\n let nodeText = n.text();\n if (trim) {\n nodeText = nodeText.trim();\n }\n\n return typeof text === 'string' ? nodeText === text : text.test(nodeText);\n });\n const newWrappers = textNodes.map((n) => {\n const textNodeParent = n.parents().first();\n if (textNodeParent.name() === 'FormattedMessage') {\n // Try not to return FormattedMessage since it breaks `simulate` due to a bug in `enzyme-adapter-react-17`\n // Similar to https://github.com/wojtekmaj/enzyme-adapter-react-17/issues/45\n const formattedMessageParents = textNodeParent.parents();\n return formattedMessageParents.length > 0 ? formattedMessageParents.first() : textNodeParent;\n } else {\n return textNodeParent;\n }\n });\n return newWrappers;\n}\n\n// We need to keep ref to original setTimeout to avoid SinonJS fake timers if enabled\nconst originalSetTimeout = window.setTimeout;\n\n/**\n * This is so the stack trace the developer sees is one that's\n * closer to their code (because async stack traces are hard to follow).\n *\n * The code is taken from\n * https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44632fba\n * 1579cb44f9f175be1ec46087/src/wait-for.js#L15-L19\n */\nfunction copyStackTrace(target: Error, source: Error) {\n // eslint-disable-next-line no-param-reassign\n target.stack = source.stack!.replace(source.message, target.message);\n}\n\ninterface WaitForOptions {\n interval?: number;\n stackTraceError?: Error;\n timeout?: number;\n}\n\n/**\n * Run an expectation until it succeeds or reaches the timeout. The timeout of 1500ms\n * is chosen to be under the default Karma test timeout of 2000ms. This function will\n * not work properly if fake timers are being used (since it expects the real setTimeout).\n *\n * The code is taken from\n * https://github.com/TheBrainFamily/wait-for-expect/blob/master/src/index.ts,\n * with slight modifications to support Karma (instead of Jest).\n *\n *\n * Example\n * The <App /> component does not render the header synchronously.\n * Therefore, we cannot check that the wrapper's text is equal to the string\n * immediately--this assertion will fail and cause the test to fail. To\n * remediate this issue, we can run the expectation until it succeeds:\n *\n * function App() {\n * const [value, setValue] = useState(null);\n * useEffect(() => {\n * const timeoutId = setTimeout(() => setValue(\"some value\"), 100);\n * return () => clearTimeout(timeoutId);\n * }, []);\n * return value === null ? null : <h1>The value is: {value}</h1>;\n * }\n *\n * it('renders value', async () => {\n * const wrapper = mount(<App />);\n * await waitFor(() =>\n * wrapper.update();\n * expect(wrapper.text()).to.equal(\"The value is: some value\")\n * );\n * });\n */\nfunction _waitFor<T>(\n f: () => T | Promise<T>,\n { interval = 50, stackTraceError, timeout = 1500 }: WaitForOptions = {}\n): Promise<T> {\n const maxTries = Math.ceil(timeout / interval);\n let tries = 0;\n return new Promise((resolve, reject) => {\n const rejectOrRerun = (error: Error) => {\n if (tries > maxTries) {\n if (stackTraceError !== undefined) {\n copyStackTrace(error, stackTraceError);\n }\n reject(error);\n return;\n }\n originalSetTimeout(runExpectation, interval);\n };\n\n function runExpectation() {\n tries += 1;\n try {\n Promise.resolve(f()).then(resolve).catch(rejectOrRerun);\n } catch (error) {\n // @ts-expect-error ts-migrate(2571) Object is of type 'unknown'\n rejectOrRerun(error);\n }\n }\n\n originalSetTimeout(runExpectation, 0);\n });\n}\n\n/**\n * Wraps `_waitFor` in React's `act` testing utility. Used when the React component\n * updates during the execution of the callback (either because of indirect effects\n * being run or because of direct requests to update the component, like wrapper.update).\n * Prevents updates related to the callback from being affected by other updates\n * and more closely mimics how React runs in the browser. See\n * https://reactjs.org/docs/test-utils.html#act for more info on `act`.\n */\nexport async function waitFor<T>(callback: () => T | Promise<T>, options?: WaitForOptions): Promise<T> {\n let result: T | Promise<T>;\n // See https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44\n // 632fba1579cb44f9f175be1ec46087/src/wait-for.js#L182-L184\n const stackTraceError = new Error('STACK_TRACE_ERROR');\n\n await act(async () => {\n result = await _waitFor(callback, { stackTraceError, ...options });\n });\n\n // @ts-expect-error: either `waitFor` will throw or `result` will be assigned\n return result;\n}\n\n/**\n * Finds all elements (that are rendered in the DOM) in `wrapper` that have an explicit\n * role of `role` specified. This is similar to `getAllByRole` from @testing-library/react\n * but is much simpler because of the shortcomings of Enzyme's API.\n */\nexport function findAllByRole(wrapper: ReactWrapper, role: string): ReactWrapper[] {\n return wrapper\n .find(`[role=\"${role}\"]`)\n .hostNodes()\n .map((n) => n);\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport { selectClasses } from '../common';\nimport { findByText, waitFor } from './utils';\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport function clearAll(getSelect: () => ReactWrapper): void {\n getSelect().find(`.${selectClasses.clear}`).hostNodes().simulate('mousedown');\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu(getSelect: () => ReactWrapper): Promise<void> {\n if (!getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already closed\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not close\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText(getSelect: () => ReactWrapper): string {\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return getSelect().find(`.${selectClasses.selector}`).text().trim();\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect(getSelect: () => ReactWrapper, options: string[]): Promise<void> {\n await openMenu(getSelect);\n options.forEach((option) => {\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n });\n // Close the menu to indicate that selection has finished\n await closeMenu(getSelect);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect(getSelect: () => ReactWrapper, option: string): Promise<void> {\n await openMenu(getSelect);\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu(getSelect: () => ReactWrapper): Promise<void> {\n if (getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already open\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (!select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not open\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions(getSelect: () => ReactWrapper): Promise<string[]> {\n await openMenu(getSelect);\n const options = getSelect()\n .find(`.${selectClasses.list}`)\n .find(`.${selectClasses.option}`)\n .map((option) => option.text());\n await closeMenu(getSelect);\n return options;\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport type { GetTableRowByCellTextOptions, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\nimport { findAllByRole, findByText } from './utils';\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText(\n tableWrapper: ReactWrapper,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {}\n): ReactWrapper {\n let columnHeaderIndex: number;\n if (columnHeaderName === undefined) {\n columnHeaderIndex = 0;\n } else {\n const columnHeaders = findAllByRole(tableWrapper, 'columnheader');\n columnHeaderIndex = columnHeaders.findIndex((n) => {\n try {\n findByText(n, columnHeaderName);\n return true;\n } catch {\n return false;\n }\n });\n if (columnHeaderIndex === -1) {\n throw new Error(`Unable to find a column with name \"${columnHeaderName}\"\\n${tableWrapper.debug()}`);\n }\n }\n\n const matchingRows = findAllByRole(tableWrapper, 'row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = findAllByRole(row, 'cell');\n const cell = cells[columnHeaderIndex];\n try {\n findByText(cell, cellText);\n return true;\n } catch {\n return false;\n }\n });\n\n if (matchingRows.length === 0) {\n throw new Error(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`\n );\n }\n\n if (matchingRows.length > 1) {\n throw new Error(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`\n );\n }\n\n return matchingRows[0].hostNodes();\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable(tableWrapper: ReactWrapper): string {\n const { bodyRows, headerRow } = getTableRows(tableWrapper);\n const columns = findAllByRole(headerRow, 'columnheader').map((column) => column.text());\n const rows = bodyRows.map((row) => findAllByRole(row, 'cell').map((cell) => cell.text()));\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableWrapper` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n */\nexport function getTableRows(tableWrapper: ReactWrapper): TableRows<ReactWrapper> {\n const [firstRow, ...restRows] = findAllByRole(tableWrapper, 'row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Open a dropdown menu by simulating a pointerDown event on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = (dropdownButton: ReactWrapper) => {\n dropdownButton.hostNodes().simulate('pointerDown', { button: 0, ctrlKey: false });\n};\n"],"names":["findByText","wrapper","text","queryOptions","newWrappers","findAllByText","length","Error","debug","trim","textNodes","findWhere","n","type","undefined","nodeText","test","map","textNodeParent","parents","first","name","formattedMessageParents","originalSetTimeout","window","setTimeout","copyStackTrace","target","source","stack","replace","message","_waitFor","f","interval","stackTraceError","timeout","maxTries","Math","ceil","tries","Promise","resolve","reject","rejectOrRerun","error","runExpectation","then","catch","waitFor","callback","options","result","act","findAllByRole","role","find","hostNodes","clearAll","getSelect","selectClasses","clear","simulate","closeMenu","open","exists","selector","select","getLabelText","multiSelect","openMenu","forEach","option","list","singleSelect","getAllOptions","getTableRowByCellText","tableWrapper","cellText","columnHeaderName","columnHeaderIndex","columnHeaders","findIndex","matchingRows","slice","filter","row","cells","cell","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","column","rows","createMarkdownTable","firstRow","restRows","openDropdownMenu","dropdownButton","button","ctrlKey"],"mappings":";;;AAAA;AASA;AACA;AACA;AACA;AACA;AACO,SAASA,UAAU,CACxBC,OAA8B,EAC9BC,IAAqB,EACrBC,YAA2B,EAC3B;EACA,MAAMC,WAAW,GAAGC,aAAa,CAAUJ,OAAO,EAAEC,IAAI,EAAEC,YAAY,CAAC;EACvE,IAAIC,WAAW,CAACE,MAAM,KAAK,CAAC,EAAE;IAC5B,MAAM,IAAIC,KAAK,CACZ,qCAAoCH,WAAW,CAACE,MAAO,oBAAmBJ,IAAK,OAAMD,OAAO,CAACO,KAAK,EAAG,EAAC,CACxG;;EAEH,OAAOJ,WAAW,CAAC,CAAC,CAAC;AACvB;;AAEA;AACA;AACA;AACA;AACO,SAASC,aAAa,CAC3BJ,OAA8B,EAC9BC,IAAqB,EAErB;EAAA,IADA;IAAEO,IAAI,GAAG;GAAqB,uEAAG,EAAE;EAEnC,MAAMC,SAAS,GAAGT,OAAO,CAACU,SAAS,CAAEC,CAAC,IAAK;IACzC,IAAIA,CAAC,CAACC,IAAI,EAAE,KAAKC,SAAS,EAAE;MAC1B,OAAO,KAAK;;IAGd,IAAIC,QAAQ,GAAGH,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MAAM,CAACoB,QAAQ,EAAE,GAAGC,QAAQ,CAAC,GAAG5C,aAAa,CAACuB,YAAY,EAAE,KAAK,CAAC;EAClE,OAAO;IACLa,QAAQ,EAAEQ,QAAQ;IAClBP,SAAS,EAAEM;GACZ;AACH;;AC/HA;;AAOA;AACA;AACA;AACA;AACA;MACaE,gBAAgB,GAAIC,cAA4B,IAAK;EAChEA,cAAc,CAAC3C,SAAS,EAAE,CAACK,QAAQ,CAAC,aAAa,EAAE;IAAEuC,MAAM,EAAE,CAAC;IAAEC,OAAO,EAAE;GAAO,CAAC;AACnF;;;;"}
1
+ {"version":3,"file":"enzyme.js","sources":["../../src/test-utils/enzyme/utils.ts","../../src/test-utils/enzyme/selectEvent.ts","../../src/test-utils/enzyme/table.ts","../../src/test-utils/enzyme/index.ts"],"sourcesContent":["// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\nimport { act } from 'react-dom/test-utils';\n\ninterface QueryOptions {\n /** Whether to trim the whitespace from DOM text using `String.prototype.trim` */\n trim?: boolean;\n}\n\n/**\n * Finds a single element that contains the specified text in the wrapper. If\n * there are 0 or more than 1 element that contains the specified text, an error\n * is thrown. Returns the element in an enzyme wrapper.\n */\nexport function findByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n queryOptions?: QueryOptions\n) {\n const newWrappers = findAllByText<P, S, C>(wrapper, text, queryOptions);\n if (newWrappers.length !== 1) {\n throw new Error(\n `Expected to find 1 node but found ${newWrappers.length} nodes for text \"${text}\".\\n${wrapper.debug()}`\n );\n }\n return newWrappers[0];\n}\n\n/**\n * Finds all elements that contain the specified text. To avoid duplicate results,\n * only the parents of text nodes are returned.\n */\nexport function findAllByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n { trim = false }: QueryOptions = {}\n) {\n const textNodes = wrapper.findWhere((n) => {\n if (typeof n.type() !== 'string' || n.getDOMNode().children.length !== 0) {\n return false;\n }\n\n let nodeText = n.text();\n if (trim) {\n nodeText = nodeText.trim();\n }\n\n return typeof text === 'string' ? nodeText === text : text.test(nodeText);\n });\n const newWrappers = textNodes.map((n) => {\n if (n.name() === 'FormattedMessage') {\n // Try not to return FormattedMessage since it breaks `simulate` due to a bug in `enzyme-adapter-react-17`\n // Similar to https://github.com/wojtekmaj/enzyme-adapter-react-17/issues/45\n const formattedMessageParents = n.parents();\n return formattedMessageParents.length > 0 ? formattedMessageParents.first() : n;\n } else {\n return n;\n }\n });\n return newWrappers;\n}\n\n// We need to keep ref to original setTimeout to avoid SinonJS fake timers if enabled\nconst originalSetTimeout = window.setTimeout;\n\n/**\n * This is so the stack trace the developer sees is one that's\n * closer to their code (because async stack traces are hard to follow).\n *\n * The code is taken from\n * https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44632fba\n * 1579cb44f9f175be1ec46087/src/wait-for.js#L15-L19\n */\nfunction copyStackTrace(target: Error, source: Error) {\n // eslint-disable-next-line no-param-reassign\n target.stack = source.stack!.replace(source.message, target.message);\n}\n\ninterface WaitForOptions {\n interval?: number;\n stackTraceError?: Error;\n timeout?: number;\n}\n\n/**\n * Run an expectation until it succeeds or reaches the timeout. The timeout of 1500ms\n * is chosen to be under the default Karma test timeout of 2000ms. This function will\n * not work properly if fake timers are being used (since it expects the real setTimeout).\n *\n * The code is taken from\n * https://github.com/TheBrainFamily/wait-for-expect/blob/master/src/index.ts,\n * with slight modifications to support Karma (instead of Jest).\n *\n *\n * Example\n * The <App /> component does not render the header synchronously.\n * Therefore, we cannot check that the wrapper's text is equal to the string\n * immediately--this assertion will fail and cause the test to fail. To\n * remediate this issue, we can run the expectation until it succeeds:\n *\n * function App() {\n * const [value, setValue] = useState(null);\n * useEffect(() => {\n * const timeoutId = setTimeout(() => setValue(\"some value\"), 100);\n * return () => clearTimeout(timeoutId);\n * }, []);\n * return value === null ? null : <h1>The value is: {value}</h1>;\n * }\n *\n * it('renders value', async () => {\n * const wrapper = mount(<App />);\n * await waitFor(() =>\n * wrapper.update();\n * expect(wrapper.text()).to.equal(\"The value is: some value\")\n * );\n * });\n */\nfunction _waitFor<T>(\n f: () => T | Promise<T>,\n { interval = 50, stackTraceError, timeout = 1500 }: WaitForOptions = {}\n): Promise<T> {\n const maxTries = Math.ceil(timeout / interval);\n let tries = 0;\n return new Promise((resolve, reject) => {\n const rejectOrRerun = (error: Error) => {\n if (tries > maxTries) {\n if (stackTraceError !== undefined) {\n copyStackTrace(error, stackTraceError);\n }\n reject(error);\n return;\n }\n originalSetTimeout(runExpectation, interval);\n };\n\n function runExpectation() {\n tries += 1;\n try {\n Promise.resolve(f()).then(resolve).catch(rejectOrRerun);\n } catch (error) {\n // @ts-expect-error ts-migrate(2571) Object is of type 'unknown'\n rejectOrRerun(error);\n }\n }\n\n originalSetTimeout(runExpectation, 0);\n });\n}\n\n/**\n * Wraps `_waitFor` in React's `act` testing utility. Used when the React component\n * updates during the execution of the callback (either because of indirect effects\n * being run or because of direct requests to update the component, like wrapper.update).\n * Prevents updates related to the callback from being affected by other updates\n * and more closely mimics how React runs in the browser. See\n * https://reactjs.org/docs/test-utils.html#act for more info on `act`.\n */\nexport async function waitFor<T>(callback: () => T | Promise<T>, options?: WaitForOptions): Promise<T> {\n let result: T | Promise<T>;\n // See https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44\n // 632fba1579cb44f9f175be1ec46087/src/wait-for.js#L182-L184\n const stackTraceError = new Error('STACK_TRACE_ERROR');\n\n await act(async () => {\n result = await _waitFor(callback, { stackTraceError, ...options });\n });\n\n // @ts-expect-error: either `waitFor` will throw or `result` will be assigned\n return result;\n}\n\n/**\n * Finds all elements (that are rendered in the DOM) in `wrapper` that have an explicit\n * role of `role` specified. This is similar to `getAllByRole` from @testing-library/react\n * but is much simpler because of the shortcomings of Enzyme's API.\n */\nexport function findAllByRole(wrapper: ReactWrapper, role: string): ReactWrapper[] {\n return wrapper\n .find(`[role=\"${role}\"]`)\n .hostNodes()\n .map((n) => n);\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport { selectClasses } from '../common';\nimport { findByText, waitFor } from './utils';\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport function clearAll(getSelect: () => ReactWrapper): void {\n getSelect().find(`.${selectClasses.clear}`).hostNodes().simulate('mousedown');\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu(getSelect: () => ReactWrapper): Promise<void> {\n if (!getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already closed\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not close\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText(getSelect: () => ReactWrapper): string {\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return getSelect().find(`.${selectClasses.selector}`).text().trim();\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect(getSelect: () => ReactWrapper, options: string[]): Promise<void> {\n await openMenu(getSelect);\n options.forEach((option) => {\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n });\n // Close the menu to indicate that selection has finished\n await closeMenu(getSelect);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect(getSelect: () => ReactWrapper, option: string): Promise<void> {\n await openMenu(getSelect);\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu(getSelect: () => ReactWrapper): Promise<void> {\n if (getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already open\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (!select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not open\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions(getSelect: () => ReactWrapper): Promise<string[]> {\n await openMenu(getSelect);\n const options = getSelect()\n .find(`.${selectClasses.list}`)\n .find(`.${selectClasses.option}`)\n .map((option) => option.text());\n await closeMenu(getSelect);\n return options;\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport type { GetTableRowByCellTextOptions, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\nimport { findAllByRole, findByText } from './utils';\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText(\n tableWrapper: ReactWrapper,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {}\n): ReactWrapper {\n let columnHeaderIndex: number;\n if (columnHeaderName === undefined) {\n columnHeaderIndex = 0;\n } else {\n const columnHeaders = findAllByRole(tableWrapper, 'columnheader');\n columnHeaderIndex = columnHeaders.findIndex((n) => {\n try {\n findByText(n, columnHeaderName);\n return true;\n } catch {\n return false;\n }\n });\n if (columnHeaderIndex === -1) {\n throw new Error(`Unable to find a column with name \"${columnHeaderName}\"\\n${tableWrapper.debug()}`);\n }\n }\n\n const matchingRows = findAllByRole(tableWrapper, 'row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = findAllByRole(row, 'cell');\n const cell = cells[columnHeaderIndex];\n try {\n findByText(cell, cellText);\n return true;\n } catch {\n return false;\n }\n });\n\n if (matchingRows.length === 0) {\n throw new Error(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`\n );\n }\n\n if (matchingRows.length > 1) {\n throw new Error(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`\n );\n }\n\n return matchingRows[0].hostNodes();\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable(tableWrapper: ReactWrapper): string {\n const { bodyRows, headerRow } = getTableRows(tableWrapper);\n const columns = findAllByRole(headerRow, 'columnheader').map((column) => column.text());\n const rows = bodyRows.map((row) => findAllByRole(row, 'cell').map((cell) => cell.text()));\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableWrapper` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n */\nexport function getTableRows(tableWrapper: ReactWrapper): TableRows<ReactWrapper> {\n const [firstRow, ...restRows] = findAllByRole(tableWrapper, 'row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Open a dropdown menu by simulating a pointerDown event on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = (dropdownButton: ReactWrapper) => {\n dropdownButton.hostNodes().simulate('pointerDown', { button: 0, ctrlKey: false });\n};\n"],"names":["findByText","wrapper","text","queryOptions","newWrappers","findAllByText","length","Error","debug","trim","arguments","undefined","textNodes","findWhere","n","type","getDOMNode","children","nodeText","test","map","name","formattedMessageParents","parents","first","originalSetTimeout","window","setTimeout","copyStackTrace","target","source","stack","replace","message","_waitFor","f","interval","stackTraceError","timeout","maxTries","Math","ceil","tries","Promise","resolve","reject","rejectOrRerun","error","runExpectation","then","catch","waitFor","callback","options","result","act","findAllByRole","role","find","hostNodes","clearAll","getSelect","selectClasses","clear","simulate","closeMenu","open","exists","selector","select","getLabelText","multiSelect","openMenu","forEach","option","list","singleSelect","getAllOptions","getTableRowByCellText","tableWrapper","cellText","columnHeaderName","columnHeaderIndex","columnHeaders","findIndex","matchingRows","slice","filter","row","cells","cell","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","column","rows","createMarkdownTable","firstRow","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CAACK,QAAQ,CAAC,aAAa,EAAE;IAAEuC,MAAM,EAAE,CAAC;IAAEC,OAAO,EAAE;GAAO,CAAC;AACnF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"rtl.js","sources":["../../src/test-utils/rtl/selectEvent.ts","../../src/test-utils/rtl/table.ts","../../src/test-utils/rtl/index.ts"],"sourcesContent":["import { waitFor, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { selectClasses } from '../common';\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu(select: HTMLElement): Promise<void> {\n if (select.classList.contains(selectClasses.open)) {\n throw new Error(`Select is already open\\n${select.innerHTML}`);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw new Error(`Selector not found\\n${select.innerHTML}`);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (!select.classList.contains(selectClasses.open)) {\n throw new Error(`Select did not open\\n${select.innerHTML}`);\n }\n });\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu(select: HTMLElement): Promise<void> {\n if (!select.classList.contains(selectClasses.open)) {\n throw new Error(`Select is already closed\\n${select.innerHTML}`);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw new Error(`Selector not found\\n${select.innerHTML}`);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (select.classList.contains(selectClasses.open)) {\n throw new Error(`Select did not close\\n${select.innerHTML}`);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText(select: HTMLElement): string {\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw new Error(`Selector not found\\n${select.innerHTML}`);\n }\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return selector.textContent?.trim() ?? '';\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect(select: HTMLElement, options: string[]): Promise<void> {\n await openMenu(select);\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const optionItem = screen.getByTitle(option);\n await userEvent.click(optionItem, { pointerEventsCheck: 0 });\n }\n // Close the menu to indicate that selection has finished\n await closeMenu(select);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect(select: HTMLElement, option: string): Promise<void> {\n await openMenu(select);\n const optionElem = screen.getByTitle(option);\n await userEvent.click(optionElem, { pointerEventsCheck: 0 });\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport async function clearAll(select: HTMLElement): Promise<void> {\n const clearBtn = select.querySelector(`.${selectClasses.clear}`);\n if (!clearBtn) {\n throw new Error(`Select not clearable\\n${select.innerHTML}`);\n }\n await userEvent.click(clearBtn);\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions(select: HTMLElement): Promise<string[]> {\n await openMenu(select);\n const optionsList = select.ownerDocument.body.querySelector(`.${selectClasses.list}`);\n if (optionsList === null) {\n throw new Error(`Options list not found\\n${select.ownerDocument.body.innerHTML}`);\n }\n const options: string[] = [];\n optionsList.querySelectorAll(`.${selectClasses.option}`).forEach((option) => {\n if (option.textContent === null) {\n throw new Error(`Option had no text content\\n${option.innerHTML}`);\n }\n options.push(option.textContent);\n });\n await closeMenu(select);\n return options;\n}\n","import { queryHelpers, within } from '@testing-library/react';\n\nimport type { GetTableRowByCellTextOptions, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText(\n tableElement: HTMLElement,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {}\n): HTMLElement {\n let columnHeaderIndex: number;\n if (columnHeaderName === undefined) {\n columnHeaderIndex = 0;\n } else {\n const columnHeader = within(tableElement).getByRole('columnheader', { name: columnHeaderName });\n columnHeaderIndex = Array.from(columnHeader.parentElement?.children ?? []).indexOf(columnHeader);\n }\n\n const matchingRows = within(tableElement)\n .getAllByRole('row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = within(row).getAllByRole('cell');\n const cell = cells[columnHeaderIndex];\n const cellContainsText = within(cell).queryByText(cellText) !== null;\n return cellContainsText;\n });\n\n if (matchingRows.length === 0) {\n throw queryHelpers.getElementError(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement\n );\n }\n\n if (matchingRows.length > 1) {\n throw queryHelpers.getElementError(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement\n );\n }\n\n return matchingRows[0];\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable(tableElement: HTMLElement): string {\n const { bodyRows, headerRow } = getTableRows(tableElement);\n const columns = within(headerRow)\n .getAllByRole('columnheader')\n .map((column) => column.textContent ?? '');\n const rows = bodyRows.map((row) =>\n within(row)\n .getAllByRole('cell')\n .map((cell) => cell.textContent ?? '')\n );\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableElement` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n */\nexport function getTableRows(tableElement: HTMLElement): TableRows<HTMLElement> {\n const [firstRow, ...restRows] = within(tableElement).getAllByRole('row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n","import userEvent from '@testing-library/user-event';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Opens the dropdown menu by clicking on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = async (dropdownButton: HTMLElement) => {\n await userEvent.type(dropdownButton, '{arrowdown}');\n};\n"],"names":["openMenu","select","classList","contains","selectClasses","open","Error","innerHTML","selector","querySelector","userEvent","click","pointerEventsCheck","waitFor","closeMenu","getLabelText","textContent","trim","multiSelect","options","i","length","option","optionItem","screen","getByTitle","singleSelect","optionElem","clearAll","clearBtn","clear","getAllOptions","optionsList","ownerDocument","body","list","querySelectorAll","forEach","push","getTableRowByCellText","tableElement","cellText","columnHeaderName","columnHeaderIndex","undefined","columnHeader","within","getByRole","name","Array","from","parentElement","children","indexOf","matchingRows","getAllByRole","slice","filter","row","cells","cell","cellContainsText","queryByText","queryHelpers","getElementError","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","map","column","rows","createMarkdownTable","firstRow","restRows","openDropdownMenu","dropdownButton","type"],"mappings":";;;;AAKA;AACA;AACA;AACA;AACO,eAAeA,QAAQ,CAACC,MAAmB,EAAiB;EACjE,IAAIA,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,aAAa,CAACC,IAAI,CAAC,EAAE;IACjD,MAAM,IAAIC,KAAK,CAAE,2BAA0BL,MAAM,CAACM,SAAU,EAAC,CAAC;;EAEhE,MAAMC,QAAQ,GAAGP,MAAM,CAACQ,aAAa,CAAE,IAAGL,aAAa,CAACI,QAAS,EAAC,CAAC;EACnE,IAAI,CAACA,QAAQ,EAAE;IACb,MAAM,IAAIF,KAAK,CAAE,uBAAsBL,MAAM,CAACM,SAAU,EAAC,CAAC;;EAE5D,MAAMG,SAAS,CAACC,KAAK,CAACH,QAAQ,EAAE;IAAEI,kBAAkB,EAAE;GAAG,CAAC;EAC1D,MAAMC,OAAO,CAAC,MAAM;IAClB,IAAI,CAACZ,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,aAAa,CAACC,IAAI,CAAC,EAAE;MAClD,MAAM,IAAIC,KAAK,CAAE,wBAAuBL,MAAM,CAACM,SAAU,EAAC,CAAC;;GAE9D,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACO,eAAeO,SAAS,CAACb,MAAmB,EAAiB;EAClE,IAAI,CAACA,MAAM,CA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C9E,MAAM,CAACkC,QAAQ,EAAE,GAAGC,QAAQ,CAAC,GAAG7B,MAAM,CAACN,YAAY,CAAC,CAACe,YAAY,CAAC,KAAK,CAAC;EACxE,OAAO;IACLW,QAAQ,EAAES,QAAQ;IAClBR,SAAS,EAAEO;GACZ;AACH;;ACrHA;AACA;AACA;AACA;AACA;MACaE,gBAAgB,GAAG,MAAOC,cAA2B,IAAK;EACrE,MAAMnE,SAAS,CAACoE,IAAI,CAACD,cAAc,EAAE,aAAa,CAAC;AACrD;;;;"}
1
+ {"version":3,"file":"rtl.js","sources":["../../src/test-utils/rtl/selectEvent.ts","../../src/test-utils/rtl/table.ts","../../src/test-utils/rtl/index.ts"],"sourcesContent":["import { waitFor, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { selectClasses } from '../common';\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu(select: HTMLElement): Promise<void> {\n if (select.classList.contains(selectClasses.open)) {\n throw new Error(`Select is already open\\n${select.innerHTML}`);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw new Error(`Selector not found\\n${select.innerHTML}`);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (!select.classList.contains(selectClasses.open)) {\n throw new Error(`Select did not open\\n${select.innerHTML}`);\n }\n });\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu(select: HTMLElement): Promise<void> {\n if (!select.classList.contains(selectClasses.open)) {\n throw new Error(`Select is already closed\\n${select.innerHTML}`);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw new Error(`Selector not found\\n${select.innerHTML}`);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (select.classList.contains(selectClasses.open)) {\n throw new Error(`Select did not close\\n${select.innerHTML}`);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText(select: HTMLElement): string {\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw new Error(`Selector not found\\n${select.innerHTML}`);\n }\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return selector.textContent?.trim() ?? '';\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect(select: HTMLElement, options: string[]): Promise<void> {\n await openMenu(select);\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const optionItem = screen.getByTitle(option);\n await userEvent.click(optionItem, { pointerEventsCheck: 0 });\n }\n // Close the menu to indicate that selection has finished\n await closeMenu(select);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect(select: HTMLElement, option: string): Promise<void> {\n await openMenu(select);\n const optionElem = screen.getByTitle(option);\n await userEvent.click(optionElem, { pointerEventsCheck: 0 });\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport async function clearAll(select: HTMLElement): Promise<void> {\n const clearBtn = select.querySelector(`.${selectClasses.clear}`);\n if (!clearBtn) {\n throw new Error(`Select not clearable\\n${select.innerHTML}`);\n }\n await userEvent.click(clearBtn);\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions(select: HTMLElement): Promise<string[]> {\n await openMenu(select);\n const optionsList = select.ownerDocument.body.querySelector(`.${selectClasses.list}`);\n if (optionsList === null) {\n throw new Error(`Options list not found\\n${select.ownerDocument.body.innerHTML}`);\n }\n const options: string[] = [];\n optionsList.querySelectorAll(`.${selectClasses.option}`).forEach((option) => {\n if (option.textContent === null) {\n throw new Error(`Option had no text content\\n${option.innerHTML}`);\n }\n options.push(option.textContent);\n });\n await closeMenu(select);\n return options;\n}\n","import { queryHelpers, within } from '@testing-library/react';\n\nimport type { GetTableRowByCellTextOptions, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText(\n tableElement: HTMLElement,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {}\n): HTMLElement {\n let columnHeaderIndex: number;\n if (columnHeaderName === undefined) {\n columnHeaderIndex = 0;\n } else {\n const columnHeader = within(tableElement).getByRole('columnheader', { name: columnHeaderName });\n columnHeaderIndex = Array.from(columnHeader.parentElement?.children ?? []).indexOf(columnHeader);\n }\n\n const matchingRows = within(tableElement)\n .getAllByRole('row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = within(row).getAllByRole('cell');\n const cell = cells[columnHeaderIndex];\n const cellContainsText = within(cell).queryByText(cellText) !== null;\n return cellContainsText;\n });\n\n if (matchingRows.length === 0) {\n throw queryHelpers.getElementError(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement\n );\n }\n\n if (matchingRows.length > 1) {\n throw queryHelpers.getElementError(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement\n );\n }\n\n return matchingRows[0];\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable(tableElement: HTMLElement): string {\n const { bodyRows, headerRow } = getTableRows(tableElement);\n const columns = within(headerRow)\n .getAllByRole('columnheader')\n .map((column) => column.textContent ?? '');\n const rows = bodyRows.map((row) =>\n within(row)\n .getAllByRole('cell')\n .map((cell) => cell.textContent ?? '')\n );\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableElement` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n */\nexport function getTableRows(tableElement: HTMLElement): TableRows<HTMLElement> {\n const [firstRow, ...restRows] = within(tableElement).getAllByRole('row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n","import userEvent from '@testing-library/user-event';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Opens the dropdown menu by clicking on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = async (dropdownButton: HTMLElement) => {\n await userEvent.type(dropdownButton, '{arrowdown}');\n};\n"],"names":["openMenu","select","classList","contains","selectClasses","open","Error","innerHTML","selector","querySelector","userEvent","click","pointerEventsCheck","waitFor","closeMenu","getLabelText","_selector$textContent","_selector$textContent2","textContent","trim","multiSelect","options","i","length","option","optionItem","screen","getByTitle","singleSelect","optionElem","clearAll","clearBtn","clear","getAllOptions","optionsList","ownerDocument","body","list","querySelectorAll","forEach","push","getTableRowByCellText","tableElement","cellText","columnHeaderName","arguments","undefined","columnHeaderIndex","_columnHeader$parentE","_columnHeader$parentE2","columnHeader","within","getByRole","name","Array","from","parentElement","children","indexOf","matchingRows","getAllByRole","slice","filter","row","cells","cell","cellContainsText","queryByText","queryHelpers","getElementError","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","map","column","_column$textContent","rows","_cell$textContent","createMarkdownTable","firstRow","restRows","openDropdownMenu","dropdownButton","type"],"mappings":";;;;AAKA;AACA;AACA;AACA;AACO,eAAeA,QAAQA,CAACC,MAAmB,EAAiB;EACjE,IAAIA,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,aAAa,CAACC,IAAI,CAAC,EAAE;IACjD,MAAM,IAAIC,KAAK,CAAE,2BAA0BL,MAAM,CAACM,SAAU,EAAC,CAAC;;EAEhE,MAAMC,QAAQ,GAAGP,MAAM,CAACQ,aAAa,CAAE,IAAGL,aAAa,CAACI,QAAS,EAAC,CAAC;EACnE,IAAI,CAACA,QAAQ,EAAE;IACb,MAAM,IAAIF,KAAK,CAAE,uBAAsBL,MAAM,CAACM,SAAU,EAAC,CAAC;;EAE5D,MAAMG,SAAS,CAACC,KAAK,CAACH,QAAQ,EAAE;IAAEI,kBAAkB,EAAE;GAAG,CAAC;EAC1D,MAAM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;GAAW,GAAGC,YAAY,CAAC/B,YAAY,CAAC;EAC1D,MAAMgC,OAAO,GAAGvB,MAAM,CAACqB,SAAS,CAAC,CAC9BZ,YAAY,CAAC,cAAc,CAAC,CAC5Be,GAAG,CAAEC,MAAM;IAAA,IAAAC,mBAAA;IAAA,QAAAA,mBAAA,GAAKD,MAAM,CAAC1D,WAAW,cAAA2D,mBAAA,cAAAA,mBAAA,GAAI,EAAE;IAAC;EAC5C,MAAMC,IAAI,GAAGP,QAAQ,CAACI,GAAG,CAAEZ,GAAG,IAC5BZ,MAAM,CAACY,GAAG,CAAC,CACRH,YAAY,CAAC,MAAM,CAAC,CACpBe,GAAG,CAAEV,IAAI;IAAA,IAAAc,iBAAA;IAAA,QAAAA,iBAAA,GAAKd,IAAI,CAAC/C,WAAW,cAAA6D,iBAAA,cAAAA,iBAAA,GAAI,EAAE;IAAC,CACzC;EACD,OAAOC,mBAAmB,CAACN,OAAO,EAAEI,IAAI,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASL,YAAYA,CAAC/B,YAAyB,EAA0B;EAC9E,MAAM,CAACuC,QAAQ,EAAE,GAAGC,QAAQ,CAAC,GAAG/B,MAAM,CAACT,YAAY,CAAC,CAACkB,YAAY,CAAC,KAAK,CAAC;EACxE,OAAO;IACLW,QAAQ,EAAEW,QAAQ;IAClBV,SAAS,EAAES;GACZ;AACH;;ACrHA;AACA;AACA;AACA;AACA;MACaE,gBAAgB,GAAG,MAAOC,cAA2B,IAAK;EACrE,MAAM1E,SAAS,CAAC2E,IAAI,CAACD,cAAc,EAAE,aAAa,CAAC;AACrD;;;;"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * These values are based on AntD's breakpoints which follow BootStrap 4 media query rules.
3
+ * The numerical values represent the min-width of the given size.
4
+ * AntD values: https://ant.design/components/grid#col
5
+ * Bootstrap: https://getbootstrap.com/docs/4.0/layout/overview/#responsive-breakpoints
6
+ */
7
+ type availableBreakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
8
+ type ResponsiveOptions<RType> = Record<availableBreakpoints, RType>;
9
+ declare const responsive: {
10
+ breakpoints: ResponsiveOptions<number>;
11
+ mediaQueries: ResponsiveOptions<string>;
12
+ };
13
+ export default responsive;
14
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/theme/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,KAAK,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AACrE,KAAK,iBAAiB,CAAC,KAAK,IAAI,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AAoBpE,QAAA,MAAM,UAAU;;;CAAgC,CAAC;AACjD,eAAe,UAAU,CAAC"}
@@ -7,7 +7,6 @@ declare const antdGeneralVariables: {
7
7
  heightBase: number;
8
8
  iconSize: number;
9
9
  iconFontSize: number;
10
- iconFontSizeNew: number;
11
10
  buttonHeight: number;
12
11
  buttonInnerHeight: number;
13
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generalVariables.d.ts","sourceRoot":"","sources":["../../src/theme/generalVariables.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAczB,CAAC;AAEF,eAAO,MAAM,kBAAkB,eAAgB,OAAO;;;CAYrD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"generalVariables.d.ts","sourceRoot":"","sources":["../../src/theme/generalVariables.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,oBAAoB;;;;;;;;;;;CAYzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,eAAgB,OAAO;;;CAYrD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import borders from './borders';
2
+ import responsive from './breakpoints';
2
3
  import { getColors } from './colors';
3
4
  import generalVariables, { getShadowVariables } from './generalVariables';
4
5
  import spacing from './spacing';
@@ -14,6 +15,7 @@ export interface Theme {
14
15
  general: typeof generalVariables & ReturnType<typeof getShadowVariables>;
15
16
  typography: typeof typography;
16
17
  borders: typeof borders;
18
+ responsive: typeof responsive;
17
19
  isDarkMode: boolean;
18
20
  options: ThemeOptions;
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,gBAAgB,EAAE,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;IACrC,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,gBAAgB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACzE,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC;CACvB;AASD,wBAAgB,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,GAAE,YAA6B,GAAG,KAAK,CAa3F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM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