@opentrons/components 0.2.1-alpha.0 → 0.3.0-alpha.0
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/LICENSE +202 -0
- package/README.md +12 -48
- package/lib/assets/index.d.ts +1 -0
- package/lib/assets/localization/en/index.d.ts +191 -16
- package/lib/assets/localization/index.d.ts +292 -13
- package/lib/assets/localization/zh/index.d.ts +110 -8
- package/lib/atoms/Checkbox/index.d.ts +3 -3
- package/lib/atoms/CheckboxField/index.d.ts +2 -0
- package/lib/atoms/FixedTrashText/index.d.ts +1 -0
- package/lib/atoms/InlineNotification/index.d.ts +1 -1
- package/lib/atoms/ListButton/index.d.ts +2 -2
- package/lib/atoms/MenuList/OverflowBtn.d.ts +2 -2
- package/lib/atoms/Slider/index.d.ts +14 -0
- package/lib/atoms/StepMeter/__tests__/StepMeter.test.d.ts +1 -1
- package/lib/atoms/StepMeter/index.d.ts +1 -2
- package/lib/atoms/StyledText/LegacyStyledText.d.ts +3 -1
- package/lib/atoms/StyledText/PlaceholderStyledText.d.ts +14 -0
- package/lib/atoms/StyledText/StyledText.d.ts +1 -0
- package/lib/atoms/StyledText/index.d.ts +1 -0
- package/lib/atoms/Tag/index.d.ts +1 -1
- package/lib/atoms/buttons/AlertPrimaryButton.d.ts +3 -1
- package/lib/atoms/buttons/AltPrimaryButton.d.ts +3 -1
- package/lib/atoms/buttons/PrimaryButton.d.ts +2 -1
- package/lib/atoms/buttons/TertiaryButton.d.ts +8 -3
- package/lib/atoms/index.d.ts +2 -1
- package/lib/buttons/Button.d.ts +3 -3
- package/lib/controls/ToggleButton.d.ts +1 -1
- package/lib/forms/DeprecatedCheckboxField.d.ts +2 -2
- package/lib/forms/FormGroup.d.ts +4 -4
- package/lib/forms/LegacyInputField.d.ts +5 -5
- package/lib/forms/RadioGroup.d.ts +2 -2
- package/lib/forms/ToggleField.d.ts +1 -1
- package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +19 -11
- package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +2 -0
- package/lib/hardware-sim/BaseDeck/StackedBadge.d.ts +1 -0
- package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +1 -0
- package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +1 -0
- package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +3 -2
- package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +6 -5
- package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +8 -5
- package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +2 -3
- package/lib/hardware-sim/DeckConfigurator/VacuumModuleItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/constants.d.ts +5 -0
- package/lib/hardware-sim/Labware/Labware.d.ts +3 -3
- package/lib/hardware-sim/Labware/LabwareAdapter/GenericLid.d.ts +9 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapterTypeB.d.ts +1 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +11 -3
- package/lib/hardware-sim/Labware/LabwareRender.d.ts +9 -9
- package/lib/hardware-sim/Labware/index.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +7 -2
- package/lib/hardware-sim/Labware/labwareInternals/Tips/InaccessibleTip.d.ts +3 -0
- package/lib/hardware-sim/Labware/labwareInternals/Tips/NewTip.d.ts +4 -0
- package/lib/hardware-sim/Labware/labwareInternals/Tips/TipStatus.d.ts +11 -0
- package/lib/hardware-sim/Labware/labwareInternals/Tips/UsedTip.d.ts +4 -0
- package/lib/hardware-sim/Labware/labwareInternals/Tips/__tests__/TipStatus.test.d.ts +1 -0
- package/lib/hardware-sim/Labware/labwareInternals/Tips/constants.d.ts +11 -0
- package/lib/hardware-sim/Labware/labwareInternals/Tips/index.d.ts +2 -0
- package/lib/hardware-sim/Labware/labwareInternals/Wells/EmptyWell.d.ts +10 -0
- package/lib/hardware-sim/Labware/labwareInternals/{FilledWells.d.ts → Wells/FilledWells.d.ts} +3 -3
- package/lib/hardware-sim/Labware/labwareInternals/Wells/SelectedWell.d.ts +13 -0
- package/lib/hardware-sim/Labware/labwareInternals/{StrokedWells.d.ts → Wells/StrokedWells.d.ts} +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/{StyledWells.d.ts → Wells/StyledWells.d.ts} +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/{Well.d.ts → Wells/Well.d.ts} +2 -3
- package/lib/hardware-sim/Labware/labwareInternals/{WellLabels.d.ts → Wells/WellLabels.d.ts} +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/Wells/WellStatus.d.ts +12 -0
- package/lib/hardware-sim/Labware/labwareInternals/Wells/constants.d.ts +21 -0
- package/lib/hardware-sim/Labware/labwareInternals/Wells/index.d.ts +9 -0
- package/lib/hardware-sim/Labware/labwareInternals/Wells/utils.d.ts +2 -0
- package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +2 -5
- package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +10 -12
- package/lib/hardware-sim/Module/Vacuum.d.ts +1 -0
- package/lib/hardware-sim/Module/index.d.ts +40 -5
- package/lib/hardware-sim/Pipette/StrokedNozzles.d.ts +10 -0
- package/lib/hardware-sim/Pipette/constants.d.ts +3 -0
- package/lib/hardware-sim/Pipette/index.d.ts +1 -0
- package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +5 -3
- package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +5 -4
- package/lib/hardware-sim/alignment/AlignToModuleChildSlot.d.ts +25 -0
- package/lib/hardware-sim/alignment/CenterLabwareInModuleChildSlot.d.ts +33 -0
- package/lib/hardware-sim/alignment/CenterLabwareInSlot.d.ts +11 -0
- package/lib/hardware-sim/alignment/index.d.ts +4 -0
- package/lib/hardware-sim/index.d.ts +1 -0
- package/lib/helix-design-system/colors.d.ts +1 -0
- package/lib/hocs/withStyleProps.d.ts +1 -1
- package/lib/hooks/__tests__/useCommandTypeSummaries.test.d.ts +1 -0
- package/lib/hooks/index.d.ts +2 -1
- package/lib/hooks/testHelpers/index.d.ts +2 -0
- package/lib/hooks/useCommandTypeSummaries.d.ts +2 -0
- package/lib/hooks/useConditionalConfirm.d.ts +5 -9
- package/lib/i18n.d.ts +4 -0
- package/lib/icons/ModuleIcon.d.ts +5 -4
- package/lib/icons/icon-data.d.ts +702 -4
- package/lib/index.d.ts +2 -1
- package/lib/index.js +557 -0
- package/lib/index.mjs +30626 -28730
- package/lib/interaction-enhancers/HandleKeypress.d.ts +2 -2
- package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +1 -1
- package/lib/legacy-hardware-sim/index.d.ts +0 -1
- package/lib/modals/AlertModal.d.ts +1 -1
- package/lib/molecules/CustomizeExpandButton/index.d.ts +2 -2
- package/lib/molecules/DeckInfoLabel/index.d.ts +8 -20
- package/lib/molecules/DeckLabel/index.d.ts +9 -2
- package/lib/molecules/DropdownMenu/index.d.ts +5 -4
- package/lib/molecules/IconButton/index.d.ts +45 -0
- package/lib/molecules/InfoScreen/index.d.ts +3 -1
- package/lib/molecules/InputField/__tests__/InputField.test.d.ts +1 -0
- package/lib/{atoms → molecules}/InputField/index.d.ts +13 -12
- package/lib/molecules/LiquidIcon/index.d.ts +2 -1
- package/lib/molecules/RobotInfoLabel/__tests__/RobotInfoLabel.test.d.ts +1 -0
- package/lib/molecules/RobotInfoLabel/index.d.ts +12 -0
- package/lib/molecules/StepGroup/__tests__/StepGroup.test.d.ts +1 -0
- package/lib/molecules/StepGroup/index.d.ts +11 -0
- package/lib/molecules/TextAreaField/__tests__/TextAreaField.test.d.ts +1 -0
- package/lib/molecules/TextAreaField/index.d.ts +34 -0
- package/lib/molecules/TimelineScrubber/TrackSlider.d.ts +10 -0
- package/lib/molecules/TimelineScrubber/index.d.ts +6 -0
- package/lib/molecules/TouchInputField/__tests__/TouchInputField.test.d.ts +1 -0
- package/lib/molecules/TouchInputField/index.d.ts +56 -0
- package/lib/molecules/WizardHeader/__tests__/WizardHeader.test.d.ts +1 -0
- package/lib/molecules/WizardHeader/index.d.ts +11 -0
- package/lib/molecules/index.d.ts +8 -1
- package/lib/organisms/CommandText/getCommandData.d.ts +3 -0
- package/lib/organisms/CommandText/index.d.ts +2 -1
- package/lib/organisms/CommandText/useCommandTextString/index.d.ts +8 -3
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/__tests__/getTipStateCommandText.test.d.ts +1 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getConcurrentCommandText.d.ts +3 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getHSConcurrentShakeSpeedCommandTex.d.ts +3 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getRobotDevicesCommandText.d.ts +3 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getTCStartRunExtendedProfileCommandText.d.ts +4 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getTipStateCommandText.d.ts +3 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/commandText/index.d.ts +5 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareDisplayLocation.d.ts +2 -0
- package/lib/organisms/CommandText/useCommandTextString/utils/getLiquidDisplayName.d.ts +2 -1
- package/lib/organisms/CommandText/useCommandTextString/utils/types.d.ts +2 -1
- package/lib/organisms/DeckLabelSet/index.d.ts +1 -0
- package/lib/organisms/FixtureOption/index.d.ts +0 -1
- package/lib/organisms/LabwareDetailsWithCount/__tests__/LabwareDetailsWithCount.test.d.ts +1 -0
- package/lib/organisms/LabwareDetailsWithCount/index.d.ts +7 -0
- package/lib/organisms/LabwareInfoOverlay/__tests__/LabwareInfoOverlay.test.d.ts +1 -0
- package/lib/organisms/LabwareInfoOverlay/index.d.ts +12 -0
- package/lib/organisms/ProtocolDeck/index.d.ts +1 -0
- package/lib/organisms/Toolbox/index.d.ts +2 -0
- package/lib/organisms/index.d.ts +4 -3
- package/lib/primitives/Box.d.ts +3 -7
- package/lib/primitives/Btn.d.ts +2 -55
- package/lib/primitives/Buttons/NewPrimaryBtn.d.ts +8 -0
- package/lib/primitives/Buttons/NewSecondaryBtn.d.ts +8 -0
- package/lib/primitives/Flex.d.ts +3 -7
- package/lib/primitives/ForeignObject.d.ts +8 -18
- package/lib/primitives/Link.d.ts +3 -7
- package/lib/primitives/Svg.d.ts +4 -13
- package/lib/primitives/Text.d.ts +5 -7
- package/lib/primitives/index.d.ts +2 -0
- package/lib/primitives/style-props.d.ts +3 -3
- package/lib/primitives/types.d.ts +10 -3
- package/lib/src/alerts/alerts.module.css +103 -0
- package/lib/src/atoms/StyledText/placeholderstyledtext.module.css +26 -0
- package/lib/src/buttons/buttons.module.css +428 -0
- package/lib/src/controls/styles.module.css +103 -0
- package/lib/src/forms/Select.module.css +118 -0
- package/lib/src/forms/SelectField.module.css +16 -0
- package/lib/src/forms/forms.module.css +240 -0
- package/lib/src/hardware-sim/BaseDeck/basedeck.module.css +20 -0
- package/lib/src/hardware-sim/Deck/deck.module.css +54 -0
- package/lib/src/hardware-sim/Labware/labware.module.css +8 -0
- package/lib/src/hardware-sim/RobotCoordinateSpace/robotcoordinatespace.module.css +3 -0
- package/lib/src/icons/icon.module.css +10 -0
- package/lib/src/index.module.css +9 -0
- package/lib/src/instrument/PipetteSelect.module.css +14 -0
- package/lib/src/legacy-hardware-sim/LabwareNameOverlay.module.css +20 -0
- package/lib/src/legacy-hardware-sim/ModuleItem.module.css +98 -0
- package/lib/src/lists/lists.module.css +171 -0
- package/lib/src/modals/modals.module.css +275 -0
- package/lib/src/molecules/DeckInfoLabel/deckinfolabel.module.css +42 -0
- package/lib/src/molecules/ReleaseNotes/styles.module.css +66 -0
- package/lib/src/nav/SidePanel.module.css +34 -0
- package/lib/src/slotmap/styles.module.css +18 -0
- package/lib/src/structure/Pill.module.css +16 -0
- package/lib/src/structure/Splash.module.css +16 -0
- package/lib/src/structure/structure.module.css +114 -0
- package/lib/src/styles/borders.module.css +20 -0
- package/lib/src/styles/colors.module.css +58 -0
- package/lib/src/styles/global.css +179 -0
- package/lib/src/styles/index.module.css +8 -0
- package/lib/src/styles/typography.module.css +23 -0
- package/lib/src/tooltips/tooltips.module.css +72 -0
- package/lib/structure/Pill.d.ts +3 -3
- package/lib/style.css +1 -1
- package/lib/testing/utils/matchers.d.ts +0 -1
- package/lib/utils/__tests__/setRefs.test.d.ts +1 -0
- package/lib/utils/__tests__/truncateString.test.d.ts +1 -0
- package/lib/utils/humanizeLabwareType.d.ts +1 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/setRefs.d.ts +2 -0
- package/lib/{utils.d.ts → utils/truncateString.d.ts} +0 -2
- package/lib/utils/wellNameSplit.d.ts +1 -0
- package/package.json +21 -26
- package/src/index.module.css +9 -0
- package/src/styles/borders.module.css +20 -0
- package/src/styles/borders.ts +16 -0
- package/src/styles/colors.module.css +52 -0
- package/src/styles/colors.ts +58 -0
- package/src/styles/cursor.ts +12 -0
- package/src/styles/flexbox.ts +39 -0
- package/src/styles/global.css +180 -0
- package/src/styles/index.module.css +8 -0
- package/src/styles/index.ts +8 -0
- package/src/styles/layout.ts +31 -0
- package/src/styles/position.ts +5 -0
- package/src/styles/spacing.ts +11 -0
- package/src/styles/typography.module.css +23 -0
- package/src/styles/typography.ts +90 -0
- package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
- /package/lib/{__tests__/utils.test.d.ts → atoms/Slider/__tests__/Slider.test.d.ts} +0 -0
- /package/lib/{atoms/InputField/__tests__/InputField.test.d.ts → hardware-sim/DeckConfigurator/__tests__/VacuumModuleItem.test.d.ts} +0 -0
- /package/lib/hardware-sim/Labware/labwareInternals/{__tests__ → Wells/__tests__}/StrokedWells.test.d.ts +0 -0
- /package/lib/hardware-sim/Labware/labwareInternals/{__tests__ → Wells/__tests__}/WellLabels.test.d.ts +0 -0
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { CSSProperties } from '
|
|
2
|
-
import type { RefObject } from 'react';
|
|
1
|
+
import type { CSSProperties, RefObject } from 'react';
|
|
3
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
readonly SHOW_LABEL_INSIDE: "SHOW_LABEL_INSIDE";
|
|
7
|
-
readonly SHOW_LABEL_OUTSIDE: "SHOW_LABEL_OUTSIDE";
|
|
8
|
-
};
|
|
3
|
+
import type { TipType, WellType } from './labwareInternals/types';
|
|
4
|
+
import type { HighlightedWellLabels, WELL_LABEL_OPTIONS, WellFillByName, WellGroup, WellMouseEvent, WellStrokeByName } from './labwareInternals/Wells';
|
|
9
5
|
export type WellLabelOption = keyof typeof WELL_LABEL_OPTIONS;
|
|
10
6
|
export interface LabwareRenderProps {
|
|
11
7
|
/** Labware definition to render */
|
|
@@ -67,9 +63,9 @@ export interface LabwareRenderProps {
|
|
|
67
63
|
highlightedWellLabels?: HighlightedWellLabels;
|
|
68
64
|
selectedWells?: WellGroup | null;
|
|
69
65
|
/** CSS color to fill specified wells */
|
|
70
|
-
wellFill?:
|
|
66
|
+
wellFill?: WellFillByName;
|
|
71
67
|
/** CSS color to stroke specified wells */
|
|
72
|
-
wellStroke?:
|
|
68
|
+
wellStroke?: WellStrokeByName;
|
|
73
69
|
/** CSS color to stroke the labware outline */
|
|
74
70
|
labwareStroke?: CSSProperties['stroke'];
|
|
75
71
|
/** adds thicker blue border with blur to labware */
|
|
@@ -84,5 +80,9 @@ export interface LabwareRenderProps {
|
|
|
84
80
|
onLabwareClick?: () => void;
|
|
85
81
|
showBorder?: boolean;
|
|
86
82
|
strokeColor?: string;
|
|
83
|
+
statusByWellName?: Record<string, TipType | WellType>;
|
|
84
|
+
handleClickWell?: (wellName: string) => void;
|
|
85
|
+
selectedTipsByIndex?: Record<string, number>;
|
|
86
|
+
fill?: CSSProperties['fill'];
|
|
87
87
|
}
|
|
88
88
|
export declare const LabwareRender: (props: LabwareRenderProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CSSProperties } from '
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
3
|
export type LabwareOutlineProps = {
|
|
4
4
|
/** if this labware is a tip rack, darken background and lighten borderx dimension in mm of this labware, used if definition doesn't supply dimensions, defaults to false */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MemoExoticComponent } from 'react';
|
|
2
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
|
-
import type { HighlightedWellLabels } from './
|
|
3
|
+
import type { HighlightedWellLabels } from './Wells';
|
|
4
4
|
interface LabwareWellLabelsProps {
|
|
5
5
|
definition: LabwareDefinition;
|
|
6
6
|
highlightedWellLabels?: HighlightedWellLabels;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CSSProperties } from 'styled-components';
|
|
2
2
|
import type { MemoExoticComponent } from 'react';
|
|
3
3
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
4
|
-
import type {
|
|
4
|
+
import type { TipType, WellType } from './types';
|
|
5
|
+
import type { WellMouseEvent, WellStrokeByName } from './Wells/constants';
|
|
5
6
|
export interface StaticLabwareProps {
|
|
6
7
|
/** Labware definition to render */
|
|
7
8
|
definition: LabwareDefinition;
|
|
@@ -17,9 +18,13 @@ export interface StaticLabwareProps {
|
|
|
17
18
|
onMouseLeaveWell?: (e: WellMouseEvent) => unknown;
|
|
18
19
|
fill?: CSSProperties['fill'];
|
|
19
20
|
showRadius?: boolean;
|
|
20
|
-
wellStroke?:
|
|
21
|
+
wellStroke?: WellStrokeByName;
|
|
21
22
|
/** optional show of labware border, defaulted to true */
|
|
22
23
|
showBorder?: boolean;
|
|
24
|
+
borderStroke?: CSSProperties['stroke'];
|
|
25
|
+
statusByWellName?: Record<string, TipType | WellType>;
|
|
26
|
+
handleClickWell?: (wellName: string) => void;
|
|
27
|
+
selectedTipsByIndex?: Record<string, number>;
|
|
23
28
|
}
|
|
24
29
|
export declare function StaticLabwareComponent(props: StaticLabwareProps): JSX.Element;
|
|
25
30
|
export declare const StaticLabware: MemoExoticComponent<typeof StaticLabwareComponent>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LabwareWellMap } from '@opentrons/shared-data';
|
|
2
|
+
import type { TipType } from '../types';
|
|
3
|
+
interface TipStatusProps {
|
|
4
|
+
type: TipType;
|
|
5
|
+
wellMap: LabwareWellMap;
|
|
6
|
+
wellName: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function TipStatus(props: TipStatusProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TipState } from '@opentrons/step-generation';
|
|
2
|
+
import type { TipType } from '../types';
|
|
3
|
+
export declare const DEFAULT_TIP_SIZE = "20";
|
|
4
|
+
export declare const NEW: 'new';
|
|
5
|
+
export declare const USED: 'used';
|
|
6
|
+
export declare const SELECTED: 'selected';
|
|
7
|
+
export declare const NO: 'no';
|
|
8
|
+
export declare const INACCESSIBLE: 'inaccessible';
|
|
9
|
+
export declare const SELECTED_USED: 'selected_used';
|
|
10
|
+
export declare const SELECTED_ERROR: 'selected_error';
|
|
11
|
+
export declare const tipStateToTipType: Record<TipState, TipType>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LabwareWellMap } from '@opentrons/shared-data';
|
|
2
|
+
import type { ParentType } from '../types';
|
|
3
|
+
interface EmptyWellProps {
|
|
4
|
+
wellMap: LabwareWellMap;
|
|
5
|
+
parentType: ParentType;
|
|
6
|
+
wellName: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function EmptyWell(props: EmptyWellProps): JSX.Element;
|
|
10
|
+
export {};
|
package/lib/hardware-sim/Labware/labwareInternals/{FilledWells.d.ts → Wells/FilledWells.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { CSSProperties } from 'styled-components';
|
|
2
1
|
import type { MemoExoticComponent } from 'react';
|
|
3
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
|
+
import type { WellFillByName, WellStroke } from './constants';
|
|
4
4
|
export interface FilledWellsProps {
|
|
5
5
|
definition: LabwareDefinition;
|
|
6
|
-
fillByWell:
|
|
7
|
-
strokeColor?:
|
|
6
|
+
fillByWell: WellFillByName;
|
|
7
|
+
strokeColor?: WellStroke;
|
|
8
8
|
}
|
|
9
9
|
declare function FilledWellsComponent(props: FilledWellsProps): JSX.Element;
|
|
10
10
|
export declare const FilledWells: MemoExoticComponent<typeof FilledWellsComponent>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LabwareWellMap } from '@opentrons/shared-data';
|
|
2
|
+
interface SelectedWellProps {
|
|
3
|
+
wellMap: LabwareWellMap;
|
|
4
|
+
wellName: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
textInsideTip?: string;
|
|
7
|
+
isUsed?: boolean;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
showStroke?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function SelectedWell(props: SelectedWellProps): JSX.Element;
|
|
13
|
+
export {};
|
package/lib/hardware-sim/Labware/labwareInternals/{StrokedWells.d.ts → Wells/StrokedWells.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { CSSProperties } from 'styled-components';
|
|
2
1
|
import type { MemoExoticComponent } from 'react';
|
|
3
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
|
+
import type { WellStrokeByName } from './constants';
|
|
4
4
|
export interface StrokedWellProps {
|
|
5
5
|
definition: LabwareDefinition;
|
|
6
|
-
strokeByWell
|
|
6
|
+
strokeByWell?: WellStrokeByName;
|
|
7
7
|
}
|
|
8
8
|
export declare function StrokedWellsComponent(props: StrokedWellProps): JSX.Element;
|
|
9
9
|
export declare const StrokedWells: MemoExoticComponent<typeof StrokedWellsComponent>;
|
package/lib/hardware-sim/Labware/labwareInternals/{StyledWells.d.ts → Wells/StyledWells.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, MemoExoticComponent } from 'react';
|
|
2
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
|
-
import type { WellGroup } from './
|
|
3
|
+
import type { WellGroup } from './constants';
|
|
4
4
|
type WellContents = 'tipPresent' | 'tipMissing' | 'defaultWell' | 'disabledWell' | 'highlightedWell' | 'selectedWell';
|
|
5
5
|
export interface StyledWellProps {
|
|
6
6
|
wellContents: WellContents;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties, MemoExoticComponent } from 'react';
|
|
2
2
|
import type { LabwareWell } from '@opentrons/shared-data';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
export interface WellProps extends StyleProps {
|
|
3
|
+
import type { WellMouseEvent } from './constants';
|
|
4
|
+
export interface WellProps extends CSSProperties {
|
|
6
5
|
/** Well Name (eg 'A1') */
|
|
7
6
|
wellName: string;
|
|
8
7
|
/** well object from labware definition */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MemoExoticComponent } from 'react';
|
|
2
2
|
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
|
-
import type { WellLabelOption } from '
|
|
4
|
-
import type { HighlightedWellLabels } from './
|
|
3
|
+
import type { WellLabelOption } from '../../LabwareRender';
|
|
4
|
+
import type { HighlightedWellLabels } from './constants';
|
|
5
5
|
export interface WellLabelsProps {
|
|
6
6
|
definition: LabwareDefinition;
|
|
7
7
|
wellLabelOption: WellLabelOption;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LabwareWellMap } from '@opentrons/shared-data';
|
|
2
|
+
import type { ParentType, WellType } from '../types';
|
|
3
|
+
interface WellStatusProps {
|
|
4
|
+
wellMap: LabwareWellMap;
|
|
5
|
+
wellName: string;
|
|
6
|
+
type: WellType;
|
|
7
|
+
parentType: ParentType;
|
|
8
|
+
showStroke?: boolean;
|
|
9
|
+
size?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function WellStatus(props: WellStatusProps): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CSSProperties, MouseEvent } from 'react';
|
|
2
|
+
export declare const UNSELECTED: 'unselected';
|
|
3
|
+
export interface HighlightedWellLabels {
|
|
4
|
+
wells: string[];
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface WellMouseEvent {
|
|
8
|
+
wellName: string;
|
|
9
|
+
event: MouseEvent;
|
|
10
|
+
}
|
|
11
|
+
type WellName = string;
|
|
12
|
+
export type WellStroke = CSSProperties['stroke'];
|
|
13
|
+
export type WellFill = CSSProperties['fill'];
|
|
14
|
+
export type WellFillByName = Record<WellName, WellFill>;
|
|
15
|
+
export type WellStrokeByName = Record<WellName, WellStroke>;
|
|
16
|
+
export type WellGroup = Record<string, null>;
|
|
17
|
+
export declare const WELL_LABEL_OPTIONS: {
|
|
18
|
+
readonly SHOW_LABEL_INSIDE: "SHOW_LABEL_INSIDE";
|
|
19
|
+
readonly SHOW_LABEL_OUTSIDE: "SHOW_LABEL_OUTSIDE";
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './StyledWells';
|
|
2
|
+
export * from './StrokedWells';
|
|
3
|
+
export * from './WellLabels';
|
|
4
|
+
export * from './FilledWells';
|
|
5
|
+
export * from './EmptyWell';
|
|
6
|
+
export * from './SelectedWell';
|
|
7
|
+
export * from './Well';
|
|
8
|
+
export * from './WellStatus';
|
|
9
|
+
export * from './constants';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export * from './StaticLabware';
|
|
2
|
-
export * from './StyledWells';
|
|
3
|
-
export * from './StrokedWells';
|
|
4
|
-
export * from './WellLabels';
|
|
5
|
-
export * from './FilledWells';
|
|
6
2
|
export * from './LabwareOutline';
|
|
7
|
-
export * from './Well';
|
|
8
3
|
export * from './LabwareWellLabels';
|
|
4
|
+
export * from './Tips';
|
|
5
|
+
export * from './Wells';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export type
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
color?: string;
|
|
12
|
-
}
|
|
1
|
+
import type { INACCESSIBLE, NEW, NO, SELECTED, SELECTED_ERROR, SELECTED_USED, USED } from './Tips/constants';
|
|
2
|
+
import type { UNSELECTED } from './Wells/constants';
|
|
3
|
+
export type TipType = typeof NEW | typeof USED | typeof SELECTED | typeof NO | typeof INACCESSIBLE | typeof SELECTED_USED | typeof SELECTED_ERROR;
|
|
4
|
+
export type WellType = typeof SELECTED | typeof INACCESSIBLE | typeof UNSELECTED | typeof SELECTED_ERROR;
|
|
5
|
+
export declare const WELL: 'well';
|
|
6
|
+
export declare const TIP: 'tip';
|
|
7
|
+
export type SelectionType = typeof WELL | typeof TIP;
|
|
8
|
+
export declare const LABWARE: 'labware';
|
|
9
|
+
export declare const PIPETTE: 'pipette';
|
|
10
|
+
export type ParentType = typeof LABWARE | typeof PIPETTE;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Vacuum(): JSX.Element;
|
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
import { HeaterShaker } from './HeaterShaker';
|
|
2
2
|
import { Temperature } from './Temperature';
|
|
3
3
|
import { Thermocycler } from './Thermocycler';
|
|
4
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
4
|
+
import type { ComponentProps, Dispatch, ReactNode, SetStateAction } from 'react';
|
|
5
5
|
import type { ModuleDefinition } from '@opentrons/shared-data';
|
|
6
6
|
export * from './Thermocycler';
|
|
7
7
|
interface Props {
|
|
8
|
+
/**
|
|
9
|
+
* The x-coordinate of the module origin,
|
|
10
|
+
* which is the -x,-y corner of the slot that the module is in.
|
|
11
|
+
*/
|
|
8
12
|
x: number;
|
|
13
|
+
/**
|
|
14
|
+
* The y-coordinate of the module origin,
|
|
15
|
+
* which is the -x,-y corner of the slot that the module is in.
|
|
16
|
+
*/
|
|
9
17
|
y: number;
|
|
10
18
|
def: ModuleDefinition;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
/**
|
|
20
|
+
* How child components should be positioned. Use `passThrough` for new code.
|
|
21
|
+
*
|
|
22
|
+
* `passThrough` - The SVG origin of each child will be at the origin of the module,
|
|
23
|
+
* which is the front-left (-x, -y) corner of the slot that the module is in.
|
|
24
|
+
* From there, use a helper component like `CenterLabwareInModuleChildSlot` or
|
|
25
|
+
* `AlignToModuleChildSlot` to move the child where you want it.
|
|
26
|
+
*
|
|
27
|
+
* `offsetToSlot - The SVG origin of each child will be at the "labware mating interface"
|
|
28
|
+
* of the module, which is the front-left (-x, -y) corner of the slot on top of the
|
|
29
|
+
* module.
|
|
30
|
+
*
|
|
31
|
+
* This is deprecated for separation of responsibilities, and because it's easier
|
|
32
|
+
* to support labware schema 3's unpredictable labware origins with `passThrough`'s
|
|
33
|
+
* way of doing things.
|
|
34
|
+
*
|
|
35
|
+
* todo(mm, 2025-07-21):
|
|
36
|
+
* 1. Migrate all existing call sites to use "passThrough".
|
|
37
|
+
* 2. Remove "offsetToSlot".
|
|
38
|
+
*/
|
|
39
|
+
childrenPositioningMode: 'passThrough' | 'offsetToSlot';
|
|
15
40
|
/**
|
|
16
41
|
* Used for applying slot-specific positioning adjustments.
|
|
17
42
|
* If you're rendering the module on a deck, supply this for correct positioning.
|
|
@@ -22,5 +47,15 @@ interface Props {
|
|
|
22
47
|
* If you're rendering the module on a deck, supply this for correct positioning.
|
|
23
48
|
*/
|
|
24
49
|
targetDeckId: string | null;
|
|
50
|
+
orientation?: 'left' | 'right';
|
|
51
|
+
innerProps?: ComponentProps<typeof Thermocycler> | ComponentProps<typeof HeaterShaker> | ComponentProps<typeof Temperature> | {};
|
|
52
|
+
statusInfo?: ReactNode; /** contents of small status rectangle, not displayed if absent */
|
|
53
|
+
/**
|
|
54
|
+
* Contents to be rendered above and as part of the module, typically labware.
|
|
55
|
+
* See `childrenPositioningMode`.
|
|
56
|
+
*/
|
|
57
|
+
children?: ReactNode;
|
|
58
|
+
setSelectedSlot?: Dispatch<SetStateAction<string | null>>;
|
|
59
|
+
setHoveredSlot?: Dispatch<SetStateAction<string | null>>;
|
|
25
60
|
}
|
|
26
61
|
export declare const Module: (props: Props) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MemoExoticComponent } from 'react';
|
|
2
|
+
import type { PipetteV2Specs } from '@opentrons/shared-data';
|
|
3
|
+
import type { WellType } from '../..';
|
|
4
|
+
export interface StrokedNozzleProps {
|
|
5
|
+
pipetteSpecs: PipetteV2Specs;
|
|
6
|
+
nozzleStatus: Record<string, WellType>;
|
|
7
|
+
handleClickNozzle: (nozzleName: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function StrokedNozzlesComponent(props: StrokedNozzleProps): JSX.Element;
|
|
10
|
+
export declare const StrokedNozzles: MemoExoticComponent<typeof StrokedNozzlesComponent>;
|
|
@@ -5,3 +5,6 @@ export declare const MULTI_CHANNEL_PIPETTE_HEIGHT = 90.3;
|
|
|
5
5
|
export declare const NINETY_SIX_CHANNEL_PIPETTE_WIDTH = 117.7;
|
|
6
6
|
export declare const MULTI_CHANNEL_CENTER_Y_NOZZLE = 13.3;
|
|
7
7
|
export declare const MULTI_CHANNEL_Y_OFFSET = -2.5;
|
|
8
|
+
export declare const NOZZLE_SIZE_MM = "8";
|
|
9
|
+
export declare const NOZZLE_DIAMETER = 20;
|
|
10
|
+
export declare const NOZZLE_POSITION_IN_RENDER = 5;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface RobotCoordinateSpaceProps extends ComponentProps<typeof Svg> {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface RobotCoordinateSpaceProps {
|
|
4
3
|
animated?: boolean;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
height?: string;
|
|
6
|
+
viewBox?: string;
|
|
5
7
|
}
|
|
6
8
|
export declare function RobotCoordinateSpace(props: RobotCoordinateSpaceProps): JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
3
2
|
import type { DeckDefinition, DeckSlot } from '@opentrons/shared-data';
|
|
3
|
+
import type { SvgProps } from '../../primitives';
|
|
4
4
|
export interface RobotCoordinateSpaceWithRefRenderProps {
|
|
5
5
|
deckSlotsById: {
|
|
6
6
|
[slotId: string]: DeckSlot;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
interface RobotCoordinateSpaceWithRefProps extends
|
|
10
|
-
viewBox?: string
|
|
9
|
+
interface RobotCoordinateSpaceWithRefProps extends SvgProps {
|
|
10
|
+
viewBox?: string;
|
|
11
11
|
deckDef?: DeckDefinition;
|
|
12
12
|
zoomed?: boolean;
|
|
13
|
+
adjustViewBoxForStacker?: boolean;
|
|
13
14
|
children?: (props: RobotCoordinateSpaceWithRefRenderProps) => ReactNode;
|
|
14
15
|
}
|
|
15
16
|
export declare function RobotCoordinateSpaceWithRef(props: RobotCoordinateSpaceWithRefProps): JSX.Element | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { ModuleDefinition } from '@opentrons/shared-data';
|
|
3
|
+
export type AlignToModuleChildSlotProps = PropsWithChildren<{
|
|
4
|
+
/** Should match the `deckId` passed to the parent `<Module>`. */
|
|
5
|
+
deckId: string | null;
|
|
6
|
+
/** Should match the `slotId` passed to the parent `<Module>`. */
|
|
7
|
+
slotId: string | null;
|
|
8
|
+
/** Should match the module definition passed to the parent `<Module>`. */
|
|
9
|
+
moduleDefinition: ModuleDefinition;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Applies an SVG transform to children so that their SVG origin is at the front-left
|
|
13
|
+
* (-x, -y) corner of the "slot" atop a module.
|
|
14
|
+
*
|
|
15
|
+
* See `getModuleParentOriginToChildSlotOrigin()` for nuances of what "the 'slot' atop
|
|
16
|
+
* the module" means for things like the Thermocycler and Heater-Shaker.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <Module ...>
|
|
20
|
+
* <AlignToModuleChildSlot ...>
|
|
21
|
+
* <SomeUIControl ... />
|
|
22
|
+
* </AlignToModuleChildSlot>
|
|
23
|
+
* </Module>
|
|
24
|
+
*/
|
|
25
|
+
export declare function AlignToModuleChildSlot(props: AlignToModuleChildSlotProps): JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { LabwareDefinition, ModuleDefinition } from '@opentrons/shared-data';
|
|
3
|
+
export type CenterLabwareInModuleChildSlotProps = PropsWithChildren<{
|
|
4
|
+
/** Should match the `deckId` passed to the parent `<Module>`. */
|
|
5
|
+
deckId: string | null;
|
|
6
|
+
/** Should match the `slotId` passed to the parent `<Module>`. */
|
|
7
|
+
slotId: string | null;
|
|
8
|
+
/** Should match the module definition passed to the parent `<Module>`. */
|
|
9
|
+
moduleDefinition: ModuleDefinition;
|
|
10
|
+
/** Should match the labware definition passed to the child `<Labware>`/`<LabwareRender>`. */
|
|
11
|
+
labwareDefinition: LabwareDefinition;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* This visually aligns a labware so it's centered in the slot atop a module.
|
|
15
|
+
*
|
|
16
|
+
* Certain modules, like the Thermocycler and Heater-Shaker, don't have slots. In those
|
|
17
|
+
* cases, the labware will be centered over the thermal block or whatever the module has
|
|
18
|
+
* instead.
|
|
19
|
+
*
|
|
20
|
+
* The parent SVG origin should be the front-left (-x,-y) corner of the slot that the
|
|
21
|
+
* module is in, which is also the origin of the module.
|
|
22
|
+
*
|
|
23
|
+
* Example:
|
|
24
|
+
*
|
|
25
|
+
* ```
|
|
26
|
+
* <Module childrenPositioningMode="passThrough" ...>
|
|
27
|
+
* <CenterLabwareInModuleChildSlot ...>
|
|
28
|
+
* <LabwareRender positioningMode="passThrough" ... />
|
|
29
|
+
* </CenterLabwareInModuleChildSlot>
|
|
30
|
+
* </Module>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function CenterLabwareInModuleChildSlot(props: CenterLabwareInModuleChildSlotProps): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { LabwareDefinition } from '@opentrons/shared-data';
|
|
3
|
+
export type CenterLabwareInSlotProps = PropsWithChildren<{
|
|
4
|
+
definition: LabwareDefinition;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* This wraps a `<LabwareRender>` to center it within a standard-sized slot.
|
|
8
|
+
*
|
|
9
|
+
* The parent SVG origin should point to the front-left (-x, -y) corner of the slot.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CenterLabwareInSlot(props: CenterLabwareInSlotProps): JSX.Element;
|
|
@@ -71,6 +71,7 @@ export declare const blue50 = "#006CFA";
|
|
|
71
71
|
export declare const transparentWhite80 = "#FFFFFFCC";
|
|
72
72
|
export declare const transparentWhite50 = "#FFFFFF80";
|
|
73
73
|
export declare const transparentBlack80 = "#16212D80";
|
|
74
|
+
export declare const transparentBlack90 = "#16212D90";
|
|
74
75
|
/**
|
|
75
76
|
* flex
|
|
76
77
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ComponentType } from 'react';
|
|
2
|
-
import type { StyleProps } from '../primitives';
|
|
2
|
+
import type { StyleProps } from '../primitives/types';
|
|
3
3
|
/**
|
|
4
4
|
* A Higher-Order Component (HOC) that enhances a component by enabling it to
|
|
5
5
|
* accept `StyleProps`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export * from './useCommandTypeSummaries';
|
|
1
2
|
export * from './useConditionalConfirm';
|
|
2
3
|
export * from './useDrag';
|
|
3
4
|
export * from './useInterval';
|
|
4
5
|
export * from './useLongPress';
|
|
6
|
+
export * from './useMenuHandleClickOutside';
|
|
5
7
|
export * from './useMountEffect';
|
|
6
8
|
export * from './usePrevious';
|
|
7
9
|
export * from './useScrolling';
|
|
@@ -9,4 +11,3 @@ export * from './useSelectDeckLocation';
|
|
|
9
11
|
export * from './useSwipe';
|
|
10
12
|
export * from './useTimeout';
|
|
11
13
|
export * from './useToggle';
|
|
12
|
-
export * from './useMenuHandleClickOutside';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export interface UseConditionalConfirmResult<T extends any[]> {
|
|
2
|
+
confirm: (...args: T) => void;
|
|
3
|
+
showConfirmation: boolean;
|
|
4
|
+
cancel: () => unknown;
|
|
5
|
+
}
|
|
1
6
|
/**
|
|
2
7
|
* useConditionalConfirm is intended for cases where we want to block and defer
|
|
3
8
|
* a particular user action until the user clicks "ok" in any kind of "are you sure?"
|
|
@@ -33,13 +38,4 @@
|
|
|
33
38
|
* }
|
|
34
39
|
* ```
|
|
35
40
|
*/
|
|
36
|
-
export interface UseConditionalConfirmResult<T extends any[]> {
|
|
37
|
-
confirm: (...args: T) => void;
|
|
38
|
-
showConfirmation: boolean;
|
|
39
|
-
cancel: () => unknown;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Provides conditional confirmation logic, allowing certain actions to be blocked
|
|
43
|
-
* until explicitly confirmed.
|
|
44
|
-
*/
|
|
45
41
|
export declare const useConditionalConfirm: <T extends any[]>(handleContinue: (...args: T) => any, shouldBlock: boolean) => UseConditionalConfirmResult<T>;
|
package/lib/i18n.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export declare const LANGUAGES: Array<{
|
|
|
9
9
|
name: string;
|
|
10
10
|
value: Language;
|
|
11
11
|
}>;
|
|
12
|
+
/** base i18n config to be used in all other projects in the monorepo
|
|
13
|
+
* that use i18n
|
|
14
|
+
*/
|
|
15
|
+
export declare const baseI18nConfig: InitOptions;
|
|
12
16
|
declare const i18nConfig: InitOptions;
|
|
13
17
|
declare const i18nCb: (err?: Error) => void;
|
|
14
18
|
export { i18n, i18nCb, i18nConfig };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ModuleType } from '@opentrons/shared-data';
|
|
2
|
-
|
|
3
|
-
export type ModuleIconName = 'ot-magnet-v2' | 'ot-heater-shaker' | 'ot-temperature-v2' | 'ot-magnet-v2' | 'ot-thermocycler' | 'ot-absorbance' | 'ot-flex-stacker';
|
|
3
|
+
export type ModuleIconName = 'ot-magnet-v2' | 'ot-heater-shaker' | 'ot-temperature-v2' | 'ot-magnet-v2' | 'ot-thermocycler' | 'ot-absorbance' | 'ot-flex-stacker' | 'ot-vacuum';
|
|
4
4
|
export declare const MODULE_ICON_NAME_BY_TYPE: {
|
|
5
5
|
[type in ModuleType]: ModuleIconName;
|
|
6
6
|
};
|
|
7
|
-
interface ModuleIconProps
|
|
7
|
+
interface ModuleIconProps {
|
|
8
8
|
moduleType: ModuleType;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
declare function ModuleIconComponent(props: ModuleIconProps): JSX.Element;
|
|
11
|
+
export declare const ModuleIcon: typeof ModuleIconComponent & import("react").ComponentType<ModuleIconProps & import("..").StyleProps>;
|
|
11
12
|
export {};
|