@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.
- package/package.json +2 -2
- package/src/hardware-sim/BaseDeck/something.test.tsx +7 -0
- package/src/hardware-sim/Deck/SlotLabels.tsx +1 -1
- package/src/hardware-sim/ProtocolDeck/LabwareInfo.tsx +1 -1
- package/src/hardware-sim/ProtocolDeck/index.tsx +2 -2
- package/src/index.ts +2 -41
- package/src/molecules/DeckInfoLabel/index.tsx +1 -1
- package/src/molecules/DeckLabel/index.tsx +3 -3
- package/lib/__tests__/utils.test.d.ts +0 -1
- package/lib/alerts/AlertItem.d.ts +0 -21
- package/lib/alerts/index.d.ts +0 -1
- package/lib/atoms/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
- package/lib/atoms/Checkbox/index.d.ts +0 -25
- package/lib/atoms/CheckboxField/__tests__/CheckboxField.test.d.ts +0 -1
- package/lib/atoms/CheckboxField/index.d.ts +0 -20
- package/lib/atoms/Chip/__tests__/Chip.test.d.ts +0 -1
- package/lib/atoms/Chip/index.d.ts +0 -20
- package/lib/atoms/Divider/index.d.ts +0 -5
- package/lib/atoms/InputField/__tests__/InputField.test.d.ts +0 -1
- package/lib/atoms/InputField/index.d.ts +0 -68
- package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordion.d.ts +0 -10
- package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.d.ts +0 -7
- package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +0 -14
- package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +0 -3
- package/lib/atoms/ListButton/__tests__/ListButton.test.d.ts +0 -1
- package/lib/atoms/ListButton/__tests__/ListButtonAccordion.test.d.ts +0 -1
- package/lib/atoms/ListButton/__tests__/ListButtonRadioButton.test.d.ts +0 -1
- package/lib/atoms/ListButton/index.d.ts +0 -11
- package/lib/atoms/ListItem/ListItemChildren/ListItemCustomize.d.ts +0 -15
- package/lib/atoms/ListItem/ListItemChildren/ListItemDescriptor.d.ts +0 -8
- package/lib/atoms/ListItem/ListItemChildren/index.d.ts +0 -2
- package/lib/atoms/ListItem/__tests__/ListItem.test.d.ts +0 -1
- package/lib/atoms/ListItem/index.d.ts +0 -14
- package/lib/atoms/MenuList/MenuItem.d.ts +0 -7
- package/lib/atoms/MenuList/OverflowBtn.d.ts +0 -7
- package/lib/atoms/MenuList/__tests__/MenuItem.test.d.ts +0 -1
- package/lib/atoms/MenuList/__tests__/MenuList.test.d.ts +0 -1
- package/lib/atoms/MenuList/__tests__/OverflowBtn.test.d.ts +0 -1
- package/lib/atoms/MenuList/index.d.ts +0 -8
- package/lib/atoms/Snackbar/__tests__/Snackbar.test.d.ts +0 -1
- package/lib/atoms/Snackbar/index.d.ts +0 -7
- package/lib/atoms/StepMeter/index.d.ts +0 -7
- package/lib/atoms/StyledText/LegacyStyledText.d.ts +0 -6
- package/lib/atoms/StyledText/StyledText.d.ts +0 -154
- package/lib/atoms/StyledText/index.d.ts +0 -2
- package/lib/atoms/Tag/__tests__/Tag.test.d.ts +0 -1
- package/lib/atoms/Tag/index.d.ts +0 -14
- package/lib/atoms/Toast/__tests__/ODDToast.test.d.ts +0 -1
- package/lib/atoms/Toast/__tests__/Toast.test.d.ts +0 -1
- package/lib/atoms/Toast/index.d.ts +0 -25
- package/lib/atoms/ToggleGroup/__tests__/ToggleGroup.test.d.ts +0 -1
- package/lib/atoms/ToggleGroup/index.d.ts +0 -9
- package/lib/atoms/Tooltip/__tests__/Tooltip.test.d.ts +0 -1
- package/lib/atoms/Tooltip/index.d.ts +0 -11
- package/lib/atoms/buttons/AlertPrimaryButton.d.ts +0 -1
- package/lib/atoms/buttons/AltPrimaryButton.d.ts +0 -1
- package/lib/atoms/buttons/EmptySelectorButton.d.ts +0 -10
- package/lib/atoms/buttons/LargeButton.d.ts +0 -17
- package/lib/atoms/buttons/PrimaryButton.d.ts +0 -1
- package/lib/atoms/buttons/RadioButton.d.ts +0 -21
- package/lib/atoms/buttons/SecondaryButton.d.ts +0 -7
- package/lib/atoms/buttons/__tests__/AlertPrimaryButton.test.d.ts +0 -1
- package/lib/atoms/buttons/__tests__/AltPrimaryButton.test.d.ts +0 -1
- package/lib/atoms/buttons/__tests__/EmptySelectorButton.test.d.ts +0 -1
- package/lib/atoms/buttons/__tests__/LargeButton.test.d.ts +0 -1
- package/lib/atoms/buttons/__tests__/PrimaryButton.test.d.ts +0 -1
- package/lib/atoms/buttons/__tests__/RadioButton.test.d.ts +0 -1
- package/lib/atoms/buttons/__tests__/SecondaryButton.test.d.ts +0 -1
- package/lib/atoms/buttons/index.d.ts +0 -6
- package/lib/atoms/index.d.ts +0 -20
- package/lib/barrel.d.ts +0 -3
- package/lib/buttons/Button.d.ts +0 -50
- package/lib/buttons/DeprecatedPrimaryButton.d.ts +0 -8
- package/lib/buttons/FlatButton.d.ts +0 -5
- package/lib/buttons/IconButton.d.ts +0 -14
- package/lib/buttons/OutlineButton.d.ts +0 -8
- package/lib/buttons/index.d.ts +0 -5
- package/lib/controls/ControlInfo.d.ts +0 -6
- package/lib/controls/LabeledButton.d.ts +0 -8
- package/lib/controls/LabeledCheckbox.d.ts +0 -10
- package/lib/controls/LabeledControl.d.ts +0 -7
- package/lib/controls/LabeledRadioGroup.d.ts +0 -8
- package/lib/controls/LabeledSelect.d.ts +0 -9
- package/lib/controls/LabeledToggle.d.ts +0 -11
- package/lib/controls/StackedLabeledControl.d.ts +0 -7
- package/lib/controls/ToggleButton.d.ts +0 -5
- package/lib/controls/index.d.ts +0 -6
- package/lib/forms/DeprecatedCheckboxField.d.ts +0 -33
- package/lib/forms/DropdownField.d.ts +0 -38
- package/lib/forms/FormGroup.d.ts +0 -19
- package/lib/forms/LegacyInputField.d.ts +0 -51
- package/lib/forms/RadioGroup.d.ts +0 -29
- package/lib/forms/Select.d.ts +0 -26
- package/lib/forms/SelectField.d.ts +0 -33
- package/lib/forms/ToggleField.d.ts +0 -22
- package/lib/forms/__tests__/DeprecatedCheckboxField.test.d.ts +0 -1
- package/lib/forms/__tests__/DropdownField.test.d.ts +0 -1
- package/lib/forms/__tests__/InputField.test.d.ts +0 -1
- package/lib/forms/__tests__/Select.test.d.ts +0 -1
- package/lib/forms/__tests__/SelectField.test.d.ts +0 -1
- package/lib/forms/__tests__/ToggleField.test.d.ts +0 -1
- package/lib/forms/index.d.ts +0 -8
- package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +0 -49
- package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +0 -12
- package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +0 -2
- package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +0 -2
- package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +0 -13
- package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +0 -20
- package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +0 -14
- package/lib/hardware-sim/BaseDeck/__fixtures__/index.d.ts +0 -4
- package/lib/hardware-sim/BaseDeck/index.d.ts +0 -5
- package/lib/hardware-sim/Deck/DeckFromLayers.d.ts +0 -10
- package/lib/hardware-sim/Deck/FlexTrash.d.ts +0 -14
- package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +0 -16
- package/lib/hardware-sim/Deck/OT2Layers.d.ts +0 -10
- package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +0 -14
- package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +0 -12
- package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +0 -9
- package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +0 -21
- package/lib/hardware-sim/Deck/SlotLabels.d.ts +0 -12
- package/lib/hardware-sim/Deck/__mocks__/getDeckDefinitions.d.ts +0 -1
- package/lib/hardware-sim/Deck/constants.d.ts +0 -1
- package/lib/hardware-sim/Deck/index.d.ts +0 -8
- package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +0 -8
- package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +0 -11
- package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/StaticFixture.d.ts +0 -12
- package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +0 -11
- package/lib/hardware-sim/DeckConfigurator/constants.d.ts +0 -20
- package/lib/hardware-sim/DeckConfigurator/index.d.ts +0 -20
- package/lib/hardware-sim/DeckSlotLocation/index.d.ts +0 -15
- package/lib/hardware-sim/Labware/Labware.d.ts +0 -39
- package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAutoclavableDeckRiser.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsToughPCRAutoSealingLid.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +0 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +0 -27
- package/lib/hardware-sim/Labware/LabwareRender.d.ts +0 -46
- package/lib/hardware-sim/Labware/LabwareStackRender.d.ts +0 -20
- package/lib/hardware-sim/Labware/__tests__/Labware.test.d.ts +0 -1
- package/lib/hardware-sim/Labware/__tests__/LabwareRender.test.d.ts +0 -1
- package/lib/hardware-sim/Labware/index.d.ts +0 -5
- package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +0 -11
- package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +0 -21
- package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +0 -15
- package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +0 -25
- package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +0 -9
- package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +0 -19
- package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +0 -20
- package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +0 -12
- package/lib/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.d.ts +0 -1
- package/lib/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.d.ts +0 -1
- package/lib/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.d.ts +0 -1
- package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +0 -8
- package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +0 -12
- package/lib/hardware-sim/Module/HeaterShaker.d.ts +0 -4
- package/lib/hardware-sim/Module/MagneticBlock.d.ts +0 -1
- package/lib/hardware-sim/Module/MagneticModule.d.ts +0 -1
- package/lib/hardware-sim/Module/ModuleTag.d.ts +0 -9
- package/lib/hardware-sim/Module/PlateReader.d.ts +0 -1
- package/lib/hardware-sim/Module/Temperature.d.ts +0 -4
- package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.d.ts +0 -6
- package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.d.ts +0 -6
- package/lib/hardware-sim/Module/Thermocycler/index.d.ts +0 -7
- package/lib/hardware-sim/Module/index.d.ts +0 -18
- package/lib/hardware-sim/Pipette/EightEmanatingNozzles.d.ts +0 -4
- package/lib/hardware-sim/Pipette/EmanatingNozzle.d.ts +0 -4
- package/lib/hardware-sim/Pipette/PipetteRender.d.ts +0 -8
- package/lib/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.d.ts +0 -1
- package/lib/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.d.ts +0 -1
- package/lib/hardware-sim/Pipette/__tests__/PipetteRender.test.d.ts +0 -1
- package/lib/hardware-sim/Pipette/constants.d.ts +0 -7
- package/lib/hardware-sim/Pipette/index.d.ts +0 -1
- package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +0 -6
- package/lib/hardware-sim/ProtocolDeck/index.d.ts +0 -14
- package/lib/hardware-sim/ProtocolDeck/types.d.ts +0 -8
- package/lib/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.d.ts +0 -1
- package/lib/hardware-sim/ProtocolDeck/utils/getInitiallyLoadedLabwareByAdapter.d.ts +0 -5
- package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +0 -12
- package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInfoByLiquidId.d.ts +0 -3
- package/lib/hardware-sim/ProtocolDeck/utils/getModulesInSlots.d.ts +0 -10
- package/lib/hardware-sim/ProtocolDeck/utils/getStandardDeckViewLayerBlockList.d.ts +0 -2
- package/lib/hardware-sim/ProtocolDeck/utils/getWellFillFromLabwareId.d.ts +0 -4
- package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +0 -3
- package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +0 -7
- package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +0 -16
- package/lib/hardware-sim/RobotCoordinateSpace/index.d.ts +0 -2
- package/lib/hardware-sim/index.d.ts +0 -11
- package/lib/hardware-sim/utils.d.ts +0 -3
- package/lib/helix-design-system/borders.d.ts +0 -26
- package/lib/helix-design-system/colors.d.ts +0 -86
- package/lib/helix-design-system/index.d.ts +0 -4
- package/lib/helix-design-system/product/index.d.ts +0 -1
- package/lib/helix-design-system/product/typography.d.ts +0 -79
- package/lib/helix-design-system/style.d.ts +0 -1
- package/lib/hooks/__tests__/useConditionalConfirm.test.d.ts +0 -1
- package/lib/hooks/__tests__/useDrag.test.d.ts +0 -1
- package/lib/hooks/__tests__/useIdle.test.d.ts +0 -1
- package/lib/hooks/__tests__/useInterval.test.d.ts +0 -1
- package/lib/hooks/__tests__/useLongPress.test.d.ts +0 -1
- package/lib/hooks/__tests__/useMountEffect.test.d.ts +0 -1
- package/lib/hooks/__tests__/usePrevious.test.d.ts +0 -1
- package/lib/hooks/__tests__/useScrolling.test.d.ts +0 -1
- package/lib/hooks/__tests__/useSwipe.test.d.ts +0 -1
- package/lib/hooks/__tests__/useTimeout.test.d.ts +0 -1
- package/lib/hooks/__tests__/useToggle.test.d.ts +0 -1
- package/lib/hooks/index.d.ts +0 -13
- package/lib/hooks/useConditionalConfirm.d.ts +0 -41
- package/lib/hooks/useDrag.d.ts +0 -22
- package/lib/hooks/useIdle.d.ts +0 -11
- package/lib/hooks/useInterval.d.ts +0 -11
- package/lib/hooks/useLongPress.d.ts +0 -19
- package/lib/hooks/useMenuHandleClickOutside.d.ts +0 -9
- package/lib/hooks/useMountEffect.d.ts +0 -8
- package/lib/hooks/usePrevious.d.ts +0 -9
- package/lib/hooks/useScrolling.d.ts +0 -1
- package/lib/hooks/useSelectDeckLocation/index.d.ts +0 -18
- package/lib/hooks/useSwipe.d.ts +0 -12
- package/lib/hooks/useTimeout.d.ts +0 -9
- package/lib/hooks/useToggle.d.ts +0 -22
- package/lib/icons/Icon.d.ts +0 -34
- package/lib/icons/ModuleIcon.d.ts +0 -11
- package/lib/icons/NotificationIcon.d.ts +0 -12
- package/lib/icons/icon-data.d.ts +0 -4
- package/lib/icons/index.d.ts +0 -4
- package/lib/images/index.d.ts +0 -1
- package/lib/images/labware/index.d.ts +0 -1
- package/lib/images/labware/measurement-guide/index.d.ts +0 -13
- package/lib/index.d.ts +0 -26
- package/lib/instrument/InstrumentDiagram.d.ts +0 -11
- package/lib/instrument/InstrumentGroup.d.ts +0 -11
- package/lib/instrument/InstrumentInfo.d.ts +0 -18
- package/lib/instrument/PipetteSelect.d.ts +0 -20
- package/lib/instrument/__tests__/InstrumentInfo.test.d.ts +0 -1
- package/lib/instrument/__tests__/PipetteSelect.test.d.ts +0 -1
- package/lib/instrument/index.d.ts +0 -4
- package/lib/interaction-enhancers/ClickOutside.d.ts +0 -18
- package/lib/interaction-enhancers/HandleKeypress.d.ts +0 -27
- package/lib/interaction-enhancers/__tests__/useHover.test.d.ts +0 -1
- package/lib/interaction-enhancers/index.d.ts +0 -4
- package/lib/interaction-enhancers/useHover.d.ts +0 -33
- package/lib/interaction-enhancers/useOnClickOutside.d.ts +0 -5
- package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +0 -7
- package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
- package/lib/legacy-hardware-sim/index.d.ts +0 -2
- package/lib/lists/SidePanelGroup.d.ts +0 -18
- package/lib/lists/TitledList.d.ts +0 -44
- package/lib/lists/index.d.ts +0 -2
- package/lib/modals/AlertModal.d.ts +0 -28
- package/lib/modals/ContinueModal.d.ts +0 -10
- package/lib/modals/LegacyModal.d.ts +0 -24
- package/lib/modals/Modal.d.ts +0 -24
- package/lib/modals/ModalHeader.d.ts +0 -13
- package/lib/modals/ModalShell.d.ts +0 -34
- package/lib/modals/Overlay.d.ts +0 -9
- package/lib/modals/SpinnerModal.d.ts +0 -13
- package/lib/modals/SpinnerModalPage.d.ts +0 -12
- package/lib/modals/__tests__/Modal.test.d.ts +0 -1
- package/lib/modals/__tests__/ModalHeader.test.d.ts +0 -1
- package/lib/modals/__tests__/ModalShell.test.d.ts +0 -1
- package/lib/modals/index.d.ts +0 -9
- package/lib/molecules/Banner/__tests__/Banner.test.d.ts +0 -1
- package/lib/molecules/Banner/index.d.ts +0 -23
- package/lib/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.d.ts +0 -1
- package/lib/molecules/DeckInfoLabel/index.d.ts +0 -19
- package/lib/molecules/DeckLabel/__tests__/DeckLabel.test.d.ts +0 -1
- package/lib/molecules/DeckLabel/index.d.ts +0 -10
- package/lib/molecules/DropdownMenu/__tests__/DropdownMenu.test.d.ts +0 -1
- package/lib/molecules/DropdownMenu/index.d.ts +0 -41
- package/lib/molecules/InfoScreen/__tests__/InfoScreen.test.d.ts +0 -1
- package/lib/molecules/InfoScreen/index.d.ts +0 -8
- package/lib/molecules/LiquidIcon/__tests__/LiquidIcon.test.d.ts +0 -1
- package/lib/molecules/LiquidIcon/index.d.ts +0 -9
- package/lib/molecules/ParametersTable/__tests__/ParametersTable.test.d.ts +0 -1
- package/lib/molecules/ParametersTable/index.d.ts +0 -10
- package/lib/molecules/Tabs/__tests__/Tabs.test.d.ts +0 -1
- package/lib/molecules/Tabs/index.d.ts +0 -10
- package/lib/molecules/index.d.ts +0 -8
- package/lib/nav/SidePanel.d.ts +0 -6
- package/lib/nav/index.d.ts +0 -1
- package/lib/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.d.ts +0 -1
- package/lib/organisms/DeckLabelSet/index.d.ts +0 -11
- package/lib/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.d.ts +0 -1
- package/lib/organisms/EndUserAgreementFooter/index.d.ts +0 -1
- package/lib/organisms/Toolbox/__tests__/Toolbox.test.d.ts +0 -1
- package/lib/organisms/Toolbox/index.d.ts +0 -20
- package/lib/organisms/index.d.ts +0 -3
- package/lib/primitives/Box.d.ts +0 -7
- package/lib/primitives/Btn.d.ts +0 -59
- package/lib/primitives/Flex.d.ts +0 -7
- package/lib/primitives/ForeignObject.d.ts +0 -23
- package/lib/primitives/Link.d.ts +0 -11
- package/lib/primitives/Svg.d.ts +0 -23
- package/lib/primitives/Text.d.ts +0 -7
- package/lib/primitives/__tests__/Box.test.d.ts +0 -1
- package/lib/primitives/__tests__/Btn.test.d.ts +0 -1
- package/lib/primitives/__tests__/Flex.test.d.ts +0 -1
- package/lib/primitives/__tests__/Link.test.d.ts +0 -1
- package/lib/primitives/__tests__/Svg.test.d.ts +0 -1
- package/lib/primitives/__tests__/Text.test.d.ts +0 -1
- package/lib/primitives/__tests__/primitives.test.d.ts +0 -1
- package/lib/primitives/__tests__/style-props.test.d.ts +0 -1
- package/lib/primitives/index.d.ts +0 -9
- package/lib/primitives/style-props.d.ts +0 -4
- package/lib/primitives/types.d.ts +0 -95
- package/lib/robot-types.d.ts +0 -1
- package/lib/slotmap/OT2SlotMap.d.ts +0 -9
- package/lib/slotmap/__tests__/OT2SlotMap.test.d.ts +0 -1
- package/lib/slotmap/index.d.ts +0 -1
- package/lib/structure/Card.d.ts +0 -18
- package/lib/structure/LabeledValue.d.ts +0 -12
- package/lib/structure/Pill.d.ts +0 -18
- package/lib/structure/Splash.d.ts +0 -8
- package/lib/structure/TitleBar.d.ts +0 -17
- package/lib/structure/index.d.ts +0 -5
- package/lib/styles/borders.d.ts +0 -8
- package/lib/styles/colors.d.ts +0 -37
- package/lib/styles/cursor.d.ts +0 -10
- package/lib/styles/flexbox.d.ts +0 -34
- package/lib/styles/index.d.ts +0 -8
- package/lib/styles/layout.d.ts +0 -24
- package/lib/styles/position.d.ts +0 -5
- package/lib/styles/spacing.d.ts +0 -9
- package/lib/styles/typography.d.ts +0 -36
- package/lib/testing/utils/index.d.ts +0 -2
- package/lib/testing/utils/matchers.d.ts +0 -3
- package/lib/testing/utils/renderWithProviders.d.ts +0 -9
- package/lib/tooltips/DeprecatedTooltip.d.ts +0 -37
- package/lib/tooltips/HoverTooltip.d.ts +0 -36
- package/lib/tooltips/LegacyTooltip.d.ts +0 -35
- package/lib/tooltips/__tests__/Tooltip.test.d.ts +0 -1
- package/lib/tooltips/__tests__/useHoverTooltip.test.d.ts +0 -1
- package/lib/tooltips/__tests__/usePopper.test.d.ts +0 -1
- package/lib/tooltips/__tests__/useTooltip.test.d.ts +0 -1
- package/lib/tooltips/constants.d.ts +0 -17
- package/lib/tooltips/index.d.ts +0 -8
- package/lib/tooltips/styles.d.ts +0 -12
- package/lib/tooltips/types.d.ts +0 -52
- package/lib/tooltips/useHoverTooltip.d.ts +0 -24
- package/lib/tooltips/usePopper.d.ts +0 -2
- package/lib/tooltips/useTooltip.d.ts +0 -31
- package/lib/ui-style-constants/index.d.ts +0 -4
- package/lib/ui-style-constants/responsiveness.d.ts +0 -3
- package/lib/ui-style-constants/spacing.d.ts +0 -18
- package/lib/ui-style-constants/typography.d.ts +0 -71
- package/lib/ui-style-constants/viewport.d.ts +0 -15
- package/lib/utils.d.ts +0 -15
- package/src/__tests__/utils.test.ts +0 -27
- package/src/alerts/alerts.module.css +0 -103
- package/src/atoms/Checkbox/__tests__/Checkbox.test.tsx +0 -55
- package/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx +0 -141
- package/src/atoms/Chip/__tests__/Chip.test.tsx +0 -429
- package/src/atoms/InputField/__tests__/InputField.test.tsx +0 -63
- package/src/atoms/ListButton/__tests__/ListButton.test.tsx +0 -46
- package/src/atoms/ListButton/__tests__/ListButtonAccordion.test.tsx +0 -35
- package/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx +0 -27
- package/src/atoms/ListItem/__tests__/ListItem.test.tsx +0 -61
- package/src/atoms/MenuList/__tests__/MenuItem.test.tsx +0 -50
- package/src/atoms/MenuList/__tests__/MenuList.test.tsx +0 -36
- package/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx +0 -33
- package/src/atoms/Snackbar/__tests__/Snackbar.test.tsx +0 -73
- package/src/atoms/Tag/__tests__/Tag.test.tsx +0 -55
- package/src/atoms/Toast/__tests__/ODDToast.test.tsx +0 -178
- package/src/atoms/Toast/__tests__/Toast.test.tsx +0 -174
- package/src/atoms/ToggleGroup/__tests__/ToggleGroup.test.tsx +0 -28
- package/src/atoms/Tooltip/__tests__/Tooltip.test.tsx +0 -78
- package/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx +0 -47
- package/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx +0 -57
- package/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx +0 -42
- package/src/atoms/buttons/__tests__/LargeButton.test.tsx +0 -91
- package/src/atoms/buttons/__tests__/PrimaryButton.test.tsx +0 -64
- package/src/atoms/buttons/__tests__/RadioButton.test.tsx +0 -98
- package/src/atoms/buttons/__tests__/SecondaryButton.test.tsx +0 -54
- package/src/buttons/buttons.module.css +0 -428
- package/src/controls/styles.module.css +0 -103
- package/src/forms/Select.module.css +0 -118
- package/src/forms/SelectField.module.css +0 -16
- package/src/forms/__tests__/DeprecatedCheckboxField.test.tsx +0 -5
- package/src/forms/__tests__/DropdownField.test.tsx +0 -5
- package/src/forms/__tests__/InputField.test.tsx +0 -5
- package/src/forms/__tests__/Select.test.tsx +0 -5
- package/src/forms/__tests__/SelectField.test.tsx +0 -5
- package/src/forms/__tests__/ToggleField.test.tsx +0 -5
- package/src/forms/forms.module.css +0 -239
- package/src/hardware-sim/Labware/__tests__/Labware.test.tsx +0 -43
- package/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx +0 -54
- package/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx +0 -66
- package/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx +0 -31
- package/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx +0 -91
- package/src/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.tsx +0 -16
- package/src/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.tsx +0 -67
- package/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx +0 -99
- package/src/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.ts +0 -158
- package/src/hooks/__tests__/useConditionalConfirm.test.tsx +0 -5
- package/src/hooks/__tests__/useDrag.test.ts +0 -46
- package/src/hooks/__tests__/useIdle.test.ts +0 -68
- package/src/hooks/__tests__/useInterval.test.tsx +0 -5
- package/src/hooks/__tests__/useLongPress.test.ts +0 -25
- package/src/hooks/__tests__/useMountEffect.test.tsx +0 -5
- package/src/hooks/__tests__/usePrevious.test.tsx +0 -5
- package/src/hooks/__tests__/useScrolling.test.tsx +0 -46
- package/src/hooks/__tests__/useSwipe.test.tsx +0 -26
- package/src/hooks/__tests__/useTimeout.test.tsx +0 -5
- package/src/hooks/__tests__/useToggle.test.tsx +0 -5
- package/src/index.module.css +0 -9
- package/src/instrument/PipetteSelect.module.css +0 -14
- package/src/instrument/__tests__/InstrumentInfo.test.tsx +0 -55
- package/src/instrument/__tests__/PipetteSelect.test.tsx +0 -4
- package/src/instrument/instrument.module.css +0 -45
- package/src/interaction-enhancers/__tests__/useHover.test.tsx +0 -4
- package/src/legacy-hardware-sim/LabwareNameOverlay.module.css +0 -20
- package/src/legacy-hardware-sim/ModuleItem.module.css +0 -98
- package/src/lists/lists.module.css +0 -171
- package/src/modals/__tests__/Modal.test.tsx +0 -65
- package/src/modals/__tests__/ModalHeader.test.tsx +0 -73
- package/src/modals/__tests__/ModalShell.test.tsx +0 -45
- package/src/modals/modals.module.css +0 -275
- package/src/molecules/Banner/__tests__/Banner.test.tsx +0 -94
- package/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx +0 -49
- package/src/molecules/DeckLabel/__tests__/DeckLabel.test.tsx +0 -69
- package/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx +0 -85
- package/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx +0 -40
- package/src/molecules/LiquidIcon/__tests__/LiquidIcon.test.tsx +0 -50
- package/src/molecules/ParametersTable/__tests__/ParametersTable.test.tsx +0 -126
- package/src/molecules/Tabs/__tests__/Tabs.test.tsx +0 -90
- package/src/nav/SidePanel.module.css +0 -34
- package/src/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.tsx +0 -49
- package/src/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.tsx +0 -21
- package/src/organisms/Toolbox/__tests__/Toolbox.test.tsx +0 -35
- package/src/primitives/__tests__/Box.test.tsx +0 -4
- package/src/primitives/__tests__/Btn.test.tsx +0 -4
- package/src/primitives/__tests__/Flex.test.tsx +0 -4
- package/src/primitives/__tests__/Link.test.tsx +0 -4
- package/src/primitives/__tests__/Svg.test.tsx +0 -4
- package/src/primitives/__tests__/Text.test.tsx +0 -4
- package/src/primitives/__tests__/primitives.test.tsx +0 -4
- package/src/primitives/__tests__/style-props.test.tsx +0 -4
- package/src/slotmap/__tests__/OT2SlotMap.test.tsx +0 -4
- package/src/slotmap/styles.module.css +0 -18
- package/src/structure/Pill.module.css +0 -16
- package/src/structure/Splash.module.css +0 -16
- package/src/structure/structure.module.css +0 -114
- package/src/styles/borders.module.css +0 -20
- package/src/styles/colors.module.css +0 -57
- package/src/styles/index.module.css +0 -8
- package/src/styles/typography.module.css +0 -22
- package/src/tooltips/__tests__/Tooltip.test.tsx +0 -4
- package/src/tooltips/__tests__/useHoverTooltip.test.tsx +0 -4
- package/src/tooltips/__tests__/usePopper.test.tsx +0 -4
- package/src/tooltips/__tests__/useTooltip.test.tsx +0 -4
- package/src/tooltips/tooltips.module.css +0 -72
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, vi, expect, beforeEach } from 'vitest'
|
|
3
|
-
import { fireEvent, screen } from '@testing-library/react'
|
|
4
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
5
|
-
|
|
6
|
-
import { Banner } from '..'
|
|
7
|
-
|
|
8
|
-
const render = (props: React.ComponentProps<typeof Banner>) => {
|
|
9
|
-
return renderWithProviders(<Banner {...props} />)[0]
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
describe('Banner', () => {
|
|
13
|
-
let props: React.ComponentProps<typeof Banner>
|
|
14
|
-
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
props = {
|
|
17
|
-
type: 'success',
|
|
18
|
-
children: 'TITLE',
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
it('renders success banner', () => {
|
|
23
|
-
render(props)
|
|
24
|
-
screen.getByLabelText('icon_success')
|
|
25
|
-
screen.getByText('TITLE')
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
it('renders success banner with exit button and when click dismisses banner', () => {
|
|
29
|
-
props = {
|
|
30
|
-
type: 'success',
|
|
31
|
-
children: 'TITLE',
|
|
32
|
-
onCloseClick: vi.fn(),
|
|
33
|
-
}
|
|
34
|
-
render(props)
|
|
35
|
-
screen.getByText('TITLE')
|
|
36
|
-
const btn = screen.getByLabelText('close_icon')
|
|
37
|
-
fireEvent.click(btn)
|
|
38
|
-
expect(props.onCloseClick).toHaveBeenCalled()
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('renders warning banner', () => {
|
|
42
|
-
props = {
|
|
43
|
-
type: 'warning',
|
|
44
|
-
children: 'TITLE',
|
|
45
|
-
}
|
|
46
|
-
render(props)
|
|
47
|
-
screen.getByLabelText('icon_warning')
|
|
48
|
-
screen.getByText('TITLE')
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
it('renders error banner', () => {
|
|
52
|
-
props = {
|
|
53
|
-
type: 'error',
|
|
54
|
-
children: 'TITLE',
|
|
55
|
-
}
|
|
56
|
-
render(props)
|
|
57
|
-
screen.getByLabelText('icon_error')
|
|
58
|
-
screen.getByText('TITLE')
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
it('renders updating banner', () => {
|
|
62
|
-
props = {
|
|
63
|
-
type: 'updating',
|
|
64
|
-
children: 'TITLE',
|
|
65
|
-
}
|
|
66
|
-
render(props)
|
|
67
|
-
screen.getByLabelText('icon_updating')
|
|
68
|
-
screen.getByText('TITLE')
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
it('renders custom icon banner', () => {
|
|
72
|
-
props = {
|
|
73
|
-
type: 'warning',
|
|
74
|
-
children: 'TITLE',
|
|
75
|
-
icon: { name: 'ot-hot-to-touch' },
|
|
76
|
-
}
|
|
77
|
-
render(props)
|
|
78
|
-
screen.getByLabelText('icon_warning')
|
|
79
|
-
screen.getByText('TITLE')
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
it('renders custom close', () => {
|
|
83
|
-
props = {
|
|
84
|
-
type: 'warning',
|
|
85
|
-
children: 'TITLE',
|
|
86
|
-
closeButton: 'close button',
|
|
87
|
-
onCloseClick: vi.fn(),
|
|
88
|
-
}
|
|
89
|
-
render(props)
|
|
90
|
-
const btn = screen.getByText('close button')
|
|
91
|
-
fireEvent.click(btn)
|
|
92
|
-
expect(props.onCloseClick).toHaveBeenCalled()
|
|
93
|
-
})
|
|
94
|
-
})
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, beforeEach, expect } from 'vitest'
|
|
3
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
4
|
-
import { screen } from '@testing-library/react'
|
|
5
|
-
import { SPACING } from '../../../ui-style-constants'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
|
|
8
|
-
import { DeckInfoLabel } from '..'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof DeckInfoLabel>) => {
|
|
11
|
-
return renderWithProviders(<DeckInfoLabel {...props} />)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('DeckInfoLabel', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof DeckInfoLabel>
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
props = {
|
|
19
|
-
deckLabel: 'A1',
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
it('should render the proper styles - web style', () => {
|
|
24
|
-
render(props)
|
|
25
|
-
const deckInfoLabel = screen.getByTestId('DeckInfoLabel_A1')
|
|
26
|
-
expect(deckInfoLabel).toHaveStyle(
|
|
27
|
-
`padding: ${SPACING.spacing2} ${SPACING.spacing4}`
|
|
28
|
-
)
|
|
29
|
-
expect(deckInfoLabel).toHaveStyle(`height: ${SPACING.spacing20}`)
|
|
30
|
-
expect(deckInfoLabel).toHaveStyle('width: max-content')
|
|
31
|
-
expect(deckInfoLabel).toHaveStyle(`border: 1px solid ${COLORS.black90}`)
|
|
32
|
-
expect(deckInfoLabel).toHaveStyle(`border-radius: ${BORDERS.borderRadius8}`)
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
it.todo('should render the proper styles - odd style')
|
|
36
|
-
|
|
37
|
-
it('should render deck label', () => {
|
|
38
|
-
render(props)
|
|
39
|
-
screen.getByText('A1')
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
it('should render an icon', () => {
|
|
43
|
-
props = {
|
|
44
|
-
iconName: 'ot-temperature-v2',
|
|
45
|
-
}
|
|
46
|
-
render(props)
|
|
47
|
-
screen.getByLabelText(props.iconName)
|
|
48
|
-
})
|
|
49
|
-
})
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { screen } from '@testing-library/react'
|
|
3
|
-
import { describe, it, beforeEach, expect } from 'vitest'
|
|
4
|
-
|
|
5
|
-
import { COLORS } from '../../../helix-design-system'
|
|
6
|
-
import { SPACING } from '../../../ui-style-constants'
|
|
7
|
-
import { FLEX_MAX_CONTENT } from '../../../styles'
|
|
8
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
9
|
-
import { DeckLabel } from '..'
|
|
10
|
-
|
|
11
|
-
const render = (props: React.ComponentProps<typeof DeckLabel>) => {
|
|
12
|
-
return renderWithProviders(<DeckLabel {...props} />)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
describe('DeckLabel', () => {
|
|
16
|
-
let props: React.ComponentProps<typeof DeckLabel>
|
|
17
|
-
|
|
18
|
-
beforeEach(() => {
|
|
19
|
-
props = {
|
|
20
|
-
text: 'mock DeckLabel text',
|
|
21
|
-
isSelected: false,
|
|
22
|
-
isLast: true,
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
it('should render text and styles isSelected - false', () => {
|
|
27
|
-
render(props)
|
|
28
|
-
screen.getByText('mock DeckLabel text')
|
|
29
|
-
const deckLabel = screen.getByTestId('DeckLabel_UnSelected')
|
|
30
|
-
expect(deckLabel).toHaveStyle(`padding: ${SPACING.spacing2}`)
|
|
31
|
-
expect(deckLabel).toHaveStyle(`width: ${FLEX_MAX_CONTENT}`)
|
|
32
|
-
expect(deckLabel).toHaveStyle(`color: ${COLORS.blue50}`)
|
|
33
|
-
expect(deckLabel).toHaveStyle(`border-right: 1.5px solid ${COLORS.blue50}`)
|
|
34
|
-
expect(deckLabel).toHaveStyle(`border-bottom: 1.5px solid ${COLORS.blue50}`)
|
|
35
|
-
expect(deckLabel).toHaveStyle(`border-left: 1.5px solid ${COLORS.blue50}`)
|
|
36
|
-
expect(deckLabel).toHaveStyle(`background-color: ${COLORS.white}`)
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
it('should render text and styles isSelected - false not last', () => {
|
|
40
|
-
props = {
|
|
41
|
-
...props,
|
|
42
|
-
isLast: false,
|
|
43
|
-
}
|
|
44
|
-
render(props)
|
|
45
|
-
screen.getByText('mock DeckLabel text')
|
|
46
|
-
const deckLabel = screen.getByTestId('DeckLabel_UnSelected')
|
|
47
|
-
expect(deckLabel).toHaveStyle(`padding: ${SPACING.spacing2}`)
|
|
48
|
-
expect(deckLabel).toHaveStyle(`width: ${FLEX_MAX_CONTENT}`)
|
|
49
|
-
expect(deckLabel).toHaveStyle(`color: ${COLORS.blue50}`)
|
|
50
|
-
expect(deckLabel).toHaveStyle(`border-right: 1.5px solid ${COLORS.blue50}`)
|
|
51
|
-
expect(deckLabel).toHaveStyle(`border-left: 1.5px solid ${COLORS.blue50}`)
|
|
52
|
-
expect(deckLabel).toHaveStyle(`background-color: ${COLORS.white}`)
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
it('should render text and styles isSelected - true', () => {
|
|
56
|
-
props = {
|
|
57
|
-
...props,
|
|
58
|
-
isSelected: true,
|
|
59
|
-
}
|
|
60
|
-
render(props)
|
|
61
|
-
screen.getByText('mock DeckLabel text')
|
|
62
|
-
const deckLabel = screen.getByTestId('DeckLabel_Selected')
|
|
63
|
-
expect(deckLabel).toHaveStyle(`padding: ${SPACING.spacing2}`)
|
|
64
|
-
expect(deckLabel).toHaveStyle(`width: ${FLEX_MAX_CONTENT}`)
|
|
65
|
-
expect(deckLabel).toHaveStyle(`color: ${COLORS.white}`)
|
|
66
|
-
expect(deckLabel).toHaveStyle(`border: 1.5px solid ${COLORS.blue50}`)
|
|
67
|
-
expect(deckLabel).toHaveStyle(`background-color: ${COLORS.blue50}`)
|
|
68
|
-
})
|
|
69
|
-
})
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { screen, fireEvent } from '@testing-library/react'
|
|
3
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
4
|
-
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { DropdownMenu } from '..'
|
|
7
|
-
import type { DropdownOption } from '..'
|
|
8
|
-
|
|
9
|
-
const mockOptions: DropdownOption[] = [
|
|
10
|
-
{ name: 'Option 1', value: 'option1' },
|
|
11
|
-
{ name: 'Option 2', value: 'option2' },
|
|
12
|
-
{ name: 'Option 3', value: 'option3' },
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
const mockOnClick = vi.fn()
|
|
16
|
-
|
|
17
|
-
const render = (props: React.ComponentProps<typeof DropdownMenu>) => {
|
|
18
|
-
return renderWithProviders(<DropdownMenu {...props} />)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
describe('DropdownMenu', () => {
|
|
22
|
-
let props: React.ComponentProps<typeof DropdownMenu>
|
|
23
|
-
|
|
24
|
-
beforeEach(() => {
|
|
25
|
-
props = {
|
|
26
|
-
filterOptions: mockOptions,
|
|
27
|
-
onClick: mockOnClick,
|
|
28
|
-
currentOption: mockOptions[0],
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
it('renders with default props', () => {
|
|
33
|
-
render(props)
|
|
34
|
-
expect(screen.getByText('Option 1')).toBeInTheDocument()
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
it('renders with custom props', () => {
|
|
38
|
-
props = {
|
|
39
|
-
filterOptions: mockOptions,
|
|
40
|
-
onClick: mockOnClick,
|
|
41
|
-
currentOption: mockOptions[0],
|
|
42
|
-
dropdownType: 'neutral',
|
|
43
|
-
title: 'Custom Dropdown',
|
|
44
|
-
caption: 'Select an option',
|
|
45
|
-
tooltipText: 'This is a tooltip',
|
|
46
|
-
}
|
|
47
|
-
render(props)
|
|
48
|
-
|
|
49
|
-
expect(screen.getByText('Custom Dropdown')).toBeInTheDocument()
|
|
50
|
-
expect(screen.getByText('Select an option')).toBeInTheDocument()
|
|
51
|
-
expect(screen.getByText('Option 1')).toBeInTheDocument()
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
it('opens dropdown menu on click', () => {
|
|
55
|
-
render(props)
|
|
56
|
-
fireEvent.click(screen.getByText('Option 1'))
|
|
57
|
-
expect(screen.getByText('Option 2')).toBeInTheDocument()
|
|
58
|
-
expect(screen.getByText('Option 3')).toBeInTheDocument()
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
it('calls onClick when an option is selected', () => {
|
|
62
|
-
render(props)
|
|
63
|
-
fireEvent.click(screen.getByText('Option 1'))
|
|
64
|
-
fireEvent.click(screen.getByText('Option 2'))
|
|
65
|
-
|
|
66
|
-
expect(mockOnClick).toHaveBeenCalledWith('option2')
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
// ToDo (kk:08/13/2024) activate when jsdom is updated
|
|
70
|
-
// it('renders tooltip when tooltipText is provided', () => {
|
|
71
|
-
// props = {
|
|
72
|
-
// filterOptions: mockOptions,
|
|
73
|
-
// onClick: mockOnClick,
|
|
74
|
-
// currentOption: mockOptions[0],
|
|
75
|
-
// title: 'With Tooltip',
|
|
76
|
-
// tooltipText: 'Tooltip content',
|
|
77
|
-
// }
|
|
78
|
-
// render(props)
|
|
79
|
-
|
|
80
|
-
// expect(screen.getByText('With Tooltip')).toBeInTheDocument()
|
|
81
|
-
// const infoIcon = screen.getByTestId('information_icon')
|
|
82
|
-
// fireEvent.mouseOver(infoIcon)
|
|
83
|
-
// expect(screen.getByText('Tooltip content')).toBeInTheDocument()
|
|
84
|
-
// })
|
|
85
|
-
})
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { screen } from '@testing-library/react'
|
|
3
|
-
import { describe, it, expect, beforeEach } from 'vitest'
|
|
4
|
-
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { InfoScreen } from '..'
|
|
8
|
-
|
|
9
|
-
const render = (props: React.ComponentProps<typeof InfoScreen>) => {
|
|
10
|
-
return renderWithProviders(<InfoScreen {...props} />)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
describe('InfoScreen', () => {
|
|
14
|
-
let props: React.ComponentProps<typeof InfoScreen>
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
props = {
|
|
18
|
-
content: 'mock info text',
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
it('should render text and icon with proper color - labware', () => {
|
|
23
|
-
render(props)
|
|
24
|
-
screen.getByLabelText('alert')
|
|
25
|
-
screen.getByText('mock info text')
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
it('should have proper styles', () => {
|
|
29
|
-
render(props)
|
|
30
|
-
expect(screen.getByTestId('InfoScreen')).toHaveStyle(
|
|
31
|
-
`background-color: ${COLORS.grey30}`
|
|
32
|
-
)
|
|
33
|
-
expect(screen.getByTestId('InfoScreen')).toHaveStyle(
|
|
34
|
-
`border-radius: ${BORDERS.borderRadius8}`
|
|
35
|
-
)
|
|
36
|
-
expect(screen.getByLabelText('alert')).toHaveStyle(
|
|
37
|
-
`color: ${COLORS.grey60}`
|
|
38
|
-
)
|
|
39
|
-
})
|
|
40
|
-
})
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, expect } from 'vitest'
|
|
3
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
4
|
-
import { screen } from '@testing-library/react'
|
|
5
|
-
import { SPACING } from '../../../ui-style-constants'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
|
|
8
|
-
import { LiquidIcon } from '..'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof LiquidIcon>) => {
|
|
11
|
-
return renderWithProviders(<LiquidIcon {...props} />)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('LiquidIcon', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof LiquidIcon>
|
|
16
|
-
|
|
17
|
-
it('should render the proper style for large icon', () => {
|
|
18
|
-
props = {
|
|
19
|
-
size: 'medium',
|
|
20
|
-
color: COLORS.red50,
|
|
21
|
-
}
|
|
22
|
-
render(props)
|
|
23
|
-
const LiquidIcon = screen.getByTestId(`LiquidIcon_${COLORS.red50}`)
|
|
24
|
-
expect(LiquidIcon).toHaveStyle(`padding: ${SPACING.spacing12}`)
|
|
25
|
-
expect(LiquidIcon).toHaveStyle('height: max-content')
|
|
26
|
-
expect(LiquidIcon).toHaveStyle('width: max-content')
|
|
27
|
-
expect(LiquidIcon).toHaveStyle(`background-color: ${COLORS.white}`)
|
|
28
|
-
expect(LiquidIcon).toHaveStyle(`border-style: ${BORDERS.styleSolid}`)
|
|
29
|
-
expect(LiquidIcon).toHaveStyle(`border-width: 1px`)
|
|
30
|
-
expect(LiquidIcon).toHaveStyle(`border-color: ${COLORS.grey30}`)
|
|
31
|
-
expect(LiquidIcon).toHaveStyle(`border-radius: ${BORDERS.borderRadius4}`)
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it('should render the proper style for large icon', () => {
|
|
35
|
-
props = {
|
|
36
|
-
size: 'small',
|
|
37
|
-
color: COLORS.blue50,
|
|
38
|
-
}
|
|
39
|
-
render(props)
|
|
40
|
-
const LiquidIcon = screen.getByTestId(`LiquidIcon_${COLORS.blue50}`)
|
|
41
|
-
expect(LiquidIcon).toHaveStyle(`padding: ${SPACING.spacing8}`)
|
|
42
|
-
expect(LiquidIcon).toHaveStyle('height: max-content')
|
|
43
|
-
expect(LiquidIcon).toHaveStyle('width: max-content')
|
|
44
|
-
expect(LiquidIcon).toHaveStyle(`background-color: ${COLORS.white}`)
|
|
45
|
-
expect(LiquidIcon).toHaveStyle(`border-style: ${BORDERS.styleSolid}`)
|
|
46
|
-
expect(LiquidIcon).toHaveStyle(`border-width: 1px`)
|
|
47
|
-
expect(LiquidIcon).toHaveStyle(`border-color: ${COLORS.grey30}`)
|
|
48
|
-
expect(LiquidIcon).toHaveStyle(`border-radius: ${BORDERS.borderRadius4}`)
|
|
49
|
-
})
|
|
50
|
-
})
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
3
|
-
import { describe, it, beforeEach } from 'vitest'
|
|
4
|
-
import { screen } from '@testing-library/react'
|
|
5
|
-
import { ParametersTable } from '../index'
|
|
6
|
-
|
|
7
|
-
import type { RunTimeParameter } from '@opentrons/shared-data'
|
|
8
|
-
|
|
9
|
-
const tMock = (key: string) => key
|
|
10
|
-
const mockRunTimeParameter: RunTimeParameter[] = [
|
|
11
|
-
{
|
|
12
|
-
displayName: 'Trash Tips',
|
|
13
|
-
variableName: 'TIP_TRASH',
|
|
14
|
-
description:
|
|
15
|
-
'to throw tip into the trash or to not throw tip into the trash',
|
|
16
|
-
type: 'bool',
|
|
17
|
-
default: true,
|
|
18
|
-
value: true,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
displayName: 'EtoH Volume',
|
|
22
|
-
variableName: 'ETOH_VOLUME',
|
|
23
|
-
description: '70% ethanol volume',
|
|
24
|
-
type: 'float',
|
|
25
|
-
suffix: 'mL',
|
|
26
|
-
min: 1.5,
|
|
27
|
-
max: 10.0,
|
|
28
|
-
default: 6.5,
|
|
29
|
-
value: 6.5,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
displayName: 'Default Module Offsets',
|
|
33
|
-
variableName: 'DEFAULT_OFFSETS',
|
|
34
|
-
description: 'default module offsets for temp, H-S, and none',
|
|
35
|
-
type: 'str',
|
|
36
|
-
value: 'none',
|
|
37
|
-
choices: [
|
|
38
|
-
{
|
|
39
|
-
displayName: 'No offsets',
|
|
40
|
-
value: 'none',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
displayName: 'temp offset',
|
|
44
|
-
value: '1',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
displayName: 'heater-shaker offset',
|
|
48
|
-
value: '2',
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
default: 'none',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
displayName: 'pipette mount',
|
|
55
|
-
variableName: 'mont',
|
|
56
|
-
description: 'pipette mount',
|
|
57
|
-
type: 'str',
|
|
58
|
-
value: 'left',
|
|
59
|
-
choices: [
|
|
60
|
-
{
|
|
61
|
-
displayName: 'Left',
|
|
62
|
-
value: 'left',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
displayName: 'Right',
|
|
66
|
-
value: 'right',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
default: 'left',
|
|
70
|
-
},
|
|
71
|
-
]
|
|
72
|
-
|
|
73
|
-
const render = (props: React.ComponentProps<typeof ParametersTable>) => {
|
|
74
|
-
return renderWithProviders(<ParametersTable {...props} />)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
describe('ParametersTable', () => {
|
|
78
|
-
let props: React.ComponentProps<typeof ParametersTable>
|
|
79
|
-
|
|
80
|
-
beforeEach(() => {
|
|
81
|
-
props = {
|
|
82
|
-
runTimeParameters: mockRunTimeParameter,
|
|
83
|
-
}
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
it('should render table header', () => {
|
|
87
|
-
render(props)
|
|
88
|
-
screen.getByText('Name')
|
|
89
|
-
screen.getByText('Default Value')
|
|
90
|
-
screen.getByText('Range')
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
it('should render parameters default information', () => {
|
|
94
|
-
render(props)
|
|
95
|
-
screen.getByText('Trash Tips')
|
|
96
|
-
screen.getByText('On')
|
|
97
|
-
screen.getByText('On, off')
|
|
98
|
-
|
|
99
|
-
screen.getByText('EtoH Volume')
|
|
100
|
-
screen.getByText('6.5 mL')
|
|
101
|
-
screen.getByText('1.5-10.0')
|
|
102
|
-
|
|
103
|
-
// more than 2 options
|
|
104
|
-
screen.getByText('Default Module Offsets')
|
|
105
|
-
screen.getByText('No offsets')
|
|
106
|
-
screen.getByText('3 options')
|
|
107
|
-
|
|
108
|
-
// 2 options
|
|
109
|
-
screen.getByText('pipette mount')
|
|
110
|
-
screen.getByText('Left')
|
|
111
|
-
screen.getByText('Left, Right')
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
it('should render the raw i18n values if a t prop is provided', () => {
|
|
115
|
-
props.t = tMock
|
|
116
|
-
render(props)
|
|
117
|
-
screen.getByText('name')
|
|
118
|
-
screen.getByText('default_value')
|
|
119
|
-
screen.getByText('range')
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
it('should render a description icon if description is provided', () => {
|
|
123
|
-
render(props)
|
|
124
|
-
screen.getByTestId('Icon_0')
|
|
125
|
-
})
|
|
126
|
-
})
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { vi, describe, it, expect, beforeEach } from 'vitest'
|
|
3
|
-
import { fireEvent, screen } from '@testing-library/react'
|
|
4
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
5
|
-
import { SPACING } from '../../../ui-style-constants'
|
|
6
|
-
import { POSITION_RELATIVE } from '../../../styles'
|
|
7
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
8
|
-
import { Tabs } from '../index'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof Tabs>) => {
|
|
11
|
-
return renderWithProviders(<Tabs {...props} />)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('Tabs', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof Tabs>
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
props = {
|
|
19
|
-
tabs: [
|
|
20
|
-
{ text: 'set up', onClick: vi.fn() },
|
|
21
|
-
{ text: 'parameters', onClick: vi.fn() },
|
|
22
|
-
{ text: 'module controls', onClick: vi.fn() },
|
|
23
|
-
],
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
it('renders unclicked tabs with text', () => {
|
|
28
|
-
render(props)
|
|
29
|
-
|
|
30
|
-
const tabTexts = ['set up', 'parameters', 'module controls']
|
|
31
|
-
const tabStyles = {
|
|
32
|
-
backgroundColor: COLORS.purple30,
|
|
33
|
-
borderRadius: BORDERS.borderRadius8,
|
|
34
|
-
padding: `${SPACING.spacing8} ${SPACING.spacing16}`,
|
|
35
|
-
position: POSITION_RELATIVE,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
tabTexts.forEach(text => {
|
|
39
|
-
const tab = screen.getByText(text)
|
|
40
|
-
expect(tab).not.toBeNull()
|
|
41
|
-
|
|
42
|
-
Object.entries(tabStyles).forEach(([key, value]) => {
|
|
43
|
-
expect(tab).toHaveStyle(`${key}: ${value}`)
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
it('renders an active tab', () => {
|
|
49
|
-
props.tabs[0].isActive = true
|
|
50
|
-
|
|
51
|
-
render(props)
|
|
52
|
-
|
|
53
|
-
const tab1 = screen.getByText('set up')
|
|
54
|
-
|
|
55
|
-
expect(tab1).toHaveStyle(`background-color: ${COLORS.purple50}`)
|
|
56
|
-
expect(tab1).toHaveStyle(`color: ${COLORS.white}`)
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
it('should call the right click handler when clicked', () => {
|
|
60
|
-
render(props)
|
|
61
|
-
|
|
62
|
-
const tabList = props.tabs
|
|
63
|
-
|
|
64
|
-
fireEvent.click(screen.getByText('set up'))
|
|
65
|
-
expect(tabList[0].onClick).toHaveBeenCalled()
|
|
66
|
-
|
|
67
|
-
fireEvent.click(screen.getByText('parameters'))
|
|
68
|
-
expect(tabList[1].onClick).toHaveBeenCalled()
|
|
69
|
-
|
|
70
|
-
fireEvent.click(screen.getByText('module controls'))
|
|
71
|
-
expect(tabList[2].onClick).toHaveBeenCalled()
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
it('should show right style when disabled', () => {
|
|
75
|
-
props = {
|
|
76
|
-
tabs: [
|
|
77
|
-
{ text: 'set up', onClick: vi.fn(), disabled: true },
|
|
78
|
-
{ text: 'parameters', onClick: vi.fn() },
|
|
79
|
-
{ text: 'module controls', onClick: vi.fn() },
|
|
80
|
-
],
|
|
81
|
-
}
|
|
82
|
-
render(props)
|
|
83
|
-
const tab = screen.getByText('set up')
|
|
84
|
-
expect(tab).toHaveStyle(`background-color: ${COLORS.grey30}`)
|
|
85
|
-
expect(tab).toHaveStyle(`color: ${COLORS.grey40}`)
|
|
86
|
-
|
|
87
|
-
fireEvent.click(tab)
|
|
88
|
-
expect(props.tabs[0].onClick).not.toHaveBeenCalled()
|
|
89
|
-
})
|
|
90
|
-
})
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
@import '../index.module.css';
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--sidebar-width: 18.25rem;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.panel {
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
overflow: visible;
|
|
10
|
-
border-right: var(--bd-light);
|
|
11
|
-
background-color: var(--c-bg-light);
|
|
12
|
-
position: relative;
|
|
13
|
-
padding: 0 4px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.title_bar {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: var(--sidebar-width);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.title {
|
|
23
|
-
font-size: var(--fs-header); /* from legacy --font-header-dark */
|
|
24
|
-
font-weight: var(--fw-semibold); /* from legacy --font-header-dark */
|
|
25
|
-
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
26
|
-
margin: 1rem auto;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.panel_contents {
|
|
30
|
-
width: var(--sidebar-width);
|
|
31
|
-
height: calc(100vh - 3.5rem);
|
|
32
|
-
overflow-x: hidden;
|
|
33
|
-
overflow-y: auto;
|
|
34
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, vi, beforeEach, expect } from 'vitest'
|
|
3
|
-
import { screen } from '@testing-library/react'
|
|
4
|
-
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { DeckLabel } from '../../../molecules/DeckLabel'
|
|
8
|
-
import { DeckLabelSet } from '..'
|
|
9
|
-
|
|
10
|
-
vi.mock('../../../molecules/DeckLabel')
|
|
11
|
-
|
|
12
|
-
const mockDeckLabels = [
|
|
13
|
-
{
|
|
14
|
-
text: 'Label',
|
|
15
|
-
isSelected: false,
|
|
16
|
-
labelBorderRadius: BORDERS.borderRadius4,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
text: 'Label',
|
|
20
|
-
isSelected: false,
|
|
21
|
-
labelBorderRadius: BORDERS.borderRadius4,
|
|
22
|
-
},
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
const render = (props: React.ComponentProps<typeof DeckLabelSet>) => {
|
|
26
|
-
return renderWithProviders(<DeckLabelSet {...props} />)
|
|
27
|
-
}
|
|
28
|
-
describe('DeckLabelSet', () => {
|
|
29
|
-
let props: React.ComponentProps<typeof DeckLabelSet>
|
|
30
|
-
|
|
31
|
-
beforeEach(() => {
|
|
32
|
-
props = {
|
|
33
|
-
x: 1,
|
|
34
|
-
y: 1,
|
|
35
|
-
width: 50,
|
|
36
|
-
height: 50,
|
|
37
|
-
deckLabels: mockDeckLabels,
|
|
38
|
-
}
|
|
39
|
-
vi.mocked(DeckLabel).mockReturnValue(<div>mock DeckLabels</div>)
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
it('should render blue border and DeckLabel', () => {
|
|
43
|
-
render(props)
|
|
44
|
-
expect(screen.getAllByText('mock DeckLabels').length).toBe(2)
|
|
45
|
-
const deckLabelSet = screen.getByTestId('DeckLabeSet')
|
|
46
|
-
expect(deckLabelSet).toHaveStyle(`border: 1.5px solid ${COLORS.blue50}`)
|
|
47
|
-
expect(deckLabelSet).toHaveStyle(`border-radius: ${BORDERS.borderRadius4}`)
|
|
48
|
-
})
|
|
49
|
-
})
|