@opentrons/components 0.1.6-alpha.18 → 0.1.6-alpha.19

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 (459) hide show
  1. package/package.json +2 -2
  2. package/src/hardware-sim/BaseDeck/something.test.tsx +7 -0
  3. package/src/hardware-sim/Deck/SlotLabels.tsx +1 -1
  4. package/src/hardware-sim/ProtocolDeck/LabwareInfo.tsx +1 -1
  5. package/src/hardware-sim/ProtocolDeck/index.tsx +2 -2
  6. package/src/index.ts +2 -41
  7. package/src/molecules/DeckInfoLabel/index.tsx +1 -1
  8. package/src/molecules/DeckLabel/index.tsx +3 -3
  9. package/lib/__tests__/utils.test.d.ts +0 -1
  10. package/lib/alerts/AlertItem.d.ts +0 -21
  11. package/lib/alerts/index.d.ts +0 -1
  12. package/lib/atoms/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
  13. package/lib/atoms/Checkbox/index.d.ts +0 -25
  14. package/lib/atoms/CheckboxField/__tests__/CheckboxField.test.d.ts +0 -1
  15. package/lib/atoms/CheckboxField/index.d.ts +0 -20
  16. package/lib/atoms/Chip/__tests__/Chip.test.d.ts +0 -1
  17. package/lib/atoms/Chip/index.d.ts +0 -20
  18. package/lib/atoms/Divider/index.d.ts +0 -5
  19. package/lib/atoms/InputField/__tests__/InputField.test.d.ts +0 -1
  20. package/lib/atoms/InputField/index.d.ts +0 -68
  21. package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordion.d.ts +0 -10
  22. package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.d.ts +0 -7
  23. package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +0 -14
  24. package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +0 -3
  25. package/lib/atoms/ListButton/__tests__/ListButton.test.d.ts +0 -1
  26. package/lib/atoms/ListButton/__tests__/ListButtonAccordion.test.d.ts +0 -1
  27. package/lib/atoms/ListButton/__tests__/ListButtonRadioButton.test.d.ts +0 -1
  28. package/lib/atoms/ListButton/index.d.ts +0 -11
  29. package/lib/atoms/ListItem/ListItemChildren/ListItemCustomize.d.ts +0 -15
  30. package/lib/atoms/ListItem/ListItemChildren/ListItemDescriptor.d.ts +0 -8
  31. package/lib/atoms/ListItem/ListItemChildren/index.d.ts +0 -2
  32. package/lib/atoms/ListItem/__tests__/ListItem.test.d.ts +0 -1
  33. package/lib/atoms/ListItem/index.d.ts +0 -14
  34. package/lib/atoms/MenuList/MenuItem.d.ts +0 -7
  35. package/lib/atoms/MenuList/OverflowBtn.d.ts +0 -7
  36. package/lib/atoms/MenuList/__tests__/MenuItem.test.d.ts +0 -1
  37. package/lib/atoms/MenuList/__tests__/MenuList.test.d.ts +0 -1
  38. package/lib/atoms/MenuList/__tests__/OverflowBtn.test.d.ts +0 -1
  39. package/lib/atoms/MenuList/index.d.ts +0 -8
  40. package/lib/atoms/Snackbar/__tests__/Snackbar.test.d.ts +0 -1
  41. package/lib/atoms/Snackbar/index.d.ts +0 -7
  42. package/lib/atoms/StepMeter/index.d.ts +0 -7
  43. package/lib/atoms/StyledText/LegacyStyledText.d.ts +0 -6
  44. package/lib/atoms/StyledText/StyledText.d.ts +0 -154
  45. package/lib/atoms/StyledText/index.d.ts +0 -2
  46. package/lib/atoms/Tag/__tests__/Tag.test.d.ts +0 -1
  47. package/lib/atoms/Tag/index.d.ts +0 -14
  48. package/lib/atoms/Toast/__tests__/ODDToast.test.d.ts +0 -1
  49. package/lib/atoms/Toast/__tests__/Toast.test.d.ts +0 -1
  50. package/lib/atoms/Toast/index.d.ts +0 -25
  51. package/lib/atoms/ToggleGroup/__tests__/ToggleGroup.test.d.ts +0 -1
  52. package/lib/atoms/ToggleGroup/index.d.ts +0 -9
  53. package/lib/atoms/Tooltip/__tests__/Tooltip.test.d.ts +0 -1
  54. package/lib/atoms/Tooltip/index.d.ts +0 -11
  55. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +0 -1
  56. package/lib/atoms/buttons/AltPrimaryButton.d.ts +0 -1
  57. package/lib/atoms/buttons/EmptySelectorButton.d.ts +0 -10
  58. package/lib/atoms/buttons/LargeButton.d.ts +0 -17
  59. package/lib/atoms/buttons/PrimaryButton.d.ts +0 -1
  60. package/lib/atoms/buttons/RadioButton.d.ts +0 -21
  61. package/lib/atoms/buttons/SecondaryButton.d.ts +0 -7
  62. package/lib/atoms/buttons/__tests__/AlertPrimaryButton.test.d.ts +0 -1
  63. package/lib/atoms/buttons/__tests__/AltPrimaryButton.test.d.ts +0 -1
  64. package/lib/atoms/buttons/__tests__/EmptySelectorButton.test.d.ts +0 -1
  65. package/lib/atoms/buttons/__tests__/LargeButton.test.d.ts +0 -1
  66. package/lib/atoms/buttons/__tests__/PrimaryButton.test.d.ts +0 -1
  67. package/lib/atoms/buttons/__tests__/RadioButton.test.d.ts +0 -1
  68. package/lib/atoms/buttons/__tests__/SecondaryButton.test.d.ts +0 -1
  69. package/lib/atoms/buttons/index.d.ts +0 -6
  70. package/lib/atoms/index.d.ts +0 -20
  71. package/lib/barrel.d.ts +0 -3
  72. package/lib/buttons/Button.d.ts +0 -50
  73. package/lib/buttons/DeprecatedPrimaryButton.d.ts +0 -8
  74. package/lib/buttons/FlatButton.d.ts +0 -5
  75. package/lib/buttons/IconButton.d.ts +0 -14
  76. package/lib/buttons/OutlineButton.d.ts +0 -8
  77. package/lib/buttons/index.d.ts +0 -5
  78. package/lib/controls/ControlInfo.d.ts +0 -6
  79. package/lib/controls/LabeledButton.d.ts +0 -8
  80. package/lib/controls/LabeledCheckbox.d.ts +0 -10
  81. package/lib/controls/LabeledControl.d.ts +0 -7
  82. package/lib/controls/LabeledRadioGroup.d.ts +0 -8
  83. package/lib/controls/LabeledSelect.d.ts +0 -9
  84. package/lib/controls/LabeledToggle.d.ts +0 -11
  85. package/lib/controls/StackedLabeledControl.d.ts +0 -7
  86. package/lib/controls/ToggleButton.d.ts +0 -5
  87. package/lib/controls/index.d.ts +0 -6
  88. package/lib/forms/DeprecatedCheckboxField.d.ts +0 -33
  89. package/lib/forms/DropdownField.d.ts +0 -38
  90. package/lib/forms/FormGroup.d.ts +0 -19
  91. package/lib/forms/LegacyInputField.d.ts +0 -51
  92. package/lib/forms/RadioGroup.d.ts +0 -29
  93. package/lib/forms/Select.d.ts +0 -26
  94. package/lib/forms/SelectField.d.ts +0 -33
  95. package/lib/forms/ToggleField.d.ts +0 -22
  96. package/lib/forms/__tests__/DeprecatedCheckboxField.test.d.ts +0 -1
  97. package/lib/forms/__tests__/DropdownField.test.d.ts +0 -1
  98. package/lib/forms/__tests__/InputField.test.d.ts +0 -1
  99. package/lib/forms/__tests__/Select.test.d.ts +0 -1
  100. package/lib/forms/__tests__/SelectField.test.d.ts +0 -1
  101. package/lib/forms/__tests__/ToggleField.test.d.ts +0 -1
  102. package/lib/forms/index.d.ts +0 -8
  103. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +0 -49
  104. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +0 -12
  105. package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +0 -2
  106. package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +0 -2
  107. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +0 -13
  108. package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +0 -20
  109. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +0 -14
  110. package/lib/hardware-sim/BaseDeck/__fixtures__/index.d.ts +0 -4
  111. package/lib/hardware-sim/BaseDeck/index.d.ts +0 -5
  112. package/lib/hardware-sim/Deck/DeckFromLayers.d.ts +0 -10
  113. package/lib/hardware-sim/Deck/FlexTrash.d.ts +0 -14
  114. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +0 -16
  115. package/lib/hardware-sim/Deck/OT2Layers.d.ts +0 -10
  116. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +0 -14
  117. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +0 -12
  118. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +0 -9
  119. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +0 -21
  120. package/lib/hardware-sim/Deck/SlotLabels.d.ts +0 -12
  121. package/lib/hardware-sim/Deck/__mocks__/getDeckDefinitions.d.ts +0 -1
  122. package/lib/hardware-sim/Deck/constants.d.ts +0 -1
  123. package/lib/hardware-sim/Deck/index.d.ts +0 -8
  124. package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +0 -10
  125. package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +0 -8
  126. package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +0 -10
  127. package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +0 -11
  128. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +0 -10
  129. package/lib/hardware-sim/DeckConfigurator/StaticFixture.d.ts +0 -12
  130. package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +0 -10
  131. package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +0 -10
  132. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +0 -10
  133. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +0 -11
  134. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +0 -20
  135. package/lib/hardware-sim/DeckConfigurator/index.d.ts +0 -20
  136. package/lib/hardware-sim/DeckSlotLocation/index.d.ts +0 -15
  137. package/lib/hardware-sim/Labware/Labware.d.ts +0 -39
  138. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +0 -1
  139. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +0 -1
  140. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +0 -1
  141. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAutoclavableDeckRiser.d.ts +0 -1
  142. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +0 -1
  143. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsToughPCRAutoSealingLid.d.ts +0 -1
  144. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +0 -1
  145. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +0 -27
  146. package/lib/hardware-sim/Labware/LabwareRender.d.ts +0 -46
  147. package/lib/hardware-sim/Labware/LabwareStackRender.d.ts +0 -20
  148. package/lib/hardware-sim/Labware/__tests__/Labware.test.d.ts +0 -1
  149. package/lib/hardware-sim/Labware/__tests__/LabwareRender.test.d.ts +0 -1
  150. package/lib/hardware-sim/Labware/index.d.ts +0 -5
  151. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +0 -11
  152. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +0 -21
  153. package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +0 -15
  154. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +0 -25
  155. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +0 -9
  156. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +0 -19
  157. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +0 -20
  158. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +0 -12
  159. package/lib/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.d.ts +0 -1
  160. package/lib/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.d.ts +0 -1
  161. package/lib/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.d.ts +0 -1
  162. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +0 -8
  163. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +0 -12
  164. package/lib/hardware-sim/Module/HeaterShaker.d.ts +0 -4
  165. package/lib/hardware-sim/Module/MagneticBlock.d.ts +0 -1
  166. package/lib/hardware-sim/Module/MagneticModule.d.ts +0 -1
  167. package/lib/hardware-sim/Module/ModuleTag.d.ts +0 -9
  168. package/lib/hardware-sim/Module/PlateReader.d.ts +0 -1
  169. package/lib/hardware-sim/Module/Temperature.d.ts +0 -4
  170. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.d.ts +0 -6
  171. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.d.ts +0 -6
  172. package/lib/hardware-sim/Module/Thermocycler/index.d.ts +0 -7
  173. package/lib/hardware-sim/Module/index.d.ts +0 -18
  174. package/lib/hardware-sim/Pipette/EightEmanatingNozzles.d.ts +0 -4
  175. package/lib/hardware-sim/Pipette/EmanatingNozzle.d.ts +0 -4
  176. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +0 -8
  177. package/lib/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.d.ts +0 -1
  178. package/lib/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.d.ts +0 -1
  179. package/lib/hardware-sim/Pipette/__tests__/PipetteRender.test.d.ts +0 -1
  180. package/lib/hardware-sim/Pipette/constants.d.ts +0 -7
  181. package/lib/hardware-sim/Pipette/index.d.ts +0 -1
  182. package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +0 -6
  183. package/lib/hardware-sim/ProtocolDeck/index.d.ts +0 -14
  184. package/lib/hardware-sim/ProtocolDeck/types.d.ts +0 -8
  185. package/lib/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.d.ts +0 -1
  186. package/lib/hardware-sim/ProtocolDeck/utils/getInitiallyLoadedLabwareByAdapter.d.ts +0 -5
  187. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +0 -12
  188. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInfoByLiquidId.d.ts +0 -3
  189. package/lib/hardware-sim/ProtocolDeck/utils/getModulesInSlots.d.ts +0 -10
  190. package/lib/hardware-sim/ProtocolDeck/utils/getStandardDeckViewLayerBlockList.d.ts +0 -2
  191. package/lib/hardware-sim/ProtocolDeck/utils/getWellFillFromLabwareId.d.ts +0 -4
  192. package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +0 -3
  193. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +0 -7
  194. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +0 -16
  195. package/lib/hardware-sim/RobotCoordinateSpace/index.d.ts +0 -2
  196. package/lib/hardware-sim/index.d.ts +0 -11
  197. package/lib/hardware-sim/utils.d.ts +0 -3
  198. package/lib/helix-design-system/borders.d.ts +0 -26
  199. package/lib/helix-design-system/colors.d.ts +0 -86
  200. package/lib/helix-design-system/index.d.ts +0 -4
  201. package/lib/helix-design-system/product/index.d.ts +0 -1
  202. package/lib/helix-design-system/product/typography.d.ts +0 -79
  203. package/lib/helix-design-system/style.d.ts +0 -1
  204. package/lib/hooks/__tests__/useConditionalConfirm.test.d.ts +0 -1
  205. package/lib/hooks/__tests__/useDrag.test.d.ts +0 -1
  206. package/lib/hooks/__tests__/useIdle.test.d.ts +0 -1
  207. package/lib/hooks/__tests__/useInterval.test.d.ts +0 -1
  208. package/lib/hooks/__tests__/useLongPress.test.d.ts +0 -1
  209. package/lib/hooks/__tests__/useMountEffect.test.d.ts +0 -1
  210. package/lib/hooks/__tests__/usePrevious.test.d.ts +0 -1
  211. package/lib/hooks/__tests__/useScrolling.test.d.ts +0 -1
  212. package/lib/hooks/__tests__/useSwipe.test.d.ts +0 -1
  213. package/lib/hooks/__tests__/useTimeout.test.d.ts +0 -1
  214. package/lib/hooks/__tests__/useToggle.test.d.ts +0 -1
  215. package/lib/hooks/index.d.ts +0 -13
  216. package/lib/hooks/useConditionalConfirm.d.ts +0 -41
  217. package/lib/hooks/useDrag.d.ts +0 -22
  218. package/lib/hooks/useIdle.d.ts +0 -11
  219. package/lib/hooks/useInterval.d.ts +0 -11
  220. package/lib/hooks/useLongPress.d.ts +0 -19
  221. package/lib/hooks/useMenuHandleClickOutside.d.ts +0 -9
  222. package/lib/hooks/useMountEffect.d.ts +0 -8
  223. package/lib/hooks/usePrevious.d.ts +0 -9
  224. package/lib/hooks/useScrolling.d.ts +0 -1
  225. package/lib/hooks/useSelectDeckLocation/index.d.ts +0 -18
  226. package/lib/hooks/useSwipe.d.ts +0 -12
  227. package/lib/hooks/useTimeout.d.ts +0 -9
  228. package/lib/hooks/useToggle.d.ts +0 -22
  229. package/lib/icons/Icon.d.ts +0 -34
  230. package/lib/icons/ModuleIcon.d.ts +0 -11
  231. package/lib/icons/NotificationIcon.d.ts +0 -12
  232. package/lib/icons/icon-data.d.ts +0 -4
  233. package/lib/icons/index.d.ts +0 -4
  234. package/lib/images/index.d.ts +0 -1
  235. package/lib/images/labware/index.d.ts +0 -1
  236. package/lib/images/labware/measurement-guide/index.d.ts +0 -13
  237. package/lib/index.d.ts +0 -26
  238. package/lib/instrument/InstrumentDiagram.d.ts +0 -11
  239. package/lib/instrument/InstrumentGroup.d.ts +0 -11
  240. package/lib/instrument/InstrumentInfo.d.ts +0 -18
  241. package/lib/instrument/PipetteSelect.d.ts +0 -20
  242. package/lib/instrument/__tests__/InstrumentInfo.test.d.ts +0 -1
  243. package/lib/instrument/__tests__/PipetteSelect.test.d.ts +0 -1
  244. package/lib/instrument/index.d.ts +0 -4
  245. package/lib/interaction-enhancers/ClickOutside.d.ts +0 -18
  246. package/lib/interaction-enhancers/HandleKeypress.d.ts +0 -27
  247. package/lib/interaction-enhancers/__tests__/useHover.test.d.ts +0 -1
  248. package/lib/interaction-enhancers/index.d.ts +0 -4
  249. package/lib/interaction-enhancers/useHover.d.ts +0 -33
  250. package/lib/interaction-enhancers/useOnClickOutside.d.ts +0 -5
  251. package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +0 -7
  252. package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
  253. package/lib/legacy-hardware-sim/index.d.ts +0 -2
  254. package/lib/lists/SidePanelGroup.d.ts +0 -18
  255. package/lib/lists/TitledList.d.ts +0 -44
  256. package/lib/lists/index.d.ts +0 -2
  257. package/lib/modals/AlertModal.d.ts +0 -28
  258. package/lib/modals/ContinueModal.d.ts +0 -10
  259. package/lib/modals/LegacyModal.d.ts +0 -24
  260. package/lib/modals/Modal.d.ts +0 -24
  261. package/lib/modals/ModalHeader.d.ts +0 -13
  262. package/lib/modals/ModalShell.d.ts +0 -34
  263. package/lib/modals/Overlay.d.ts +0 -9
  264. package/lib/modals/SpinnerModal.d.ts +0 -13
  265. package/lib/modals/SpinnerModalPage.d.ts +0 -12
  266. package/lib/modals/__tests__/Modal.test.d.ts +0 -1
  267. package/lib/modals/__tests__/ModalHeader.test.d.ts +0 -1
  268. package/lib/modals/__tests__/ModalShell.test.d.ts +0 -1
  269. package/lib/modals/index.d.ts +0 -9
  270. package/lib/molecules/Banner/__tests__/Banner.test.d.ts +0 -1
  271. package/lib/molecules/Banner/index.d.ts +0 -23
  272. package/lib/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.d.ts +0 -1
  273. package/lib/molecules/DeckInfoLabel/index.d.ts +0 -19
  274. package/lib/molecules/DeckLabel/__tests__/DeckLabel.test.d.ts +0 -1
  275. package/lib/molecules/DeckLabel/index.d.ts +0 -10
  276. package/lib/molecules/DropdownMenu/__tests__/DropdownMenu.test.d.ts +0 -1
  277. package/lib/molecules/DropdownMenu/index.d.ts +0 -41
  278. package/lib/molecules/InfoScreen/__tests__/InfoScreen.test.d.ts +0 -1
  279. package/lib/molecules/InfoScreen/index.d.ts +0 -8
  280. package/lib/molecules/LiquidIcon/__tests__/LiquidIcon.test.d.ts +0 -1
  281. package/lib/molecules/LiquidIcon/index.d.ts +0 -9
  282. package/lib/molecules/ParametersTable/__tests__/ParametersTable.test.d.ts +0 -1
  283. package/lib/molecules/ParametersTable/index.d.ts +0 -10
  284. package/lib/molecules/Tabs/__tests__/Tabs.test.d.ts +0 -1
  285. package/lib/molecules/Tabs/index.d.ts +0 -10
  286. package/lib/molecules/index.d.ts +0 -8
  287. package/lib/nav/SidePanel.d.ts +0 -6
  288. package/lib/nav/index.d.ts +0 -1
  289. package/lib/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.d.ts +0 -1
  290. package/lib/organisms/DeckLabelSet/index.d.ts +0 -11
  291. package/lib/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.d.ts +0 -1
  292. package/lib/organisms/EndUserAgreementFooter/index.d.ts +0 -1
  293. package/lib/organisms/Toolbox/__tests__/Toolbox.test.d.ts +0 -1
  294. package/lib/organisms/Toolbox/index.d.ts +0 -20
  295. package/lib/organisms/index.d.ts +0 -3
  296. package/lib/primitives/Box.d.ts +0 -7
  297. package/lib/primitives/Btn.d.ts +0 -59
  298. package/lib/primitives/Flex.d.ts +0 -7
  299. package/lib/primitives/ForeignObject.d.ts +0 -23
  300. package/lib/primitives/Link.d.ts +0 -11
  301. package/lib/primitives/Svg.d.ts +0 -23
  302. package/lib/primitives/Text.d.ts +0 -7
  303. package/lib/primitives/__tests__/Box.test.d.ts +0 -1
  304. package/lib/primitives/__tests__/Btn.test.d.ts +0 -1
  305. package/lib/primitives/__tests__/Flex.test.d.ts +0 -1
  306. package/lib/primitives/__tests__/Link.test.d.ts +0 -1
  307. package/lib/primitives/__tests__/Svg.test.d.ts +0 -1
  308. package/lib/primitives/__tests__/Text.test.d.ts +0 -1
  309. package/lib/primitives/__tests__/primitives.test.d.ts +0 -1
  310. package/lib/primitives/__tests__/style-props.test.d.ts +0 -1
  311. package/lib/primitives/index.d.ts +0 -9
  312. package/lib/primitives/style-props.d.ts +0 -4
  313. package/lib/primitives/types.d.ts +0 -95
  314. package/lib/robot-types.d.ts +0 -1
  315. package/lib/slotmap/OT2SlotMap.d.ts +0 -9
  316. package/lib/slotmap/__tests__/OT2SlotMap.test.d.ts +0 -1
  317. package/lib/slotmap/index.d.ts +0 -1
  318. package/lib/structure/Card.d.ts +0 -18
  319. package/lib/structure/LabeledValue.d.ts +0 -12
  320. package/lib/structure/Pill.d.ts +0 -18
  321. package/lib/structure/Splash.d.ts +0 -8
  322. package/lib/structure/TitleBar.d.ts +0 -17
  323. package/lib/structure/index.d.ts +0 -5
  324. package/lib/styles/borders.d.ts +0 -8
  325. package/lib/styles/colors.d.ts +0 -37
  326. package/lib/styles/cursor.d.ts +0 -10
  327. package/lib/styles/flexbox.d.ts +0 -34
  328. package/lib/styles/index.d.ts +0 -8
  329. package/lib/styles/layout.d.ts +0 -24
  330. package/lib/styles/position.d.ts +0 -5
  331. package/lib/styles/spacing.d.ts +0 -9
  332. package/lib/styles/typography.d.ts +0 -36
  333. package/lib/testing/utils/index.d.ts +0 -2
  334. package/lib/testing/utils/matchers.d.ts +0 -3
  335. package/lib/testing/utils/renderWithProviders.d.ts +0 -9
  336. package/lib/tooltips/DeprecatedTooltip.d.ts +0 -37
  337. package/lib/tooltips/HoverTooltip.d.ts +0 -36
  338. package/lib/tooltips/LegacyTooltip.d.ts +0 -35
  339. package/lib/tooltips/__tests__/Tooltip.test.d.ts +0 -1
  340. package/lib/tooltips/__tests__/useHoverTooltip.test.d.ts +0 -1
  341. package/lib/tooltips/__tests__/usePopper.test.d.ts +0 -1
  342. package/lib/tooltips/__tests__/useTooltip.test.d.ts +0 -1
  343. package/lib/tooltips/constants.d.ts +0 -17
  344. package/lib/tooltips/index.d.ts +0 -8
  345. package/lib/tooltips/styles.d.ts +0 -12
  346. package/lib/tooltips/types.d.ts +0 -52
  347. package/lib/tooltips/useHoverTooltip.d.ts +0 -24
  348. package/lib/tooltips/usePopper.d.ts +0 -2
  349. package/lib/tooltips/useTooltip.d.ts +0 -31
  350. package/lib/ui-style-constants/index.d.ts +0 -4
  351. package/lib/ui-style-constants/responsiveness.d.ts +0 -3
  352. package/lib/ui-style-constants/spacing.d.ts +0 -18
  353. package/lib/ui-style-constants/typography.d.ts +0 -71
  354. package/lib/ui-style-constants/viewport.d.ts +0 -15
  355. package/lib/utils.d.ts +0 -15
  356. package/src/__tests__/utils.test.ts +0 -27
  357. package/src/alerts/alerts.module.css +0 -103
  358. package/src/atoms/Checkbox/__tests__/Checkbox.test.tsx +0 -55
  359. package/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx +0 -141
  360. package/src/atoms/Chip/__tests__/Chip.test.tsx +0 -429
  361. package/src/atoms/InputField/__tests__/InputField.test.tsx +0 -63
  362. package/src/atoms/ListButton/__tests__/ListButton.test.tsx +0 -46
  363. package/src/atoms/ListButton/__tests__/ListButtonAccordion.test.tsx +0 -35
  364. package/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx +0 -27
  365. package/src/atoms/ListItem/__tests__/ListItem.test.tsx +0 -61
  366. package/src/atoms/MenuList/__tests__/MenuItem.test.tsx +0 -50
  367. package/src/atoms/MenuList/__tests__/MenuList.test.tsx +0 -36
  368. package/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx +0 -33
  369. package/src/atoms/Snackbar/__tests__/Snackbar.test.tsx +0 -73
  370. package/src/atoms/Tag/__tests__/Tag.test.tsx +0 -55
  371. package/src/atoms/Toast/__tests__/ODDToast.test.tsx +0 -178
  372. package/src/atoms/Toast/__tests__/Toast.test.tsx +0 -174
  373. package/src/atoms/ToggleGroup/__tests__/ToggleGroup.test.tsx +0 -28
  374. package/src/atoms/Tooltip/__tests__/Tooltip.test.tsx +0 -78
  375. package/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx +0 -47
  376. package/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx +0 -57
  377. package/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx +0 -42
  378. package/src/atoms/buttons/__tests__/LargeButton.test.tsx +0 -91
  379. package/src/atoms/buttons/__tests__/PrimaryButton.test.tsx +0 -64
  380. package/src/atoms/buttons/__tests__/RadioButton.test.tsx +0 -98
  381. package/src/atoms/buttons/__tests__/SecondaryButton.test.tsx +0 -54
  382. package/src/buttons/buttons.module.css +0 -428
  383. package/src/controls/styles.module.css +0 -103
  384. package/src/forms/Select.module.css +0 -118
  385. package/src/forms/SelectField.module.css +0 -16
  386. package/src/forms/__tests__/DeprecatedCheckboxField.test.tsx +0 -5
  387. package/src/forms/__tests__/DropdownField.test.tsx +0 -5
  388. package/src/forms/__tests__/InputField.test.tsx +0 -5
  389. package/src/forms/__tests__/Select.test.tsx +0 -5
  390. package/src/forms/__tests__/SelectField.test.tsx +0 -5
  391. package/src/forms/__tests__/ToggleField.test.tsx +0 -5
  392. package/src/forms/forms.module.css +0 -239
  393. package/src/hardware-sim/Labware/__tests__/Labware.test.tsx +0 -43
  394. package/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx +0 -54
  395. package/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx +0 -66
  396. package/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx +0 -31
  397. package/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx +0 -91
  398. package/src/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.tsx +0 -16
  399. package/src/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.tsx +0 -67
  400. package/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx +0 -99
  401. package/src/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.ts +0 -158
  402. package/src/hooks/__tests__/useConditionalConfirm.test.tsx +0 -5
  403. package/src/hooks/__tests__/useDrag.test.ts +0 -46
  404. package/src/hooks/__tests__/useIdle.test.ts +0 -68
  405. package/src/hooks/__tests__/useInterval.test.tsx +0 -5
  406. package/src/hooks/__tests__/useLongPress.test.ts +0 -25
  407. package/src/hooks/__tests__/useMountEffect.test.tsx +0 -5
  408. package/src/hooks/__tests__/usePrevious.test.tsx +0 -5
  409. package/src/hooks/__tests__/useScrolling.test.tsx +0 -46
  410. package/src/hooks/__tests__/useSwipe.test.tsx +0 -26
  411. package/src/hooks/__tests__/useTimeout.test.tsx +0 -5
  412. package/src/hooks/__tests__/useToggle.test.tsx +0 -5
  413. package/src/index.module.css +0 -9
  414. package/src/instrument/PipetteSelect.module.css +0 -14
  415. package/src/instrument/__tests__/InstrumentInfo.test.tsx +0 -55
  416. package/src/instrument/__tests__/PipetteSelect.test.tsx +0 -4
  417. package/src/instrument/instrument.module.css +0 -45
  418. package/src/interaction-enhancers/__tests__/useHover.test.tsx +0 -4
  419. package/src/legacy-hardware-sim/LabwareNameOverlay.module.css +0 -20
  420. package/src/legacy-hardware-sim/ModuleItem.module.css +0 -98
  421. package/src/lists/lists.module.css +0 -171
  422. package/src/modals/__tests__/Modal.test.tsx +0 -65
  423. package/src/modals/__tests__/ModalHeader.test.tsx +0 -73
  424. package/src/modals/__tests__/ModalShell.test.tsx +0 -45
  425. package/src/modals/modals.module.css +0 -275
  426. package/src/molecules/Banner/__tests__/Banner.test.tsx +0 -94
  427. package/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx +0 -49
  428. package/src/molecules/DeckLabel/__tests__/DeckLabel.test.tsx +0 -69
  429. package/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx +0 -85
  430. package/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx +0 -40
  431. package/src/molecules/LiquidIcon/__tests__/LiquidIcon.test.tsx +0 -50
  432. package/src/molecules/ParametersTable/__tests__/ParametersTable.test.tsx +0 -126
  433. package/src/molecules/Tabs/__tests__/Tabs.test.tsx +0 -90
  434. package/src/nav/SidePanel.module.css +0 -34
  435. package/src/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.tsx +0 -49
  436. package/src/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.tsx +0 -21
  437. package/src/organisms/Toolbox/__tests__/Toolbox.test.tsx +0 -35
  438. package/src/primitives/__tests__/Box.test.tsx +0 -4
  439. package/src/primitives/__tests__/Btn.test.tsx +0 -4
  440. package/src/primitives/__tests__/Flex.test.tsx +0 -4
  441. package/src/primitives/__tests__/Link.test.tsx +0 -4
  442. package/src/primitives/__tests__/Svg.test.tsx +0 -4
  443. package/src/primitives/__tests__/Text.test.tsx +0 -4
  444. package/src/primitives/__tests__/primitives.test.tsx +0 -4
  445. package/src/primitives/__tests__/style-props.test.tsx +0 -4
  446. package/src/slotmap/__tests__/OT2SlotMap.test.tsx +0 -4
  447. package/src/slotmap/styles.module.css +0 -18
  448. package/src/structure/Pill.module.css +0 -16
  449. package/src/structure/Splash.module.css +0 -16
  450. package/src/structure/structure.module.css +0 -114
  451. package/src/styles/borders.module.css +0 -20
  452. package/src/styles/colors.module.css +0 -57
  453. package/src/styles/index.module.css +0 -8
  454. package/src/styles/typography.module.css +0 -22
  455. package/src/tooltips/__tests__/Tooltip.test.tsx +0 -4
  456. package/src/tooltips/__tests__/useHoverTooltip.test.tsx +0 -4
  457. package/src/tooltips/__tests__/usePopper.test.tsx +0 -4
  458. package/src/tooltips/__tests__/useTooltip.test.tsx +0 -4
  459. package/src/tooltips/tooltips.module.css +0 -72
