@opentrons/components 0.1.5-alpha.4 → 0.1.6-alpha.2

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 (274) hide show
  1. package/Makefile +5 -8
  2. package/README.md +1 -15
  3. package/babel.config.cjs +21 -0
  4. package/lib/index.mjs +19869 -0
  5. package/package.json +6 -5
  6. package/tsconfig.json +2 -2
  7. package/typings/global.d.ts +0 -1
  8. package/vite.config.ts +57 -0
  9. package/lib/__tests__/utils.test.d.ts +0 -1
  10. package/lib/alerts/AlertItem.d.ts +0 -21
  11. package/lib/alerts/index.d.ts +0 -1
  12. package/lib/atoms/CheckboxField/__tests__/CheckboxField.test.d.ts +0 -1
  13. package/lib/atoms/CheckboxField/index.d.ts +0 -20
  14. package/lib/atoms/StepMeter/index.d.ts +0 -6
  15. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +0 -2
  16. package/lib/atoms/buttons/PrimaryButton.d.ts +0 -2
  17. package/lib/atoms/buttons/SecondaryButton.d.ts +0 -7
  18. package/lib/atoms/buttons/__tests__/AlertPrimaryButton.test.d.ts +0 -1
  19. package/lib/atoms/buttons/__tests__/PrimaryButton.test.d.ts +0 -1
  20. package/lib/atoms/buttons/__tests__/SecondaryButton.test.d.ts +0 -1
  21. package/lib/atoms/buttons/index.d.ts +0 -3
  22. package/lib/atoms/index.d.ts +0 -3
  23. package/lib/barrel.d.ts +0 -3
  24. package/lib/buttons/Button.d.ts +0 -49
  25. package/lib/buttons/DeprecatedPrimaryButton.d.ts +0 -9
  26. package/lib/buttons/FlatButton.d.ts +0 -6
  27. package/lib/buttons/IconButton.d.ts +0 -15
  28. package/lib/buttons/OutlineButton.d.ts +0 -9
  29. package/lib/buttons/index.d.ts +0 -5
  30. package/lib/controls/ControlInfo.d.ts +0 -6
  31. package/lib/controls/LabeledButton.d.ts +0 -8
  32. package/lib/controls/LabeledCheckbox.d.ts +0 -10
  33. package/lib/controls/LabeledControl.d.ts +0 -7
  34. package/lib/controls/LabeledRadioGroup.d.ts +0 -8
  35. package/lib/controls/LabeledSelect.d.ts +0 -9
  36. package/lib/controls/LabeledToggle.d.ts +0 -11
  37. package/lib/controls/StackedLabeledControl.d.ts +0 -7
  38. package/lib/controls/ToggleButton.d.ts +0 -6
  39. package/lib/controls/index.d.ts +0 -6
  40. package/lib/forms/DeprecatedCheckboxField.d.ts +0 -33
  41. package/lib/forms/DropdownField.d.ts +0 -38
  42. package/lib/forms/FormGroup.d.ts +0 -19
  43. package/lib/forms/InputField.d.ts +0 -51
  44. package/lib/forms/RadioGroup.d.ts +0 -29
  45. package/lib/forms/Select.d.ts +0 -27
  46. package/lib/forms/SelectField.d.ts +0 -33
  47. package/lib/forms/ToggleField.d.ts +0 -22
  48. package/lib/forms/__tests__/DeprecatedCheckboxField.test.d.ts +0 -0
  49. package/lib/forms/__tests__/DropdownField.test.d.ts +0 -0
  50. package/lib/forms/__tests__/InputField.test.d.ts +0 -0
  51. package/lib/forms/__tests__/Select.test.d.ts +0 -0
  52. package/lib/forms/__tests__/SelectField.test.d.ts +0 -0
  53. package/lib/forms/__tests__/ToggleField.test.d.ts +0 -0
  54. package/lib/forms/index.d.ts +0 -8
  55. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +0 -42
  56. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +0 -12
  57. package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +0 -2
  58. package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +0 -2
  59. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +0 -13
  60. package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +0 -21
  61. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +0 -14
  62. package/lib/hardware-sim/BaseDeck/__fixtures__/index.d.ts +0 -4
  63. package/lib/hardware-sim/BaseDeck/index.d.ts +0 -5
  64. package/lib/hardware-sim/Deck/DeckFromLayers.d.ts +0 -11
  65. package/lib/hardware-sim/Deck/FlexTrash.d.ts +0 -14
  66. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +0 -17
  67. package/lib/hardware-sim/Deck/OT2Layers.d.ts +0 -11
  68. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +0 -14
  69. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +0 -12
  70. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +0 -8
  71. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +0 -21
  72. package/lib/hardware-sim/Deck/SlotLabels.d.ts +0 -12
  73. package/lib/hardware-sim/Deck/__mocks__/getDeckDefinitions.d.ts +0 -2
  74. package/lib/hardware-sim/Deck/constants.d.ts +0 -1
  75. package/lib/hardware-sim/Deck/getDeckDefinitions.d.ts +0 -2
  76. package/lib/hardware-sim/Deck/index.d.ts +0 -9
  77. package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +0 -9
  78. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +0 -9
  79. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +0 -9
  80. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +0 -10
  81. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +0 -15
  82. package/lib/hardware-sim/DeckConfigurator/index.d.ts +0 -14
  83. package/lib/hardware-sim/DeckSlotLocation/index.d.ts +0 -15
  84. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +0 -2
  85. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +0 -2
  86. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +0 -2
  87. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +0 -2
  88. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +0 -2
  89. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +0 -19
  90. package/lib/hardware-sim/Labware/LabwareRender.d.ts +0 -42
  91. package/lib/hardware-sim/Labware/__tests__/LabwareRender.test.d.ts +0 -1
  92. package/lib/hardware-sim/Labware/index.d.ts +0 -3
  93. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +0 -10
  94. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +0 -18
  95. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +0 -17
  96. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +0 -9
  97. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +0 -19
  98. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +0 -19
  99. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +0 -12
  100. package/lib/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.d.ts +0 -1
  101. package/lib/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.d.ts +0 -1
  102. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +0 -6
  103. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +0 -12
  104. package/lib/hardware-sim/Module/HeaterShaker.d.ts +0 -5
  105. package/lib/hardware-sim/Module/MagneticBlock.d.ts +0 -2
  106. package/lib/hardware-sim/Module/MagneticModule.d.ts +0 -2
  107. package/lib/hardware-sim/Module/ModuleTag.d.ts +0 -9
  108. package/lib/hardware-sim/Module/Temperature.d.ts +0 -5
  109. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.d.ts +0 -7
  110. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.d.ts +0 -7
  111. package/lib/hardware-sim/Module/Thermocycler/index.d.ts +0 -8
  112. package/lib/hardware-sim/Module/index.d.ts +0 -18
  113. package/lib/hardware-sim/Pipette/EightEmanatingNozzles.d.ts +0 -4
  114. package/lib/hardware-sim/Pipette/EmanatingNozzle.d.ts +0 -4
  115. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +0 -8
  116. package/lib/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.d.ts +0 -1
  117. package/lib/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.d.ts +0 -1
  118. package/lib/hardware-sim/Pipette/__tests__/PipetteRender.test.d.ts +0 -1
  119. package/lib/hardware-sim/Pipette/constants.d.ts +0 -7
  120. package/lib/hardware-sim/Pipette/index.d.ts +0 -1
  121. package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +0 -6
  122. package/lib/hardware-sim/ProtocolDeck/index.d.ts +0 -12
  123. package/lib/hardware-sim/ProtocolDeck/types.d.ts +0 -8
  124. package/lib/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.d.ts +0 -1
  125. package/lib/hardware-sim/ProtocolDeck/utils/getInitiallyLoadedLabwareByAdapter.d.ts +0 -5
  126. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +0 -12
  127. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInfoByLiquidId.d.ts +0 -3
  128. package/lib/hardware-sim/ProtocolDeck/utils/getModulesInSlots.d.ts +0 -10
  129. package/lib/hardware-sim/ProtocolDeck/utils/getStandardDeckViewLayerBlockList.d.ts +0 -2
  130. package/lib/hardware-sim/ProtocolDeck/utils/getWellFillFromLabwareId.d.ts +0 -4
  131. package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +0 -2
  132. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +0 -7
  133. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithDOMCoords.d.ts +0 -19
  134. package/lib/hardware-sim/RobotCoordinateSpace/index.d.ts +0 -2
  135. package/lib/hardware-sim/index.d.ts +0 -11
  136. package/lib/hardware-sim/utils.d.ts +0 -3
  137. package/lib/helix-design-system/colors.d.ts +0 -75
  138. package/lib/helix-design-system/index.d.ts +0 -1
  139. package/lib/hooks/__tests__/useConditionalConfirm.test.d.ts +0 -0
  140. package/lib/hooks/__tests__/useDrag.test.d.ts +0 -1
  141. package/lib/hooks/__tests__/useIdle.test.d.ts +0 -1
  142. package/lib/hooks/__tests__/useInterval.test.d.ts +0 -0
  143. package/lib/hooks/__tests__/useLongPress.test.d.ts +0 -1
  144. package/lib/hooks/__tests__/useMountEffect.test.d.ts +0 -0
  145. package/lib/hooks/__tests__/usePrevious.test.d.ts +0 -0
  146. package/lib/hooks/__tests__/useScrolling.test.d.ts +0 -1
  147. package/lib/hooks/__tests__/useSwipe.test.d.ts +0 -1
  148. package/lib/hooks/__tests__/useTimeout.test.d.ts +0 -0
  149. package/lib/hooks/__tests__/useToggle.test.d.ts +0 -0
  150. package/lib/hooks/index.d.ts +0 -12
  151. package/lib/hooks/useConditionalConfirm.d.ts +0 -40
  152. package/lib/hooks/useDrag.d.ts +0 -22
  153. package/lib/hooks/useIdle.d.ts +0 -11
  154. package/lib/hooks/useInterval.d.ts +0 -11
  155. package/lib/hooks/useLongPress.d.ts +0 -19
  156. package/lib/hooks/useMountEffect.d.ts +0 -8
  157. package/lib/hooks/usePrevious.d.ts +0 -9
  158. package/lib/hooks/useScrolling.d.ts +0 -1
  159. package/lib/hooks/useSelectDeckLocation/index.d.ts +0 -20
  160. package/lib/hooks/useSwipe.d.ts +0 -12
  161. package/lib/hooks/useTimeout.d.ts +0 -9
  162. package/lib/hooks/useToggle.d.ts +0 -22
  163. package/lib/icons/Icon.d.ts +0 -34
  164. package/lib/icons/ModuleIcon.d.ts +0 -12
  165. package/lib/icons/NotificationIcon.d.ts +0 -13
  166. package/lib/icons/icon-data.d.ts +0 -582
  167. package/lib/icons/index.d.ts +0 -3
  168. package/lib/images/index.d.ts +0 -1
  169. package/lib/images/labware/index.d.ts +0 -1
  170. package/lib/images/labware/measurement-guide/index.d.ts +0 -13
  171. package/lib/index.d.ts +0 -28
  172. package/lib/instrument/InfoItem.d.ts +0 -11
  173. package/lib/instrument/InstrumentDiagram.d.ts +0 -12
  174. package/lib/instrument/InstrumentGroup.d.ts +0 -12
  175. package/lib/instrument/InstrumentInfo.d.ts +0 -24
  176. package/lib/instrument/PipetteSelect.d.ts +0 -20
  177. package/lib/instrument/__tests__/PipetteSelect.test.d.ts +0 -0
  178. package/lib/instrument/index.d.ts +0 -5
  179. package/lib/interaction-enhancers/ClickOutside.d.ts +0 -18
  180. package/lib/interaction-enhancers/HandleKeypress.d.ts +0 -27
  181. package/lib/interaction-enhancers/__tests__/useHover.test.d.ts +0 -0
  182. package/lib/interaction-enhancers/index.d.ts +0 -4
  183. package/lib/interaction-enhancers/useHover.d.ts +0 -33
  184. package/lib/interaction-enhancers/useOnClickOutside.d.ts +0 -5
  185. package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +0 -8
  186. package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -18
  187. package/lib/legacy-hardware-sim/index.d.ts +0 -2
  188. package/lib/lists/ListItem.d.ts +0 -37
  189. package/lib/lists/SidePanelGroup.d.ts +0 -18
  190. package/lib/lists/TitledList.d.ts +0 -44
  191. package/lib/lists/index.d.ts +0 -3
  192. package/lib/modals/AlertModal.d.ts +0 -27
  193. package/lib/modals/BaseModal.d.ts +0 -26
  194. package/lib/modals/ContinueModal.d.ts +0 -10
  195. package/lib/modals/Modal.d.ts +0 -23
  196. package/lib/modals/ModalPage.d.ts +0 -16
  197. package/lib/modals/ModalShell.d.ts +0 -25
  198. package/lib/modals/Overlay.d.ts +0 -9
  199. package/lib/modals/SpinnerModal.d.ts +0 -13
  200. package/lib/modals/SpinnerModalPage.d.ts +0 -11
  201. package/lib/modals/__tests__/BaseModal.test.d.ts +0 -0
  202. package/lib/modals/index.d.ts +0 -9
  203. package/lib/molecules/LocationIcon/__tests__/LocationIcon.test.d.ts +0 -1
  204. package/lib/molecules/LocationIcon/index.d.ts +0 -16
  205. package/lib/molecules/RoundTab.d.ts +0 -8
  206. package/lib/molecules/index.d.ts +0 -2
  207. package/lib/nav/SidePanel.d.ts +0 -6
  208. package/lib/nav/index.d.ts +0 -1
  209. package/lib/opentrons-components.js +0 -16
  210. package/lib/primitives/Box.d.ts +0 -7
  211. package/lib/primitives/Btn.d.ts +0 -61
  212. package/lib/primitives/Flex.d.ts +0 -7
  213. package/lib/primitives/ForeignObject.d.ts +0 -23
  214. package/lib/primitives/Link.d.ts +0 -11
  215. package/lib/primitives/Svg.d.ts +0 -23
  216. package/lib/primitives/Text.d.ts +0 -7
  217. package/lib/primitives/__tests__/Box.test.d.ts +0 -0
  218. package/lib/primitives/__tests__/Btn.test.d.ts +0 -0
  219. package/lib/primitives/__tests__/Flex.test.d.ts +0 -0
  220. package/lib/primitives/__tests__/Link.test.d.ts +0 -0
  221. package/lib/primitives/__tests__/Svg.test.d.ts +0 -0
  222. package/lib/primitives/__tests__/Text.test.d.ts +0 -0
  223. package/lib/primitives/__tests__/primitives.test.d.ts +0 -0
  224. package/lib/primitives/__tests__/style-props.test.d.ts +0 -0
  225. package/lib/primitives/index.d.ts +0 -9
  226. package/lib/primitives/style-props.d.ts +0 -4
  227. package/lib/primitives/types.d.ts +0 -96
  228. package/lib/robot-types.d.ts +0 -1
  229. package/lib/slotmap/SlotMap.d.ts +0 -12
  230. package/lib/slotmap/__tests__/SlotMap.test.d.ts +0 -0
  231. package/lib/slotmap/index.d.ts +0 -1
  232. package/lib/structure/Card.d.ts +0 -18
  233. package/lib/structure/LabeledValue.d.ts +0 -12
  234. package/lib/structure/PageTabs.d.ts +0 -12
  235. package/lib/structure/Pill.d.ts +0 -18
  236. package/lib/structure/Splash.d.ts +0 -9
  237. package/lib/structure/TitleBar.d.ts +0 -17
  238. package/lib/structure/index.d.ts +0 -6
  239. package/lib/styles/borders.d.ts +0 -8
  240. package/lib/styles/colors.d.ts +0 -37
  241. package/lib/styles/flexbox.d.ts +0 -28
  242. package/lib/styles/index.d.ts +0 -7
  243. package/lib/styles/layout.d.ts +0 -23
  244. package/lib/styles/position.d.ts +0 -5
  245. package/lib/styles/spacing.d.ts +0 -9
  246. package/lib/styles/typography.d.ts +0 -36
  247. package/lib/tabbedNav/NavTab.d.ts +0 -25
  248. package/lib/tabbedNav/OutsideLinkTab.d.ts +0 -24
  249. package/lib/tabbedNav/TabbedNavBar.d.ts +0 -7
  250. package/lib/tabbedNav/index.d.ts +0 -3
  251. package/lib/testing/utils/index.d.ts +0 -2
  252. package/lib/testing/utils/matchers.d.ts +0 -6
  253. package/lib/testing/utils/renderWithProviders.d.ts +0 -10
  254. package/lib/tooltips/DeprecatedTooltip.d.ts +0 -37
  255. package/lib/tooltips/HoverTooltip.d.ts +0 -36
  256. package/lib/tooltips/Tooltip.d.ts +0 -35
  257. package/lib/tooltips/__tests__/Tooltip.test.d.ts +0 -0
  258. package/lib/tooltips/__tests__/useHoverTooltip.test.d.ts +0 -0
  259. package/lib/tooltips/__tests__/usePopper.test.d.ts +0 -0
  260. package/lib/tooltips/__tests__/useTooltip.test.d.ts +0 -0
  261. package/lib/tooltips/constants.d.ts +0 -17
  262. package/lib/tooltips/index.d.ts +0 -8
  263. package/lib/tooltips/styles.d.ts +0 -12
  264. package/lib/tooltips/types.d.ts +0 -52
  265. package/lib/tooltips/useHoverTooltip.d.ts +0 -24
  266. package/lib/tooltips/usePopper.d.ts +0 -2
  267. package/lib/tooltips/useTooltip.d.ts +0 -31
  268. package/lib/ui-style-constants/borders.d.ts +0 -18
  269. package/lib/ui-style-constants/index.d.ts +0 -4
  270. package/lib/ui-style-constants/responsiveness.d.ts +0 -2
  271. package/lib/ui-style-constants/spacing.d.ts +0 -17
  272. package/lib/ui-style-constants/typography.d.ts +0 -70
  273. package/lib/utils.d.ts +0 -15
  274. package/webpack.config.js +0 -38
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import type { InstrumentInfoProps } from './InstrumentInfo';
3
- export interface InstrumentGroupProps {
4
- showMountLabel?: boolean | null | undefined;
5
- left?: InstrumentInfoProps | null | undefined;
6
- right?: InstrumentInfoProps | null | undefined;
7
- }
8
- /**
9
- * Renders a left and right pipette diagram & info.
10
- * Takes child `InstrumentInfo` props in `right` and `left` props.
11
- */
12
- export declare function InstrumentGroup(props: InstrumentGroupProps): JSX.Element;
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import type { Mount } from '../robot-types';
3
- import type { InstrumentDiagramProps } from './InstrumentDiagram';
4
- export interface InstrumentInfoProps {
5
- /** 'left' or 'right' */
6
- mount: Mount;
7
- /** if true, show labels 'LEFT PIPETTE' / 'RIGHT PIPETTE' */
8
- showMountLabel?: boolean | null;
9
- /** human-readable description, eg 'p300 Single-channel' */
10
- description: string;
11
- /** paired tiprack model */
12
- tiprackModel?: string;
13
- /** if disabled, pipette & its info are grayed out */
14
- isDisabled: boolean;
15
- /** specs of mounted pipette */
16
- pipetteSpecs?: InstrumentDiagramProps['pipetteSpecs'] | null;
17
- /** classes to apply */
18
- className?: string;
19
- /** classes to apply to the info group child */
20
- infoClassName?: string;
21
- /** children to display under the info */
22
- children?: React.ReactNode;
23
- }
24
- export declare function InstrumentInfo(props: InstrumentInfoProps): JSX.Element;
@@ -1,20 +0,0 @@
1
- import type { ActionMeta } from 'react-select';
2
- import type { SelectOption } from '../forms';
3
- export interface PipetteSelectProps {
4
- /** currently selected value, optional in case selecting triggers immediate action */
5
- pipetteName?: string | null;
6
- /** react-select change handler */
7
- onPipetteChange: (pipetteName: string | null, e: ActionMeta<SelectOption>) => void;
8
- /** list of pipette names to omit */
9
- nameBlocklist?: string[];
10
- /** whether or not "None" shows up as the default option */
11
- enableNoneOption?: boolean;
12
- /** input tabIndex */
13
- tabIndex?: string | number;
14
- /** classes to apply to the top-level component */
15
- className?: string;
16
- /** custom id to be applied. likely to be used as a data test id for e2e testing */
17
- id?: string;
18
- disabled?: boolean;
19
- }
20
- export declare const PipetteSelect: (props: PipetteSelectProps) => JSX.Element;
File without changes
@@ -1,5 +0,0 @@
1
- export * from './InfoItem';
2
- export * from './InstrumentDiagram';
3
- export * from './InstrumentGroup';
4
- export * from './InstrumentInfo';
5
- export * from './PipetteSelect';
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- interface ClickOutsideChildParams {
3
- ref: React.RefCallback<Element>;
4
- }
5
- export interface ClickOutsideProps {
6
- onClickOutside: ((e: MouseEvent) => void) | undefined | null;
7
- children: (params: ClickOutsideChildParams) => JSX.Element;
8
- }
9
- export declare class ClickOutside extends React.Component<ClickOutsideProps> {
10
- wrapperRef: Element | null;
11
- constructor(props: ClickOutsideProps);
12
- componentDidMount(): void;
13
- componentWillUnmount(): void;
14
- setWrapperRef: (el: Element | null) => void;
15
- handleClickOutside: (event: MouseEvent) => void;
16
- render(): JSX.Element;
17
- }
18
- export {};
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- export interface KeypressHandler {
3
- key: string;
4
- shiftKey?: boolean | null | undefined;
5
- onPress: () => unknown;
6
- }
7
- export interface HandleKeypressProps {
8
- /** array of keypress handlers to attach to the window */
9
- handlers: KeypressHandler[];
10
- /** optionally call event.preventDefault if keypress is handled */
11
- preventDefault?: boolean | null | undefined;
12
- /** wrapped children */
13
- children?: React.ReactNode;
14
- }
15
- /**
16
- * Keypress handler wrapper component. Takes an array of keypress handlers
17
- * to call when a given key is pressed on the keyboard. Handler is called on
18
- * `keyup` event. `event.preventDefault` will be called if a key is handled
19
- * and `props.preventDefault` is true.
20
- */
21
- export declare class HandleKeypress extends React.Component<HandleKeypressProps> {
22
- handlePressIfKey: (event: KeyboardEvent) => void;
23
- preventDefaultIfKey: (event: KeyboardEvent) => void;
24
- componentDidMount(): void;
25
- componentWillUnmount(): void;
26
- render(): JSX.Element;
27
- }
@@ -1,4 +0,0 @@
1
- export * from './ClickOutside';
2
- export * from './HandleKeypress';
3
- export * from './useOnClickOutside';
4
- export * from './useHover';
@@ -1,33 +0,0 @@
1
- export interface UseHoverOptions {
2
- enterDelay?: number;
3
- leaveDelay?: number;
4
- }
5
- export interface HoverHandlers {
6
- onPointerEnter: () => unknown;
7
- onPointerLeave: () => unknown;
8
- }
9
- export type UseHoverResult = [boolean, HoverHandlers];
10
- /**
11
- * Hook to track hover state of an element
12
- *
13
- * @param {UseHoverOptions} [options={}] (add an `enterDelay` or `leaveDelay` to the hover state change)
14
- * @returns {UseHoverResult}
15
- * @example
16
- * ```js
17
- * import { useHover } from '@opentrons/components'
18
- *
19
- * export function HoverComponent() {
20
- * const [hovered, hoverHandlers] = useHover({
21
- * enterDelay: 300,
22
- * leaveDelay: 100
23
- * })
24
- *
25
- * return (
26
- * <span {...hoverHandlers}>
27
- * {hovered ? 'Hovered!' : 'Not hovered!'}
28
- * </span>
29
- * )
30
- * }
31
- * ```
32
- */
33
- export declare function useHover(options?: UseHoverOptions): UseHoverResult;
@@ -1,5 +0,0 @@
1
- import type { RefObject } from 'react';
2
- export interface UseOnClickOutsideOptions {
3
- onClickOutside?: (e: MouseEvent) => unknown;
4
- }
5
- export declare const useOnClickOutside: <E extends Element>(options: UseOnClickOutsideOptions) => RefObject<E>;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export interface LabwareNameOverlayProps {
3
- title: string;
4
- subtitle?: string | null | undefined;
5
- className?: string;
6
- }
7
- /** @deprecated use LabwareDisplayName or custom RobotCoordsForeignDiv */
8
- export declare function LabwareNameOverlay(props: LabwareNameOverlayProps): JSX.Element;
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ModuleModel, DeckSlot } from '@opentrons/shared-data';
3
- export interface ModuleProps {
4
- /** module model */
5
- model: ModuleModel;
6
- /** display mode: 'default', 'present', 'missing', or 'info' */
7
- mode: 'default' | 'present' | 'missing' | 'info';
8
- /** slot details of the location of this module */
9
- slot: DeckSlot;
10
- /** USB port detail of the connected module */
11
- usbInfoString?: string;
12
- }
13
- /**
14
- * Legacy App-specific Module Rendering. Removable after Protocol Upload Revamp release
15
- *
16
- * @deprecated Use {@link Module}
17
- */
18
- export declare function ModuleItem(props: ModuleProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './LabwareNameOverlay';
2
- export * from './ModuleItem';
@@ -1,37 +0,0 @@
1
- import * as React from 'react';
2
- import type { IconName } from '../icons';
3
- interface ListItemProps {
4
- /** click handler */
5
- onClick?: (event: React.SyntheticEvent) => unknown;
6
- /** mouse enter handler */
7
- onMouseEnter?: (event: React.MouseEvent) => unknown;
8
- /** mouse leave handler */
9
- onMouseLeave?: (event: React.MouseEvent) => unknown;
10
- /** mouse enter handler */
11
- onPointerEnter?: (event: React.PointerEvent) => unknown;
12
- /** mouse leave handler */
13
- onPointerLeave?: (event: React.PointerEvent) => unknown;
14
- /** if URL is specified, ListItem is wrapped in a React Router NavLink */
15
- url?: string | null;
16
- /** if URL is specified NavLink can receive an active class name */
17
- activeClassName?: string;
18
- /** if URL is specified NavLink can receive an exact property for matching routes */
19
- exact?: boolean;
20
- /** Additional class name */
21
- className?: string;
22
- /** if disabled, the onClick handler will be disabled */
23
- isDisabled?: boolean;
24
- /** name constant of the icon to display */
25
- iconName?: IconName;
26
- 'aria-describedby'?: string;
27
- ref?: {
28
- current: Element | null;
29
- } | ((current: Element | null) => unknown);
30
- children?: React.ReactNode;
31
- }
32
- /**
33
- * A styled `<li>` with an optional icon, and an optional url for a React Router `NavLink`
34
- *
35
- */
36
- export declare const ListItem: React.ForwardRefExoticComponent<Pick<ListItemProps, "className" | "exact" | "children" | "aria-describedby" | "onClick" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "url" | "iconName" | "isDisabled" | "activeClassName"> & React.RefAttributes<HTMLLIElement>>;
37
- export {};
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- import type { IconName } from '../icons';
3
- export interface SidePanelGroupProps {
4
- /** text of title */
5
- title?: string;
6
- /** optional icon left of the title */
7
- iconName?: IconName;
8
- /** children, most likely one or more TitledList */
9
- children?: React.ReactNode;
10
- /** additional classnames */
11
- className?: string;
12
- /** disables the whole SidePanelGroup if true */
13
- disabled?: boolean;
14
- }
15
- /**
16
- * A component for grouping and titling multiple lists
17
- */
18
- export declare function SidePanelGroup(props: SidePanelGroupProps): JSX.Element;
@@ -1,44 +0,0 @@
1
- import * as React from 'react';
2
- import type { IconName, IconProps } from '../icons';
3
- export interface TitledListProps {
4
- /** id attribute */
5
- id?: string;
6
- /** text of title */
7
- title: string;
8
- /** optional icon left of the title */
9
- iconName?: IconName | null | undefined;
10
- /** props passed down to icon (`className` and `name` are ignored) */
11
- iconProps?: Omit<IconProps, 'name'>;
12
- /** optional data test id for the container */
13
- 'data-test'?: string;
14
- /** children must all be `<li>` */
15
- children?: React.ReactNode;
16
- /** additional classnames */
17
- className?: string;
18
- /** component with descriptive text about the list */
19
- description?: React.ReactNode;
20
- /** optional click action (on title div, not children) */
21
- onClick?: (event: React.MouseEvent) => unknown;
22
- /** optional right click action (on wrapping div) */
23
- onContextMenu?: (event: React.MouseEvent) => unknown;
24
- /** optional mouseEnter action */
25
- onMouseEnter?: (event: React.MouseEvent) => unknown;
26
- /** optional mouseLeave action */
27
- onMouseLeave?: (event: React.MouseEvent) => unknown;
28
- /** caret click action; if defined, list is expandable and carat is visible */
29
- onCollapseToggle?: (event: React.MouseEvent) => unknown;
30
- /** collapse the list if true (false by default) */
31
- collapsed?: boolean;
32
- /** set to true when TitledList is selected (eg, user clicked it) */
33
- selected?: boolean;
34
- /** set to true when TitledList is hovered (but not when its contents are hovered) */
35
- hovered?: boolean;
36
- /** disables the whole TitledList if true */
37
- disabled?: boolean;
38
- /** appear disabled, but preserve collapsibility */
39
- inert?: boolean;
40
- }
41
- /**
42
- * An ordered list with optional title, icon, and description.
43
- */
44
- export declare function TitledList(props: TitledListProps): JSX.Element;
@@ -1,3 +0,0 @@
1
- export * from './SidePanelGroup';
2
- export * from './TitledList';
3
- export * from './ListItem';
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import type { ButtonProps } from '../buttons';
3
- import type { IconName } from '../icons';
4
- export interface AlertModalProps {
5
- /** optional handler for overlay click */
6
- onCloseClick?: () => unknown;
7
- /** optional modal heading */
8
- heading?: React.ReactNode;
9
- /** optional array of `ButtonProps` for `OutlineButton`s at bottom of modal */
10
- buttons?: Array<ButtonProps | null | undefined>;
11
- /** modal contents */
12
- children: React.ReactNode;
13
- /** optional classes to apply */
14
- className?: string;
15
- /** optional classes to apply */
16
- contentsClassName?: string;
17
- /** lightens overlay (alert modal over existing modal) */
18
- alertOverlay?: boolean;
19
- /** override default alert icon */
20
- iconName?: IconName | null | undefined;
21
- /** restricts scroll outside of Modal when open, true by default */
22
- restrictOuterScroll?: boolean;
23
- }
24
- /**
25
- * Generic alert modal with a heading and a set of buttons at the bottom
26
- */
27
- export declare function AlertModal(props: AlertModalProps): JSX.Element;
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import type { StyleProps } from '../primitives';
3
- export interface BaseModalProps extends StyleProps {
4
- /** Overlay color, defaults to `OVERLAY_GRAY_90` */
5
- overlayColor?: string;
6
- /** Optional close on outside click **/
7
- onOutsideClick?: React.MouseEventHandler;
8
- /** Optional sticky header */
9
- header?: React.ReactNode;
10
- /** Option to turn off headerStyles */
11
- noHeaderStyles?: boolean;
12
- /** Optional sticky footer */
13
- footer?: React.ReactNode;
14
- /** Modal content */
15
- children?: React.ReactNode;
16
- }
17
- /**
18
- * A BaseModal is a layout component for building more specific modals.
19
- *
20
- * It includes:
21
- * - An overlay, customizable with the `overlayColor` prop
22
- * - A content area, with `overflow-y: auto` and customizable with style props
23
- * - An optional sticky header
24
- * - An optional sticky footer
25
- */
26
- export declare function BaseModal(props: BaseModalProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import type { AlertModalProps } from './AlertModal';
3
- export interface ContinueModalProps extends Omit<AlertModalProps, 'buttons'> {
4
- onCancelClick: () => unknown;
5
- onContinueClick: () => unknown;
6
- }
7
- /**
8
- * AlertModal variant to prompt user to "Cancel" or "Continue" a given action
9
- */
10
- export declare function ContinueModal(props: ContinueModalProps): JSX.Element;
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- export interface ModalProps {
3
- /** handler to close the modal (attached to `Overlay` onClick) */
4
- onCloseClick?: React.MouseEventHandler;
5
- /** Optional styled heading **/
6
- heading?: string;
7
- /** modal contents */
8
- children: React.ReactNode;
9
- /** classes to apply */
10
- className?: string;
11
- /** classes to apply to the contents box */
12
- contentsClassName?: string;
13
- /** lightens overlay (alert modal over existing modal) */
14
- alertOverlay?: boolean;
15
- /** restricts scroll outside of Modal when open, true by default */
16
- restrictOuterScroll?: boolean;
17
- innerRef?: React.Ref<HTMLDivElement>;
18
- }
19
- /**
20
- * Base modal component that fills its nearest `display:relative` ancestor
21
- * with a dark overlay and displays `children` as its contents in a white box
22
- */
23
- export declare function Modal(props: ModalProps): JSX.Element;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import { Box } from '../primitives';
3
- import type { TitleBarProps } from '../structure';
4
- export interface ModalPageProps {
5
- /** Props for title bar at top of modal page */
6
- titleBar: TitleBarProps;
7
- contentsClassName?: string;
8
- heading?: React.ReactNode;
9
- children?: React.ReactNode;
10
- innerProps?: React.ComponentProps<typeof Box>;
11
- outerProps?: React.ComponentProps<typeof Box>;
12
- }
13
- /**
14
- * @deprecated Use `Interstitial` instead
15
- */
16
- export declare function ModalPage(props: ModalPageProps): JSX.Element;
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- import { StyleProps } from '../primitives';
3
- export interface ModalShellProps extends StyleProps {
4
- /** Modal content */
5
- children: React.ReactNode;
6
- /** Optional close on outside click **/
7
- onOutsideClick?: React.MouseEventHandler;
8
- /** Optional sticky header */
9
- header?: React.ReactNode;
10
- /** Optional sticky footer */
11
- footer?: React.ReactNode;
12
- /** Optional full page takeover */
13
- fullPage?: boolean;
14
- }
15
- /**
16
- * A ModalShell is a layout component for building more specific modals.
17
- *
18
- * It includes:
19
- * - An overlay
20
- * - A content area, with `overflow-y: auto` and customizable with style props
21
- * - An optional sticky header
22
- * - An optional sticky footer
23
- * - An optional onOutsideClick function
24
- */
25
- export declare function ModalShell(props: ModalShellProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import { Flex } from '..';
3
- export interface OverlayProps extends React.ComponentProps<typeof Flex> {
4
- /** optional onClick handler */
5
- onClick?: React.MouseEventHandler;
6
- alertOverlay?: boolean | null;
7
- backgroundColor?: string;
8
- }
9
- export declare function Overlay(props: OverlayProps): JSX.Element;
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- export interface SpinnerModalProps {
3
- /** Additional/Override style */
4
- contentsClassName?: string;
5
- /** Optional message to display as italic text below spinner */
6
- message?: string;
7
- /** lightens overlay (alert modal over existing modal) */
8
- alertOverlay?: boolean;
9
- }
10
- /**
11
- * Spinner Modal with no background and optional message
12
- */
13
- export declare function SpinnerModal(props: SpinnerModalProps): JSX.Element;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- import { SpinnerModal } from './SpinnerModal';
3
- import type { TitleBarProps } from '../structure';
4
- export interface SpinnerModalPageProps extends React.ComponentProps<typeof SpinnerModal> {
5
- /** Props for title bar at top of modal page */
6
- titleBar: TitleBarProps;
7
- }
8
- /**
9
- * Spinner Modal variant with TitleBar
10
- */
11
- export declare function SpinnerModalPage(props: SpinnerModalPageProps): JSX.Element;
File without changes
@@ -1,9 +0,0 @@
1
- export * from './Modal';
2
- export * from './AlertModal';
3
- export * from './ContinueModal';
4
- export * from './SpinnerModal';
5
- export * from './ModalPage';
6
- export * from './ModalShell';
7
- export * from './SpinnerModalPage';
8
- export * from './BaseModal';
9
- export * from './Overlay';
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import type { IconName } from '../../icons';
3
- import type { StyleProps } from '../../primitives';
4
- interface SlotLocationProps extends StyleProps {
5
- /** name constant of the slot to display */
6
- slotName: string;
7
- iconName?: undefined;
8
- }
9
- interface HardwareIconProps extends StyleProps {
10
- /** hardware icon name */
11
- iconName: IconName;
12
- slotName?: undefined;
13
- }
14
- type LocationIconProps = SlotLocationProps | HardwareIconProps;
15
- export declare function LocationIcon({ slotName, iconName, color, ...styleProps }: LocationIconProps): JSX.Element;
16
- export {};
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { Btn } from '../primitives';
3
- interface RoundTabProps extends React.ComponentProps<typeof Btn> {
4
- isCurrent: boolean;
5
- disabled?: boolean;
6
- }
7
- export declare function RoundTab({ isCurrent, children, disabled, ...restProps }: RoundTabProps): JSX.Element;
8
- export {};
@@ -1,2 +0,0 @@
1
- export * from './LocationIcon';
2
- export * from './RoundTab';
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export interface SidePanelProps {
3
- title?: string;
4
- children?: React.ReactNode;
5
- }
6
- export declare function SidePanel(props: SidePanelProps): JSX.Element;
@@ -1 +0,0 @@
1
- export * from './SidePanel';