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

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 (353) 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/Checkbox/__tests__/Checkbox.test.d.ts +1 -0
  6. package/lib/atoms/Checkbox/index.d.ts +24 -0
  7. package/lib/atoms/CheckboxField/__tests__/CheckboxField.test.d.ts +1 -0
  8. package/lib/atoms/CheckboxField/index.d.ts +20 -0
  9. package/lib/atoms/Chip/__tests__/Chip.test.d.ts +1 -0
  10. package/lib/atoms/Chip/index.d.ts +20 -0
  11. package/lib/atoms/Divider/index.d.ts +5 -0
  12. package/lib/atoms/InputField/__tests__/InputField.test.d.ts +1 -0
  13. package/lib/atoms/InputField/index.d.ts +68 -0
  14. package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordion.d.ts +10 -0
  15. package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.d.ts +7 -0
  16. package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +14 -0
  17. package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +3 -0
  18. package/lib/atoms/ListButton/__tests__/ListButton.test.d.ts +1 -0
  19. package/lib/atoms/ListButton/__tests__/ListButtonAccordion.test.d.ts +1 -0
  20. package/lib/atoms/ListButton/__tests__/ListButtonRadioButton.test.d.ts +1 -0
  21. package/lib/atoms/ListButton/index.d.ts +11 -0
  22. package/lib/atoms/ListItem/ListItemChildren/ListItemCustomize.d.ts +15 -0
  23. package/lib/atoms/ListItem/ListItemChildren/ListItemDescriptor.d.ts +7 -0
  24. package/lib/atoms/ListItem/ListItemChildren/index.d.ts +2 -0
  25. package/lib/atoms/ListItem/__tests__/ListItem.test.d.ts +1 -0
  26. package/lib/atoms/ListItem/index.d.ts +14 -0
  27. package/lib/atoms/MenuList/MenuItem.d.ts +7 -0
  28. package/lib/atoms/MenuList/OverflowBtn.d.ts +7 -0
  29. package/lib/atoms/MenuList/__tests__/MenuItem.test.d.ts +1 -0
  30. package/lib/atoms/MenuList/__tests__/MenuList.test.d.ts +1 -0
  31. package/lib/atoms/MenuList/__tests__/OverflowBtn.test.d.ts +1 -0
  32. package/lib/atoms/MenuList/index.d.ts +8 -0
  33. package/lib/atoms/Snackbar/__tests__/Snackbar.test.d.ts +1 -0
  34. package/lib/atoms/Snackbar/index.d.ts +7 -0
  35. package/lib/atoms/StepMeter/index.d.ts +7 -0
  36. package/lib/atoms/StyledText/LegacyStyledText.d.ts +6 -0
  37. package/lib/atoms/StyledText/StyledText.d.ts +154 -0
  38. package/lib/atoms/StyledText/index.d.ts +2 -0
  39. package/lib/atoms/Tag/__tests__/Tag.test.d.ts +1 -0
  40. package/lib/atoms/Tag/index.d.ts +13 -0
  41. package/lib/atoms/Toast/__tests__/ODDToast.test.d.ts +1 -0
  42. package/lib/atoms/Toast/__tests__/Toast.test.d.ts +1 -0
  43. package/lib/atoms/Toast/index.d.ts +25 -0
  44. package/lib/atoms/ToggleGroup/__tests__/ToggleGroup.test.d.ts +1 -0
  45. package/lib/atoms/ToggleGroup/index.d.ts +9 -0
  46. package/lib/atoms/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
  47. package/lib/atoms/Tooltip/index.d.ts +11 -0
  48. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +1 -0
  49. package/lib/atoms/buttons/AltPrimaryButton.d.ts +1 -0
  50. package/lib/atoms/buttons/EmptySelectorButton.d.ts +10 -0
  51. package/lib/atoms/buttons/LargeButton.d.ts +17 -0
  52. package/lib/atoms/buttons/PrimaryButton.d.ts +1 -0
  53. package/lib/atoms/buttons/RadioButton.d.ts +21 -0
  54. package/lib/atoms/buttons/SecondaryButton.d.ts +7 -0
  55. package/lib/atoms/buttons/__tests__/AlertPrimaryButton.test.d.ts +1 -0
  56. package/lib/atoms/buttons/__tests__/AltPrimaryButton.test.d.ts +1 -0
  57. package/lib/atoms/buttons/__tests__/EmptySelectorButton.test.d.ts +1 -0
  58. package/lib/atoms/buttons/__tests__/LargeButton.test.d.ts +1 -0
  59. package/lib/atoms/buttons/__tests__/PrimaryButton.test.d.ts +1 -0
  60. package/lib/atoms/buttons/__tests__/RadioButton.test.d.ts +1 -0
  61. package/lib/atoms/buttons/__tests__/SecondaryButton.test.d.ts +1 -0
  62. package/lib/atoms/buttons/index.d.ts +6 -0
  63. package/lib/atoms/index.d.ts +20 -0
  64. package/lib/barrel.d.ts +3 -0
  65. package/lib/buttons/Button.d.ts +50 -0
  66. package/lib/buttons/DeprecatedPrimaryButton.d.ts +8 -0
  67. package/lib/buttons/FlatButton.d.ts +5 -0
  68. package/lib/buttons/IconButton.d.ts +14 -0
  69. package/lib/buttons/OutlineButton.d.ts +8 -0
  70. package/lib/buttons/index.d.ts +5 -0
  71. package/lib/controls/ControlInfo.d.ts +6 -0
  72. package/lib/controls/LabeledButton.d.ts +8 -0
  73. package/lib/controls/LabeledCheckbox.d.ts +10 -0
  74. package/lib/controls/LabeledControl.d.ts +7 -0
  75. package/lib/controls/LabeledRadioGroup.d.ts +8 -0
  76. package/lib/controls/LabeledSelect.d.ts +9 -0
  77. package/lib/controls/LabeledToggle.d.ts +11 -0
  78. package/lib/controls/StackedLabeledControl.d.ts +7 -0
  79. package/lib/controls/ToggleButton.d.ts +5 -0
  80. package/lib/controls/index.d.ts +6 -0
  81. package/lib/forms/DeprecatedCheckboxField.d.ts +33 -0
  82. package/lib/forms/DropdownField.d.ts +38 -0
  83. package/lib/forms/FormGroup.d.ts +19 -0
  84. package/lib/forms/LegacyInputField.d.ts +51 -0
  85. package/lib/forms/RadioGroup.d.ts +29 -0
  86. package/lib/forms/Select.d.ts +26 -0
  87. package/lib/forms/SelectField.d.ts +33 -0
  88. package/lib/forms/ToggleField.d.ts +22 -0
  89. package/lib/forms/__tests__/DeprecatedCheckboxField.test.d.ts +1 -0
  90. package/lib/forms/__tests__/DropdownField.test.d.ts +1 -0
  91. package/lib/forms/__tests__/InputField.test.d.ts +1 -0
  92. package/lib/forms/__tests__/Select.test.d.ts +1 -0
  93. package/lib/forms/__tests__/SelectField.test.d.ts +1 -0
  94. package/lib/forms/__tests__/ToggleField.test.d.ts +1 -0
  95. package/lib/forms/index.d.ts +8 -0
  96. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +49 -0
  97. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +12 -0
  98. package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +2 -0
  99. package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +2 -0
  100. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +13 -0
  101. package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +20 -0
  102. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +14 -0
  103. package/lib/hardware-sim/BaseDeck/__fixtures__/index.d.ts +4 -0
  104. package/lib/hardware-sim/BaseDeck/index.d.ts +5 -0
  105. package/lib/hardware-sim/Deck/DeckFromLayers.d.ts +10 -0
  106. package/lib/hardware-sim/Deck/FlexTrash.d.ts +14 -0
  107. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +16 -0
  108. package/lib/hardware-sim/Deck/OT2Layers.d.ts +10 -0
  109. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +14 -0
  110. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +12 -0
  111. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +8 -0
  112. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +21 -0
  113. package/lib/hardware-sim/Deck/SlotLabels.d.ts +12 -0
  114. package/lib/hardware-sim/Deck/__mocks__/getDeckDefinitions.d.ts +1 -0
  115. package/lib/hardware-sim/Deck/constants.d.ts +1 -0
  116. package/lib/hardware-sim/Deck/index.d.ts +8 -0
  117. package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +10 -0
  118. package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +8 -0
  119. package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +10 -0
  120. package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +11 -0
  121. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +10 -0
  122. package/lib/hardware-sim/DeckConfigurator/StaticFixture.d.ts +12 -0
  123. package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +10 -0
  124. package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +10 -0
  125. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +10 -0
  126. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +11 -0
  127. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +20 -0
  128. package/lib/hardware-sim/DeckConfigurator/index.d.ts +20 -0
  129. package/lib/hardware-sim/DeckSlotLocation/index.d.ts +15 -0
  130. package/lib/hardware-sim/Labware/Labware.d.ts +39 -0
  131. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.d.ts +1 -0
  132. package/lib/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.d.ts +1 -0
  133. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.d.ts +1 -0
  134. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAutoclavableDeckRiser.d.ts +1 -0
  135. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.d.ts +1 -0
  136. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsToughPCRAutoSealingLid.d.ts +1 -0
  137. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.d.ts +1 -0
  138. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +27 -0
  139. package/lib/hardware-sim/Labware/LabwareRender.d.ts +46 -0
  140. package/lib/hardware-sim/Labware/LabwareStackRender.d.ts +20 -0
  141. package/lib/hardware-sim/Labware/__tests__/Labware.test.d.ts +1 -0
  142. package/lib/hardware-sim/Labware/__tests__/LabwareRender.test.d.ts +1 -0
  143. package/lib/hardware-sim/Labware/index.d.ts +5 -0
  144. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +11 -0
  145. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +21 -0
  146. package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +15 -0
  147. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +25 -0
  148. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +9 -0
  149. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +19 -0
  150. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +20 -0
  151. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +12 -0
  152. package/lib/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.d.ts +1 -0
  153. package/lib/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.d.ts +1 -0
  154. package/lib/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.d.ts +1 -0
  155. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +8 -0
  156. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +12 -0
  157. package/lib/hardware-sim/Module/HeaterShaker.d.ts +4 -0
  158. package/lib/hardware-sim/Module/MagneticBlock.d.ts +1 -0
  159. package/lib/hardware-sim/Module/MagneticModule.d.ts +1 -0
  160. package/lib/hardware-sim/Module/ModuleTag.d.ts +9 -0
  161. package/lib/hardware-sim/Module/PlateReader.d.ts +1 -0
  162. package/lib/hardware-sim/Module/Temperature.d.ts +4 -0
  163. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.d.ts +6 -0
  164. package/lib/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.d.ts +6 -0
  165. package/lib/hardware-sim/Module/Thermocycler/index.d.ts +7 -0
  166. package/lib/hardware-sim/Module/index.d.ts +18 -0
  167. package/lib/hardware-sim/Pipette/EightEmanatingNozzles.d.ts +4 -0
  168. package/lib/hardware-sim/Pipette/EmanatingNozzle.d.ts +4 -0
  169. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +8 -0
  170. package/lib/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.d.ts +1 -0
  171. package/lib/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.d.ts +1 -0
  172. package/lib/hardware-sim/Pipette/__tests__/PipetteRender.test.d.ts +1 -0
  173. package/lib/hardware-sim/Pipette/constants.d.ts +7 -0
  174. package/lib/hardware-sim/Pipette/index.d.ts +1 -0
  175. package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +6 -0
  176. package/lib/hardware-sim/ProtocolDeck/index.d.ts +14 -0
  177. package/lib/hardware-sim/ProtocolDeck/types.d.ts +8 -0
  178. package/lib/hardware-sim/ProtocolDeck/utils/__tests__/getLabwareInforByLiquidId.test.d.ts +1 -0
  179. package/lib/hardware-sim/ProtocolDeck/utils/getInitiallyLoadedLabwareByAdapter.d.ts +5 -0
  180. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInSlots.d.ts +12 -0
  181. package/lib/hardware-sim/ProtocolDeck/utils/getLabwareInfoByLiquidId.d.ts +3 -0
  182. package/lib/hardware-sim/ProtocolDeck/utils/getModulesInSlots.d.ts +10 -0
  183. package/lib/hardware-sim/ProtocolDeck/utils/getStandardDeckViewLayerBlockList.d.ts +2 -0
  184. package/lib/hardware-sim/ProtocolDeck/utils/getWellFillFromLabwareId.d.ts +4 -0
  185. package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +3 -0
  186. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +7 -0
  187. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +16 -0
  188. package/lib/hardware-sim/RobotCoordinateSpace/index.d.ts +2 -0
  189. package/lib/hardware-sim/index.d.ts +11 -0
  190. package/lib/hardware-sim/utils.d.ts +3 -0
  191. package/lib/helix-design-system/borders.d.ts +26 -0
  192. package/lib/helix-design-system/colors.d.ts +86 -0
  193. package/lib/helix-design-system/index.d.ts +4 -0
  194. package/lib/helix-design-system/product/index.d.ts +1 -0
  195. package/lib/helix-design-system/product/typography.d.ts +79 -0
  196. package/lib/helix-design-system/style.d.ts +1 -0
  197. package/lib/hooks/__tests__/useConditionalConfirm.test.d.ts +1 -0
  198. package/lib/hooks/__tests__/useDrag.test.d.ts +1 -0
  199. package/lib/hooks/__tests__/useIdle.test.d.ts +1 -0
  200. package/lib/hooks/__tests__/useInterval.test.d.ts +1 -0
  201. package/lib/hooks/__tests__/useLongPress.test.d.ts +1 -0
  202. package/lib/hooks/__tests__/useMountEffect.test.d.ts +1 -0
  203. package/lib/hooks/__tests__/usePrevious.test.d.ts +1 -0
  204. package/lib/hooks/__tests__/useScrolling.test.d.ts +1 -0
  205. package/lib/hooks/__tests__/useSwipe.test.d.ts +1 -0
  206. package/lib/hooks/__tests__/useTimeout.test.d.ts +1 -0
  207. package/lib/hooks/__tests__/useToggle.test.d.ts +1 -0
  208. package/lib/hooks/index.d.ts +13 -0
  209. package/lib/hooks/useConditionalConfirm.d.ts +41 -0
  210. package/lib/hooks/useDrag.d.ts +22 -0
  211. package/lib/hooks/useIdle.d.ts +11 -0
  212. package/lib/hooks/useInterval.d.ts +11 -0
  213. package/lib/hooks/useLongPress.d.ts +19 -0
  214. package/lib/hooks/useMenuHandleClickOutside.d.ts +9 -0
  215. package/lib/hooks/useMountEffect.d.ts +8 -0
  216. package/lib/hooks/usePrevious.d.ts +9 -0
  217. package/lib/hooks/useScrolling.d.ts +1 -0
  218. package/lib/hooks/useSelectDeckLocation/index.d.ts +18 -0
  219. package/lib/hooks/useSwipe.d.ts +12 -0
  220. package/lib/hooks/useTimeout.d.ts +9 -0
  221. package/lib/hooks/useToggle.d.ts +22 -0
  222. package/lib/icons/Icon.d.ts +34 -0
  223. package/lib/icons/ModuleIcon.d.ts +11 -0
  224. package/lib/icons/NotificationIcon.d.ts +12 -0
  225. package/lib/icons/icon-data.d.ts +4 -0
  226. package/lib/icons/index.d.ts +4 -0
  227. package/lib/images/index.d.ts +1 -0
  228. package/lib/images/labware/index.d.ts +1 -0
  229. package/lib/images/labware/measurement-guide/index.d.ts +13 -0
  230. package/lib/index.d.ts +26 -0
  231. package/lib/{index.mjs → index.js} +8783 -6217
  232. package/lib/instrument/InstrumentDiagram.d.ts +11 -0
  233. package/lib/instrument/InstrumentGroup.d.ts +11 -0
  234. package/lib/instrument/InstrumentInfo.d.ts +18 -0
  235. package/lib/instrument/PipetteSelect.d.ts +20 -0
  236. package/lib/instrument/__tests__/InstrumentInfo.test.d.ts +1 -0
  237. package/lib/instrument/__tests__/PipetteSelect.test.d.ts +1 -0
  238. package/lib/instrument/index.d.ts +4 -0
  239. package/lib/interaction-enhancers/ClickOutside.d.ts +18 -0
  240. package/lib/interaction-enhancers/HandleKeypress.d.ts +27 -0
  241. package/lib/interaction-enhancers/__tests__/useHover.test.d.ts +1 -0
  242. package/lib/interaction-enhancers/index.d.ts +4 -0
  243. package/lib/interaction-enhancers/useHover.d.ts +33 -0
  244. package/lib/interaction-enhancers/useOnClickOutside.d.ts +5 -0
  245. package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +7 -0
  246. package/lib/legacy-hardware-sim/ModuleItem.d.ts +17 -0
  247. package/lib/legacy-hardware-sim/index.d.ts +2 -0
  248. package/lib/lists/SidePanelGroup.d.ts +18 -0
  249. package/lib/lists/TitledList.d.ts +44 -0
  250. package/lib/lists/index.d.ts +2 -0
  251. package/lib/modals/AlertModal.d.ts +28 -0
  252. package/lib/modals/ContinueModal.d.ts +10 -0
  253. package/lib/modals/LegacyModal.d.ts +24 -0
  254. package/lib/modals/Modal.d.ts +24 -0
  255. package/lib/modals/ModalHeader.d.ts +13 -0
  256. package/lib/modals/ModalShell.d.ts +34 -0
  257. package/lib/modals/Overlay.d.ts +9 -0
  258. package/lib/modals/SpinnerModal.d.ts +13 -0
  259. package/lib/modals/SpinnerModalPage.d.ts +12 -0
  260. package/lib/modals/__tests__/Modal.test.d.ts +1 -0
  261. package/lib/modals/__tests__/ModalHeader.test.d.ts +1 -0
  262. package/lib/modals/__tests__/ModalShell.test.d.ts +1 -0
  263. package/lib/modals/index.d.ts +9 -0
  264. package/lib/molecules/Banner/__tests__/Banner.test.d.ts +1 -0
  265. package/lib/molecules/Banner/index.d.ts +23 -0
  266. package/lib/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.d.ts +1 -0
  267. package/lib/molecules/DeckInfoLabel/index.d.ts +19 -0
  268. package/lib/molecules/DeckLabel/__tests__/DeckLabel.test.d.ts +1 -0
  269. package/lib/molecules/DeckLabel/index.d.ts +10 -0
  270. package/lib/molecules/DropdownMenu/__tests__/DropdownMenu.test.d.ts +1 -0
  271. package/lib/molecules/DropdownMenu/index.d.ts +41 -0
  272. package/lib/molecules/InfoScreen/__tests__/InfoScreen.test.d.ts +1 -0
  273. package/lib/molecules/InfoScreen/index.d.ts +6 -0
  274. package/lib/molecules/LiquidIcon/__tests__/LiquidIcon.test.d.ts +1 -0
  275. package/lib/molecules/LiquidIcon/index.d.ts +9 -0
  276. package/lib/molecules/ParametersTable/__tests__/ParametersTable.test.d.ts +1 -0
  277. package/lib/molecules/ParametersTable/index.d.ts +10 -0
  278. package/lib/molecules/Tabs/__tests__/Tabs.test.d.ts +1 -0
  279. package/lib/molecules/Tabs/index.d.ts +10 -0
  280. package/lib/molecules/index.d.ts +8 -0
  281. package/lib/nav/SidePanel.d.ts +6 -0
  282. package/lib/nav/index.d.ts +1 -0
  283. package/lib/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.d.ts +1 -0
  284. package/lib/organisms/DeckLabelSet/index.d.ts +11 -0
  285. package/lib/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.d.ts +1 -0
  286. package/lib/organisms/EndUserAgreementFooter/index.d.ts +1 -0
  287. package/lib/organisms/Toolbox/__tests__/Toolbox.test.d.ts +1 -0
  288. package/lib/organisms/Toolbox/index.d.ts +20 -0
  289. package/lib/organisms/index.d.ts +3 -0
  290. package/lib/primitives/Box.d.ts +7 -0
  291. package/lib/primitives/Btn.d.ts +59 -0
  292. package/lib/primitives/Flex.d.ts +7 -0
  293. package/lib/primitives/ForeignObject.d.ts +23 -0
  294. package/lib/primitives/Link.d.ts +11 -0
  295. package/lib/primitives/Svg.d.ts +23 -0
  296. package/lib/primitives/Text.d.ts +7 -0
  297. package/lib/primitives/__tests__/Box.test.d.ts +1 -0
  298. package/lib/primitives/__tests__/Btn.test.d.ts +1 -0
  299. package/lib/primitives/__tests__/Flex.test.d.ts +1 -0
  300. package/lib/primitives/__tests__/Link.test.d.ts +1 -0
  301. package/lib/primitives/__tests__/Svg.test.d.ts +1 -0
  302. package/lib/primitives/__tests__/Text.test.d.ts +1 -0
  303. package/lib/primitives/__tests__/primitives.test.d.ts +1 -0
  304. package/lib/primitives/__tests__/style-props.test.d.ts +1 -0
  305. package/lib/primitives/index.d.ts +9 -0
  306. package/lib/primitives/style-props.d.ts +4 -0
  307. package/lib/primitives/types.d.ts +95 -0
  308. package/lib/robot-types.d.ts +1 -0
  309. package/lib/slotmap/OT2SlotMap.d.ts +9 -0
  310. package/lib/slotmap/__tests__/OT2SlotMap.test.d.ts +1 -0
  311. package/lib/slotmap/index.d.ts +1 -0
  312. package/lib/structure/Card.d.ts +18 -0
  313. package/lib/structure/LabeledValue.d.ts +12 -0
  314. package/lib/structure/Pill.d.ts +18 -0
  315. package/lib/structure/Splash.d.ts +8 -0
  316. package/lib/structure/TitleBar.d.ts +17 -0
  317. package/lib/structure/index.d.ts +5 -0
  318. package/lib/style.css +3786 -0
  319. package/lib/styles/borders.d.ts +8 -0
  320. package/lib/styles/colors.d.ts +37 -0
  321. package/lib/styles/cursor.d.ts +10 -0
  322. package/lib/styles/flexbox.d.ts +34 -0
  323. package/lib/styles/index.d.ts +8 -0
  324. package/lib/styles/layout.d.ts +24 -0
  325. package/lib/styles/position.d.ts +5 -0
  326. package/lib/styles/spacing.d.ts +9 -0
  327. package/lib/styles/typography.d.ts +36 -0
  328. package/lib/testing/utils/index.d.ts +2 -0
  329. package/lib/testing/utils/matchers.d.ts +3 -0
  330. package/lib/testing/utils/renderWithProviders.d.ts +9 -0
  331. package/lib/tooltips/DeprecatedTooltip.d.ts +37 -0
  332. package/lib/tooltips/HoverTooltip.d.ts +36 -0
  333. package/lib/tooltips/LegacyTooltip.d.ts +35 -0
  334. package/lib/tooltips/__tests__/Tooltip.test.d.ts +1 -0
  335. package/lib/tooltips/__tests__/useHoverTooltip.test.d.ts +1 -0
  336. package/lib/tooltips/__tests__/usePopper.test.d.ts +1 -0
  337. package/lib/tooltips/__tests__/useTooltip.test.d.ts +1 -0
  338. package/lib/tooltips/constants.d.ts +17 -0
  339. package/lib/tooltips/index.d.ts +8 -0
  340. package/lib/tooltips/styles.d.ts +12 -0
  341. package/lib/tooltips/types.d.ts +52 -0
  342. package/lib/tooltips/useHoverTooltip.d.ts +24 -0
  343. package/lib/tooltips/usePopper.d.ts +2 -0
  344. package/lib/tooltips/useTooltip.d.ts +31 -0
  345. package/lib/ui-style-constants/index.d.ts +4 -0
  346. package/lib/ui-style-constants/responsiveness.d.ts +3 -0
  347. package/lib/ui-style-constants/spacing.d.ts +18 -0
  348. package/lib/ui-style-constants/typography.d.ts +71 -0
  349. package/lib/ui-style-constants/viewport.d.ts +15 -0
  350. package/lib/utils.d.ts +15 -0
  351. package/package.json +5 -7
  352. package/tsconfig.json +5 -2
  353. package/{vite.config.ts → vite.config.mts} +19 -4
