@opentrons/components 0.1.1 → 0.1.2-alpha.1

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 (260) hide show
  1. package/lib/__tests__/utils.test.d.ts +1 -0
  2. package/lib/alerts/AlertItem.d.ts +21 -0
  3. package/lib/alerts/index.d.ts +1 -0
  4. package/lib/atoms/CheckboxField/__tests__/CheckboxField.test.d.ts +1 -0
  5. package/lib/atoms/CheckboxField/index.d.ts +20 -0
  6. package/lib/atoms/StepMeter/index.d.ts +6 -0
  7. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +1 -0
  8. package/lib/atoms/buttons/PrimaryButton.d.ts +1 -0
  9. package/lib/atoms/buttons/SecondaryButton.d.ts +7 -0
  10. package/lib/atoms/buttons/__tests__/AlertPrimaryButton.test.d.ts +1 -0
  11. package/lib/atoms/buttons/__tests__/PrimaryButton.test.d.ts +1 -0
  12. package/lib/atoms/buttons/__tests__/SecondaryButton.test.d.ts +1 -0
  13. package/lib/atoms/buttons/index.d.ts +3 -0
  14. package/lib/atoms/index.d.ts +3 -0
  15. package/lib/barrel.d.ts +3 -0
  16. package/lib/buttons/Button.d.ts +49 -0
  17. package/lib/buttons/DeprecatedPrimaryButton.d.ts +9 -0
  18. package/lib/buttons/FlatButton.d.ts +6 -0
  19. package/lib/buttons/IconButton.d.ts +15 -0
  20. package/lib/buttons/OutlineButton.d.ts +9 -0
  21. package/lib/buttons/index.d.ts +5 -0
  22. package/lib/controls/ControlInfo.d.ts +6 -0
  23. package/lib/controls/LabeledButton.d.ts +8 -0
  24. package/lib/controls/LabeledCheckbox.d.ts +10 -0
  25. package/lib/controls/LabeledControl.d.ts +7 -0
  26. package/lib/controls/LabeledRadioGroup.d.ts +8 -0
  27. package/lib/controls/LabeledSelect.d.ts +9 -0
  28. package/lib/controls/LabeledToggle.d.ts +11 -0
  29. package/lib/controls/StackedLabeledControl.d.ts +7 -0
  30. package/lib/controls/ToggleButton.d.ts +6 -0
  31. package/lib/controls/index.d.ts +6 -0
  32. package/lib/forms/DeprecatedCheckboxField.d.ts +33 -0
  33. package/lib/forms/DropdownField.d.ts +38 -0
  34. package/lib/forms/FormGroup.d.ts +19 -0
  35. package/lib/forms/InputField.d.ts +51 -0
  36. package/lib/forms/RadioGroup.d.ts +29 -0
  37. package/lib/forms/Select.d.ts +27 -0
  38. package/lib/forms/SelectField.d.ts +33 -0
  39. package/lib/forms/ToggleField.d.ts +22 -0
  40. package/lib/forms/__tests__/DeprecatedCheckboxField.test.d.ts +0 -0
  41. package/lib/forms/__tests__/DropdownField.test.d.ts +0 -0
  42. package/lib/forms/__tests__/InputField.test.d.ts +0 -0
  43. package/lib/forms/__tests__/Select.test.d.ts +0 -0
  44. package/lib/forms/__tests__/SelectField.test.d.ts +0 -0
  45. package/lib/forms/__tests__/ToggleField.test.d.ts +0 -0
  46. package/lib/forms/index.d.ts +8 -0
  47. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +42 -0
  48. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +12 -0
  49. package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +2 -0
  50. package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +2 -0
  51. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +13 -0
  52. package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +21 -0
  53. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +14 -0
  54. package/lib/hardware-sim/BaseDeck/__fixtures__/index.d.ts +4 -0
  55. package/lib/hardware-sim/BaseDeck/index.d.ts +5 -0
  56. package/lib/hardware-sim/Deck/DeckFromLayers.d.ts +11 -0
  57. package/lib/hardware-sim/Deck/FlexTrash.d.ts +14 -0
  58. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +17 -0
  59. package/lib/hardware-sim/Deck/OT2Layers.d.ts +11 -0
  60. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +14 -0
  61. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +12 -0
  62. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +8 -0
  63. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +21 -0
  64. package/lib/hardware-sim/Deck/SlotLabels.d.ts +12 -0
  65. package/lib/hardware-sim/Deck/__mocks__/getDeckDefinitions.d.ts +2 -0
  66. package/lib/hardware-sim/Deck/constants.d.ts +1 -0
  67. package/lib/hardware-sim/Deck/getDeckDefinitions.d.ts +2 -0
  68. package/lib/hardware-sim/Deck/index.d.ts +9 -0
  69. package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +9 -0
  70. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +9 -0
  71. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +9 -0
  72. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +10 -0
  73. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +15 -0
  74. package/lib/hardware-sim/DeckConfigurator/index.d.ts +14 -0
  75. package/lib/hardware-sim/DeckSlotLocation/index.d.ts +15 -0
  76. package/lib/hardware-sim/Labware/LabwareRender.d.ts +40 -0
  77. package/lib/hardware-sim/Labware/__tests__/LabwareRender.test.d.ts +1 -0
  78. package/lib/hardware-sim/Labware/index.d.ts +3 -0
  79. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +10 -0
  80. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +18 -0
  81. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +17 -0
  82. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +9 -0
  83. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +19 -0
  84. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +19 -0
  85. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +12 -0
  86. package/lib/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.d.ts +1 -0
  87. package/lib/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.d.ts +1 -0
  88. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +6 -0
  89. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +12 -0
  90. package/lib/hardware-sim/Module/HeaterShaker.d.ts +5 -0
  91. package/lib/hardware-sim/Module/MagneticBlock.d.ts +2 -0
  92. package/lib/hardware-sim/Module/MagneticModule.d.ts +2 -0
  93. package/lib/hardware-sim/Module/ModuleTag.d.ts +9 -0
  94. package/lib/hardware-sim/Module/Temperature.d.ts +5 -0
  95. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.d.ts +7 -0
  96. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.d.ts +7 -0
  97. package/lib/hardware-sim/Module/Thermocycler/index.d.ts +8 -0
  98. package/lib/hardware-sim/Module/index.d.ts +18 -0
  99. package/lib/hardware-sim/Pipette/EightEmanatingNozzles.d.ts +4 -0
  100. package/lib/hardware-sim/Pipette/EmanatingNozzle.d.ts +4 -0
  101. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +8 -0
  102. package/lib/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.d.ts +1 -0
  103. package/lib/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.d.ts +1 -0
  104. package/lib/hardware-sim/Pipette/__tests__/PipetteRender.test.d.ts +1 -0
  105. package/lib/hardware-sim/Pipette/constants.d.ts +7 -0
  106. package/lib/hardware-sim/Pipette/index.d.ts +1 -0
  107. package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +6 -0
  108. package/lib/hardware-sim/ProtocolDeck/index.d.ts +12 -0
  109. package/lib/hardware-sim/ProtocolDeck/types.d.ts +8 -0
  110. package/lib/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.d.ts +1 -0
  111. package/lib/hardware-sim/ProtocolDeck/utils/getInitiallyLoadedLabwareByAdapter.d.ts +5 -0
  112. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +11 -0
  113. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInfoByLiquidId.d.ts +3 -0
  114. package/lib/hardware-sim/ProtocolDeck/utils/getModulesInSlots.d.ts +10 -0
  115. package/lib/hardware-sim/ProtocolDeck/utils/getStandardDeckViewLayerBlockList.d.ts +2 -0
  116. package/lib/hardware-sim/ProtocolDeck/utils/getWellFillFromLabwareId.d.ts +4 -0
  117. package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +2 -0
  118. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +7 -0
  119. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithDOMCoords.d.ts +19 -0
  120. package/lib/hardware-sim/RobotCoordinateSpace/index.d.ts +2 -0
  121. package/lib/hardware-sim/index.d.ts +11 -0
  122. package/lib/hardware-sim/utils.d.ts +3 -0
  123. package/lib/helix-design-system/colors.d.ts +75 -0
  124. package/lib/helix-design-system/index.d.ts +1 -0
  125. package/lib/hooks/__tests__/useConditionalConfirm.test.d.ts +0 -0
  126. package/lib/hooks/__tests__/useDrag.test.d.ts +1 -0
  127. package/lib/hooks/__tests__/useIdle.test.d.ts +1 -0
  128. package/lib/hooks/__tests__/useInterval.test.d.ts +0 -0
  129. package/lib/hooks/__tests__/useLongPress.test.d.ts +1 -0
  130. package/lib/hooks/__tests__/useMountEffect.test.d.ts +0 -0
  131. package/lib/hooks/__tests__/usePrevious.test.d.ts +0 -0
  132. package/lib/hooks/__tests__/useScrolling.test.d.ts +1 -0
  133. package/lib/hooks/__tests__/useSwipe.test.d.ts +1 -0
  134. package/lib/hooks/__tests__/useTimeout.test.d.ts +0 -0
  135. package/lib/hooks/__tests__/useToggle.test.d.ts +0 -0
  136. package/lib/hooks/index.d.ts +12 -0
  137. package/lib/hooks/useConditionalConfirm.d.ts +40 -0
  138. package/lib/hooks/useDrag.d.ts +22 -0
  139. package/lib/hooks/useIdle.d.ts +11 -0
  140. package/lib/hooks/useInterval.d.ts +11 -0
  141. package/lib/hooks/useLongPress.d.ts +19 -0
  142. package/lib/hooks/useMountEffect.d.ts +8 -0
  143. package/lib/hooks/usePrevious.d.ts +9 -0
  144. package/lib/hooks/useScrolling.d.ts +8 -0
  145. package/lib/hooks/useSelectDeckLocation/index.d.ts +17 -0
  146. package/lib/hooks/useSwipe.d.ts +12 -0
  147. package/lib/hooks/useTimeout.d.ts +9 -0
  148. package/lib/hooks/useToggle.d.ts +22 -0
  149. package/lib/icons/Icon.d.ts +34 -0
  150. package/lib/icons/ModuleIcon.d.ts +12 -0
  151. package/lib/icons/NotificationIcon.d.ts +13 -0
  152. package/lib/icons/icon-data.d.ts +582 -0
  153. package/lib/icons/index.d.ts +3 -0
  154. package/lib/images/index.d.ts +1 -0
  155. package/lib/images/labware/index.d.ts +1 -0
  156. package/lib/images/labware/measurement-guide/index.d.ts +13 -0
  157. package/lib/index.d.ts +28 -0
  158. package/lib/instrument/InfoItem.d.ts +11 -0
  159. package/lib/instrument/InstrumentDiagram.d.ts +12 -0
  160. package/lib/instrument/InstrumentGroup.d.ts +12 -0
  161. package/lib/instrument/InstrumentInfo.d.ts +24 -0
  162. package/lib/instrument/PipetteSelect.d.ts +20 -0
  163. package/lib/instrument/__tests__/PipetteSelect.test.d.ts +0 -0
  164. package/lib/instrument/index.d.ts +5 -0
  165. package/lib/interaction-enhancers/ClickOutside.d.ts +18 -0
  166. package/lib/interaction-enhancers/HandleKeypress.d.ts +27 -0
  167. package/lib/interaction-enhancers/__tests__/useHover.test.d.ts +0 -0
  168. package/lib/interaction-enhancers/index.d.ts +4 -0
  169. package/lib/interaction-enhancers/useHover.d.ts +33 -0
  170. package/lib/interaction-enhancers/useOnClickOutside.d.ts +5 -0
  171. package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +8 -0
  172. package/lib/legacy-hardware-sim/ModuleItem.d.ts +18 -0
  173. package/lib/legacy-hardware-sim/index.d.ts +2 -0
  174. package/lib/lists/ListItem.d.ts +37 -0
  175. package/lib/lists/SidePanelGroup.d.ts +18 -0
  176. package/lib/lists/TitledList.d.ts +44 -0
  177. package/lib/lists/index.d.ts +3 -0
  178. package/lib/modals/AlertModal.d.ts +27 -0
  179. package/lib/modals/BaseModal.d.ts +26 -0
  180. package/lib/modals/ContinueModal.d.ts +10 -0
  181. package/lib/modals/Modal.d.ts +23 -0
  182. package/lib/modals/ModalPage.d.ts +16 -0
  183. package/lib/modals/ModalShell.d.ts +25 -0
  184. package/lib/modals/Overlay.d.ts +9 -0
  185. package/lib/modals/SpinnerModal.d.ts +13 -0
  186. package/lib/modals/SpinnerModalPage.d.ts +11 -0
  187. package/lib/modals/__tests__/BaseModal.test.d.ts +0 -0
  188. package/lib/modals/index.d.ts +9 -0
  189. package/lib/molecules/LocationIcon/__tests__/LocationIcon.test.d.ts +1 -0
  190. package/lib/molecules/LocationIcon/index.d.ts +16 -0
  191. package/lib/molecules/RoundTab.d.ts +7 -0
  192. package/lib/molecules/index.d.ts +2 -0
  193. package/lib/nav/SidePanel.d.ts +6 -0
  194. package/lib/nav/index.d.ts +1 -0
  195. package/lib/opentrons-components.js +2 -2
  196. package/lib/primitives/Box.d.ts +7 -0
  197. package/lib/primitives/Btn.d.ts +60 -0
  198. package/lib/primitives/Flex.d.ts +7 -0
  199. package/lib/primitives/ForeignObject.d.ts +23 -0
  200. package/lib/primitives/Link.d.ts +11 -0
  201. package/lib/primitives/Svg.d.ts +23 -0
  202. package/lib/primitives/Text.d.ts +7 -0
  203. package/lib/primitives/__tests__/Box.test.d.ts +0 -0
  204. package/lib/primitives/__tests__/Btn.test.d.ts +0 -0
  205. package/lib/primitives/__tests__/Flex.test.d.ts +0 -0
  206. package/lib/primitives/__tests__/Link.test.d.ts +0 -0
  207. package/lib/primitives/__tests__/Svg.test.d.ts +0 -0
  208. package/lib/primitives/__tests__/Text.test.d.ts +0 -0
  209. package/lib/primitives/__tests__/primitives.test.d.ts +0 -0
  210. package/lib/primitives/__tests__/style-props.test.d.ts +0 -0
  211. package/lib/primitives/index.d.ts +9 -0
  212. package/lib/primitives/style-props.d.ts +4 -0
  213. package/lib/primitives/types.d.ts +96 -0
  214. package/lib/robot-types.d.ts +1 -0
  215. package/lib/slotmap/SlotMap.d.ts +12 -0
  216. package/lib/slotmap/__tests__/SlotMap.test.d.ts +0 -0
  217. package/lib/slotmap/index.d.ts +1 -0
  218. package/lib/structure/Card.d.ts +18 -0
  219. package/lib/structure/LabeledValue.d.ts +12 -0
  220. package/lib/structure/PageTabs.d.ts +12 -0
  221. package/lib/structure/Pill.d.ts +18 -0
  222. package/lib/structure/Splash.d.ts +9 -0
  223. package/lib/structure/TitleBar.d.ts +17 -0
  224. package/lib/structure/index.d.ts +6 -0
  225. package/lib/styles/borders.d.ts +8 -0
  226. package/lib/styles/colors.d.ts +37 -0
  227. package/lib/styles/flexbox.d.ts +28 -0
  228. package/lib/styles/index.d.ts +7 -0
  229. package/lib/styles/layout.d.ts +20 -0
  230. package/lib/styles/position.d.ts +5 -0
  231. package/lib/styles/spacing.d.ts +9 -0
  232. package/lib/styles/typography.d.ts +36 -0
  233. package/lib/tabbedNav/NavTab.d.ts +25 -0
  234. package/lib/tabbedNav/OutsideLinkTab.d.ts +24 -0
  235. package/lib/tabbedNav/TabbedNavBar.d.ts +7 -0
  236. package/lib/tabbedNav/index.d.ts +3 -0
  237. package/lib/testing/utils/index.d.ts +2 -0
  238. package/lib/testing/utils/matchers.d.ts +6 -0
  239. package/lib/testing/utils/renderWithProviders.d.ts +10 -0
  240. package/lib/tooltips/DeprecatedTooltip.d.ts +37 -0
  241. package/lib/tooltips/HoverTooltip.d.ts +36 -0
  242. package/lib/tooltips/Tooltip.d.ts +35 -0
  243. package/lib/tooltips/__tests__/Tooltip.test.d.ts +0 -0
  244. package/lib/tooltips/__tests__/useHoverTooltip.test.d.ts +0 -0
  245. package/lib/tooltips/__tests__/usePopper.test.d.ts +0 -0
  246. package/lib/tooltips/__tests__/useTooltip.test.d.ts +0 -0
  247. package/lib/tooltips/constants.d.ts +17 -0
  248. package/lib/tooltips/index.d.ts +8 -0
  249. package/lib/tooltips/styles.d.ts +12 -0
  250. package/lib/tooltips/types.d.ts +52 -0
  251. package/lib/tooltips/useHoverTooltip.d.ts +24 -0
  252. package/lib/tooltips/usePopper.d.ts +2 -0
  253. package/lib/tooltips/useTooltip.d.ts +31 -0
  254. package/lib/ui-style-constants/borders.d.ts +18 -0
  255. package/lib/ui-style-constants/index.d.ts +4 -0
  256. package/lib/ui-style-constants/responsiveness.d.ts +1 -0
  257. package/lib/ui-style-constants/spacing.d.ts +17 -0
  258. package/lib/ui-style-constants/typography.d.ts +70 -0
  259. package/lib/utils.d.ts +15 -0
  260. package/package.json +2 -2
