@opentrons/components 0.1.6-alpha.6 → 0.1.6-alpha.7

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 (280) hide show
  1. package/Makefile +4 -0
  2. package/lib/__tests__/utils.test.d.ts +1 -0
  3. package/lib/alerts/AlertItem.d.ts +21 -0
  4. package/lib/alerts/index.d.ts +1 -0
  5. package/lib/atoms/CheckboxField/__tests__/CheckboxField.test.d.ts +1 -0
  6. package/lib/atoms/CheckboxField/index.d.ts +20 -0
  7. package/lib/atoms/Chip/__tests__/Chip.test.d.ts +1 -0
  8. package/lib/atoms/Chip/index.d.ts +20 -0
  9. package/lib/atoms/StepMeter/index.d.ts +7 -0
  10. package/lib/atoms/StyledText/__tests__/StyledText.test.d.ts +1 -0
  11. package/lib/atoms/StyledText/index.d.ts +6 -0
  12. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +1 -0
  13. package/lib/atoms/buttons/PrimaryButton.d.ts +1 -0
  14. package/lib/atoms/buttons/SecondaryButton.d.ts +7 -0
  15. package/lib/atoms/buttons/__tests__/AlertPrimaryButton.test.d.ts +1 -0
  16. package/lib/atoms/buttons/__tests__/PrimaryButton.test.d.ts +1 -0
  17. package/lib/atoms/buttons/__tests__/SecondaryButton.test.d.ts +1 -0
  18. package/lib/atoms/buttons/index.d.ts +3 -0
  19. package/lib/atoms/index.d.ts +6 -0
  20. package/lib/barrel.d.ts +3 -0
  21. package/lib/buttons/Button.d.ts +49 -0
  22. package/lib/buttons/DeprecatedPrimaryButton.d.ts +8 -0
  23. package/lib/buttons/FlatButton.d.ts +5 -0
  24. package/lib/buttons/IconButton.d.ts +14 -0
  25. package/lib/buttons/OutlineButton.d.ts +8 -0
  26. package/lib/buttons/index.d.ts +5 -0
  27. package/lib/controls/ControlInfo.d.ts +6 -0
  28. package/lib/controls/LabeledButton.d.ts +8 -0
  29. package/lib/controls/LabeledCheckbox.d.ts +10 -0
  30. package/lib/controls/LabeledControl.d.ts +7 -0
  31. package/lib/controls/LabeledRadioGroup.d.ts +8 -0
  32. package/lib/controls/LabeledSelect.d.ts +9 -0
  33. package/lib/controls/LabeledToggle.d.ts +11 -0
  34. package/lib/controls/StackedLabeledControl.d.ts +7 -0
  35. package/lib/controls/ToggleButton.d.ts +5 -0
  36. package/lib/controls/index.d.ts +6 -0
  37. package/lib/forms/DeprecatedCheckboxField.d.ts +33 -0
  38. package/lib/forms/DropdownField.d.ts +38 -0
  39. package/lib/forms/FormGroup.d.ts +19 -0
  40. package/lib/forms/InputField.d.ts +51 -0
  41. package/lib/forms/RadioGroup.d.ts +29 -0
  42. package/lib/forms/Select.d.ts +26 -0
  43. package/lib/forms/SelectField.d.ts +33 -0
  44. package/lib/forms/ToggleField.d.ts +22 -0
  45. package/lib/forms/__tests__/DeprecatedCheckboxField.test.d.ts +1 -0
  46. package/lib/forms/__tests__/DropdownField.test.d.ts +1 -0
  47. package/lib/forms/__tests__/InputField.test.d.ts +1 -0
  48. package/lib/forms/__tests__/Select.test.d.ts +1 -0
  49. package/lib/forms/__tests__/SelectField.test.d.ts +1 -0
  50. package/lib/forms/__tests__/ToggleField.test.d.ts +1 -0
  51. package/lib/forms/index.d.ts +8 -0
  52. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +42 -0
  53. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +12 -0
  54. package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +2 -0
  55. package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +2 -0
  56. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +13 -0
  57. package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +21 -0
  58. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +14 -0
  59. package/lib/hardware-sim/BaseDeck/__fixtures__/index.d.ts +4 -0
  60. package/lib/hardware-sim/BaseDeck/index.d.ts +5 -0
  61. package/lib/hardware-sim/Deck/DeckFromLayers.d.ts +10 -0
  62. package/lib/hardware-sim/Deck/FlexTrash.d.ts +14 -0
  63. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +17 -0
  64. package/lib/hardware-sim/Deck/OT2Layers.d.ts +10 -0
  65. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +14 -0
  66. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +12 -0
  67. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +8 -0
  68. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +21 -0
  69. package/lib/hardware-sim/Deck/SlotLabels.d.ts +12 -0
  70. package/lib/hardware-sim/Deck/__mocks__/getDeckDefinitions.d.ts +1 -0
  71. package/lib/hardware-sim/Deck/constants.d.ts +1 -0
  72. package/lib/hardware-sim/Deck/index.d.ts +8 -0
  73. package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +8 -0
  74. package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +10 -0
  75. package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +11 -0
  76. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +10 -0
  77. package/lib/hardware-sim/DeckConfigurator/StaticFixture.d.ts +12 -0
  78. package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +10 -0
  79. package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +10 -0
  80. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +10 -0
  81. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +11 -0
  82. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +20 -0
  83. package/lib/hardware-sim/DeckConfigurator/index.d.ts +20 -0
  84. package/lib/hardware-sim/DeckSlotLocation/index.d.ts +15 -0
  85. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +1 -0
  86. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +1 -0
  87. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +1 -0
  88. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +1 -0
  89. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +1 -0
  90. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +19 -0
  91. package/lib/hardware-sim/Labware/LabwareRender.d.ts +42 -0
  92. package/lib/hardware-sim/Labware/__tests__/LabwareRender.test.d.ts +1 -0
  93. package/lib/hardware-sim/Labware/index.d.ts +3 -0
  94. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +10 -0
  95. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +17 -0
  96. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +17 -0
  97. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +9 -0
  98. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +19 -0
  99. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +18 -0
  100. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +12 -0
  101. package/lib/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.d.ts +1 -0
  102. package/lib/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.d.ts +1 -0
  103. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +7 -0
  104. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +12 -0
  105. package/lib/hardware-sim/Module/HeaterShaker.d.ts +4 -0
  106. package/lib/hardware-sim/Module/MagneticBlock.d.ts +1 -0
  107. package/lib/hardware-sim/Module/MagneticModule.d.ts +1 -0
  108. package/lib/hardware-sim/Module/ModuleTag.d.ts +9 -0
  109. package/lib/hardware-sim/Module/Temperature.d.ts +4 -0
  110. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.d.ts +6 -0
  111. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.d.ts +6 -0
  112. package/lib/hardware-sim/Module/Thermocycler/index.d.ts +7 -0
  113. package/lib/hardware-sim/Module/index.d.ts +18 -0
  114. package/lib/hardware-sim/Pipette/EightEmanatingNozzles.d.ts +4 -0
  115. package/lib/hardware-sim/Pipette/EmanatingNozzle.d.ts +4 -0
  116. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +8 -0
  117. package/lib/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.d.ts +1 -0
  118. package/lib/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.d.ts +1 -0
  119. package/lib/hardware-sim/Pipette/__tests__/PipetteRender.test.d.ts +1 -0
  120. package/lib/hardware-sim/Pipette/constants.d.ts +7 -0
  121. package/lib/hardware-sim/Pipette/index.d.ts +1 -0
  122. package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +6 -0
  123. package/lib/hardware-sim/ProtocolDeck/index.d.ts +12 -0
  124. package/lib/hardware-sim/ProtocolDeck/types.d.ts +8 -0
  125. package/lib/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.d.ts +1 -0
  126. package/lib/hardware-sim/ProtocolDeck/utils/getInitiallyLoadedLabwareByAdapter.d.ts +5 -0
  127. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +12 -0
  128. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInfoByLiquidId.d.ts +3 -0
  129. package/lib/hardware-sim/ProtocolDeck/utils/getModulesInSlots.d.ts +10 -0
  130. package/lib/hardware-sim/ProtocolDeck/utils/getStandardDeckViewLayerBlockList.d.ts +2 -0
  131. package/lib/hardware-sim/ProtocolDeck/utils/getWellFillFromLabwareId.d.ts +4 -0
  132. package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +2 -0
  133. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +7 -0
  134. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +15 -0
  135. package/lib/hardware-sim/RobotCoordinateSpace/index.d.ts +2 -0
  136. package/lib/hardware-sim/index.d.ts +11 -0
  137. package/lib/hardware-sim/utils.d.ts +3 -0
  138. package/lib/helix-design-system/borders.d.ts +26 -0
  139. package/lib/helix-design-system/colors.d.ts +75 -0
  140. package/lib/helix-design-system/index.d.ts +2 -0
  141. package/lib/hooks/__tests__/useConditionalConfirm.test.d.ts +1 -0
  142. package/lib/hooks/__tests__/useDrag.test.d.ts +1 -0
  143. package/lib/hooks/__tests__/useIdle.test.d.ts +1 -0
  144. package/lib/hooks/__tests__/useInterval.test.d.ts +1 -0
  145. package/lib/hooks/__tests__/useLongPress.test.d.ts +1 -0
  146. package/lib/hooks/__tests__/useMountEffect.test.d.ts +1 -0
  147. package/lib/hooks/__tests__/usePrevious.test.d.ts +1 -0
  148. package/lib/hooks/__tests__/useScrolling.test.d.ts +1 -0
  149. package/lib/hooks/__tests__/useSwipe.test.d.ts +1 -0
  150. package/lib/hooks/__tests__/useTimeout.test.d.ts +1 -0
  151. package/lib/hooks/__tests__/useToggle.test.d.ts +1 -0
  152. package/lib/hooks/index.d.ts +12 -0
  153. package/lib/hooks/useConditionalConfirm.d.ts +40 -0
  154. package/lib/hooks/useDrag.d.ts +22 -0
  155. package/lib/hooks/useIdle.d.ts +11 -0
  156. package/lib/hooks/useInterval.d.ts +11 -0
  157. package/lib/hooks/useLongPress.d.ts +19 -0
  158. package/lib/hooks/useMountEffect.d.ts +8 -0
  159. package/lib/hooks/usePrevious.d.ts +9 -0
  160. package/lib/hooks/useScrolling.d.ts +1 -0
  161. package/lib/hooks/useSelectDeckLocation/index.d.ts +19 -0
  162. package/lib/hooks/useSwipe.d.ts +12 -0
  163. package/lib/hooks/useTimeout.d.ts +9 -0
  164. package/lib/hooks/useToggle.d.ts +22 -0
  165. package/lib/icons/Icon.d.ts +34 -0
  166. package/lib/icons/ModuleIcon.d.ts +11 -0
  167. package/lib/icons/NotificationIcon.d.ts +12 -0
  168. package/lib/icons/icon-data.d.ts +586 -0
  169. package/lib/icons/index.d.ts +4 -0
  170. package/lib/images/index.d.ts +1 -0
  171. package/lib/images/labware/index.d.ts +1 -0
  172. package/lib/images/labware/measurement-guide/index.d.ts +13 -0
  173. package/lib/index.d.ts +26 -0
  174. package/lib/instrument/InstrumentDiagram.d.ts +11 -0
  175. package/lib/instrument/InstrumentGroup.d.ts +11 -0
  176. package/lib/instrument/InstrumentInfo.d.ts +18 -0
  177. package/lib/instrument/PipetteSelect.d.ts +20 -0
  178. package/lib/instrument/__tests__/InstrumentInfo.test.d.ts +1 -0
  179. package/lib/instrument/__tests__/PipetteSelect.test.d.ts +1 -0
  180. package/lib/instrument/index.d.ts +4 -0
  181. package/lib/interaction-enhancers/ClickOutside.d.ts +18 -0
  182. package/lib/interaction-enhancers/HandleKeypress.d.ts +27 -0
  183. package/lib/interaction-enhancers/__tests__/useHover.test.d.ts +1 -0
  184. package/lib/interaction-enhancers/index.d.ts +4 -0
  185. package/lib/interaction-enhancers/useHover.d.ts +33 -0
  186. package/lib/interaction-enhancers/useOnClickOutside.d.ts +5 -0
  187. package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +7 -0
  188. package/lib/legacy-hardware-sim/ModuleItem.d.ts +17 -0
  189. package/lib/legacy-hardware-sim/index.d.ts +2 -0
  190. package/lib/lists/ListItem.d.ts +37 -0
  191. package/lib/lists/SidePanelGroup.d.ts +18 -0
  192. package/lib/lists/TitledList.d.ts +44 -0
  193. package/lib/lists/index.d.ts +3 -0
  194. package/lib/modals/AlertModal.d.ts +27 -0
  195. package/lib/modals/BaseModal.d.ts +26 -0
  196. package/lib/modals/ContinueModal.d.ts +9 -0
  197. package/lib/modals/Modal.d.ts +23 -0
  198. package/lib/modals/ModalPage.d.ts +16 -0
  199. package/lib/modals/ModalShell.d.ts +25 -0
  200. package/lib/modals/Overlay.d.ts +9 -0
  201. package/lib/modals/SpinnerModal.d.ts +12 -0
  202. package/lib/modals/SpinnerModalPage.d.ts +11 -0
  203. package/lib/modals/__tests__/BaseModal.test.d.ts +1 -0
  204. package/lib/modals/index.d.ts +9 -0
  205. package/lib/molecules/LocationIcon/__tests__/LocationIcon.test.d.ts +1 -0
  206. package/lib/molecules/LocationIcon/index.d.ts +15 -0
  207. package/lib/molecules/ParametersTable/InfoScreen.d.ts +6 -0
  208. package/lib/molecules/ParametersTable/__tests__/InfoScreen.test.d.ts +1 -0
  209. package/lib/molecules/ParametersTable/__tests__/ParametersTable.test.d.ts +1 -0
  210. package/lib/molecules/ParametersTable/index.d.ts +10 -0
  211. package/lib/molecules/RoundTab.d.ts +8 -0
  212. package/lib/molecules/index.d.ts +4 -0
  213. package/lib/nav/SidePanel.d.ts +6 -0
  214. package/lib/nav/index.d.ts +1 -0
  215. package/lib/primitives/Box.d.ts +7 -0
  216. package/lib/primitives/Btn.d.ts +59 -0
  217. package/lib/primitives/Flex.d.ts +7 -0
  218. package/lib/primitives/ForeignObject.d.ts +23 -0
  219. package/lib/primitives/Link.d.ts +11 -0
  220. package/lib/primitives/Svg.d.ts +23 -0
  221. package/lib/primitives/Text.d.ts +7 -0
  222. package/lib/primitives/__tests__/Box.test.d.ts +1 -0
  223. package/lib/primitives/__tests__/Btn.test.d.ts +1 -0
  224. package/lib/primitives/__tests__/Flex.test.d.ts +1 -0
  225. package/lib/primitives/__tests__/Link.test.d.ts +1 -0
  226. package/lib/primitives/__tests__/Svg.test.d.ts +1 -0
  227. package/lib/primitives/__tests__/Text.test.d.ts +1 -0
  228. package/lib/primitives/__tests__/primitives.test.d.ts +1 -0
  229. package/lib/primitives/__tests__/style-props.test.d.ts +1 -0
  230. package/lib/primitives/index.d.ts +9 -0
  231. package/lib/primitives/style-props.d.ts +4 -0
  232. package/lib/primitives/types.d.ts +95 -0
  233. package/lib/robot-types.d.ts +1 -0
  234. package/lib/slotmap/OT2SlotMap.d.ts +9 -0
  235. package/lib/slotmap/__tests__/OT2SlotMap.test.d.ts +1 -0
  236. package/lib/slotmap/index.d.ts +1 -0
  237. package/lib/structure/Card.d.ts +18 -0
  238. package/lib/structure/LabeledValue.d.ts +12 -0
  239. package/lib/structure/PageTabs.d.ts +11 -0
  240. package/lib/structure/Pill.d.ts +18 -0
  241. package/lib/structure/Splash.d.ts +8 -0
  242. package/lib/structure/TitleBar.d.ts +17 -0
  243. package/lib/structure/index.d.ts +6 -0
  244. package/lib/styles/borders.d.ts +8 -0
  245. package/lib/styles/colors.d.ts +37 -0
  246. package/lib/styles/flexbox.d.ts +29 -0
  247. package/lib/styles/index.d.ts +7 -0
  248. package/lib/styles/layout.d.ts +23 -0
  249. package/lib/styles/position.d.ts +5 -0
  250. package/lib/styles/spacing.d.ts +9 -0
  251. package/lib/styles/typography.d.ts +36 -0
  252. package/lib/tabbedNav/NavTab.d.ts +25 -0
  253. package/lib/tabbedNav/OutsideLinkTab.d.ts +24 -0
  254. package/lib/tabbedNav/TabbedNavBar.d.ts +7 -0
  255. package/lib/tabbedNav/index.d.ts +3 -0
  256. package/lib/testing/utils/index.d.ts +2 -0
  257. package/lib/testing/utils/matchers.d.ts +3 -0
  258. package/lib/testing/utils/renderWithProviders.d.ts +10 -0
  259. package/lib/tooltips/DeprecatedTooltip.d.ts +37 -0
  260. package/lib/tooltips/HoverTooltip.d.ts +36 -0
  261. package/lib/tooltips/Tooltip.d.ts +35 -0
  262. package/lib/tooltips/__tests__/Tooltip.test.d.ts +1 -0
  263. package/lib/tooltips/__tests__/useHoverTooltip.test.d.ts +1 -0
  264. package/lib/tooltips/__tests__/usePopper.test.d.ts +1 -0
  265. package/lib/tooltips/__tests__/useTooltip.test.d.ts +1 -0
  266. package/lib/tooltips/constants.d.ts +17 -0
  267. package/lib/tooltips/index.d.ts +8 -0
  268. package/lib/tooltips/styles.d.ts +12 -0
  269. package/lib/tooltips/types.d.ts +52 -0
  270. package/lib/tooltips/useHoverTooltip.d.ts +24 -0
  271. package/lib/tooltips/usePopper.d.ts +2 -0
  272. package/lib/tooltips/useTooltip.d.ts +31 -0
  273. package/lib/ui-style-constants/index.d.ts +4 -0
  274. package/lib/ui-style-constants/responsiveness.d.ts +2 -0
  275. package/lib/ui-style-constants/spacing.d.ts +18 -0
  276. package/lib/ui-style-constants/typography.d.ts +70 -0
  277. package/lib/ui-style-constants/viewport.d.ts +15 -0
  278. package/lib/utils.d.ts +15 -0
  279. package/package.json +2 -2
  280. package/vite.config.ts +2 -0
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import type { LabwareWell } from '@opentrons/shared-data';
3
+ import type { WellMouseEvent } from './types';
4
+ import type { StyleProps } from '../../../primitives';
5
+ export interface WellProps extends StyleProps {
6
+ /** Well Name (eg 'A1') */
7
+ wellName: string;
8
+ /** well object from labware definition */
9
+ well: LabwareWell;
10
+ stroke: React.CSSProperties['stroke'];
11
+ strokeWidth: React.CSSProperties['strokeWidth'];
12
+ fill: React.CSSProperties['fill'];
13
+ /** Optional callback, called with WellMouseEvent args onMouseOver */
14
+ onMouseEnterWell?: (e: WellMouseEvent) => unknown;
15
+ onMouseLeaveWell?: (e: WellMouseEvent) => unknown;
16
+ }
17
+ export declare function WellComponent(props: WellProps): JSX.Element;
18
+ export declare const Well: React.MemoExoticComponent<typeof WellComponent>;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { WellLabelOption } from '../LabwareRender';
3
+ import type { LabwareDefinition2 } from '@opentrons/shared-data';
4
+ import type { HighlightedWellLabels } from './types';
5
+ export interface WellLabelsProps {
6
+ definition: LabwareDefinition2;
7
+ wellLabelOption: WellLabelOption;
8
+ highlightedWellLabels?: HighlightedWellLabels;
9
+ wellLabelColor?: string;
10
+ }
11
+ export declare function WellLabelsComponent(props: WellLabelsProps): JSX.Element;
12
+ export declare const WellLabels: React.MemoExoticComponent<typeof WellLabelsComponent>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,7 @@
1
+ export * from './StaticLabware';
2
+ export * from './StyledWells';
3
+ export * from './StrokedWells';
4
+ export * from './WellLabels';
5
+ export * from './FilledWells';
6
+ export * from './LabwareOutline';
7
+ export * from './Well';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ export interface WellMouseEvent {
3
+ wellName: string;
4
+ event: React.MouseEvent;
5
+ }
6
+ export type WellFill = Record<string, string>;
7
+ export type WellStroke = WellFill;
8
+ export type WellGroup = Record<string, null>;
9
+ export interface HighlightedWellLabels {
10
+ wells: string[];
11
+ color?: string;
12
+ }
@@ -0,0 +1,4 @@
1
+ export interface HeaterShakerVizProps {
2
+ targetTemp: number | null;
3
+ }
4
+ export declare function HeaterShaker(props: HeaterShakerVizProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function MagneticBlock(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function MagneticModule(): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface ModuleTagProps {
3
+ x: number;
4
+ y: number;
5
+ height: number;
6
+ width: number;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare const ModuleTag: (props: ModuleTagProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface TemperatureVizProps {
2
+ targetTemperature: number | null;
3
+ }
4
+ export declare function Temperature(props: TemperatureVizProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface ThermocyclerGEN1Props {
2
+ lidMotorState: 'open' | 'closed';
3
+ ledLightColor: string;
4
+ }
5
+ export declare function ThermocyclerGEN1(props: ThermocyclerGEN1Props): JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ interface ThermocyclerGEN2Props {
2
+ lidMotorState: 'open' | 'closed';
3
+ ledLightColor: string;
4
+ }
5
+ export declare function ThermocyclerGEN2(props: ThermocyclerGEN2Props): JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ThermocyclerModuleModel } from '@opentrons/shared-data';
2
+ export interface ThermocyclerVizProps {
3
+ lidMotorState: 'open' | 'closed' | 'unknown';
4
+ blockTargetTemp?: number | null;
5
+ model: ThermocyclerModuleModel;
6
+ }
7
+ export declare function Thermocycler(props: ThermocyclerVizProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ModuleDefinition } from '@opentrons/shared-data';
3
+ import { Thermocycler } from './Thermocycler';
4
+ import { HeaterShaker } from './HeaterShaker';
5
+ import { Temperature } from './Temperature';
6
+ export * from './Thermocycler';
7
+ interface Props {
8
+ x: number;
9
+ y: number;
10
+ def: ModuleDefinition;
11
+ orientation?: 'left' | 'right';
12
+ innerProps?: React.ComponentProps<typeof Thermocycler> | React.ComponentProps<typeof HeaterShaker> | React.ComponentProps<typeof Temperature> | {};
13
+ statusInfo?: React.ReactNode;
14
+ children?: React.ReactNode;
15
+ targetSlotId?: string;
16
+ targetDeckId?: string;
17
+ }
18
+ export declare const Module: (props: Props) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const EightEmanatingNozzles: (props: {
2
+ cx: number;
3
+ initialCy: number;
4
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const EmanatingNozzle: (props: {
2
+ cx: number;
3
+ cy: number;
4
+ }) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { LabwareDefinition2, PipetteName } from '@opentrons/shared-data';
2
+ interface PipetteRenderProps {
3
+ labwareDef: LabwareDefinition2;
4
+ pipetteName: PipetteName;
5
+ usingMetalProbe?: boolean;
6
+ }
7
+ export declare const PipetteRender: (props: PipetteRenderProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const SINGLE_CHANNEL_PIPETTE_WIDTH = 18.7;
2
+ export declare const SINGLE_CHANNEL_PIPETTE_HEIGHT = 30.5;
3
+ export declare const MULTI_CHANNEL_PIPETTE_WIDTH = 18.7;
4
+ export declare const MULTI_CHANNEL_PIPETTE_HEIGHT = 90.3;
5
+ export declare const NINETY_SIX_CHANNEL_PIPETTE_WIDTH = 117.7;
6
+ export declare const MULTI_CHANNEL_CENTER_Y_NOZZLE = 13.3;
7
+ export declare const MULTI_CHANNEL_Y_OFFSET = -2.5;
@@ -0,0 +1 @@
1
+ export * from './PipetteRender';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { LabwareDefinition2 } from '@opentrons/shared-data';
3
+ export declare function LabwareInfo(props: {
4
+ def: LabwareDefinition2;
5
+ children: React.ReactNode;
6
+ }): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { BaseDeck } from '../BaseDeck';
3
+ import type { CompletedProtocolAnalysis, ProtocolAnalysisOutput } from '@opentrons/shared-data';
4
+ export * from './utils/getStandardDeckViewLayerBlockList';
5
+ interface ProtocolDeckProps {
6
+ protocolAnalysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput | null;
7
+ /** defaults to false, when set labware nicknames will appear on top level labware. If no nickname specified in protocol, falls back to labware definition display name */
8
+ showLabwareInfo?: boolean;
9
+ /** extra props to pass through to BaseDeck component */
10
+ baseDeckProps?: Partial<React.ComponentProps<typeof BaseDeck>>;
11
+ }
12
+ export declare function ProtocolDeck(props: ProtocolDeckProps): JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ export interface LabwareByLiquidId {
2
+ [liquidId: string]: Array<{
3
+ labwareId: string;
4
+ volumeByWell: {
5
+ [well: string]: number;
6
+ };
7
+ }>;
8
+ }
@@ -0,0 +1,5 @@
1
+ import type { LoadLabwareRunTimeCommand, RunTimeCommand } from '@opentrons/shared-data';
2
+ export interface LoadedLabwareByAdapter {
3
+ [labwareId: string]: LoadLabwareRunTimeCommand;
4
+ }
5
+ export declare function getInitialLoadedLabwareByAdapter(commands: RunTimeCommand[]): LoadedLabwareByAdapter;
@@ -0,0 +1,12 @@
1
+ import type { CompletedProtocolAnalysis, ProtocolAnalysisOutput, LabwareDefinition2 } from '@opentrons/shared-data';
2
+ interface LabwareInSlot {
3
+ labwareId: string;
4
+ labwareDef: LabwareDefinition2;
5
+ labwareNickName: string | null;
6
+ location: {
7
+ slotName: string;
8
+ };
9
+ }
10
+ export declare const getInitialAndMovedLabwareInSlots: (protocolAnalysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput) => LabwareInSlot[];
11
+ export declare const getTopMostLabwareInSlots: (protocolAnalysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput) => LabwareInSlot[];
12
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { RunTimeCommand } from '@opentrons/shared-data';
2
+ import type { LabwareByLiquidId } from '../types';
3
+ export declare function getLabwareInfoByLiquidId(commands: RunTimeCommand[]): LabwareByLiquidId;
@@ -0,0 +1,10 @@
1
+ import type { CompletedProtocolAnalysis, ProtocolAnalysisOutput, ModuleLocation, ModuleModel, LabwareDefinition2 } from '@opentrons/shared-data';
2
+ interface ModuleInSlot {
3
+ moduleModel: ModuleModel;
4
+ moduleLocation: ModuleLocation;
5
+ nestedLabwareId: string | null;
6
+ nestedLabwareDef: LabwareDefinition2 | null;
7
+ nestedLabwareNickName: string | null;
8
+ }
9
+ export declare const getModulesInSlots: (protocolAnalysis: ProtocolAnalysisOutput | CompletedProtocolAnalysis) => ModuleInSlot[];
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { RobotType } from '@opentrons/shared-data';
2
+ export declare const getStandardDeckViewLayerBlockList: (robotType: RobotType) => string[];
@@ -0,0 +1,4 @@
1
+ import type { Liquid } from '@opentrons/shared-data';
2
+ import type { WellFill } from '../../Labware';
3
+ import type { LabwareByLiquidId } from '../types';
4
+ export declare function getWellFillFromLabwareId(labwareId: string, liquidsInLoadOrder: Liquid[], labwareByLiquidId: LabwareByLiquidId): WellFill;
@@ -0,0 +1,2 @@
1
+ export * from './getLabwareInSlots';
2
+ export * from './getStandardDeckViewLayerBlockList';
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { Svg } from '../../primitives';
3
+ interface RobotCoordinateSpaceProps extends React.ComponentProps<typeof Svg> {
4
+ animated?: boolean;
5
+ }
6
+ export declare function RobotCoordinateSpace(props: RobotCoordinateSpaceProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Svg } from '../../primitives';
3
+ import type { DeckDefinition, DeckSlot } from '@opentrons/shared-data';
4
+ export interface RobotCoordinateSpaceWithRefRenderProps {
5
+ deckSlotsById: {
6
+ [slotId: string]: DeckSlot;
7
+ };
8
+ }
9
+ interface RobotCoordinateSpaceWithRefProps extends React.ComponentProps<typeof Svg> {
10
+ viewBox?: string | null;
11
+ deckDef?: DeckDefinition;
12
+ children?: (props: RobotCoordinateSpaceWithRefRenderProps) => React.ReactNode;
13
+ }
14
+ export declare function RobotCoordinateSpaceWithRef(props: RobotCoordinateSpaceWithRefProps): JSX.Element | null;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './RobotCoordinateSpaceWithRef';
2
+ export * from './RobotCoordinateSpace';
@@ -0,0 +1,11 @@
1
+ export * from './BaseDeck';
2
+ export * from './BaseDeck/__fixtures__';
3
+ export * from './ProtocolDeck';
4
+ export * from './ProtocolDeck/utils';
5
+ export * from './Deck';
6
+ export * from './DeckConfigurator';
7
+ export * from './DeckSlotLocation';
8
+ export * from './Labware';
9
+ export * from './Module';
10
+ export * from './Pipette';
11
+ export * from './RobotCoordinateSpace';
@@ -0,0 +1,3 @@
1
+ import { AffineTransformMatrix } from '@opentrons/shared-data';
2
+ export declare const IDENTITY_AFFINE_TRANSFORM: AffineTransformMatrix;
3
+ export declare function multiplyMatrices(a: number[][], b: number[][]): number[][];
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Constants
3
+ */
4
+ export declare const borderRadius2 = "2px";
5
+ export declare const borderRadius4 = "4px";
6
+ export declare const borderRadius8 = "8px";
7
+ export declare const borderRadius12 = "12px";
8
+ export declare const borderRadius16 = "16px";
9
+ export declare const borderRadius40 = "40px";
10
+ export declare const borderRadiusFull = "200px";
11
+ /**
12
+ * Styles
13
+ */
14
+ export declare const styleSolid = "solid";
15
+ /**
16
+ * Special-case borders
17
+ */
18
+ export declare const activeLineBorder = "1px solid #006CFA";
19
+ export declare const lineBorder = "1px solid #DEDEDE";
20
+ /**
21
+ * Shadows
22
+ */
23
+ export declare const smallDropShadow = "0px 3px 6px rgba(0, 0, 0, 0.23)";
24
+ export declare const tinyDropShadow = "0px 1px 3px 0px rgba(0, 0, 0, .33)";
25
+ export declare const shadowBig = "0px 3px 6px rgba(0,0,0,0.23)";
26
+ export declare const shadowSmall = "0px 0px 40px rgba(0,0,0,0.4)";
@@ -0,0 +1,75 @@
1
+ /**
2
+ * green
3
+ */
4
+ export declare const green60 = "#03683E";
5
+ export declare const green50: string;
6
+ export declare const green40: string;
7
+ export declare const green35: string;
8
+ export declare const green30 = "#C4F6E0";
9
+ export declare const green20 = "#E8F7ED";
10
+ /**
11
+ * red
12
+ */
13
+ export declare const red60 = "#941313";
14
+ export declare const red55 = "#C71A1B";
15
+ export declare const red50 = "#DE1B1B";
16
+ export declare const red40 = "#F5B2B3";
17
+ export declare const red35 = "#F8C8C9";
18
+ export declare const red30 = "#FAD6D6";
19
+ export declare const red20 = "#FCE9E9";
20
+ /**
21
+ * yellow
22
+ */
23
+ export declare const yellow60 = "#825512";
24
+ export declare const yellow50 = "#F09D20";
25
+ export declare const yellow40 = "#FCD48B";
26
+ export declare const yellow35 = "#FFE1A4";
27
+ export declare const yellow30 = "#FFE9BE";
28
+ export declare const yellow20 = "#FDF3E2";
29
+ /**
30
+ * purple
31
+ */
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
+ /**
40
+ * blue
41
+ */
42
+ export declare const blue60 = "#004196";
43
+ export declare const blue55 = "#0056C8";
44
+ export declare const blue40 = "#A9CEFD";
45
+ export declare const blue35 = "#BFDCFD";
46
+ export declare const blue30 = "#D0E6FE";
47
+ export declare const blue20 = "#E1EFFF";
48
+ export declare const blue10 = "#F1F8FF";
49
+ /**
50
+ * grey
51
+ */
52
+ export declare const grey60 = "#4A4C4E";
53
+ export declare const grey55 = "#626467";
54
+ export declare const grey50 = "#737578";
55
+ export declare const grey40 = "#B7B8B9";
56
+ export declare const grey35 = "#CBCCCC";
57
+ export declare const grey30 = "#DEDEDE";
58
+ export declare const grey20 = "#E9E9E9";
59
+ export declare const grey10 = "#F3F3F3";
60
+ /**
61
+ * core
62
+ */
63
+ export declare const black90 = "#16212D";
64
+ export declare const black80 = "#24313F";
65
+ export declare const black70 = "#39495B";
66
+ export declare const white = "#FFFFFF";
67
+ export declare const blue50 = "#006CFA";
68
+ /**
69
+ * extras
70
+ */
71
+ export declare const transparent = "transparent";
72
+ export declare const opacity20HexCode = "33";
73
+ export declare const opacity40HexCode = "66";
74
+ export declare const opacity60HexCode = "99";
75
+ export declare const opacity90HexCode = "E6";
@@ -0,0 +1,2 @@
1
+ export * as COLORS from './colors';
2
+ export * as BORDERS from './borders';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ export * from './useConditionalConfirm';
2
+ export * from './useDrag';
3
+ export * from './useIdle';
4
+ export * from './useInterval';
5
+ export * from './useLongPress';
6
+ export * from './useMountEffect';
7
+ export * from './usePrevious';
8
+ export * from './useScrolling';
9
+ export * from './useSelectDeckLocation';
10
+ export * from './useSwipe';
11
+ export * from './useTimeout';
12
+ export * from './useToggle';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * useConditionalConfirm is intended for cases where we want to block and defer
3
+ * a particular user action until the user clicks "ok" in any kind of "are you sure?"
4
+ * confirmation UI. The arguments passed to the confirm function will be preserved and
5
+ * used to call handleContinue. Ex. a click event is being deferred by a modal. When the
6
+ * user confirms, the initial click event passed as an argument will be used as the argument in
7
+ * the callback.
8
+ * @param {() => unknown)} handleContinue (the action we may want to require confirmation for)
9
+ * @param {boolean} shouldBlock (if no confirmation is needed, we will avoid the modal and immediately call handleContinue)
10
+ * @example
11
+ * ```js
12
+ * import { useConditionalConfirm } from '@opentrons/components'
13
+ *
14
+ * const ExampleDangerForm = props => {
15
+ * const {
16
+ * confirm,
17
+ * showConfirmation,
18
+ * cancel,
19
+ * } = useConditionalConfirm(props.goAhead, props.dangerIsPresent)
20
+ *
21
+ * return (
22
+ * <>
23
+ * {showConfirmation && (
24
+ * <AreYouSureModal
25
+ * handleCancel={cancel}
26
+ * handleContinue={confirm}
27
+ * />
28
+ * )}
29
+ * <DangerFormFields />
30
+ * <DangerousSubmit onClick={confirm} />
31
+ * </>
32
+ * )
33
+ * }
34
+ * ```
35
+ */
36
+ export declare const useConditionalConfirm: <T extends any[]>(handleContinue: (...args: T) => any, shouldBlock: boolean) => {
37
+ confirm: (...args: T) => void;
38
+ showConfirmation: boolean;
39
+ cancel: () => unknown;
40
+ };
@@ -0,0 +1,22 @@
1
+ import { CSSProperties, MutableRefObject } from 'react';
2
+ export interface ElementPosition {
3
+ width: number;
4
+ height: number;
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export interface UseDragResult {
9
+ ref: MutableRefObject<null>;
10
+ style: CSSProperties;
11
+ position: ElementPosition;
12
+ isEnabled: boolean;
13
+ enable: () => void;
14
+ disable: () => void;
15
+ }
16
+ /**
17
+ * useDrag makes HTMLElement draggable for on-device app
18
+ * This hook should be used when isOnDevice is true
19
+ * @param {ElementPosition} (width, height, x, and y, they are HTMLElement's size and the initial position)
20
+ * @returns {UseDragResult}
21
+ */
22
+ export declare const useDrag: (position: ElementPosition) => UseDragResult;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * React hook to check user events
3
+ *
4
+ * @param {number} idleTime (idle time)
5
+ * @param {object} options (events that the app need to check, initialState: initial state true => idle)
6
+ * @returns {boolean}
7
+ */
8
+ export declare function useIdle(idleTime: number, options?: Partial<{
9
+ events: Array<keyof DocumentEventMap>;
10
+ initialState: boolean;
11
+ }>): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * React hook to call a function on an interval; copied from:
3
+ * https://overreacted.io/making-setinterval-declarative-with-react-hooks/
4
+ *
5
+ * @template T (type of the input value)
6
+ * @param {() => unknown} callback (function to call on an interval)
7
+ * @param {number | null} delay (interval delay, or null to stop interval)
8
+ * @param {boolean} [immediate=false] (trigger the callback immediately before starting the interval)
9
+ * @returns {void}
10
+ */
11
+ export declare function useInterval(callback: () => unknown, delay: number | null, immediate?: boolean): void;
@@ -0,0 +1,19 @@
1
+ import { CSSProperties, MutableRefObject } from 'react';
2
+ export interface UseLongPressResult {
3
+ ref: MutableRefObject<null>;
4
+ style: CSSProperties;
5
+ isEnabled: boolean;
6
+ isLongPressed: boolean;
7
+ isTapped: boolean;
8
+ setIsLongPressed: (value: boolean) => void;
9
+ setIsTapped: (value: boolean) => void;
10
+ enable: () => void;
11
+ disable: () => void;
12
+ }
13
+ /**
14
+ * useLongPress provide two actions (tap and long press)
15
+ * useLongPress recognize 1 sec hold as long press: hold Duration
16
+ * interactjs recognize "hold" when an element is held down around 600ms(default)
17
+ * @returns {UseLongPressResult}
18
+ */
19
+ export declare const useLongPress: () => UseLongPressResult;
@@ -0,0 +1,8 @@
1
+ import type { EffectCallback } from 'react';
2
+ /**
3
+ * React hook to call a function on component mount and unmount
4
+ *
5
+ * @param {EffectCallback} callback (function to call on mount that optionally returns a cleanup function to call on unmount)
6
+ * @returns {void}
7
+ */
8
+ export declare function useMountEffect(callback: EffectCallback): void;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * React hook to keep track of the previous value of a parameter
3
+ * https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
4
+ *
5
+ * @template T (type of the input value)
6
+ * @param {T} value (value to keep track of)
7
+ * @returns {(T | void)} (previous value or undefined if first render)
8
+ */
9
+ export declare function usePrevious<T>(value: T): T | undefined;
@@ -0,0 +1 @@
1
+ export declare const useScrolling: (node: HTMLElement | null) => boolean;
@@ -0,0 +1,19 @@
1
+ import { CutoutConfig } from '@opentrons/shared-data';
2
+ import type { DeckDefinition, ModuleLocation, RobotType } from '@opentrons/shared-data';
3
+ export type DeckLocationSelectThemes = 'default' | 'grey';
4
+ export declare function useDeckLocationSelect(robotType: RobotType, theme?: DeckLocationSelectThemes): {
5
+ DeckLocationSelect: JSX.Element;
6
+ selectedLocation: ModuleLocation;
7
+ };
8
+ interface DeckLocationSelectProps {
9
+ deckDef: DeckDefinition;
10
+ selectedLocation: ModuleLocation;
11
+ theme?: DeckLocationSelectThemes;
12
+ setSelectedLocation?: (loc: ModuleLocation) => void;
13
+ availableSlotNames?: string[];
14
+ occupiedCutouts?: CutoutConfig[];
15
+ isThermocycler?: boolean;
16
+ showTooltipOnDisabled?: boolean;
17
+ }
18
+ export declare function DeckLocationSelect({ deckDef, selectedLocation, setSelectedLocation, availableSlotNames, occupiedCutouts, theme, isThermocycler, showTooltipOnDisabled, }: DeckLocationSelectProps): JSX.Element;
19
+ export {};