@@ -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 = "1px solid #e6e6e6";
7
+ export declare const BORDER_SOLID_MEDIUM = "1px solid #9b9b9b";
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,10 @@
1
+ export declare const CURSOR_AUTO = "auto";
2
+ export declare const CURSOR_CROSSHAIR = "crosshair";
3
+ export declare const CURSOR_DEFAULT = "default";
4
+ export declare const CURSOR_GRAB = "grab";
5
+ export declare const CURSOR_GRABBING = "grabbing";
6
+ export declare const CURSOR_HELP = "help";
7
+ export declare const CURSOR_NOT_ALLOWED = "not-allowed";
8
+ export declare const CURSOR_POINTER = "pointer";
9
+ export declare const CURSOR_ZOOM_IN = "zoom-in";
10
+ export declare const CURSOR_WAIT = "wait";
@@ -0,0 +1,34 @@
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 FLEX_MAX_CONTENT = "max-content";
5
+ export declare const ALIGN_NORMAL = "normal";
6
+ export declare const ALIGN_START = "start";
7
+ export declare const ALIGN_END = "end";
8
+ export declare const ALIGN_FLEX_START = "flex-start";
9
+ export declare const ALIGN_FLEX_END = "flex-end";
10
+ export declare const ALIGN_CENTER = "center";
11
+ export declare const ALIGN_BASELINE = "baseline";
12
+ export declare const ALIGN_STRETCH = "stretch";
13
+ export declare const JUSTIFY_NORMAL = "normal";
14
+ export declare const JUSTIFY_START = "start";
15
+ export declare const JUSTIFY_END = "end";
16
+ export declare const JUSTIFY_FLEX_START = "flex-start";
17
+ export declare const JUSTIFY_FLEX_END = "flex-end";
18
+ export declare const JUSTIFY_CENTER = "center";
19
+ export declare const JUSTIFY_SPACE_BETWEEN = "space-between";
20
+ export declare const JUSTIFY_SPACE_AROUND = "space-around";
21
+ export declare const JUSTIFY_SPACE_EVENLY = "space-evenly";
22
+ export declare const JUSTIFY_STRETCH = "stretch";
23
+ export declare const DIRECTION_ROW = "row";
24
+ export declare const DIRECTION_ROW_REVERSE = "row-reverse";
25
+ export declare const DIRECTION_COLUMN = "column";
26
+ export declare const DIRECTION_COLUMN_REVERSE = "column-reverse";
27
+ export declare const WRAP = "wrap";
28
+ export declare const NO_WRAP = "nowrap";
29
+ export declare const WRAP_REVERSE = "wrap-reverse";
30
+ export declare const WHITE_SPACE_NORMAL = "normal";
31
+ export declare const WHITE_SPACE_PRE = "pre";
32
+ export declare const WHITE_SPACE_PRE_WRAP = "pre-wrap";
33
+ export declare const WHITE_SPACE_PRE_LINE = "pre-line";
34
+ export declare const WHITE_SPACE_BREAK_SPACES = "break-spaces";
@@ -0,0 +1,8 @@
1
+ export * from './borders';
2
+ export * from './colors';
3
+ export * from './cursor';
4
+ export * from './flexbox';
5
+ export * from './layout';
6
+ export * from './position';
7
+ export * from './spacing';
8
+ export * from './typography';
@@ -0,0 +1,24 @@
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 DISPLAY_GRID = "grid";
10
+ export declare const SIZE_AUTO = "auto";
11
+ export declare const SIZE_1 = "1rem";
12
+ export declare const SIZE_2 = "2rem";
13
+ export declare const SIZE_3 = "4rem";
14
+ export declare const SIZE_4 = "8rem";
15
+ export declare const SIZE_5 = "16rem";
16
+ export declare const SIZE_6 = "32rem";
17
+ export declare const OVERFLOW_VISIBLE = "visible";
18
+ export declare const OVERFLOW_HIDDEN = "hidden";
19
+ export declare const OVERFLOW_CLIP = "clip";
20
+ export declare const OVERFLOW_SCROLL = "scroll";
21
+ export declare const OVERFLOW_AUTO = "auto";
22
+ export declare const OVERFLOW_WRAP_ANYWHERE = "anywhere";
23
+ export declare const OVERFLOW_WRAP_BREAK_WORD = "break-word";
24
+ export declare const OVERFLOW_WRAP_NORMAL = "normal";
@@ -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,2 @@
1
+ export * from './renderWithProviders';
2
+ export * from './matchers';
@@ -0,0 +1,3 @@
1
+ import type { Matcher } from '@testing-library/react';
2
+ export declare const partialComponentPropsMatcher: (argsToMatch: unknown) => any;
3
+ export declare const nestedTextMatcher: (textMatch: string | RegExp) => Matcher;
@@ -0,0 +1,9 @@
1
+ import type * as React from 'react';
2
+ import { I18nextProvider } from 'react-i18next';
3
+ import type { RenderResult, RenderOptions } from '@testing-library/react';
4
+ import type { Store } from 'redux';
5
+ export interface RenderWithProvidersOptions<State> extends RenderOptions {
6
+ initialState?: State;
7
+ i18nInstance: React.ComponentProps<typeof I18nextProvider>['i18n'];
8
+ }
9
+ export declare function renderWithProviders<State>(Component: React.ReactElement, options?: RenderWithProvidersOptions<State>): [RenderResult, Store<State>];
@@ -0,0 +1,37 @@
1
+ import type * as React from 'react';
2
+ import { Popper } from 'react-popper';
3
+ type PopperProps = React.ComponentProps<typeof Popper>;
4
+ export interface DeprecatedTooltipProps {
5
+ /** show or hide the tooltip */
6
+ open?: boolean;
7
+ /** contents of the tooltip */
8
+ tooltipComponent: React.ReactNode;
9
+ /** optional portal to place the tooltipComponent inside */
10
+ portal?: React.ComponentType<any>;
11
+ /** <https://github.com/FezVrasta/react-popper#placement> */
12
+ placement?: PopperProps['placement'];
13
+ /** <https://github.com/FezVrasta/react-popper#positionfixed> */
14
+ positionFixed?: PopperProps['positionFixed'];
15
+ /** <https://github.com/FezVrasta/react-popper#modifiers> */
16
+ modifiers?: PopperProps['modifiers'];
17
+ /** render function for tooltip'd component */
18
+ children: (props?: React.PropsWithRef<any>) => JSX.Element | null;
19
+ /** extra props to pass to the children render function */
20
+ childProps?: React.PropsWithRef<any>;
21
+ }
22
+ /**
23
+ * Basic, fully controlled Tooltip component.
24
+ *
25
+ * `props.children` is a function that receives the following props object:
26
+ * ```js
27
+ * type TooltipChildProps = {
28
+ * ref: React.Ref<*>,
29
+ * }
30
+ * ```
31
+ *
32
+ * `props.childProps` can be used to add extra fields to the child props object
33
+ *
34
+ * @deprecated Use `Tooltip` and `useTooltip` instead
35
+ */
36
+ export declare function DeprecatedTooltip(props: DeprecatedTooltipProps): JSX.Element | null;
37
+ export {};
@@ -0,0 +1,36 @@
1
+ import * as React from 'react';
2
+ import type { DeprecatedTooltipProps } from './DeprecatedTooltip';
3
+ interface MouseHandlers {
4
+ onMouseEnter: () => void;
5
+ onMouseLeave: () => void;
6
+ }
7
+ export type HoverTooltipHandlers = React.PropsWithRef<MouseHandlers>;
8
+ export type HoverTooltipProps = DeprecatedTooltipProps;
9
+ interface HoverTooltipState {
10
+ isOpen: boolean;
11
+ }
12
+ /**
13
+ * Tooltip component that triggers on `MouseEnter` and `MouseLeave`. See
14
+ * `Tooltip` for full props list.
15
+ *
16
+ * `props.children` is a function that receives the following props object:
17
+ * ```js
18
+ * type HoverTooltipHandlers = {
19
+ * ref: React.Ref<*>,
20
+ * onMouseEnter: (React.MouseEvent) => void,
21
+ * onMouseLeave: (React.MouseEvent) => void,
22
+ * }
23
+ * ```
24
+ *
25
+ * @deprecated Use `Tooltip` and `useHoverTooltip` instead
26
+ */
27
+ export declare class HoverTooltip extends React.Component<HoverTooltipProps, HoverTooltipState> {
28
+ openTimeout: number | null;
29
+ closeTimeout: number | null;
30
+ constructor(props: HoverTooltipProps);
31
+ componentWillUnmount(): void;
32
+ delayedOpen: () => void;
33
+ delayedClose: () => void;
34
+ render(): JSX.Element;
35
+ }
36
+ export {};
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import type { CSSProperties } from 'react';
3
+ import type { Placement } from './types';
4
+ import type { StyleProps } from '../primitives';
5
+ export interface LegacyTooltipProps extends StyleProps {
6
+ /** Whether or not the tooltip should be rendered */
7
+ visible: boolean;
8
+ /** Contents of the tooltip */
9
+ children?: React.ReactNode;
10
+ /**
11
+ * Tooltip element ID (provided by useTooltip). Will match
12
+ * targetProps.aria-describedby
13
+ */
14
+ id: string;
15
+ /** Actual tooltip placement, if known (provided by useTooltip) */
16
+ placement: Placement | null;
17
+ /** Inline styles to apply to the tooltip element (provided by useTooltip) */
18
+ style: CSSProperties;
19
+ /** React function ref for tooltip's arrow element (provided by useTooltip) */
20
+ arrowRef: React.RefCallback<HTMLElement | null>;
21
+ /** Inline styles to apply to arrow element (provided by useTooltip) */
22
+ arrowStyle: CSSProperties;
23
+ }
24
+ /**
25
+ * Tooltip component that renders based on its `visible` prop. For use with the
26
+ * `useTooltip` and `useHoverTooltip` hooks. See examples in `Tooltip.md`.
27
+ */
28
+ export declare const LegacyTooltip: React.ForwardRefExoticComponent<LegacyTooltipProps & React.RefAttributes<HTMLDivElement>>;
29
+ export interface ArrowProps {
30
+ placement: Placement | null;
31
+ arrowRef: React.RefCallback<HTMLElement>;
32
+ arrowStyle: CSSProperties;
33
+ backgroundColor: string;
34
+ }
35
+ export declare function Arrow(props: ArrowProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ export declare const TOOLTIP_AUTO: 'auto';
2
+ export declare const TOOLTIP_AUTO_START: 'auto-start';
3
+ export declare const TOOLTIP_AUTO_END: 'auto-end';
4
+ export declare const TOOLTIP_TOP: 'top';
5
+ export declare const TOOLTIP_TOP_START: 'top-start';
6
+ export declare const TOOLTIP_TOP_END: 'top-end';
7
+ export declare const TOOLTIP_RIGHT: 'right';
8
+ export declare const TOOLTIP_RIGHT_START: 'right-start';
9
+ export declare const TOOLTIP_RIGHT_END: 'right-end';
10
+ export declare const TOOLTIP_BOTTOM: 'bottom';
11
+ export declare const TOOLTIP_BOTTOM_START: 'bottom-start';
12
+ export declare const TOOLTIP_BOTTOM_END: 'bottom-end';
13
+ export declare const TOOLTIP_LEFT: 'left';
14
+ export declare const TOOLTIP_LEFT_START: 'left-start';
15
+ export declare const TOOLTIP_LEFT_END: 'left-end';
16
+ export declare const TOOLTIP_ABSOLUTE: 'absolute';
17
+ export declare const TOOLTIP_FIXED: 'fixed';
@@ -0,0 +1,8 @@
1
+ export * from './DeprecatedTooltip';
2
+ export * from './HoverTooltip';
3
+ export * from './LegacyTooltip';
4
+ export * from './useTooltip';
5
+ export * from './useHoverTooltip';
6
+ export * from './usePopper';
7
+ export * from './constants';
8
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ export declare const INITIAL_TOOLTIP_STYLE: {
2
+ readonly position: "absolute";
3
+ readonly left: "0";
4
+ readonly top: "0";
5
+ readonly margin: "0";
6
+ };
7
+ export declare const INITIAL_ARROW_STYLE: {
8
+ readonly position: "absolute";
9
+ };
10
+ export declare const TOOLTIP_OFFSET_PX = 8;
11
+ export declare const ARROW_OFFSET_PX = 4;
12
+ export declare const ARROW_SIZE_PX: number;
@@ -0,0 +1,52 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { Instance, Options, Modifier } from '@popperjs/core/lib/types';
3
+ import type { UseHoverOptions, HoverHandlers } from '../interaction-enhancers';
4
+ export type Placement = Options['placement'];
5
+ export type Strategy = Options['strategy'];
6
+ export type PopperInstance = Instance;
7
+ export type PopperOptions = Options;
8
+ export type PopperModifer<T> = Modifier<T>;
9
+ export type HandleStateUpdate = (placement: Placement, styles: {
10
+ popper?: CSSProperties;
11
+ arrow?: CSSProperties;
12
+ }) => void;
13
+ export interface UsePopperOptions {
14
+ target: Element | null;
15
+ tooltip: HTMLElement | null;
16
+ arrow: HTMLElement | null;
17
+ onStateUpdate: HandleStateUpdate;
18
+ placement?: Placement | null;
19
+ strategy?: Strategy | null;
20
+ offset?: number;
21
+ }
22
+ export type UsePopperResult = Instance | null;
23
+ export interface UseTooltipOptions {
24
+ placement?: Placement;
25
+ strategy?: Strategy;
26
+ offset?: number;
27
+ }
28
+ export interface UseTooltipResultTargetProps {
29
+ ref: React.RefCallback<Element | null>;
30
+ 'aria-describedby': string;
31
+ }
32
+ export interface UseTooltipResultTooltipProps {
33
+ id: string;
34
+ ref: React.RefCallback<HTMLElement | null>;
35
+ placement: Placement | null;
36
+ style: CSSProperties;
37
+ arrowRef: React.RefCallback<HTMLElement | null>;
38
+ arrowStyle: CSSProperties;
39
+ }
40
+ export type UseTooltipResult = [
41
+ UseTooltipResultTargetProps,
42
+ UseTooltipResultTooltipProps
43
+ ];
44
+ export type UseHoverTooltipOptions = Partial<UseTooltipOptions & UseHoverOptions>;
45
+ export interface UseHoverTooltipTargetProps extends UseTooltipResultTargetProps, HoverHandlers {
46
+ }
47
+ export type UseHoverTooltipResult = [
48
+ UseHoverTooltipTargetProps,
49
+ UseTooltipResultTooltipProps & {
50
+ visible: boolean;
51
+ }
52
+ ];
@@ -0,0 +1,24 @@
1
+ import type { UseHoverTooltipOptions, UseHoverTooltipResult } from './types';
2
+ /**
3
+ * Hook to position a tooltip component relative to a target component on hover.
4
+ * Adds a default `enterDelay` of 300 ms before the tooltip will show
5
+ *
6
+ * @param {UseHoverTooltipOptions} [options={}] (change default options (see `useTooltip` and `useHover`))
7
+ * @returns {UseHoverTooltipResult}
8
+ * @example
9
+ * ```js
10
+ * import { useHoverTooltip, Tooltip } from '@opentrons/components'
11
+ *
12
+ * export function HelloWorld() {
13
+ * const [targetProps, tooltipProps] = useHoverTooltip()
14
+ *
15
+ * return (
16
+ * <>
17
+ * <span {...targetProps}>Hello</span>
18
+ * <Tooltip {...tooltipProps}>World</Tooltip>
19
+ * </>
20
+ * )
21
+ * }
22
+ * ```
23
+ */
24
+ export declare function useHoverTooltip(options?: UseHoverTooltipOptions): UseHoverTooltipResult;
@@ -0,0 +1,2 @@
1
+ import type { UsePopperOptions, UsePopperResult } from './types';
2
+ export declare function usePopper(options: UsePopperOptions): UsePopperResult;
@@ -0,0 +1,31 @@
1
+ import type { UseTooltipOptions, UseTooltipResult } from './types';
2
+ /**
3
+ * Hook to position a tooltip component relative to a target component
4
+ *
5
+ * @param {UseTooltipOptions} [options={}] (change the default `position`, `strategy`, or `offset` of the tooltip)
6
+ * @returns {UseTooltipResult}
7
+ * @example
8
+ * ```js
9
+ * import {
10
+ * useTooltip,
11
+ * Tooltip,
12
+ * TOOLTIP_TOP,
13
+ * TOOLTIP_FIXED
14
+ * } from '@opentrons/components'
15
+ *
16
+ * export function HelloWorld() {
17
+ * const [targetProps, tooltipProps] = useTooltip({
18
+ * position: TOOLTIP_TOP,
19
+ * strategy: TOOLTIP_FIXED
20
+ * })
21
+ *
22
+ * return (
23
+ * <>
24
+ * <span {...targetProps}>Hello</span>
25
+ * <Tooltip visible={true} {...tooltipProps}>World</Tooltip>
26
+ * </>
27
+ * )
28
+ * }
29
+ * ```
30
+ */
31
+ export declare function useTooltip(options?: UseTooltipOptions): UseTooltipResult;
@@ -0,0 +1,4 @@
1
+ export * as RESPONSIVENESS from './responsiveness';
2
+ export * as SPACING from './spacing';
3
+ export * as TYPOGRAPHY from './typography';
4
+ export * as VIEWPORT from './viewport';
@@ -0,0 +1,3 @@
1
+ export declare const touchscreenMediaQuerySpecs = "(height: 600px) and (width: 1024px)";
2
+ export declare const isTouchscreenDynamic: () => boolean;
3
+ export declare const isTouchscreen: boolean;
@@ -0,0 +1,18 @@
1
+ export declare const spacing2: "0.125rem";
2
+ export declare const spacing4: "0.25rem";
3
+ export declare const spacing6: "0.375rem";
4
+ export declare const spacing8: "0.5rem";
5
+ export declare const spacing10: "0.625rem";
6
+ export declare const spacing12: "0.75rem";
7
+ export declare const spacing16: "1rem";
8
+ export declare const spacing20: "1.25rem";
9
+ export declare const spacing24: "1.5rem";
10
+ export declare const spacing32: "2rem";
11
+ export declare const spacing40: "2.5rem";
12
+ export declare const spacing44: "2.75rem";
13
+ export declare const spacing48: "3rem";
14
+ export declare const spacing60: "3.75rem";
15
+ export declare const spacing68: "4.25rem";
16
+ export declare const spacing80: "5rem";
17
+ export declare const spacing120: "7.5rem";
18
+ export declare const spacingAuto: "auto";
@@ -0,0 +1,71 @@
1
+ export declare const fontSize80 = "5rem";
2
+ export declare const fontSize38 = "2.375rem";
3
+ export declare const fontSize32 = "2rem";
4
+ export declare const fontSize28 = "1.75rem";
5
+ export declare const fontSize22 = "1.375rem";
6
+ export declare const fontSize20 = "1.25rem";
7
+ export declare const fontSizeH1 = "1.188rem";
8
+ export declare const fontSizeH2 = "0.9375rem";
9
+ export declare const fontSizeH3 = "0.875rem";
10
+ export declare const fontSizeH4 = "0.813rem";
11
+ export declare const fontSizeH6 = "0.563rem";
12
+ export declare const fontSizeP = "0.8125rem";
13
+ export declare const fontSizeLabel = "0.6875rem";
14
+ export declare const fontSizeCaption = "0.625rem";
15
+ export declare const fontWeightBold = 700;
16
+ export declare const fontWeightSemiBold = 600;
17
+ export declare const fontWeightRegular = 400;
18
+ export declare const fontWeightLight = 300;
19
+ export declare const lineHeight96 = "6rem";
20
+ export declare const lineHeight48 = "3rem";
21
+ export declare const lineHeight42 = "2.625rem";
22
+ export declare const lineHeight36 = "2.25rem";
23
+ export declare const lineHeight28 = "1.75rem";
24
+ export declare const lineHeight24 = "1.5rem";
25
+ export declare const lineHeight20 = "1.25rem";
26
+ export declare const lineHeight18 = "1.125rem";
27
+ export declare const lineHeight16 = "1rem";
28
+ export declare const lineHeight12 = "0.75rem";
29
+ export declare const lineHeightNormal = "normal";
30
+ export declare const fontStyleNormal = "normal";
31
+ export declare const fontStyleItalic = "italic";
32
+ export declare const textTransformNone = "none";
33
+ export declare const textTransformCapitalize = "capitalize";
34
+ export declare const textTransformUppercase = "uppercase";
35
+ export declare const textTransformLowercase = "lowercase";
36
+ export declare const textAlignLeft = "left";
37
+ export declare const textAlignRight = "right";
38
+ export declare const textAlignCenter = "center";
39
+ export declare const textAlignJustify = "justify";
40
+ export declare const textDecorationUnderline = "underline";
41
+ export declare const h1Default: import("styled-components").FlattenSimpleInterpolation;
42
+ export declare const h2Regular: import("styled-components").FlattenSimpleInterpolation;
43
+ export declare const h2SemiBold: import("styled-components").FlattenSimpleInterpolation;
44
+ export declare const h3Regular: import("styled-components").FlattenSimpleInterpolation;
45
+ export declare const h3SemiBold: import("styled-components").FlattenSimpleInterpolation;
46
+ export declare const h6Default: import("styled-components").FlattenSimpleInterpolation;
47
+ export declare const h6SemiBold: import("styled-components").FlattenSimpleInterpolation;
48
+ export declare const pRegular: import("styled-components").FlattenSimpleInterpolation;
49
+ export declare const pSemiBold: import("styled-components").FlattenSimpleInterpolation;
50
+ export declare const labelRegular: import("styled-components").FlattenSimpleInterpolation;
51
+ export declare const labelSemiBold: import("styled-components").FlattenSimpleInterpolation;
52
+ export declare const linkPSemiBold: import("styled-components").FlattenSimpleInterpolation;
53
+ export declare const level1Header: import("styled-components").FlattenSimpleInterpolation;
54
+ export declare const level2HeaderBold: import("styled-components").FlattenSimpleInterpolation;
55
+ export declare const level2HeaderSemiBold: import("styled-components").FlattenSimpleInterpolation;
56
+ export declare const level2HeaderRegular: import("styled-components").FlattenSimpleInterpolation;
57
+ export declare const level3HeaderBold: import("styled-components").FlattenSimpleInterpolation;
58
+ export declare const level3HeaderSemiBold: import("styled-components").FlattenSimpleInterpolation;
59
+ export declare const level3HeaderRegular: import("styled-components").FlattenSimpleInterpolation;
60
+ export declare const level4HeaderBold: import("styled-components").FlattenSimpleInterpolation;
61
+ export declare const level4HeaderSemiBold: import("styled-components").FlattenSimpleInterpolation;
62
+ export declare const level4HeaderRegular: import("styled-components").FlattenSimpleInterpolation;
63
+ export declare const bodyTextBold: import("styled-components").FlattenSimpleInterpolation;
64
+ export declare const bodyTextSemiBold: import("styled-components").FlattenSimpleInterpolation;
65
+ export declare const bodyTextRegular: import("styled-components").FlattenSimpleInterpolation;
66
+ export declare const smallBodyTextBold: import("styled-components").FlattenSimpleInterpolation;
67
+ export declare const smallBodyTextSemiBold: import("styled-components").FlattenSimpleInterpolation;
68
+ export declare const smallBodyTextRegular: import("styled-components").FlattenSimpleInterpolation;
69
+ export declare const darkLinkH4SemiBold: import("styled-components").FlattenSimpleInterpolation;
70
+ export declare const darkLinkLabelSemiBold: import("styled-components").FlattenSimpleInterpolation;
71
+ export declare const darkLinkLabelSemiBoldDisabled: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1,15 @@
1
+ export declare const touchScreenViewport: {
2
+ viewport: {
3
+ viewports: {
4
+ onDeviceDisplay: {
5
+ name: string;
6
+ type: string;
7
+ styles: {
8
+ width: string;
9
+ height: string;
10
+ };
11
+ };
12
+ };
13
+ defaultViewport: string;
14
+ };
15
+ };
package/lib/utils.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export declare const humanizeLabwareType: (labwareType: string) => string;
2
+ export declare const wellNameSplit: (wellName: string) => [string, string];
3
+ /**
4
+ * Truncate a long string to display it
5
+ * @example
6
+ * truncateString('Illumina DNA Prep with Enrichment: Part 1 - Tagmentation, Clean Up, Amplify Tagmlo1234567ted', 88, 66);
7
+ * Illumina DNA Prep with Enrichment: Part 1 - Tagmentation, Clean Up...fy Tagmlo1234567ted
8
+ *
9
+ * @param {string} text - A string param
10
+ * @param {number} maxLength - A maximum length of display
11
+ * @param {number} breakPoint - Optional A point to insert three dots
12
+ *
13
+ * @returns {string} Returns the truncated string
14
+ */
15
+ export declare function truncateString(text: string, maxLength: number, breakPoint?: number): string;