@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.
Files changed (37) hide show
  1. package/Makefile +4 -1
  2. package/lib/alerts/AlertItem.d.ts +1 -1
  3. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +2 -1
  4. package/lib/atoms/buttons/PrimaryButton.d.ts +2 -1
  5. package/lib/forms/DropdownField.d.ts +1 -1
  6. package/lib/forms/Select.d.ts +6 -6
  7. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +1 -1
  8. package/lib/hardware-sim/Deck/FlexTrash.d.ts +1 -1
  9. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +2 -0
  10. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +2 -0
  11. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +2 -0
  12. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +2 -0
  13. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +2 -0
  14. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +19 -0
  15. package/lib/hardware-sim/Labware/LabwareRender.d.ts +3 -1
  16. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +1 -1
  17. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +3 -3
  18. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +1 -0
  19. package/lib/helix-design-system/colors.d.ts +14 -14
  20. package/lib/hooks/useScrolling.d.ts +1 -8
  21. package/lib/hooks/useSelectDeckLocation/index.d.ts +6 -3
  22. package/lib/hooks/useToggle.d.ts +1 -1
  23. package/lib/icons/Icon.d.ts +1 -1
  24. package/lib/interaction-enhancers/useHover.d.ts +1 -1
  25. package/lib/molecules/LocationIcon/index.d.ts +1 -1
  26. package/lib/opentrons-components.js +4 -4
  27. package/lib/primitives/Btn.d.ts +10 -9
  28. package/lib/primitives/style-props.d.ts +1 -1
  29. package/lib/primitives/types.d.ts +1 -1
  30. package/lib/styles/borders.d.ts +2 -2
  31. package/lib/styles/layout.d.ts +3 -0
  32. package/lib/tooltips/DeprecatedTooltip.d.ts +1 -1
  33. package/lib/tooltips/HoverTooltip.d.ts +2 -2
  34. package/lib/tooltips/types.d.ts +10 -10
  35. package/lib/ui-style-constants/borders.d.ts +3 -3
  36. package/lib/ui-style-constants/responsiveness.d.ts +1 -0
  37. package/package.json +2 -2
@@ -1,8 +1,9 @@
1
+ /// <reference types="react" />
1
2
  import type { PrimitiveComponent } from './types';
2
3
  export declare const BUTTON_TYPE_SUBMIT: 'submit';
3
4
  export declare const BUTTON_TYPE_RESET: 'reset';
4
5
  export declare const BUTTON_TYPE_BUTTON: 'button';
5
- declare type BtnComponent = PrimitiveComponent<'button'>;
6
+ type BtnComponent = PrimitiveComponent<'button'>;
6
7
  /**
7
8
  * Button primitive
8
9
  *
@@ -14,47 +15,47 @@ export declare const Btn: BtnComponent;
14
15
  *
15
16
  * @component
16
17
  */
17
- export declare const PrimaryBtn: BtnComponent;
18
+ export declare const PrimaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
18
19
  /**
19
20
  * Secondary button variant
20
21
  *
21
22
  * @component
22
23
  */
23
- export declare const SecondaryBtn: BtnComponent;
24
+ export declare const SecondaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
24
25
  /**
25
26
  * New primary button variant used in app
26
27
  *
27
28
  * @component
28
29
  */
29
- export declare const NewPrimaryBtn: BtnComponent;
30
+ export declare const NewPrimaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
30
31
  /**
31
32
  * New secondary button variant used in app
32
33
  *
33
34
  * @component
34
35
  */
35
- export declare const NewSecondaryBtn: BtnComponent;
36
+ export declare const NewSecondaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
36
37
  /**
37
38
  * Red primary button variant used in app
38
39
  *
39
40
  * @component
40
41
  */
41
- export declare const NewAlertPrimaryBtn: BtnComponent;
42
+ export declare const NewAlertPrimaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
42
43
  /**
43
44
  * Red secondary button variant used in app
44
45
  *
45
46
  * @component
46
47
  */