@@ -1,35 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, beforeEach } from 'vitest'
3
- import { screen } from '@testing-library/react'
4
- import { renderWithProviders } from '../../../testing/utils'
5
-
6
- import { ListButtonAccordion } from '..'
7
-
8
- const render = (props: React.ComponentProps<typeof ListButtonAccordion>) =>
9
- renderWithProviders(<ListButtonAccordion {...props} />)
10
-
11
- describe('ListButtonAccordion', () => {
12
- let props: React.ComponentProps<typeof ListButtonAccordion>
13
-
14
- beforeEach(() => {
15
- props = {
16
- children: <div>mock ListButtonAccordion content</div>,
17
- headline: 'mock headline',
18
- isExpanded: true,
19
- }
20
- })
21
-
22
- it('should render non nested accordion', () => {
23
- render(props)
24
- screen.getByText('mock headline')
25
- screen.getByText('mock ListButtonAccordion content')
26
- })
27
- it('should render non nested accordion with main headline', () => {
28
- props.isNested = true
29
- props.mainHeadline = 'mock main headline'
30
- render(props)
31
- screen.getByText('mock main headline')
32
- screen.getByText('mock headline')
33
- screen.getByText('mock ListButtonAccordion content')
34
- })
35
- })
@@ -1,27 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, beforeEach, vi, expect } from 'vitest'
3
- import { fireEvent, screen } from '@testing-library/react'
4
- import { renderWithProviders } from '../../../testing/utils'
5
-
6
- import { ListButtonRadioButton } from '..'
7
-
8
- const render = (props: React.ComponentProps<typeof ListButtonRadioButton>) =>
9
- renderWithProviders(<ListButtonRadioButton {...props} />)
10
-
11
- describe('ListButtonRadioButton', () => {
12
- let props: React.ComponentProps<typeof ListButtonRadioButton>
13
-
14
- beforeEach(() => {
15
- props = {
16
- buttonText: 'mock text',
17
- buttonValue: 'mockValue',
18
- onChange: vi.fn(),
19
- }
20
- })
21
-
22
- it('should render non nested accordion', () => {
23
- render(props)
24
- fireEvent.click(screen.getByText('mock text'))
25
- expect(props.onChange).toHaveBeenCalled()
26
- })
27
- })
@@ -1,61 +0,0 @@
1
- import type * as React from 'react'
2
- import { vi, describe, it, expect, beforeEach } from 'vitest'
3
- import '@testing-library/jest-dom/vitest'
4
- import { fireEvent, screen } from '@testing-library/react'
5
- import { renderWithProviders } from '../../../testing/utils'
6
- import { BORDERS, COLORS } from '../../../helix-design-system'
7
-
8
- import { ListItem } from '..'
9
-
10
- const render = (props: React.ComponentProps<typeof ListItem>) =>
11
- renderWithProviders(<ListItem {...props} />)
12
-
13
- describe('ListItem', () => {
14
- let props: React.ComponentProps<typeof ListItem>
15
-
16
- beforeEach(() => {
17
- props = {
18
- type: 'error',
19
- children: <div>mock listitem content</div>,
20
- onClick: vi.fn(),
21
- }
22
- })
23
-
24
- it('should render correct style - error', () => {
25
- render(props)
26
- screen.getByText('mock listitem content')
27
- const listItem = screen.getByTestId('ListItem_error')
28
- expect(listItem).toHaveStyle(`backgroundColor: ${COLORS.red35}`)
29
- expect(listItem).toHaveStyle(`borderRadius: ${BORDERS.borderRadius4}`)
30
- })
31
- it('should render correct style - noActive', () => {
32
- props.type = 'noActive'
33
- render(props)
34
- screen.getByText('mock listitem content')
35
- const listItem = screen.getByTestId('ListItem_noActive')
36
- expect(listItem).toHaveStyle(`backgroundColor: ${COLORS.grey20}`)
37
- expect(listItem).toHaveStyle(`borderRadius: ${BORDERS.borderRadius4}`)
38
- })
39
- it('should render correct style - success', () => {
40
- props.type = 'success'
41
- render(props)
42
- screen.getByText('mock listitem content')
43
- const listItem = screen.getByTestId('ListItem_success')
44
- expect(listItem).toHaveStyle(`backgroundColor: ${COLORS.green35}`)
45
- expect(listItem).toHaveStyle(`borderRadius: ${BORDERS.borderRadius4}`)
46
- })
47
- it('should render correct style - warning', () => {
48
- props.type = 'warning'
49
- render(props)
50
- screen.getByText('mock listitem content')
51
- const listItem = screen.getByTestId('ListItem_warning')
52
- expect(listItem).toHaveStyle(`backgroundColor: ${COLORS.yellow35}`)
53
- expect(listItem).toHaveStyle(`borderRadius: ${BORDERS.borderRadius4}`)
54
- })
55
- it('should call on click when pressed', () => {
56
- render(props)
57
- const listItem = screen.getByText('mock listitem content')
58
- fireEvent.click(listItem)
59
- expect(props.onClick).toHaveBeenCalled()
60
- })
61
- })
@@ -1,50 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, expect, beforeEach } from 'vitest'
3
- import { screen } from '@testing-library/react'
4
-
5
- import { renderWithProviders } from '../../../testing/utils'
6
- import { COLORS } from '../../../helix-design-system'
7
- import { SPACING, TYPOGRAPHY } from '../../../ui-style-constants'
8
-
9
- import { MenuItem } from '../MenuItem'
10
-
11
- const render = (props: React.ComponentProps<typeof MenuItem>) => {
12
- return renderWithProviders(<MenuItem {...props} />)[0]
13
- }
14
-
15
- describe('MenuItem', () => {
16
- let props: React.ComponentProps<typeof MenuItem>
17
-
18
- beforeEach(() => {
19
- props = {
20
- children: 'mockMenuItem',
21
- isAlert: false,
22
- }
23
- })
24
-
25
- it('render button with styles', () => {
26
- render(props)
27
- const menuItem = screen.getByText('mockMenuItem')
28
- expect(menuItem).toHaveStyle(`background-color: ${COLORS.transparent}`)
29
- expect(menuItem).toHaveStyle(`color: ${COLORS.black90}`)
30
- expect(menuItem)
31
- .toHaveStyle(`padding: ${SPACING.spacing8} ${SPACING.spacing12} ${SPACING.spacing8}
32
- ${SPACING.spacing12}`)
33
- expect(menuItem).toHaveStyle(`font-size: ${TYPOGRAPHY.fontSizeP}`)
34
- })
35
-
36
- it('render button with styles disabled', () => {
37
- props = {
38
- ...props,
39
- disabled: true,
40
- }
41
- render(props)
42
- const menuItem = screen.getByText('mockMenuItem')
43
- expect(menuItem).toHaveStyle(`background-color: ${COLORS.transparent}`)
44
- expect(menuItem).toHaveStyle(`color: ${COLORS.grey40}`)
45
- expect(menuItem)
46
- .toHaveStyle(`padding: ${SPACING.spacing8} ${SPACING.spacing12} ${SPACING.spacing8}
47
- ${SPACING.spacing12}`)
48
- expect(menuItem).toHaveStyle(`font-size: ${TYPOGRAPHY.fontSizeP}`)
49
- })
50
- })
@@ -1,36 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, expect, vi, beforeEach } from 'vitest'
3
- import { fireEvent, screen } from '@testing-library/react'
4
-
5
- import { renderWithProviders } from '../../../testing/utils'
6
- import { MenuList } from '..'
7
-
8
- const render = (props: React.ComponentProps<typeof MenuList>) => {
9
- return renderWithProviders(<MenuList {...props} />)[0]
10
- }
11
-
12
- const mockBtn = <div key="fakeKey">mockBtn</div>
13
-
14
- describe('MenuList', () => {
15
- let props: React.ComponentProps<typeof MenuList>
16
- beforeEach(() => {
17
- props = {
18
- children: mockBtn,
19
- }
20
- })
21
-
22
- it('renders a child not on device', () => {
23
- render(props)
24
- screen.getByText('mockBtn')
25
- })
26
- it('renders isOnDevice child, clicking background overlay calls onClick', () => {
27
- props = {
28
- ...props,
29
- isOnDevice: true,
30
- onClick: vi.fn(),
31
- }
32
- render(props)
33
- fireEvent.click(screen.getByLabelText('BackgroundOverlay_ModalShell'))
34
- expect(props.onClick).toHaveBeenCalled()
35
- })
36
- })
@@ -1,33 +0,0 @@
1
- import type * as React from 'react'
2
- import { vi, it, expect, describe } from 'vitest'
3
- import { fireEvent, screen } from '@testing-library/react'
4
-
5
- import { COLORS } from '../../../helix-design-system'
6
- import { renderWithProviders } from '../../../testing/utils'
7
- import { OverflowBtn } from '../OverflowBtn'
8
-
9
- const render = (props: React.ComponentProps<typeof OverflowBtn>) => {
10
- return renderWithProviders(<OverflowBtn {...props} />)[0]
11
- }
12
-
13
- describe('OverflowBtn', () => {
14
- it('renders a clickable button', () => {
15
- const handleClick = vi.fn()
16
- render({
17
- onClick: handleClick,
18
- })
19
-
20
- const button = screen.getByRole('button')
21
- fireEvent.click(button)
22
- expect(handleClick).toHaveBeenCalledTimes(1)
23
- })
24
-
25
- it('renders a hover state', () => {
26
- render({
27
- onClick: vi.fn(),
28
- })
29
- expect(screen.getByRole('button')).toHaveStyle(
30
- `background-color: ${COLORS.transparent}`
31
- )
32
- })
33
- })
@@ -1,73 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, expect, vi, beforeEach } from 'vitest'
3
- import '@testing-library/jest-dom/vitest'
4
- import { screen, act } from '@testing-library/react'
5
- import { renderWithProviders } from '../../../testing/utils'
6
- import { Snackbar } from '..'
7
- import { COLORS } from '../../../helix-design-system'
8
-
9
- const render = (props: React.ComponentProps<typeof Snackbar>) => {
10
- return renderWithProviders(<Snackbar {...props} />)[0]
11
- }
12
-
13
- describe('Snackbar', () => {
14
- let props: React.ComponentProps<typeof Snackbar>
15
- beforeEach(() => {
16
- props = {
17
- message: 'test message',
18
- onClose: vi.fn(),
19
- }
20
- })
21
-
22
- it('renders correct message', () => {
23
- render(props)
24
- screen.getByText('test message')
25
- })
26
-
27
- it('should have proper styling', () => {
28
- props = {
29
- message: 'test message',
30
- }
31
- render(props)
32
- const testSnackbar = screen.getByTestId('Snackbar')
33
- expect(testSnackbar).toHaveStyle(`background-color: ${COLORS.black90}`)
34
- })
35
-
36
- it('after 4 seconds the snackbar should be closed automatically', async () => {
37
- vi.useFakeTimers()
38
- props = {
39
- message: 'test message',
40
- duration: 4000,
41
- onClose: vi.fn(),
42
- }
43
- render(props)
44
- screen.getByText('test message')
45
- act(() => {
46
- vi.advanceTimersByTime(100)
47
- })
48
- expect(props.onClose).not.toHaveBeenCalled()
49
- act(() => {
50
- vi.advanceTimersByTime(5000)
51
- })
52
- expect(props.onClose).toHaveBeenCalled()
53
- })
54
-
55
- it('should stay more than 4 seconds when given a longer duration', async () => {
56
- vi.useFakeTimers()
57
- props = {
58
- message: 'test message',
59
- duration: 8000,
60
- onClose: vi.fn(),
61
- }
62
- render(props)
63
- screen.getByText('test message')
64
- act(() => {
65
- vi.advanceTimersByTime(4100)
66
- })
67
- expect(props.onClose).not.toHaveBeenCalled()
68
- act(() => {
69
- vi.advanceTimersByTime(5000)
70
- })
71
- expect(props.onClose).toHaveBeenCalled()
72
- })
73
- })
@@ -1,55 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, expect } from 'vitest'
3
- import { screen } from '@testing-library/react'
4
- import { COLORS } from '../../../helix-design-system'
5
- import { renderWithProviders } from '../../../testing/utils'
6
- import { Tag } from '../index'
7
-
8
- const render = (props: React.ComponentProps<typeof Tag>) => {
9
- return renderWithProviders(<Tag {...props} />)
10
- }
11
-
12
- describe('Tag', () => {
13
- let props: React.ComponentProps<typeof Tag>
14
-
15
- it('should render text, icon with default', () => {
16
- props = {
17
- text: 'mockDefault',
18
- type: 'default',
19
- iconName: 'ot-alert',
20
- iconPosition: 'left',
21
- }
22
- render(props)
23
- const tag = screen.getByTestId('Tag_default')
24
- screen.getByText('mockDefault')
25
- expect(tag).toHaveStyle(
26
- `background-color: ${COLORS.black90}${COLORS.opacity20HexCode}`
27
- )
28
- screen.getByLabelText('icon_left_mockDefault')
29
- })
30
- it('should render text, right icon with branded', () => {
31
- props = {
32
- text: 'mockBranded',
33
- type: 'branded',
34
- iconName: 'ot-alert',
35
- iconPosition: 'right',
36
- }
37
- render(props)
38
- const tag = screen.getByTestId('Tag_branded')
39
- screen.getByText('mockBranded')
40
- expect(tag).toHaveStyle(`background-color: ${COLORS.blue50}`)
41
- screen.getByLabelText('icon_right_mockBranded')
42
- })
43
- it('should render text with interactive', () => {
44
- props = {
45
- text: 'mockInteractive',
46
- type: 'interactive',
47
- }
48
- render(props)
49
- const tag = screen.getByTestId('Tag_interactive')
50
- screen.getByText('mockInteractive')
51
- expect(tag).toHaveStyle(
52
- `background-color: ${COLORS.black90}${COLORS.opacity20HexCode}`
53
- )
54
- })
55
- })
@@ -1,178 +0,0 @@
1
- import type * as React from 'react'
2
- import { describe, it, expect, vi, beforeEach } from 'vitest'
3
- import '@testing-library/jest-dom/vitest'
4
- import { act, fireEvent, screen } from '@testing-library/react'
5
- import { renderWithProviders } from '../../../testing/utils'
6
- import { Toast, TOAST_ANIMATION_DURATION } from '..'
7
-
8
- const render = (props: React.ComponentProps<typeof Toast>) => {
9
- return renderWithProviders(<Toast {...props} displayType="odd" />)[0]
10
- }
11
-
12
- describe('Toast', () => {
13
- let props: React.ComponentProps<typeof Toast>
14
- beforeEach(() => {
15
- props = {
16
- id: '1',
17
- message: 'test message',
18
- heading: 'heading message',
19
- type: 'success',
20
- closeButton: true,
21
- buttonText: 'Close',
22
- onClose: vi.fn(),
23
- displayType: 'odd',
24
- exitNow: false,
25
- }
26
- })
27
-
28
- it('renders correct message', () => {
29
- render(props)
30
- screen.getByText('test message')
31
- screen.getByText('heading message')
32
- })
33
- it('truncates heading message whern too long', () => {
34
- props = {
35
- ...props,
36
- heading: 'Super-long-protocol-file-name-that-the-user-made.py',
37
- }
38
- render(props)
39
- screen.getByText('Super-long-protocol-file-name-that-the-u...py')
40
- })
41
- it('calls onClose when close button is pressed', () => {
42
- vi.useFakeTimers()
43
- render(props)
44
- const closeButton = screen.getByRole('button')
45
- fireEvent.click(closeButton)
46
- act(() => {
47
- vi.advanceTimersByTime(TOAST_ANIMATION_DURATION)
48
- })
49
- expect(props.onClose).toHaveBeenCalled()
50
- })
51
- it('does not render close button if buttonText and closeButton are undefined', () => {
52
- props = {
53
- ...props,
54
- buttonText: undefined,
55
- closeButton: undefined,
56
- }
57
- render(props)
58
- expect(screen.queryByRole('button')).toBeNull()
59
- })
60
- it('should have success styling when passing success as type', () => {
61
- render(props)
62
- const successToast = screen.getByTestId('Toast_success')
63
- expect(successToast).toHaveStyle(`color: #04aa65
64
- background-color: ##baffcd`)
65
- screen.getByLabelText('icon_success')
66
- })
67
- it('should have warning styling when passing warning as type', () => {
68
- props = {
69
- ...props,
70
- type: 'warning',
71
- }
72
- render(props)
73
- const warningToast = screen.getByTestId('Toast_warning')
74
- expect(warningToast).toHaveStyle(`color: #f09d20
75
- background-color: #ffe9be`)
76
- screen.getByLabelText('icon_warning')
77
- })
78
-
79
- it('after 7 seconds the toast should be closed automatically', async () => {
80
- vi.useFakeTimers()
81
- props = {
82
- ...props,
83
- duration: 7000,
84
- }
85
- render(props)
86
- screen.getByText('test message')
87
- act(() => {
88
- vi.advanceTimersByTime(100)
89
- })
90
- expect(props.onClose).not.toHaveBeenCalled()
91
- act(() => {
92
- vi.advanceTimersByTime(8000)
93
- })
94
- expect(props.onClose).toHaveBeenCalled()
95
- })
96
-
97
- it('should stay more than 7 seconds when disableTimeout is true', async () => {
98
- vi.useFakeTimers()
99
- props = {
100
- ...props,
101
- disableTimeout: true,
102
- }
103
- render(props)
104
- screen.getByText('test message')
105
- act(() => {
106
- vi.advanceTimersByTime(100)
107
- })
108
- expect(props.onClose).not.toHaveBeenCalled()
109
- act(() => {
110
- vi.advanceTimersByTime(7000)
111
- })
112
- expect(props.onClose).not.toHaveBeenCalled()
113
- })
114
-
115
- it('should not stay more than 7 seconds when disableTimeout is false', async () => {
116
- vi.useFakeTimers()
117
- props = {
118
- ...props,
119
- disableTimeout: false,
120
- }
121
- render(props)
122
- screen.getByText('test message')
123
- act(() => {
124
- vi.advanceTimersByTime(100)
125
- })
126
- expect(props.onClose).not.toHaveBeenCalled()
127
- act(() => {
128
- vi.advanceTimersByTime(9000)
129
- })
130
- expect(props.onClose).toHaveBeenCalled()
131
- })
132
-
133
- it('should dismiss when a second toast appears', async () => {
134
- vi.useFakeTimers()
135
- props = {
136
- ...props,
137
- disableTimeout: true,
138
- exitNow: true,
139
- }
140
- render(props)
141
- screen.getByText('test message')
142
- act(() => {
143
- vi.advanceTimersByTime(100)
144
- })
145
- expect(props.onClose).not.toHaveBeenCalled()
146
- act(() => {
147
- vi.advanceTimersByTime(TOAST_ANIMATION_DURATION)
148
- })
149
- expect(props.onClose).toHaveBeenCalled()
150
- })
151
- it('renders link text with an optional callback', async () => {
152
- vi.useFakeTimers()
153
- props = {
154
- ...props,
155
- linkText: 'test link',
156
- onLinkClick: vi.fn(),
157
- }
158
- render(props)
159
- const clickableLink = screen.getByText('test link')
160
- fireEvent.click(clickableLink)
161
- expect(props.onLinkClick).toHaveBeenCalled()
162
- })
163
- it('toast will not disappear on a general click if both close button and clickable link present', async () => {
164
- vi.useFakeTimers()
165
- props = {
166
- ...props,
167
- linkText: 'test link',
168
- closeButton: true,
169
- }
170
- render(props)
171
- const clickableLink = screen.getByText('test message')
172
- fireEvent.click(clickableLink)
173
- act(() => {
174
- vi.advanceTimersByTime(TOAST_ANIMATION_DURATION)
175
- })
176
- expect(props.onClose).not.toHaveBeenCalled()
177
- })
178
- })