@opentrons/components 0.1.6-alpha.12 → 0.1.6-alpha.16
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/lib/atoms/Checkbox/index.d.ts +1 -0
- package/lib/atoms/InputField/index.d.ts +9 -9
- package/lib/atoms/ListItem/ListItemChildren/ListItemCustomize.d.ts +2 -2
- package/lib/atoms/ListItem/ListItemChildren/ListItemDescriptor.d.ts +1 -0
- package/lib/atoms/ListItem/index.d.ts +1 -1
- package/lib/atoms/StyledText/StyledText.d.ts +1 -1
- package/lib/atoms/Tag/index.d.ts +1 -0
- package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +6 -6
- package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +1 -0
- package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +2 -2
- package/lib/hardware-sim/Labware/LabwareRender.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +1 -1
- package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +1 -1
- package/lib/hooks/useMenuHandleClickOutside.d.ts +3 -3
- package/lib/index.mjs +12253 -25041
- package/lib/instrument/InstrumentDiagram.d.ts +1 -1
- package/lib/molecules/DropdownMenu/index.d.ts +2 -2
- package/lib/molecules/InfoScreen/index.d.ts +3 -1
- package/lib/organisms/Toolbox/index.d.ts +1 -1
- package/lib/patches.d.ts +4 -0
- package/lib/primitives/Btn.d.ts +1 -1
- package/lib/primitives/style-props.d.ts +1 -1
- package/lib/primitives/types.d.ts +1 -1
- package/lib/styles/typography.d.ts +1 -1
- package/package.json +5 -5
- package/tsconfig.json +0 -2
- package/vite.config.mts +4 -10
- package/lib/index.cjs +0 -732
- package/lib/style.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TYPOGRAPHY } from '../../ui-style-constants';
|
|
2
|
+
import type { ChangeEventHandler, FocusEvent, MouseEvent, ReactNode } from 'react';
|
|
3
3
|
import type { IconName } from '../../icons';
|
|
4
4
|
export declare const INPUT_TYPE_NUMBER: "number";
|
|
5
5
|
export declare const LEGACY_INPUT_TYPE_TEXT: "text";
|
|
@@ -8,7 +8,7 @@ export interface InputFieldProps {
|
|
|
8
8
|
/** field is disabled if value is true */
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
/** change handler */
|
|
11
|
-
onChange?:
|
|
11
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
12
12
|
/** name of field in form */
|
|
13
13
|
name?: string;
|
|
14
14
|
/** optional ID of <input> element */
|
|
@@ -16,7 +16,7 @@ export interface InputFieldProps {
|
|
|
16
16
|
/** placeholder text */
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
/** optional suffix component, appears to the right of input text */
|
|
19
|
-
units?:
|
|
19
|
+
units?: ReactNode;
|
|
20
20
|
/** current value of text in box, defaults to '' */
|
|
21
21
|
value?: string | number | null;
|
|
22
22
|
/** if included, InputField will use error style and display error instead of caption */
|
|
@@ -30,11 +30,11 @@ export interface InputFieldProps {
|
|
|
30
30
|
/** optional input type (default "text") */
|
|
31
31
|
type?: typeof LEGACY_INPUT_TYPE_TEXT | typeof LEGACY_INPUT_TYPE_PASSWORD | typeof INPUT_TYPE_NUMBER;
|
|
32
32
|
/** mouse click handler */
|
|
33
|
-
onClick?: (event:
|
|
33
|
+
onClick?: (event: MouseEvent<HTMLInputElement>) => unknown;
|
|
34
34
|
/** focus handler */
|
|
35
|
-
onFocus?: (event:
|
|
35
|
+
onFocus?: (event: FocusEvent<HTMLInputElement>) => unknown;
|
|
36
36
|
/** blur handler */
|
|
37
|
-
onBlur?: (event:
|
|
37
|
+
onBlur?: (event: FocusEvent<HTMLInputElement>) => unknown;
|
|
38
38
|
/** makes input field read-only */
|
|
39
39
|
readOnly?: boolean;
|
|
40
40
|
/** html tabindex property */
|
|
@@ -44,8 +44,8 @@ export interface InputFieldProps {
|
|
|
44
44
|
/** if true, clear out value and add '-' placeholder */
|
|
45
45
|
isIndeterminate?: boolean;
|
|
46
46
|
/** if input type is number, these are the min and max values */
|
|
47
|
-
max?: number;
|
|
48
|
-
min?: number;
|
|
47
|
+
max?: number | string;
|
|
48
|
+
min?: number | string;
|
|
49
49
|
/** horizontal text alignment for title, input, and (sub)captions */
|
|
50
50
|
textAlign?: typeof TYPOGRAPHY.textAlignLeft | typeof TYPOGRAPHY.textAlignCenter;
|
|
51
51
|
/** small or medium input field height, relevant only */
|
|
@@ -65,4 +65,4 @@ export interface InputFieldProps {
|
|
|
65
65
|
/** optional prop to override input field padding */
|
|
66
66
|
padding?: string;
|
|
67
67
|
}
|
|
68
|
-
export declare const InputField:
|
|
68
|
+
export declare const InputField: import("react").ForwardRefExoticComponent<Omit<InputFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -8,8 +8,8 @@ interface ListItemCustomizeProps {
|
|
|
8
8
|
label?: string;
|
|
9
9
|
dropdown?: DropdownMenuProps;
|
|
10
10
|
tag?: TagProps;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/** optional placement of the menu */
|
|
12
|
+
menuPlacement?: 'auto' | 'top' | 'bottom';
|
|
13
13
|
}
|
|
14
14
|
export declare function ListItemCustomize(props: ListItemCustomizeProps): JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { StyleProps } from '../../primitives';
|
|
3
3
|
export * from './ListItemChildren';
|
|
4
|
-
export type ListItemType = 'error' | 'noActive' | 'success' | 'warning';
|
|
4
|
+
export type ListItemType = 'error' | 'noActive' | 'success' | 'warning' | 'unavailable';
|
|
5
5
|
interface ListItemProps extends StyleProps {
|
|
6
6
|
/** ListItem state type */
|
|
7
7
|
type: ListItemType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Text } from '../../primitives';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
import type { FlattenSimpleInterpolation } from '
|
|
3
|
+
import type { FlattenSimpleInterpolation } from '../../patches';
|
|
4
4
|
declare const helixProductStyleMap: {
|
|
5
5
|
readonly displayBold: {
|
|
6
6
|
readonly as: "h1";
|
package/lib/atoms/Tag/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Module } from '../Module';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import type { Svg } from '../../primitives';
|
|
4
4
|
import type { DeckConfiguration, LabwareDefinition2, LabwareLocation, ModuleLocation, ModuleModel, RobotType } from '@opentrons/shared-data';
|
|
5
5
|
import type { WellFill, WellGroup } from '../Labware';
|
|
@@ -9,7 +9,7 @@ export interface LabwareOnDeck {
|
|
|
9
9
|
wellFill?: WellFill;
|
|
10
10
|
missingTips?: WellGroup;
|
|
11
11
|
/** generic prop to render self-positioned children for each labware */
|
|
12
|
-
labwareChildren?:
|
|
12
|
+
labwareChildren?: ReactNode;
|
|
13
13
|
onLabwareClick?: () => void;
|
|
14
14
|
highlight?: boolean;
|
|
15
15
|
highlightShadow?: boolean;
|
|
@@ -20,9 +20,9 @@ export interface ModuleOnDeck {
|
|
|
20
20
|
moduleLocation: ModuleLocation;
|
|
21
21
|
nestedLabwareDef?: LabwareDefinition2 | null;
|
|
22
22
|
nestedLabwareWellFill?: WellFill;
|
|
23
|
-
innerProps?:
|
|
23
|
+
innerProps?: ComponentProps<typeof Module>['innerProps'];
|
|
24
24
|
/** generic prop to render self-positioned children for each module */
|
|
25
|
-
moduleChildren?:
|
|
25
|
+
moduleChildren?: ReactNode;
|
|
26
26
|
onLabwareClick?: () => void;
|
|
27
27
|
highlightLabware?: boolean;
|
|
28
28
|
highlightShadowLabware?: boolean;
|
|
@@ -38,12 +38,12 @@ interface BaseDeckProps {
|
|
|
38
38
|
lightFill?: string;
|
|
39
39
|
mediumFill?: string;
|
|
40
40
|
darkFill?: string;
|
|
41
|
-
children?:
|
|
41
|
+
children?: ReactNode;
|
|
42
42
|
showSlotLabels?: boolean;
|
|
43
43
|
/** whether to make wrapping svg tag animatable via @react-spring/web, defaults to false */
|
|
44
44
|
animatedSVG?: boolean;
|
|
45
45
|
/** extra props to pass to svg tag */
|
|
46
|
-
svgProps?:
|
|
46
|
+
svgProps?: ComponentProps<typeof Svg>;
|
|
47
47
|
}
|
|
48
48
|
export declare function BaseDeck(props: BaseDeckProps): JSX.Element;
|
|
49
49
|
export {};
|
|
@@ -3,6 +3,7 @@ export interface RobotCoordsTextProps extends React.ComponentProps<'text'> {
|
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
+
canHighlight?: boolean;
|
|
6
7
|
}
|
|
7
8
|
/** SVG text reflected to use take robot coordinates as props */
|
|
8
9
|
export declare function RobotCoordsText(props: RobotCoordsTextProps): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
import type { StyleProps } from '../../primitives';
|
|
3
3
|
import type { DeckDefinition, DeckSlot } from '@opentrons/shared-data';
|
|
4
4
|
export interface RobotWorkSpaceRenderProps {
|
|
@@ -13,7 +13,7 @@ export interface RobotWorkSpaceRenderProps {
|
|
|
13
13
|
export interface RobotWorkSpaceProps extends StyleProps {
|
|
14
14
|
deckDef?: DeckDefinition;
|
|
15
15
|
viewBox?: string | null;
|
|
16
|
-
children?: (props: RobotWorkSpaceRenderProps) =>
|
|
16
|
+
children?: (props: RobotWorkSpaceRenderProps) => ReactNode;
|
|
17
17
|
deckLayerBlocklist?: string[];
|
|
18
18
|
showDeckLayers?: boolean;
|
|
19
19
|
id?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import type { CSSProperties } from '
|
|
2
|
+
import type { CSSProperties } from '../../patches';
|
|
3
3
|
import type { LabwareDefinition2 } from '@opentrons/shared-data';
|
|
4
4
|
import type { HighlightedWellLabels, WellMouseEvent, WellFill, WellStroke, WellGroup } from './labwareInternals/types';
|
|
5
5
|
export declare const WELL_LABEL_OPTIONS: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LabwareDefinition2 } from '@opentrons/shared-data';
|
|
3
|
-
import type { CSSProperties } from '
|
|
3
|
+
import type { CSSProperties } from '../../../patches';
|
|
4
4
|
export interface FilledWellsProps {
|
|
5
5
|
definition: LabwareDefinition2;
|
|
6
6
|
fillByWell: Record<string, CSSProperties['fill']>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LabwareDefinition2 } from '@opentrons/shared-data';
|
|
3
3
|
import type { WellMouseEvent, WellStroke } from './types';
|
|
4
|
-
import type { CSSProperties } from '
|
|
4
|
+
import type { CSSProperties } from '../../../patches';
|
|
5
5
|
export interface StaticLabwareProps {
|
|
6
6
|
/** Labware definition to render */
|
|
7
7
|
definition: LabwareDefinition2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LabwareDefinition2 } from '@opentrons/shared-data';
|
|
3
|
-
import type { CSSProperties } from '
|
|
3
|
+
import type { CSSProperties } from '../../../patches';
|
|
4
4
|
export interface StrokedWellProps {
|
|
5
5
|
definition: LabwareDefinition2;
|
|
6
6
|
strokeByWell: Record<string, CSSProperties['stroke']>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Dispatch, MouseEventHandler, SetStateAction } from 'react';
|
|
2
2
|
interface MenuHandleClickOutside {
|
|
3
3
|
menuOverlay: JSX.Element;
|
|
4
|
-
handleOverflowClick:
|
|
4
|
+
handleOverflowClick: MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
showOverflowMenu: boolean;
|
|
6
|
-
setShowOverflowMenu:
|
|
6
|
+
setShowOverflowMenu: Dispatch<SetStateAction<boolean>>;
|
|
7
7
|
}
|
|
8
8
|
export declare function useMenuHandleClickOutside(): MenuHandleClickOutside;
|
|
9
9
|
export {};
|