47
- export declare const NewAlertSecondaryBtn: BtnComponent;
48
+ export declare const NewAlertSecondaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
48
49
  /**
49
50
  * Light secondary button variant
50
51
  *
51
52
  * @component
52
53
  */
53
- export declare const LightSecondaryBtn: BtnComponent;
54
+ export declare const LightSecondaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
54
55
  /**
55
56
  * Tertiary button variant
56
57
  *
57
58
  * @component
58
59
  */
59
- export declare const TertiaryBtn: BtnComponent;
60
+ export declare const TertiaryBtn: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("./types").StyleProps, any>;
60
61
  export {};
@@ -1,4 +1,4 @@
1
- import * as Types from './types';
1
+ import type * as Types from './types';
2
2
  import type { CSSObject } from 'styled-components';
3
3
  export declare const styleProps: (props: Types.StyleProps) => CSSObject;
4
4
  export declare const isntStyleProp: (prop: string | React.ReactText) => boolean;
@@ -93,4 +93,4 @@ export interface TransitionProps {
93
93
  export interface StyleProps extends ColorProps, TypographyProps, SpacingProps, BorderProps, FlexboxProps, GridProps, LayoutProps, PositionProps, TransitionProps {
94
94
  className?: string;
95
95
  }
96
- export declare type PrimitiveComponent<Instance extends keyof JSX.IntrinsicElements | React.ComponentType<any>, Props extends StyleProps = StyleProps> = StyledComponent<Instance, {}, Props>;
96
+ export type PrimitiveComponent<Instance extends keyof JSX.IntrinsicElements | React.ComponentType<any>, Props extends StyleProps = StyleProps> = StyledComponent<Instance, {}, Props>;
@@ -3,6 +3,6 @@ export declare const BORDER_RADIUS_DEFAULT = "2px";
3
3
  export declare const BORDER_RADIUS_1 = "5px";
4
4
  export declare const BORDER_STYLE_NONE = "none";
5
5
  export declare const BORDER_STYLE_SOLID = "solid";
6
- export declare const BORDER_SOLID_LIGHT: string;
7
- export declare const BORDER_SOLID_MEDIUM: string;
6
+ export declare const BORDER_SOLID_LIGHT = "1px solid #e6e6e6";
7
+ export declare const BORDER_SOLID_MEDIUM = "1px solid #9b9b9b";
8
8
  export declare const SHADOW_LIGHT = "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.2)";
@@ -18,3 +18,6 @@ export declare const OVERFLOW_HIDDEN = "hidden";
18
18
  export declare const OVERFLOW_CLIP = "clip";
19
19
  export declare const OVERFLOW_SCROLL = "scroll";
20
20
  export declare const OVERFLOW_AUTO = "auto";
21
+ export declare const OVERFLOW_WRAP_ANYWHERE = "anywhere";
22
+ export declare const OVERFLOW_WRAP_BREAK_WORD = "break-word";
23
+ export declare const OVERFLOW_WRAP_NORMAL = "normal";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Popper } from 'react-popper';
3
- declare type PopperProps = React.ComponentProps<typeof Popper>;
3
+ type PopperProps = React.ComponentProps<typeof Popper>;
4
4
  export interface DeprecatedTooltipProps {
5
5
  /** show or hide the tooltip */
6
6
  open?: boolean;
@@ -4,8 +4,8 @@ interface MouseHandlers {
4
4
  onMouseEnter: () => void;
5
5
  onMouseLeave: () => void;
6
6
  }
7
- export declare type HoverTooltipHandlers = React.PropsWithRef<MouseHandlers>;
8
- export declare type HoverTooltipProps = DeprecatedTooltipProps;
7
+ export type HoverTooltipHandlers = React.PropsWithRef<MouseHandlers>;
8
+ export type HoverTooltipProps = DeprecatedTooltipProps;
9
9
  interface HoverTooltipState {
10
10
  isOpen: boolean;
11
11
  }
@@ -1,12 +1,12 @@
1
1
  import type { CSSProperties } from 'react';
2
2
  import type { Instance, Options, Modifier } from '@popperjs/core/lib/types';
3
3
  import type { UseHoverOptions, HoverHandlers } from '../interaction-enhancers';
4
- export declare type Placement = Options['placement'];
5
- export declare type Strategy = Options['strategy'];
6
- export declare type PopperInstance = Instance;
7
- export declare type PopperOptions = Options;
8
- export declare type PopperModifer<T> = Modifier<T>;
9
- export declare type HandleStateUpdate = (placement: Placement, styles: {
4
+ export type Placement = Options['placement'];
5
+ export type Strategy = Options['strategy'];
6
+ export type PopperInstance = Instance;
7
+ export type PopperOptions = Options;
8
+ export type PopperModifer<T> = Modifier<T>;
9
+ export type HandleStateUpdate = (placement: Placement, styles: {
10
10
  popper?: CSSProperties;
11
11
  arrow?: CSSProperties;
12
12
  }) => void;
@@ -19,7 +19,7 @@ export interface UsePopperOptions {
19
19
  strategy?: Strategy | null;
20
20
  offset?: number;
21
21
  }
22
- export declare type UsePopperResult = Instance | null;
22
+ export type UsePopperResult = Instance | null;
23
23
  export interface UseTooltipOptions {
24
24
  placement?: Placement;
25
25
  strategy?: Strategy;
@@ -37,14 +37,14 @@ export interface UseTooltipResultTooltipProps {
37
37
  arrowRef: React.RefCallback<HTMLElement | null>;
38
38
  arrowStyle: CSSProperties;
39
39
  }
40
- export declare type UseTooltipResult = [
40
+ export type UseTooltipResult = [
41
41
  UseTooltipResultTargetProps,
42
42
  UseTooltipResultTooltipProps
43
43
  ];
44
- export declare type UseHoverTooltipOptions = Partial<UseTooltipOptions & UseHoverOptions>;
44
+ export type UseHoverTooltipOptions = Partial<UseTooltipOptions & UseHoverOptions>;
45
45
  export interface UseHoverTooltipTargetProps extends UseTooltipResultTargetProps, HoverHandlers {
46
46
  }
47
- export declare type UseHoverTooltipResult = [
47
+ export type UseHoverTooltipResult = [
48
48
  UseHoverTooltipTargetProps,
49
49
  UseTooltipResultTooltipProps & {
50
50
  visible: boolean;
@@ -8,9 +8,9 @@ export declare const borderRadiusSize4 = "16px";
8
8
  export declare const borderRadiusSize5 = "40px";
9
9
  export declare const borderRadiusSize6 = "60px";
10
10
  export declare const tabBorder: import("styled-components").FlattenSimpleInterpolation;
11
- export declare const activeLineBorder: string;
12
- export declare const lineBorder: string;
13
- export declare const transparentLineBorder: string;
11
+ export declare const activeLineBorder = "1px solid #006CFA";
12
+ export declare const lineBorder = "1px solid #DEDEDE";
13
+ export declare const transparentLineBorder = "1px solid transparent";
14
14
  export declare const cardOutlineBorder: import("styled-components").FlattenSimpleInterpolation;
15
15
  export declare const bigDropShadow = "0 3px 6px rgba(255, 0, 0, 1)";
16
16
  export declare const smallDropShadow = "0px 3px 6px rgba(0, 0, 0, 0.23)";
@@ -1 +1,2 @@
1
1
  export declare const touchscreenMediaQuerySpecs = "(height: 600px) and (width: 1024px)";
2
+ export declare const isTouchscreen: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentrons/components",
3
- "version": "0.1.3",
3
+ "version": "0.1.5-alpha.3",
4
4
  "description": "React components library for Opentrons' projects",
5
5
  "source": "src/index.ts",
6
6
  "types": "lib/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "@types/react-router-dom": "5.3.3"
25
25
  },
26
26
  "dependencies": {
27
- "@opentrons/shared-data": "0.1.3",
27
+ "@opentrons/shared-data": "0.1.5-alpha.3",
28
28
  "@popperjs/core": "2.1.1",
29
29
  "@react-spring/types": "9.6.1",
30
30
  "@react-spring/web": "9.6.1",