@opentrons/components 0.1.3 → 0.1.5-alpha.3
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/Makefile +4 -1
- package/lib/alerts/AlertItem.d.ts +1 -1
- package/lib/atoms/buttons/AlertPrimaryButton.d.ts +2 -1
- package/lib/atoms/buttons/PrimaryButton.d.ts +2 -1
- package/lib/forms/DropdownField.d.ts +1 -1
- package/lib/forms/Select.d.ts +6 -6
- package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +1 -1
- package/lib/hardware-sim/Deck/FlexTrash.d.ts +1 -1
- package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +2 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +2 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +2 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +2 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +2 -0
- package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +19 -0
- package/lib/hardware-sim/Labware/LabwareRender.d.ts +3 -1
- package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +3 -3
- package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +1 -0
- package/lib/helix-design-system/colors.d.ts +14 -14
- package/lib/hooks/useScrolling.d.ts +1 -8
- package/lib/hooks/useSelectDeckLocation/index.d.ts +6 -3
- package/lib/hooks/useToggle.d.ts +1 -1
- package/lib/icons/Icon.d.ts +1 -1
- package/lib/interaction-enhancers/useHover.d.ts +1 -1
- package/lib/molecules/LocationIcon/index.d.ts +1 -1
- package/lib/opentrons-components.js +4 -4
- package/lib/primitives/Btn.d.ts +10 -9
- package/lib/primitives/style-props.d.ts +1 -1
- package/lib/primitives/types.d.ts +1 -1
- package/lib/styles/borders.d.ts +2 -2
- package/lib/styles/layout.d.ts +3 -0
- package/lib/tooltips/DeprecatedTooltip.d.ts +1 -1
- package/lib/tooltips/HoverTooltip.d.ts +2 -2
- package/lib/tooltips/types.d.ts +10 -10
- package/lib/ui-style-constants/borders.d.ts +3 -3
- package/lib/ui-style-constants/responsiveness.d.ts +1 -0
- package/package.json +2 -2
package/Makefile
CHANGED
|
@@ -9,6 +9,9 @@ tests ?=
|
|
|
9
9
|
cov_opts ?= --coverage=true --ci=true --collectCoverageFrom='components/src/**/*.(js|ts|tsx)'
|
|
10
10
|
test_opts ?=
|
|
11
11
|
|
|
12
|
+
# override webpack's default hashing algorithm for node 18: https://github.com/webpack/webpack/issues/14532
|
|
13
|
+
export NODE_OPTIONS := --openssl-legacy-provider
|
|
14
|
+
|
|
12
15
|
# standard targets
|
|
13
16
|
#####################################################################
|
|
14
17
|
|
|
@@ -44,4 +47,4 @@ test:
|
|
|
44
47
|
|
|
45
48
|
.PHONY: test-cov
|
|
46
49
|
test-cov:
|
|
47
|
-
make -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"
|
|
50
|
+
make -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { IconProps } from '../icons';
|
|
3
|
-
export
|
|
3
|
+
export type AlertType = 'success' | 'warning' | 'error' | 'info';
|
|
4
4
|
export interface AlertItemProps {
|
|
5
5
|
/** name constant of the icon to display */
|
|
6
6
|
type: AlertType;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const AlertPrimaryButton: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("../../primitives").StyleProps, any>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const PrimaryButton: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("../../primitives").StyleProps, any>;
|
|
@@ -4,7 +4,7 @@ export interface DropdownOption {
|
|
|
4
4
|
value: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type Options = DropdownOption[];
|
|
8
8
|
export interface DropdownFieldProps {
|
|
9
9
|
/** change handler */
|
|
10
10
|
onChange: React.ChangeEventHandler<HTMLSelectElement>;
|
package/lib/forms/Select.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const PLACEMENT_TOP: 'top';
|
|
|
9
9
|
export declare const CONTEXT_MENU: 'menu';
|
|
10
10
|
export declare const CONTEXT_VALUE: 'value';
|
|
11
11
|
export declare const SELECT_CX_PREFIX = "ot_select";
|
|
12
|
-
export
|
|
12
|
+
export type ChangeAction = 'select-option' | 'deselect-option' | 'remove-value' | 'pop-value' | 'set-value' | 'clear' | 'create-option';
|
|
13
13
|
export interface SelectOption {
|
|
14
14
|
value: string;
|
|
15
15
|
label?: string;
|
|
@@ -19,9 +19,9 @@ export interface SelectOptionGroup {
|
|
|
19
19
|
options: SelectOption[];
|
|
20
20
|
label?: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
22
|
+
export type SelectOptionOrGroup = SelectOption | SelectOptionGroup;
|
|
23
|
+
export type SelectPlacement = typeof PLACEMENT_AUTO | typeof PLACEMENT_BOTTOM | typeof PLACEMENT_TOP;
|
|
24
|
+
export type SelectPosition = typeof POSITION_ABSOLUTE | typeof POSITION_FIXED;
|
|
25
|
+
export type SelectOptionContext = typeof CONTEXT_MENU | typeof CONTEXT_VALUE;
|
|
26
|
+
export type SelectProps = ReactSelectProps<SelectOption>;
|
|
27
27
|
export declare function Select(props: SelectProps): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { DeckDefinition, ModuleType } from '@opentrons/shared-data';
|
|
3
|
-
export
|
|
3
|
+
export type StagingAreaLocation = 'cutoutA3' | 'cutoutB3' | 'cutoutC3' | 'cutoutD3';
|
|
4
4
|
interface StagingAreaFixtureProps extends React.SVGProps<SVGGElement> {
|
|
5
5
|
cutoutId: StagingAreaLocation;
|
|
6
6
|
deckDefinition: DeckDefinition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RobotType } from '@opentrons/shared-data';
|
|
2
|
-
export
|
|
2
|
+
export type TrashCutoutId = 'cutoutA1' | 'cutoutB1' | 'cutoutC1' | 'cutoutD1' | 'cutoutA3' | 'cutoutB3' | 'cutoutC3' | 'cutoutD3';
|
|
3
3
|
interface FlexTrashProps {
|
|
4
4
|
robotType: RobotType;
|
|
5
5
|
trashIconColor: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Opentrons96DeepWellAdapter } from './Opentrons96DeepWellAdapter';
|
|
2
|
+
import { Opentrons96FlatBottomAdapter } from './Opentrons96FlatBottomAdapter';
|
|
3
|
+
import { OpentronsUniversalFlatAdapter } from './OpentronsUniversalFlatAdapter';
|
|
4
|
+
import { OpentronsAluminumFlatBottomPlate } from './OpentronsAluminumFlatBottomPlate';
|
|
5
|
+
import { OpentronsFlex96TiprackAdapter } from './OpentronsFlex96TiprackAdapter';
|
|
6
|
+
declare const LABWARE_ADAPTER_LOADNAME_PATHS: {
|
|
7
|
+
opentrons_96_deep_well_adapter: typeof Opentrons96DeepWellAdapter;
|
|
8
|
+
opentrons_96_flat_bottom_adapter: typeof Opentrons96FlatBottomAdapter;
|
|
9
|
+
opentrons_aluminum_flat_bottom_plate: typeof OpentronsAluminumFlatBottomPlate;
|
|
10
|
+
opentrons_flex_96_tiprack_adapter: typeof OpentronsFlex96TiprackAdapter;
|
|
11
|
+
opentrons_universal_flat_adapter: typeof OpentronsUniversalFlatAdapter;
|
|
12
|
+
};
|
|
13
|
+
export type LabwareAdapterLoadName = keyof typeof LABWARE_ADAPTER_LOADNAME_PATHS;
|
|
14
|
+
export declare const labwareAdapterLoadNames: string[];
|
|
15
|
+
export interface LabwareAdapterProps {
|
|
16
|
+
labwareLoadName: LabwareAdapterLoadName;
|
|
17
|
+
}
|
|
18
|
+
export declare const LabwareAdapter: (props: LabwareAdapterProps) => JSX.Element | null;
|
|
19
|
+
export {};
|
|
@@ -6,10 +6,12 @@ export declare const WELL_LABEL_OPTIONS: {
|
|
|
6
6
|
readonly SHOW_LABEL_INSIDE: "SHOW_LABEL_INSIDE";
|
|
7
7
|
readonly SHOW_LABEL_OUTSIDE: "SHOW_LABEL_OUTSIDE";
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type WellLabelOption = keyof typeof WELL_LABEL_OPTIONS;
|
|
10
10
|
export interface LabwareRenderProps {
|
|
11
11
|
/** Labware definition to render */
|
|
12
12
|
definition: LabwareDefinition2;
|
|
13
|
+
/** Opional Prop for labware on heater shakers sitting on right side of the deck */
|
|
14
|
+
shouldRotateAdapterOrientation?: boolean;
|
|
13
15
|
/** option to show well labels inside or outside of labware outline */
|
|
14
16
|
wellLabelOption?: WellLabelOption;
|
|
15
17
|
/** wells to highlight */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LabwareDefinition2 } from '@opentrons/shared-data';
|
|
3
3
|
import type { WellGroup } from './types';
|
|
4
|
-
|
|
4
|
+
type WellContents = 'tipPresent' | 'tipMissing' | 'defaultWell' | 'disabledWell' | 'highlightedWell' | 'selectedWell';
|
|
5
5
|
export interface StyledWellProps {
|
|
6
6
|
wellContents: WellContents;
|
|
7
7
|
definition: LabwareDefinition2;
|
|
@@ -3,9 +3,9 @@ export interface WellMouseEvent {
|
|
|
3
3
|
wellName: string;
|
|
4
4
|
event: React.MouseEvent;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type WellFill = Record<string, string>;
|
|
7
|
+
export type WellStroke = WellFill;
|
|
8
|
+
export type WellGroup = Record<string, null>;
|
|
9
9
|
export interface HighlightedWellLabels {
|
|
10
10
|
wells: string[];
|
|
11
11
|
color?: string;
|
|
@@ -7,5 +7,6 @@ interface LabwareInSlot {
|
|
|
7
7
|
slotName: string;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
+
export declare const getInitialAndMovedLabwareInSlots: (protocolAnalysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput) => LabwareInSlot[];
|
|
10
11
|
export declare const getTopMostLabwareInSlots: (protocolAnalysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput) => LabwareInSlot[];
|
|
11
12
|
export {};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* green
|
|
3
3
|
*/
|
|
4
4
|
export declare const green60 = "#03683E";
|
|
5
|
-
export declare const green50
|
|
6
|
-
export declare const green40
|
|
7
|
-
export declare const green35
|
|
5
|
+
export declare const green50: string;
|
|
6
|
+
export declare const green40: string;
|
|
7
|
+
export declare const green35: string;
|
|
8
8
|
export declare const green30 = "#C4F6E0";
|
|
9
9
|
export declare const green20 = "#E8F7ED";
|
|
10
10
|
/**
|
|
@@ -29,13 +29,13 @@ export declare const yellow20 = "#FDF3E2";
|
|
|
29
29
|
/**
|
|
30
30
|
* purple
|
|
31
31
|
*/
|
|
32
|
-
export declare const purple60
|
|
33
|
-
export declare const purple55
|
|
34
|
-
export declare const purple50
|
|
35
|
-
export declare const purple40
|
|
36
|
-
export declare const purple35
|
|
37
|
-
export declare const purple30
|
|
38
|
-
export declare const purple20
|
|
32
|
+
export declare const purple60: string;
|
|
33
|
+
export declare const purple55: string;
|
|
34
|
+
export declare const purple50: string;
|
|
35
|
+
export declare const purple40: string;
|
|
36
|
+
export declare const purple35: string;
|
|
37
|
+
export declare const purple30: string;
|
|
38
|
+
export declare const purple20: string;
|
|
39
39
|
/**
|
|
40
40
|
* blue
|
|
41
41
|
*/
|
|
@@ -50,13 +50,13 @@ export declare const blue10 = "#F1F8FF";
|
|
|
50
50
|
* grey
|
|
51
51
|
*/
|
|
52
52
|
export declare const grey60 = "#4A4C4E";
|
|
53
|
-
export declare const grey55 = "#
|
|
54
|
-
export declare const grey50 = "#
|
|
55
|
-
export declare const grey40 = "#
|
|
53
|
+
export declare const grey55 = "#626467";
|
|
54
|
+
export declare const grey50 = "#737578";
|
|
55
|
+
export declare const grey40 = "#B7B8B9";
|
|
56
56
|
export declare const grey35 = "#CBCCCC";
|
|
57
57
|
export declare const grey30 = "#DEDEDE";
|
|
58
58
|
export declare const grey20 = "#E9E9E9";
|
|
59
|
-
export declare const grey10 = "#
|
|
59
|
+
export declare const grey10 = "#F3F3F3";
|
|
60
60
|
/**
|
|
61
61
|
* core
|
|
62
62
|
*/
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* A custom hook that detects whether an HTMLElement is being scrolled.
|
|
3
|
-
*
|
|
4
|
-
* @param {RefObject<HTMLElement>} ref - A ref object containing the HTMLElement to monitor for scrolling.
|
|
5
|
-
* @returns {boolean} - A boolean indicating whether the HTMLElement is being scrolled.
|
|
6
|
-
*/
|
|
7
|
-
import { RefObject } from 'react';
|
|
8
|
-
export declare function useScrolling(ref: RefObject<HTMLElement>): boolean;
|
|
1
|
+
export declare const useScrolling: (node: HTMLElement | null) => boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { CutoutConfig } from '@opentrons/shared-data';
|
|
2
3
|
import type { DeckDefinition, ModuleLocation, RobotType } from '@opentrons/shared-data';
|
|
3
|
-
export
|
|
4
|
+
export type DeckLocationSelectThemes = 'default' | 'grey';
|
|
4
5
|
export declare function useDeckLocationSelect(robotType: RobotType, theme?: DeckLocationSelectThemes): {
|
|
5
6
|
DeckLocationSelect: JSX.Element;
|
|
6
7
|
selectedLocation: ModuleLocation;
|
|
@@ -10,8 +11,10 @@ interface DeckLocationSelectProps {
|
|
|
10
11
|
selectedLocation: ModuleLocation;
|
|
11
12
|
theme?: DeckLocationSelectThemes;
|
|
12
13
|
setSelectedLocation?: (loc: ModuleLocation) => void;
|
|
13
|
-
|
|
14
|
+
availableSlotNames?: string[];
|
|
15
|
+
occupiedCutouts?: CutoutConfig[];
|
|
14
16
|
isThermocycler?: boolean;
|
|
17
|
+
showTooltipOnDisabled?: boolean;
|
|
15
18
|
}
|
|
16
|
-
export declare function DeckLocationSelect({ deckDef, selectedLocation, setSelectedLocation,
|
|
19
|
+
export declare function DeckLocationSelect({ deckDef, selectedLocation, setSelectedLocation, availableSlotNames, occupiedCutouts, theme, isThermocycler, showTooltipOnDisabled, }: DeckLocationSelectProps): JSX.Element;
|
|
17
20
|
export {};
|
package/lib/hooks/useToggle.d.ts
CHANGED
package/lib/icons/Icon.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ICON_DATA_BY_NAME } from './icon-data';
|
|
3
3
|
import type { SvgProps } from '../primitives';
|
|
4
|
-
export
|
|
4
|
+
export type IconName = keyof typeof ICON_DATA_BY_NAME;
|
|
5
5
|
export interface IconProps extends SvgProps {
|
|
6
6
|
/** name constant of the icon to display */
|
|
7
7
|
name: IconName;
|
|
@@ -6,7 +6,7 @@ export interface HoverHandlers {
|
|
|
6
6
|
onPointerEnter: () => unknown;
|
|
7
7
|
onPointerLeave: () => unknown;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type UseHoverResult = [boolean, HoverHandlers];
|
|
10
10
|
/**
|
|
11
11
|
* Hook to track hover state of an element
|
|
12
12
|
*
|
|
@@ -11,6 +11,6 @@ interface HardwareIconProps extends StyleProps {
|
|
|
11
11
|
iconName: IconName;
|
|
12
12
|
slotName?: undefined;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
type LocationIconProps = SlotLocationProps | HardwareIconProps;
|
|
15
15
|
export declare function LocationIcon({ slotName, iconName, color, ...styleProps }: LocationIconProps): JSX.Element;
|
|
16
16
|
export {};
|