@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,174 +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="desktop" />)[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
|
-
type: 'success',
|
|
19
|
-
closeButton: true,
|
|
20
|
-
onClose: vi.fn(),
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
it('renders correct message', () => {
|
|
25
|
-
render(props)
|
|
26
|
-
screen.getByText('test message')
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
it('calls onClose when close button is pressed', () => {
|
|
30
|
-
vi.useFakeTimers()
|
|
31
|
-
render(props)
|
|
32
|
-
const closeButton = screen.getByRole('button')
|
|
33
|
-
fireEvent.click(closeButton)
|
|
34
|
-
act(() => {
|
|
35
|
-
vi.advanceTimersByTime(TOAST_ANIMATION_DURATION)
|
|
36
|
-
})
|
|
37
|
-
expect(props.onClose).toHaveBeenCalled()
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
it('does not render x button if prop is false', () => {
|
|
41
|
-
props = {
|
|
42
|
-
...props,
|
|
43
|
-
closeButton: false,
|
|
44
|
-
}
|
|
45
|
-
render(props)
|
|
46
|
-
expect(screen.queryByRole('button')).toBeNull()
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
it('should have success styling when passing success as type', () => {
|
|
50
|
-
render(props)
|
|
51
|
-
const successToast = screen.getByTestId('Toast_success')
|
|
52
|
-
expect(successToast).toHaveStyle(`color: #04aa65
|
|
53
|
-
background-color: #f3fffa`)
|
|
54
|
-
screen.getByLabelText('icon_success')
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
it('should have warning styling when passing warning as type', () => {
|
|
58
|
-
props = {
|
|
59
|
-
...props,
|
|
60
|
-
type: 'warning',
|
|
61
|
-
}
|
|
62
|
-
render(props)
|
|
63
|
-
const warningToast = screen.getByTestId('Toast_warning')
|
|
64
|
-
expect(warningToast).toHaveStyle(`color: #f09d20
|
|
65
|
-
background-color: #fffcf5`)
|
|
66
|
-
screen.getByLabelText('icon_warning')
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
it('should have error styling when passing error as type', () => {
|
|
70
|
-
props = {
|
|
71
|
-
...props,
|
|
72
|
-
type: 'error',
|
|
73
|
-
}
|
|
74
|
-
render(props)
|
|
75
|
-
const errorToast = screen.getByTestId('Toast_error')
|
|
76
|
-
expect(errorToast).toHaveStyle(`color: #bf0000
|
|
77
|
-
background-color: #fff3f3`)
|
|
78
|
-
screen.getByLabelText('icon_error')
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
it('should have info styling when passing info as type', () => {
|
|
82
|
-
props = {
|
|
83
|
-
...props,
|
|
84
|
-
type: 'info',
|
|
85
|
-
}
|
|
86
|
-
render(props)
|
|
87
|
-
const infoToast = screen.getByTestId('Toast_info')
|
|
88
|
-
expect(infoToast).toHaveStyle(`color: #16212D
|
|
89
|
-
background-color: #eaeaeb`)
|
|
90
|
-
screen.getByLabelText('icon_info')
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
it('should stay more than 7 seconds when disableTimeout is true', async () => {
|
|
94
|
-
vi.useFakeTimers()
|
|
95
|
-
props = {
|
|
96
|
-
...props,
|
|
97
|
-
disableTimeout: true,
|
|
98
|
-
}
|
|
99
|
-
render(props)
|
|
100
|
-
screen.getByText('test message')
|
|
101
|
-
act(() => {
|
|
102
|
-
vi.advanceTimersByTime(100)
|
|
103
|
-
})
|
|
104
|
-
expect(props.onClose).not.toHaveBeenCalled()
|
|
105
|
-
act(() => {
|
|
106
|
-
vi.advanceTimersByTime(7000)
|
|
107
|
-
})
|
|
108
|
-
expect(props.onClose).not.toHaveBeenCalled()
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
it('should not stay more than 7 seconds when disableTimeout is false', async () => {
|
|
112
|
-
vi.useFakeTimers()
|
|
113
|
-
props = {
|
|
114
|
-
...props,
|
|
115
|
-
disableTimeout: false,
|
|
116
|
-
}
|
|
117
|
-
render(props)
|
|
118
|
-
screen.getByText('test message')
|
|
119
|
-
act(() => {
|
|
120
|
-
vi.advanceTimersByTime(100)
|
|
121
|
-
})
|
|
122
|
-
expect(props.onClose).not.toHaveBeenCalled()
|
|
123
|
-
act(() => {
|
|
124
|
-
vi.advanceTimersByTime(9000)
|
|
125
|
-
})
|
|
126
|
-
expect(props.onClose).toHaveBeenCalled()
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
it('should dismiss when a second toast appears', async () => {
|
|
130
|
-
vi.useFakeTimers()
|
|
131
|
-
props = {
|
|
132
|
-
...props,
|
|
133
|
-
disableTimeout: true,
|
|
134
|
-
exitNow: true,
|
|
135
|
-
}
|
|
136
|
-
render(props)
|
|
137
|
-
screen.getByText('test message')
|
|
138
|
-
act(() => {
|
|
139
|
-
vi.advanceTimersByTime(100)
|
|
140
|
-
})
|
|
141
|
-
expect(props.onClose).not.toHaveBeenCalled()
|
|
142
|
-
act(() => {
|
|
143
|
-
vi.advanceTimersByTime(TOAST_ANIMATION_DURATION)
|
|
144
|
-
})
|
|
145
|
-
expect(props.onClose).toHaveBeenCalled()
|
|
146
|
-
})
|
|
147
|
-
it('renders link text with an optional callback', async () => {
|
|
148
|
-
vi.useFakeTimers()
|
|
149
|
-
props = {
|
|
150
|
-
...props,
|
|
151
|
-
linkText: 'test link',
|
|
152
|
-
onLinkClick: vi.fn(),
|
|
153
|
-
}
|
|
154
|
-
render(props)
|
|
155
|
-
const clickableLink = screen.getByText('test link')
|
|
156
|
-
fireEvent.click(clickableLink)
|
|
157
|
-
expect(props.onLinkClick).toHaveBeenCalled()
|
|
158
|
-
})
|
|
159
|
-
it('toast will not disappear on a general click if both close button and clickable link present', async () => {
|
|
160
|
-
vi.useFakeTimers()
|
|
161
|
-
props = {
|
|
162
|
-
...props,
|
|
163
|
-
linkText: 'test link',
|
|
164
|
-
closeButton: true,
|
|
165
|
-
}
|
|
166
|
-
render(props)
|
|
167
|
-
const clickableLink = screen.getByText('test message')
|
|
168
|
-
fireEvent.click(clickableLink)
|
|
169
|
-
act(() => {
|
|
170
|
-
vi.advanceTimersByTime(TOAST_ANIMATION_DURATION)
|
|
171
|
-
})
|
|
172
|
-
expect(props.onClose).not.toHaveBeenCalled()
|
|
173
|
-
})
|
|
174
|
-
})
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, expect, vi } from 'vitest'
|
|
3
|
-
import { fireEvent, screen } from '@testing-library/react'
|
|
4
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
5
|
-
import { ToggleGroup } from '../index'
|
|
6
|
-
|
|
7
|
-
const render = (props: React.ComponentProps<typeof ToggleGroup>) => {
|
|
8
|
-
return renderWithProviders(<ToggleGroup {...props} />)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
describe('ToggleGroup', () => {
|
|
12
|
-
let props: React.ComponentProps<typeof ToggleGroup>
|
|
13
|
-
|
|
14
|
-
it('should render text and buttons', () => {
|
|
15
|
-
props = {
|
|
16
|
-
leftText: 'mock leftText',
|
|
17
|
-
rightText: 'mock rightText',
|
|
18
|
-
leftClick: vi.fn(),
|
|
19
|
-
rightClick: vi.fn(),
|
|
20
|
-
selectedValue: 'mock leftText',
|
|
21
|
-
}
|
|
22
|
-
render(props)
|
|
23
|
-
fireEvent.click(screen.getByText('mock leftText'))
|
|
24
|
-
expect(props.leftClick).toHaveBeenCalled()
|
|
25
|
-
fireEvent.click(screen.getByText('mock rightText'))
|
|
26
|
-
expect(props.rightClick).toHaveBeenCalled()
|
|
27
|
-
})
|
|
28
|
-
})
|
|
@@ -1,78 +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 } from '@testing-library/react'
|
|
5
|
-
|
|
6
|
-
import { COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { TOOLTIP_TOP } from '../../../tooltips'
|
|
8
|
-
import { SPACING } from '../../../ui-style-constants'
|
|
9
|
-
import { POSITION_ABSOLUTE } from '../../../styles'
|
|
10
|
-
|
|
11
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
12
|
-
import { Tooltip } from '..'
|
|
13
|
-
|
|
14
|
-
const render = (props: React.ComponentProps<typeof Tooltip>) => {
|
|
15
|
-
return renderWithProviders(<Tooltip {...props} />)[0]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const placement = TOOLTIP_TOP
|
|
19
|
-
const id = 'Tooltip_123'
|
|
20
|
-
const tooltipRef = vi.fn()
|
|
21
|
-
const tooltipStyle = {
|
|
22
|
-
position: POSITION_ABSOLUTE,
|
|
23
|
-
left: SPACING.spacing4,
|
|
24
|
-
} as const
|
|
25
|
-
const arrowRef = vi.fn()
|
|
26
|
-
const arrowStyle = {
|
|
27
|
-
position: POSITION_ABSOLUTE,
|
|
28
|
-
left: SPACING.spacing8,
|
|
29
|
-
} as const
|
|
30
|
-
|
|
31
|
-
const MockTooltipProps = {
|
|
32
|
-
id: id,
|
|
33
|
-
placement: placement,
|
|
34
|
-
arrowStyle: arrowStyle,
|
|
35
|
-
arrowRef: arrowRef,
|
|
36
|
-
visible: true,
|
|
37
|
-
ref: tooltipRef,
|
|
38
|
-
style: tooltipStyle,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
describe('Tooltip', () => {
|
|
42
|
-
let props: React.ComponentProps<typeof Tooltip>
|
|
43
|
-
|
|
44
|
-
beforeEach(() => {
|
|
45
|
-
props = {
|
|
46
|
-
children: 'mock children' as React.ReactNode,
|
|
47
|
-
tooltipProps: MockTooltipProps,
|
|
48
|
-
key: 'mock key',
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
it('renders correct children when the tooltip is visible', () => {
|
|
53
|
-
render(props)
|
|
54
|
-
const tooltip = screen.getByText('mock children')
|
|
55
|
-
expect(tooltip).toBeInTheDocument()
|
|
56
|
-
expect(tooltip).toHaveStyle('position: absolute')
|
|
57
|
-
expect(tooltip).toHaveStyle('left: 0.25rem')
|
|
58
|
-
expect(tooltip).toHaveStyle(`background: ${COLORS.black90}`)
|
|
59
|
-
expect(tooltip).toHaveStyle(`color: ${COLORS.white}`)
|
|
60
|
-
expect(tooltip).toHaveStyle('max-width: 8.75rem')
|
|
61
|
-
expect(tooltip).toHaveStyle('font-size: 0.625rem')
|
|
62
|
-
expect(tooltip).toHaveAttribute('role', 'tooltip')
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
it('renders correct children when the tooltip is visible with a specific with', () => {
|
|
66
|
-
props = { ...props, width: '3rem' }
|
|
67
|
-
render(props)
|
|
68
|
-
const tooltip = screen.getByText('mock children')
|
|
69
|
-
expect(tooltip).toHaveStyle('width: 3rem')
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
it('does not render children when the tooltip is invisible', () => {
|
|
73
|
-
MockTooltipProps.visible = false
|
|
74
|
-
render(props)
|
|
75
|
-
const tooltip = screen.queryByText('mock children')
|
|
76
|
-
expect(tooltip).not.toBeInTheDocument()
|
|
77
|
-
})
|
|
78
|
-
})
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, beforeEach, expect } from 'vitest'
|
|
3
|
-
import { screen } from '@testing-library/react'
|
|
4
|
-
import '@testing-library/jest-dom/vitest'
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants'
|
|
8
|
-
|
|
9
|
-
import { AlertPrimaryButton } from '../AlertPrimaryButton'
|
|
10
|
-
|
|
11
|
-
const render = (props: React.ComponentProps<typeof AlertPrimaryButton>) => {
|
|
12
|
-
return renderWithProviders(<AlertPrimaryButton {...props} />)[0]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
describe('AlertPrimaryButton', () => {
|
|
16
|
-
let props: React.ComponentProps<typeof AlertPrimaryButton>
|
|
17
|
-
|
|
18
|
-
beforeEach(() => {
|
|
19
|
-
props = {
|
|
20
|
-
children: 'alert primary button',
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
it('renders alert primary button with text', () => {
|
|
25
|
-
render(props)
|
|
26
|
-
const button = screen.getByText('alert primary button')
|
|
27
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.red50}`)
|
|
28
|
-
expect(button).toHaveStyle(
|
|
29
|
-
`padding: ${SPACING.spacing8} ${SPACING.spacing16} ${SPACING.spacing8} ${SPACING.spacing16}`
|
|
30
|
-
)
|
|
31
|
-
expect(button).toHaveStyle(`font-size: ${TYPOGRAPHY.fontSizeP}`)
|
|
32
|
-
expect(button).toHaveStyle(`font-weight: ${TYPOGRAPHY.fontWeightSemiBold}`)
|
|
33
|
-
expect(button).toHaveStyle(`line-height: ${TYPOGRAPHY.lineHeight20}`)
|
|
34
|
-
expect(button).toHaveStyle(`border-radius: ${BORDERS.borderRadius8}`)
|
|
35
|
-
expect(button).toHaveStyle(
|
|
36
|
-
`text-transform: ${TYPOGRAPHY.textTransformNone}`
|
|
37
|
-
)
|
|
38
|
-
expect(button).toHaveStyle('box-shadow: 0 0 0')
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('renders alert primary button with text and disabled', () => {
|
|
42
|
-
props.disabled = true
|
|
43
|
-
render(props)
|
|
44
|
-
const button = screen.getByText('alert primary button')
|
|
45
|
-
expect(button).toBeDisabled()
|
|
46
|
-
})
|
|
47
|
-
})
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, beforeEach, expect } from 'vitest'
|
|
3
|
-
import { screen } from '@testing-library/react'
|
|
4
|
-
import '@testing-library/jest-dom/vitest'
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants'
|
|
8
|
-
import { AltPrimaryButton } from '../AltPrimaryButton'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof AltPrimaryButton>) => {
|
|
11
|
-
return renderWithProviders(<AltPrimaryButton {...props} />)[0]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('AltPrimaryButton', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof AltPrimaryButton>
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
props = {
|
|
19
|
-
children: 'alt primary button',
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
it('renders alt primary button with text', () => {
|
|
24
|
-
render(props)
|
|
25
|
-
const button = screen.getByText('alt primary button')
|
|
26
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.grey30}`)
|
|
27
|
-
expect(button).toHaveStyle(
|
|
28
|
-
`padding: ${SPACING.spacing8} ${SPACING.spacing16} ${SPACING.spacing8} ${SPACING.spacing16}`
|
|
29
|
-
)
|
|
30
|
-
expect(button).toHaveStyle(`font-size: ${TYPOGRAPHY.fontSizeP}`)
|
|
31
|
-
expect(button).toHaveStyle(`font-weight: ${TYPOGRAPHY.fontWeightSemiBold}`)
|
|
32
|
-
expect(button).toHaveStyle(`line-height: ${TYPOGRAPHY.lineHeight20}`)
|
|
33
|
-
expect(button).toHaveStyle(`border-radius: ${BORDERS.borderRadius8}`)
|
|
34
|
-
expect(button).toHaveStyle(
|
|
35
|
-
`text-transform: ${TYPOGRAPHY.textTransformNone}`
|
|
36
|
-
)
|
|
37
|
-
expect(button).toHaveStyle(`box-shadow: none`)
|
|
38
|
-
expect(button).toHaveStyle(`color: ${COLORS.black90}`)
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('renders alt primary button with text and disabled', () => {
|
|
42
|
-
props.disabled = true
|
|
43
|
-
render(props)
|
|
44
|
-
const button = screen.getByText('alt primary button')
|
|
45
|
-
expect(button).toBeDisabled()
|
|
46
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.grey30}`)
|
|
47
|
-
expect(button).toHaveStyle(`color: ${COLORS.grey40}`)
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
// (kk: 09/23/2024) hover test needs jsdom update so this will be activated later
|
|
51
|
-
// it('applies the correct states to the button - hover', () => {
|
|
52
|
-
// render(props)
|
|
53
|
-
// const button = screen.getByText('alt primary button')
|
|
54
|
-
// fireEvent.mouseOver(button)
|
|
55
|
-
// expect(button).toHaveStyle(`background-color: ${COLORS.grey35}`)
|
|
56
|
-
// })
|
|
57
|
-
})
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import '@testing-library/jest-dom/vitest'
|
|
3
|
-
import { fireEvent, screen } from '@testing-library/react'
|
|
4
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { JUSTIFY_CENTER, JUSTIFY_START } from '../../../styles'
|
|
7
|
-
import { EmptySelectorButton } from '../EmptySelectorButton'
|
|
8
|
-
|
|
9
|
-
const render = (props: React.ComponentProps<typeof EmptySelectorButton>) => {
|
|
10
|
-
return renderWithProviders(<EmptySelectorButton {...props} />)[0]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
describe('EmptySelectorButton', () => {
|
|
14
|
-
let props: React.ComponentProps<typeof EmptySelectorButton>
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
props = {
|
|
17
|
-
onClick: vi.fn(),
|
|
18
|
-
text: 'mock text',
|
|
19
|
-
iconName: 'add',
|
|
20
|
-
textAlignment: 'left',
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
it('renders the props and button cta', () => {
|
|
24
|
-
render(props)
|
|
25
|
-
const button = screen.getByText('mock text')
|
|
26
|
-
fireEvent.click(button)
|
|
27
|
-
expect(props.onClick).toHaveBeenCalled()
|
|
28
|
-
screen.getByTestId('EmptySelectorButton_add')
|
|
29
|
-
expect(screen.getByTestId('EmptySelectorButton_container')).toHaveStyle(
|
|
30
|
-
`justify-content: ${JUSTIFY_START}`
|
|
31
|
-
)
|
|
32
|
-
})
|
|
33
|
-
it('renders middled aligned button', () => {
|
|
34
|
-
props.textAlignment = 'middle'
|
|
35
|
-
props.iconName = undefined
|
|
36
|
-
render(props)
|
|
37
|
-
expect(screen.getByTestId('EmptySelectorButton_container')).toHaveStyle(
|
|
38
|
-
`justify-content: ${JUSTIFY_CENTER}`
|
|
39
|
-
)
|
|
40
|
-
screen.queryByTestId('EmptySelectorButton_add')
|
|
41
|
-
})
|
|
42
|
-
})
|
|
@@ -1,91 +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 { fireEvent, screen } from '@testing-library/react'
|
|
5
|
-
|
|
6
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
7
|
-
import { COLORS } from '../../../helix-design-system'
|
|
8
|
-
import { LargeButton } from '../LargeButton'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof LargeButton>) => {
|
|
11
|
-
return renderWithProviders(<LargeButton {...props} />)[0]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('LargeButton', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof LargeButton>
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
props = {
|
|
18
|
-
onClick: vi.fn(),
|
|
19
|
-
buttonText: 'large button',
|
|
20
|
-
iconName: 'play-round-corners',
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
it('renders the default button and it works as expected', () => {
|
|
24
|
-
render(props)
|
|
25
|
-
fireEvent.click(screen.getByText('large button'))
|
|
26
|
-
expect(props.onClick).toHaveBeenCalled()
|
|
27
|
-
})
|
|
28
|
-
it('renders the alert button', () => {
|
|
29
|
-
props = {
|
|
30
|
-
...props,
|
|
31
|
-
buttonType: 'alert',
|
|
32
|
-
}
|
|
33
|
-
render(props)
|
|
34
|
-
expect(screen.getByRole('button')).toHaveStyle(
|
|
35
|
-
`background-color: ${COLORS.red35}`
|
|
36
|
-
)
|
|
37
|
-
})
|
|
38
|
-
it('renders the secondary button', () => {
|
|
39
|
-
props = {
|
|
40
|
-
...props,
|
|
41
|
-
buttonType: 'secondary',
|
|
42
|
-
}
|
|
43
|
-
render(props)
|
|
44
|
-
expect(screen.getByRole('button')).toHaveStyle(
|
|
45
|
-
`background-color: ${COLORS.blue35}`
|
|
46
|
-
)
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
it('renders the alertStroke button', () => {
|
|
50
|
-
props = {
|
|
51
|
-
...props,
|
|
52
|
-
buttonType: 'alertStroke',
|
|
53
|
-
}
|
|
54
|
-
render(props)
|
|
55
|
-
expect(screen.getByRole('button')).toHaveStyle(
|
|
56
|
-
`background-color: ${COLORS.transparent}`
|
|
57
|
-
)
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
it('renders the alertAlt button', () => {
|
|
61
|
-
props = {
|
|
62
|
-
...props,
|
|
63
|
-
buttonType: 'alertAlt',
|
|
64
|
-
}
|
|
65
|
-
render(props)
|
|
66
|
-
expect(screen.getByRole('button')).toHaveStyle(
|
|
67
|
-
`background-color: ${COLORS.white}`
|
|
68
|
-
)
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
it('renders the stroke button', () => {
|
|
72
|
-
props = {
|
|
73
|
-
...props,
|
|
74
|
-
buttonType: 'stroke',
|
|
75
|
-
}
|
|
76
|
-
render(props)
|
|
77
|
-
expect(screen.getByRole('button')).toHaveStyle(
|
|
78
|
-
`background-color: ${COLORS.white}`
|
|
79
|
-
)
|
|
80
|
-
expect(screen.getByRole('button')).toHaveStyle(`color: ${COLORS.blue50}`)
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
it('renders the button as disabled', () => {
|
|
84
|
-
props = {
|
|
85
|
-
...props,
|
|
86
|
-
disabled: true,
|
|
87
|
-
}
|
|
88
|
-
render(props)
|
|
89
|
-
expect(screen.getByRole('button')).toBeDisabled()
|
|
90
|
-
})
|
|
91
|
-
})
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import { describe, it, beforeEach, expect } from 'vitest'
|
|
3
|
-
import { fireEvent, screen } from '@testing-library/react'
|
|
4
|
-
import '@testing-library/jest-dom/vitest'
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants'
|
|
8
|
-
import { PrimaryButton } from '../PrimaryButton'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof PrimaryButton>) => {
|
|
11
|
-
return renderWithProviders(<PrimaryButton {...props} />)[0]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('PrimaryButton', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof PrimaryButton>
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
props = {
|
|
19
|
-
children: 'primary button',
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
it('renders primary button with text', () => {
|
|
24
|
-
render(props)
|
|
25
|
-
const button = screen.getByText('primary button')
|
|
26
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.blue50}`)
|
|
27
|
-
expect(button).toHaveStyle(
|
|
28
|
-
`padding: ${SPACING.spacing8} ${SPACING.spacing16} ${SPACING.spacing8} ${SPACING.spacing16}`
|
|
29
|
-
)
|
|
30
|
-
expect(button).toHaveStyle(`font-size: ${TYPOGRAPHY.fontSizeP}`)
|
|
31
|
-
expect(button).toHaveStyle(`font-weight: ${TYPOGRAPHY.fontWeightSemiBold}`)
|
|
32
|
-
expect(button).toHaveStyle(`line-height: ${TYPOGRAPHY.lineHeight20}`)
|
|
33
|
-
expect(button).toHaveStyle(`border-radius: ${BORDERS.borderRadius8}`)
|
|
34
|
-
expect(button).toHaveStyle(
|
|
35
|
-
`text-transform: ${TYPOGRAPHY.textTransformNone}`
|
|
36
|
-
)
|
|
37
|
-
expect(button).toHaveStyle(`box-shadow: none`)
|
|
38
|
-
expect(button).toHaveStyle(`color: ${COLORS.white}`)
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('renders primary button with text and disabled', () => {
|
|
42
|
-
props.disabled = true
|
|
43
|
-
render(props)
|
|
44
|
-
const button = screen.getByText('primary button')
|
|
45
|
-
expect(button).toBeDisabled()
|
|
46
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.grey30}`)
|
|
47
|
-
expect(button).toHaveStyle(`color: ${COLORS.grey40}`)
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
it('applies the correct states to the button - hover', () => {
|
|
51
|
-
render(props)
|
|
52
|
-
const button = screen.getByText('primary button')
|
|
53
|
-
fireEvent.mouseOver(button)
|
|
54
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.blue50}`)
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
it('renders primary button with text and different background color', () => {
|
|
58
|
-
props.backgroundColor = COLORS.red50
|
|
59
|
-
render(props)
|
|
60
|
-
const button = screen.getByText('primary button')
|
|
61
|
-
expect(button).toHaveStyle(`background-color: ${COLORS.red50}`)
|
|
62
|
-
expect(button).toHaveStyle(`color: ${COLORS.white}`)
|
|
63
|
-
})
|
|
64
|
-
})
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
|
-
import '@testing-library/jest-dom/vitest'
|
|
3
|
-
import { screen, queryByAttribute } from '@testing-library/react'
|
|
4
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
5
|
-
import { renderWithProviders } from '../../../testing/utils'
|
|
6
|
-
import { COLORS } from '../../../helix-design-system'
|
|
7
|
-
import { SPACING } from '../../../ui-style-constants'
|
|
8
|
-
import { RadioButton } from '../RadioButton'
|
|
9
|
-
|
|
10
|
-
const render = (props: React.ComponentProps<typeof RadioButton>) => {
|
|
11
|
-
return renderWithProviders(<RadioButton {...props} />)[0]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe('RadioButton', () => {
|
|
15
|
-
let props: React.ComponentProps<typeof RadioButton>
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
props = {
|
|
18
|
-
onChange: vi.fn(),
|
|
19
|
-
buttonLabel: 'radio button',
|
|
20
|
-
buttonValue: 1,
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
it('renders the large button', () => {
|
|
25
|
-
props = {
|
|
26
|
-
...props,
|
|
27
|
-
radioButtonType: 'large',
|
|
28
|
-
}
|
|
29
|
-
render(props)
|
|
30
|
-
const label = screen.getByRole('label')
|
|
31
|
-
expect(label).toHaveStyle(`background-color: ${COLORS.blue35}`)
|
|
32
|
-
expect(label).toHaveStyle(
|
|
33
|
-
`padding: ${SPACING.spacing12} ${SPACING.spacing16}`
|
|
34
|
-
)
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
it('renders the large selected button', () => {
|
|
38
|
-
props = {
|
|
39
|
-
...props,
|
|
40
|
-
isSelected: true,
|
|
41
|
-
radioButtonType: 'large',
|
|
42
|
-
}
|
|
43
|
-
render(props)
|
|
44
|
-
const label = screen.getByRole('label')
|
|
45
|
-
expect(label).toHaveStyle(`background-color: ${COLORS.blue50}`)
|
|
46
|
-
expect(label).toHaveStyle(
|
|
47
|
-
`padding: ${SPACING.spacing12} ${SPACING.spacing16}`
|
|
48
|
-
)
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
it('renders the small button with an icon', () => {
|
|
52
|
-
props = {
|
|
53
|
-
...props,
|
|
54
|
-
radioButtonType: 'small',
|
|
55
|
-
iconName: 'alert-circle',
|
|
56
|
-
}
|
|
57
|
-
render(props)
|
|
58
|
-
const label = screen.getByRole('label')
|
|
59
|
-
expect(label).toHaveStyle(`background-color: ${COLORS.blue35}`)
|
|
60
|
-
expect(label).toHaveStyle(
|
|
61
|
-
`padding: ${SPACING.spacing12} ${SPACING.spacing16}`
|
|
62
|
-
)
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
it('renders the small selected button', () => {
|
|
66
|
-
props = {
|
|
67
|
-
...props,
|
|
68
|
-
isSelected: true,
|
|
69
|
-
radioButtonType: 'small',
|
|
70
|
-
}
|
|
71
|
-
render(props)
|
|
72
|
-
const label = screen.getByRole('label')
|
|
73
|
-
expect(label).toHaveStyle(`background-color: ${COLORS.blue50}`)
|
|
74
|
-
expect(label).toHaveStyle(
|
|
75
|
-
`padding: ${SPACING.spacing12} ${SPACING.spacing16}`
|
|
76
|
-
)
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
it('renders id instead of buttonLabel when id is set', () => {
|
|
80
|
-
props = {
|
|
81
|
-
...props,
|
|
82
|
-
id: 'mock-radio-button-id',
|
|
83
|
-
}
|
|
84
|
-
render(props)
|
|
85
|
-
const getById = queryByAttribute.bind(null, 'id')
|
|
86
|
-
const idRadioButton = getById(
|
|
87
|
-
render(props).container,
|
|
88
|
-
'mock-radio-button-id'
|
|
89
|
-
)
|
|
90
|
-
expect(idRadioButton).toBeInTheDocument()
|
|
91
|
-
const buttonLabelIdRadioButton = getById(
|
|
92
|
-
render(props).container,
|
|
93
|
-
// @ts-expect-error(ja, 8/23/24): buttonLabel is a string type
|
|
94
|
-
props.buttonLabel
|
|
95
|
-
)
|
|
96
|
-
expect(buttonLabelIdRadioButton).not.toBeInTheDocument()
|
|
97
|
-
})
|
|
98
|
-
})
|