@@ -0,0 +1,7 @@
1
+ import type { PrimitiveComponent } from './types';
2
+ /**
3
+ * Simple Box atom. Renders a `div` by default and accepts all primitive styling props.
4
+ *
5
+ * @component
6
+ */
7
+ export declare const Box: PrimitiveComponent<'div'>;
@@ -0,0 +1,60 @@
1
+ import type { PrimitiveComponent } from './types';
2
+ export declare const BUTTON_TYPE_SUBMIT: 'submit';
3
+ export declare const BUTTON_TYPE_RESET: 'reset';
4
+ export declare const BUTTON_TYPE_BUTTON: 'button';
5
+ declare type BtnComponent = PrimitiveComponent<'button'>;
6
+ /**
7
+ * Button primitive
8
+ *
9
+ * @component
10
+ */
11
+ export declare const Btn: BtnComponent;
12
+ /**
13
+ * Primary button variant
14
+ *
15
+ * @component
16
+ */
17
+ export declare const PrimaryBtn: BtnComponent;
18
+ /**
19
+ * Secondary button variant
20
+ *
21
+ * @component
22
+ */
23
+ export declare const SecondaryBtn: BtnComponent;
24
+ /**
25
+ * New primary button variant used in app
26
+ *
27
+ * @component
28
+ */
29
+ export declare const NewPrimaryBtn: BtnComponent;
30
+ /**
31
+ * New secondary button variant used in app
32
+ *
33
+ * @component
34
+ */
35
+ export declare const NewSecondaryBtn: BtnComponent;
36
+ /**
37
+ * Red primary button variant used in app
38
+ *
39
+ * @component
40
+ */
41
+ export declare const NewAlertPrimaryBtn: BtnComponent;
42
+ /**
43
+ * Red secondary button variant used in app
44
+ *
45
+ * @component
46
+ */
47
+ export declare const NewAlertSecondaryBtn: BtnComponent;
48
+ /**
49
+ * Light secondary button variant
50
+ *
51
+ * @component
52
+ */
53
+ export declare const LightSecondaryBtn: BtnComponent;
54
+ /**
55
+ * Tertiary button variant
56
+ *
57
+ * @component
58
+ */
59
+ export declare const TertiaryBtn: BtnComponent;
60
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { PrimitiveComponent } from './types';
2
+ /**
3
+ * Flex primitive
4
+ *
5
+ * @component
6
+ */
7
+ export declare const Flex: PrimitiveComponent<'div'>;
@@ -0,0 +1,23 @@
1
+ import type { StyleProps, PrimitiveComponent } from './types';
2
+ export interface ForeignObjectProps extends StyleProps {
3
+ /** attach a width attribute to the <svg> element */
4
+ svgWidth?: string | number;
5
+ /** attach a height attribute to the <svg> element */
6
+ svgHeight?: string | number;
7
+ /**
8
+ * internal helper prop to remap width style-prop to CSS
9
+ * @internal
10
+ */
11
+ _cssWidth?: string | number;
12
+ /**
13
+ * internal helper prop to remap height style-prop to CSS
14
+ * @internal
15
+ */
16
+ _cssHeight?: string | number;
17
+ }
18
+ /**
19
+ * Foreign Object styled atomic component
20
+ *
21
+ * @component
22
+ */
23
+ export declare const ForeignObject: PrimitiveComponent<'foreignObject', ForeignObjectProps>;
@@ -0,0 +1,11 @@
1
+ import type { StyleProps, PrimitiveComponent } from './types';
2
+ export interface LinkProps extends StyleProps {
3
+ /** render link with target="_blank" */
4
+ external?: boolean;
5
+ }
6
+ /**
7
+ * Link primitive
8
+ *
9
+ * @component
10
+ */
11
+ export declare const Link: PrimitiveComponent<'a', LinkProps>;
@@ -0,0 +1,23 @@
1
+ import type { StyleProps, PrimitiveComponent } from './types';
2
+ export interface SvgProps extends StyleProps {
3
+ /** attach a width attribute to the <svg> element */
4
+ svgWidth?: string | number;
5
+ /** attach a height attribute to the <svg> element */
6
+ svgHeight?: string | number;
7
+ /**
8
+ * internal helper prop to remap width style-prop to CSS
9
+ * @internal
10
+ */
11
+ _cssWidth?: string | number;
12
+ /**
13
+ * internal helper prop to remap height style-prop to CSS
14
+ * @internal
15
+ */
16
+ _cssHeight?: string | number;
17
+ }
18
+ /**
19
+ * SVG primitive
20
+ *
21
+ * @component
22
+ */
23
+ export declare const Svg: PrimitiveComponent<'svg', SvgProps>;
@@ -0,0 +1,7 @@
1
+ import type { PrimitiveComponent } from './types';
2
+ /**
3
+ * Text primitive
4
+ *
5
+ * @component
6
+ */
7
+ export declare const Text: PrimitiveComponent<'p'>;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ export * from './style-props';
2
+ export * from './Box';
3
+ export * from './Btn';
4
+ export * from './Flex';
5
+ export * from './ForeignObject';
6
+ export * from './Link';
7
+ export * from './Svg';
8
+ export * from './Text';
9
+ export * from './types';
@@ -0,0 +1,4 @@
1
+ import * as Types from './types';
2
+ import type { CSSObject } from 'styled-components';
3
+ export declare const styleProps: (props: Types.StyleProps) => CSSObject;
4
+ export declare const isntStyleProp: (prop: string | React.ReactText) => boolean;
@@ -0,0 +1,96 @@
1
+ /// <reference types="react" />
2
+ import type { StyledComponent, CSSProperties } from 'styled-components';
3
+ export interface ColorProps {
4
+ color?: string;
5
+ backgroundColor?: string;
6
+ opacity?: string | number;
7
+ }
8
+ export interface TypographyProps {
9
+ fontSize?: string | number;
10
+ fontWeight?: string | number;
11
+ fontStyle?: string;
12
+ lineHeight?: string | number;
13
+ textAlign?: string;
14
+ textTransform?: string;
15
+ textDecoration?: string;
16
+ }
17
+ export interface SpacingProps {
18
+ margin?: string | number;
19
+ marginX?: string | number;
20
+ marginY?: string | number;
21
+ marginTop?: string | number;
22
+ marginRight?: string | number;
23
+ marginBottom?: string | number;
24
+ marginLeft?: string | number;
25
+ padding?: string | number;
26
+ paddingX?: string | number;
27
+ paddingY?: string | number;
28
+ paddingTop?: string | number;
29
+ paddingRight?: string | number;
30
+ paddingBottom?: string | number;
31
+ paddingLeft?: string | number;
32
+ }
33
+ export interface BorderProps {
34
+ border?: string;
35
+ borderTop?: string;
36
+ borderRight?: string;
37
+ borderBottom?: string;
38
+ borderLeft?: string;
39
+ borderRadius?: string | number;
40
+ borderWidth?: string | number;
41
+ borderColor?: string;
42
+ boxShadow?: string;
43
+ }
44
+ export interface FlexboxProps {
45
+ flex?: string | number;
46
+ alignItems?: string;
47
+ alignSelf?: string;
48
+ justifyContent?: string;
49
+ flexDirection?: string;
50
+ flexWrap?: string;
51
+ whiteSpace?: string;
52
+ }
53
+ export interface GridProps {
54
+ columnGap?: string | number;
55
+ gridGap?: string | number;
56
+ gridTemplateAreas?: string;
57
+ gridTemplateRows?: string;
58
+ gridTemplateColumns?: string;
59
+ gridArea?: string | number;
60
+ gridRow?: string | number;
61
+ gridColumn?: string | number;
62
+ }
63
+ export interface LayoutProps {
64
+ display?: string;
65
+ size?: string | number;
66
+ width?: string | number;
67
+ minWidth?: string | number;
68
+ maxWidth?: string | number;
69
+ height?: string | number;
70
+ minHeight?: string | number;
71
+ maxHeight?: string | number;
72
+ overflow?: CSSProperties['overflow'];
73
+ overflowX?: CSSProperties['overflowX'];
74
+ overflowY?: CSSProperties['overflowY'];
75
+ wordSpacing?: string | number;
76
+ cursor?: CSSProperties['cursor'];
77
+ overflowWrap?: string;
78
+ }
79
+ export interface PositionProps {
80
+ position?: string;
81
+ zIndex?: string | number;
82
+ top?: string | number;
83
+ right?: string | number;
84
+ bottom?: string | number;
85
+ left?: string | number;
86
+ transform?: string;
87
+ filter?: string;
88
+ transformOrigin?: CSSProperties['transformOrigin'];
89
+ }
90
+ export interface TransitionProps {
91
+ transition?: string;
92
+ }
93
+ export interface StyleProps extends ColorProps, TypographyProps, SpacingProps, BorderProps, FlexboxProps, GridProps, LayoutProps, PositionProps, TransitionProps {
94
+ className?: string;
95
+ }
96
+ export declare type PrimitiveComponent<Instance extends keyof JSX.IntrinsicElements | React.ComponentType<any>, Props extends StyleProps = StyleProps> = StyledComponent<Instance, {}, Props>;
@@ -0,0 +1 @@
1
+ export type { PipetteChannels as Channels, PipetteMount as Mount, } from '@opentrons/shared-data';
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { RobotType } from '@opentrons/shared-data';
3
+ export interface SlotMapProps {
4
+ /** Slot(s) to highlight */
5
+ occupiedSlots: string[];
6
+ /** Optional collision warning */
7
+ collisionSlots?: string[];
8
+ /** Optional error styling */
9
+ isError?: boolean;
10
+ robotType?: RobotType;
11
+ }
12
+ export declare function SlotMap(props: SlotMapProps): JSX.Element;
File without changes
@@ -0,0 +1 @@
1
+ export * from './SlotMap';
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import type { StyleProps } from '../primitives';
3
+ export interface CardProps extends StyleProps {
4
+ /** Title for card, all cards should receive a title. */
5
+ title?: React.ReactNode;
6
+ /** Card contents */
7
+ children?: React.ReactNode;
8
+ /** If card can not be used, gray it out and remove pointer events */
9
+ disabled?: boolean;
10
+ /** Additional class names */
11
+ className?: string;
12
+ }
13
+ /**
14
+ * Renders a basic card element with a white background, dropshadow, and zero padding.
15
+ *
16
+ * Titles and other children handle their own styles and layout.
17
+ */
18
+ export declare function Card(props: CardProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ export interface LabeledValueProps {
3
+ /** Label */
4
+ label: React.ReactNode;
5
+ /** Value */
6
+ value: React.ReactNode;
7
+ /** Additional className */
8
+ className?: string;
9
+ /** Additional value className */
10
+ valueClassName?: string;
11
+ }
12
+ export declare function LabeledValue(props: LabeledValueProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ interface TabProps {
3
+ title: string;
4
+ href: string;
5
+ isActive: boolean;
6
+ isDisabled: boolean;
7
+ }
8
+ export interface PageTabProps {
9
+ pages: TabProps[];
10
+ }
11
+ export declare function PageTabs(props: PageTabProps): JSX.Element;
12
+ export {};
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import type { UseHoverTooltipTargetProps } from '../tooltips';
3
+ export interface PillProps {
4
+ /** background color of pill (any CSS color string) */
5
+ color?: string | null | undefined;
6
+ /** text black, instead of default white */
7
+ invertTextColor?: boolean | null | undefined;
8
+ /** additional class name */
9
+ className?: string;
10
+ /** contents of the pill */
11
+ children?: React.ReactNode;
12
+ /** handlers for HoverTooltipComponent */
13
+ hoverTooltipHandlers?: UseHoverTooltipTargetProps | null | undefined;
14
+ }
15
+ /**
16
+ * Colored Pill containing text or other contents
17
+ */
18
+ export declare function Pill(props: PillProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { IconName } from '../icons';
3
+ export interface SplashProps {
4
+ /** optional alternative icon name. Defaults to 'logo'. */
5
+ iconName?: IconName;
6
+ /** additional className for Splash */
7
+ className?: string;
8
+ }
9
+ export declare function Splash(props: SplashProps): JSX.Element;
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import type { ButtonProps } from '../buttons';
3
+ export interface TitleBarProps {
4
+ id?: string;
5
+ title: React.ReactNode;
6
+ subtitle?: React.ReactNode;
7
+ back?: ButtonProps;
8
+ rightNode?: React.ReactNode;
9
+ className?: string;
10
+ onBackClick?: () => unknown;
11
+ backClickDisabled?: boolean;
12
+ backButtonLabel?: string;
13
+ }
14
+ /**
15
+ * @deprecated Use `InterstitialTitleBar` instead
16
+ */
17
+ export declare function TitleBar(props: TitleBarProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ export * from './PageTabs';
2
+ export * from './TitleBar';
3
+ export * from './Card';
4
+ export * from './Splash';
5
+ export * from './LabeledValue';
6
+ export * from './Pill';
@@ -0,0 +1,8 @@
1
+ export declare const BORDER_WIDTH_DEFAULT = "1px";
2
+ export declare const BORDER_RADIUS_DEFAULT = "2px";
3
+ export declare const BORDER_RADIUS_1 = "5px";
4
+ export declare const BORDER_STYLE_NONE = "none";
5
+ export declare const BORDER_STYLE_SOLID = "solid";
6
+ export declare const BORDER_SOLID_LIGHT: string;
7
+ export declare const BORDER_SOLID_MEDIUM: string;
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)";
@@ -0,0 +1,37 @@
1
+ export declare const C_BLACK = "#000000";
2
+ export declare const C_DARK_GRAY = "#4a4a4a";
3
+ export declare const C_MED_DARK_GRAY = "#6c6c6c";
4
+ export declare const C_MED_GRAY = "#9b9b9b";
5
+ export declare const C_SILVER_GRAY = "#e3e3e3";
6
+ export declare const C_MED_LIGHT_GRAY = "#d2d2d2";
7
+ export declare const C_LIGHT_GRAY = "#e6e6e6";
8
+ export declare const C_BRIGHT_GRAY = "#f8f8f8";
9
+ export declare const C_HARBOR_GRAY = "#8a8c8e";
10
+ export declare const C_NEAR_WHITE = "#fafafa";
11
+ export declare const C_WHITE = "#ffffff";
12
+ export declare const C_TRANSPARENT = "transparent";
13
+ export declare const C_DARK_BLACK = "#16212d";
14
+ export declare const C_BLUE = "#006cfa";
15
+ export declare const C_MINT = "#00bfa8";
16
+ export declare const C_AQUAMARINE = "#eefff8";
17
+ export declare const C_POWDER_BLUE = "#f1f8ff";
18
+ export declare const C_SKY_BLUE = "#accfff80";
19
+ export declare const C_BLUE_PRESSED = "#0050b8";
20
+ export declare const COLOR_WARNING = "#e28200";
21
+ export declare const COLOR_WARNING_LIGHT = "#ffd58f";
22
+ export declare const COLOR_WARNING_DARK = "#9e5e00";
23
+ export declare const COLOR_ERROR = "#d12929";
24
+ export declare const COLOR_SUCCESS = "#60b120";
25
+ export declare const C_DISABLED = "#9c9c9c";
26
+ export declare const C_SELECTED_DARK = "#00c3e6";
27
+ export declare const C_BG_SELECTED = "#f0f3ff";
28
+ export declare const C_ERROR_DARK = "#ac0505";
29
+ export declare const C_ERROR_LIGHT = "#ffc0c0";
30
+ export declare const OVERLAY_WHITE_10 = "rgba(255, 255, 255, 0.1)";
31
+ export declare const OVERLAY_WHITE_20 = "rgba(255, 255, 255, 0.2)";
32
+ export declare const OVERLAY_LIGHT_GRAY_50 = "rgba(230, 230, 230, 0.4)";
33
+ export declare const OVERLAY_GRAY_90 = "rgba(127, 127, 127, 0.9)";
34
+ export declare const OVERLAY_BLACK_90 = "rgba(0, 0, 0, 0.9)";
35
+ export declare const OVERLAY_BLACK_80 = "rgba(0, 0, 0, 0.8)";
36
+ export declare const OPACITY_DISABLED = 0.3;
37
+ export declare const C_FONT_DISABLED = "#9c9c9c";
@@ -0,0 +1,28 @@
1
+ export declare const FLEX_NONE = "none";
2
+ export declare const FLEX_AUTO = "auto";
3
+ export declare const FLEX_MIN_CONTENT = "min-content";
4
+ export declare const ALIGN_NORMAL = "normal";
5
+ export declare const ALIGN_START = "start";
6
+ export declare const ALIGN_END = "end";
7
+ export declare const ALIGN_FLEX_START = "flex-start";
8
+ export declare const ALIGN_FLEX_END = "flex-end";
9
+ export declare const ALIGN_CENTER = "center";
10
+ export declare const ALIGN_BASELINE = "baseline";
11
+ export declare const ALIGN_STRETCH = "stretch";
12
+ export declare const JUSTIFY_NORMAL = "normal";
13
+ export declare const JUSTIFY_START = "start";
14
+ export declare const JUSTIFY_END = "end";
15
+ export declare const JUSTIFY_FLEX_START = "flex-start";
16
+ export declare const JUSTIFY_FLEX_END = "flex-end";
17
+ export declare const JUSTIFY_CENTER = "center";
18
+ export declare const JUSTIFY_SPACE_BETWEEN = "space-between";
19
+ export declare const JUSTIFY_SPACE_AROUND = "space-around";
20
+ export declare const JUSTIFY_SPACE_EVENLY = "space-evenly";
21
+ export declare const JUSTIFY_STRETCH = "stretch";
22
+ export declare const DIRECTION_ROW = "row";
23
+ export declare const DIRECTION_ROW_REVERSE = "row-reverse";
24
+ export declare const DIRECTION_COLUMN = "column";
25
+ export declare const DIRECTION_COLUMN_REVERSE = "column-reverse";
26
+ export declare const WRAP = "wrap";
27
+ export declare const NO_WRAP = "nowrap";
28
+ export declare const WRAP_REVERSE = "wrap-reverse";
@@ -0,0 +1,7 @@
1
+ export * from './borders';
2
+ export * from './colors';
3
+ export * from './flexbox';
4
+ export * from './layout';
5
+ export * from './position';
6
+ export * from './spacing';
7
+ export * from './typography';
@@ -0,0 +1,20 @@
1
+ export declare const DISPLAY_NONE = "none";
2
+ export declare const DISPLAY_INLINE = "inline";
3
+ export declare const DISPLAY_BLOCK = "block";
4
+ export declare const DISPLAY_INLINE_BLOCK = "inline-block";
5
+ export declare const DISPLAY_FLEX = "flex";
6
+ export declare const DISPLAY_TABLE = "table";
7
+ export declare const DISPLAY_TABLE_ROW = "table-row";
8
+ export declare const DISPLAY_TABLE_CELL = "table-cell";
9
+ export declare const SIZE_AUTO = "auto";
10
+ export declare const SIZE_1 = "1rem";
11
+ export declare const SIZE_2 = "2rem";
12
+ export declare const SIZE_3 = "4rem";
13
+ export declare const SIZE_4 = "8rem";
14
+ export declare const SIZE_5 = "16rem";
15
+ export declare const SIZE_6 = "32rem";
16
+ export declare const OVERFLOW_VISIBLE = "visible";
17
+ export declare const OVERFLOW_HIDDEN = "hidden";
18
+ export declare const OVERFLOW_CLIP = "clip";
19
+ export declare const OVERFLOW_SCROLL = "scroll";
20
+ export declare const OVERFLOW_AUTO = "auto";
@@ -0,0 +1,5 @@
1
+ export declare const POSITION_STATIC: 'static';
2
+ export declare const POSITION_RELATIVE: 'relative';
3
+ export declare const POSITION_ABSOLUTE: 'absolute';
4
+ export declare const POSITION_FIXED: 'fixed';
5
+ export declare const POSITION_STICKY: 'sticky';
@@ -0,0 +1,9 @@
1
+ export declare const SPACING_AUTO = "auto";
2
+ export declare const SPACING_1 = "0.25rem";
3
+ export declare const SPACING_2 = "0.5rem";
4
+ export declare const SPACING_3 = "1rem";
5
+ export declare const SPACING_4 = "2rem";
6
+ export declare const SPACING_5 = "4rem";
7
+ export declare const SPACING_6 = "8rem";
8
+ export declare const SPACING_7 = "16rem";
9
+ export declare const SPACING_8 = "32rem";
@@ -0,0 +1,36 @@
1
+ import type { FlattenSimpleInterpolation } from 'styled-components';
2
+ export declare const FONT_SIZE_HUGE = "3rem";
3
+ export declare const FONT_SIZE_BIG = "1.5rem";
4
+ export declare const FONT_SIZE_HEADER = "1.125rem";
5
+ export declare const FONT_SIZE_DEFAULT = "1rem";
6
+ export declare const FONT_SIZE_BODY_2 = "0.875rem";
7
+ export declare const FONT_SIZE_BODY_1 = "0.75rem";
8
+ export declare const FONT_SIZE_CAPTION = "0.625rem";
9
+ export declare const FONT_SIZE_TINY = "0.325rem";
10
+ export declare const FONT_SIZE_MICRO = "0.2rem";
11
+ export declare const FONT_SIZE_INHERIT = "inherit";
12
+ export declare const LINE_HEIGHT_SOLID = 1;
13
+ export declare const LINE_HEIGHT_TITLE = 1.25;
14
+ export declare const LINE_HEIGHT_COPY = 1.5;
15
+ export declare const FONT_WEIGHT_LIGHT = 300;
16
+ export declare const FONT_WEIGHT_REGULAR = 400;
17
+ export declare const FONT_WEIGHT_SEMIBOLD = 600;
18
+ export declare const FONT_WEIGHT_BOLD = 800;
19
+ export declare const FONT_STYLE_NORMAL = "normal";
20
+ export declare const FONT_STYLE_ITALIC = "italic";
21
+ export declare const TEXT_ALIGN_LEFT = "left";
22
+ export declare const TEXT_ALIGN_CENTER = "center";
23
+ export declare const TEXT_ALIGN_RIGHT = "right";
24
+ export declare const TEXT_ALIGN_JUSTIFY = "justify";
25
+ export declare const TEXT_TRANSFORM_NONE = "none";
26
+ export declare const TEXT_TRANSFORM_CAPITALIZE = "capitalize";
27
+ export declare const TEXT_TRANSFORM_UPPERCASE = "uppercase";
28
+ export declare const TEXT_TRANSFORM_LOWERCASE = "lowercase";
29
+ export declare const TEXT_DECORATION_UNDERLINE = "underline";
30
+ export declare const FONT_HEADER_DARK: FlattenSimpleInterpolation;
31
+ export declare const FONT_HEADER_THIN: FlattenSimpleInterpolation;
32
+ export declare const FONT_BODY_1_DARK: FlattenSimpleInterpolation;
33
+ export declare const FONT_BODY_1_LIGHT: FlattenSimpleInterpolation;
34
+ export declare const FONT_BODY_2_DARK: FlattenSimpleInterpolation;
35
+ export declare const FONT_BODY_1_DARK_SEMIBOLD: FlattenSimpleInterpolation;
36
+ export declare const FONT_HUGE_DARK_SEMIBOLD: FlattenSimpleInterpolation;
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import type { IconName } from '../icons';
3
+ export interface NavTabProps {
4
+ /** optional click event for nav button */
5
+ onClick?: React.MouseEventHandler;
6
+ /** optional url for nav button route */
7
+ url?: string;
8
+ /** position a single button on the bottom of the page */
9
+ isBottom?: boolean;
10
+ /** classes to apply */
11
+ className?: string;
12
+ /** id */
13
+ id?: string;
14
+ /** disabled attribute (setting disabled removes onClick) */
15
+ disabled?: boolean;
16
+ /** optional title to display below the icon */
17
+ title?: string;
18
+ /** Icon name for button's icon */
19
+ iconName: IconName;
20
+ /** Display a notification dot */
21
+ notification?: boolean;
22
+ /** selected styling (can also use react-router & `activeClassName`) */
23
+ selected?: boolean;
24
+ }
25
+ export declare function NavTab(props: NavTabProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import type { IconName } from '../icons';
3
+ export interface OutsideLinkTabProps {
4
+ /** optional click event for nav button */
5
+ onClick?: React.MouseEventHandler;
6
+ /** link to outside URL */
7
+ to: string;
8
+ /** position a single button on the bottom of the page */
9
+ isBottom?: boolean;
10
+ /** classes to apply */
11
+ className?: string;
12
+ /** disabled attribute (setting disabled removes onClick) */
13
+ disabled?: boolean;
14
+ /** optional title to display below the icon */
15
+ title?: string;
16
+ /** Icon name for button's icon */
17
+ iconName: IconName;
18
+ /** Display a notification dot */
19
+ notification?: boolean;
20
+ /** selected styling (can also use react-router & `activeClassName`) */
21
+ selected?: boolean;
22
+ }
23
+ /** Very much like NavTab, but used for opening external links in a new tab/window */
24
+ export declare function OutsideLinkTab(props: OutsideLinkTabProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface TabbedNavBarProps {
3
+ className?: string;
4
+ topChildren?: React.ReactNode;
5
+ bottomChildren?: React.ReactNode;
6
+ }
7
+ export declare function TabbedNavBar(props: TabbedNavBarProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './TabbedNavBar';
2
+ export * from './NavTab';
3
+ export * from './OutsideLinkTab';
@@ -0,0 +1,2 @@
1
+ export * from './renderWithProviders';
2
+ export * from './matchers';
@@ -0,0 +1,6 @@
1
+ import type { Matcher } from '@testing-library/react';
2
+ export declare const componentPropsMatcher: (matcher: unknown) => any;
3
+ export declare const partialComponentPropsMatcher: (argsToMatch: unknown) => any;
4
+ export declare const argAtIndex: (index: number, matcher: unknown) => any;
5
+ export declare const anyProps: () => any;
6
+ export declare const nestedTextMatcher: (textMatch: string | RegExp) => Matcher;