@opentrons/components 0.1.5 → 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
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@opentrons/components",
3
- "version": "0.1.5",
3
+ "version": "0.1.6-alpha.2",
4
4
  "description": "React components library for Opentrons' projects",
5
5
  "source": "src/index.ts",
6
6
  "types": "lib/index.d.ts",
7
- "style": "src/index.css",
7
+ "style": "src/index.module.css",
8
8
  "main": "lib/opentrons-components.js",
9
9
  "module": "src/index.ts",
10
10
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "@types/react-router-dom": "5.3.3"
25
25
  },
26
26
  "dependencies": {
27
- "@opentrons/shared-data": "0.1.5",
27
+ "@opentrons/shared-data": "0.1.6-alpha.2",
28
28
  "@popperjs/core": "2.1.1",
29
29
  "@react-spring/types": "9.6.1",
30
30
  "@react-spring/web": "9.6.1",
@@ -38,9 +38,10 @@
38
38
  "react-popper": "1.0.0",
39
39
  "react-remove-scroll": "2.4.3",
40
40
  "react-select": "5.4.0",
41
+ "redux": "4.0.5",
41
42
  "styled-components": "5.3.6"
42
43
  },
43
- "browser": {
44
- "jest-when": false
44
+ "devDependencies": {
45
+ "react-redux": "8.1.2"
45
46
  }
46
47
  }
package/tsconfig.json CHANGED
@@ -8,8 +8,8 @@
8
8
  "compilerOptions": {
9
9
  "composite": true,
10
10
  "rootDir": "src",
11
- "outDir": "lib"
11
+ "outDir": "lib",
12
12
  },
13
13
  "include": ["typings", "src"],
14
14
  "exclude": ["**/*.stories.tsx"]
15
- }
15
+ }
@@ -1,2 +1 @@
1
- import 'jest-styled-components'
2
1
  import 'styled-components/cssprop'
package/vite.config.ts ADDED
@@ -0,0 +1,57 @@
1
+ import path from 'path'
2
+ import { defineConfig } from 'vite'
3
+ import react from '@vitejs/plugin-react'
4
+ import postCssImport from 'postcss-import'
5
+ import postCssApply from 'postcss-apply'
6
+ import postColorModFunction from 'postcss-color-mod-function'
7
+ import postCssPresetEnv from 'postcss-preset-env'
8
+ import lostCss from 'lost'
9
+
10
+ export default defineConfig({
11
+ build: {
12
+ // Relative to the root
13
+ ssr: 'src/index.ts',
14
+ outDir: 'lib',
15
+ commonjsOptions: {
16
+ transformMixedEsModules: true,
17
+ esmExternals: true,
18
+ },
19
+ },
20
+ plugins: [
21
+ react({
22
+ include: '**/*.tsx',
23
+ babel: {
24
+ // Use babel.config.js files
25
+ configFile: true,
26
+ },
27
+ }),
28
+ ],
29
+ optimizeDeps: {
30
+ esbuildOptions: {
31
+ target: 'es2020',
32
+ },
33
+ },
34
+ css: {
35
+ postcss: {
36
+ plugins: [
37
+ postCssImport({ root: 'src/' }),
38
+ postCssApply(),
39
+ postColorModFunction(),
40
+ postCssPresetEnv({ stage: 0 }),
41
+ lostCss(),
42
+ ],
43
+ },
44
+ },
45
+ define: {
46
+ 'process.env': process.env,
47
+ global: 'globalThis',
48
+ },
49
+ resolve: {
50
+ alias: {
51
+ '@opentrons/shared-data': path.resolve('../shared-data/js/index.ts'),
52
+ '@opentrons/components/styles': path.resolve(
53
+ '../components/src/index.module.css'
54
+ ),
55
+ },
56
+ },
57
+ })
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import type { IconProps } from '../icons';
3
- export type AlertType = 'success' | 'warning' | 'error' | 'info';
4
- export interface AlertItemProps {
5
- /** name constant of the icon to display */
6
- type: AlertType;
7
- /** title/main message of colored alert bar */
8
- title: React.ReactNode;
9
- /** Alert message body contents */
10
- children?: React.ReactNode;
11
- /** Additional class name */
12
- className?: string;
13
- /** optional handler to show close button/clear alert */
14
- onCloseClick?: () => unknown;
15
- /** Override the default Alert Icon */
16
- icon?: IconProps;
17
- }
18
- /**
19
- * @deprecated Use 'Banner' instead
20
- */
21
- export declare function AlertItem(props: AlertItemProps): JSX.Element;
@@ -1 +0,0 @@
1
- export * from './AlertItem';
@@ -1 +0,0 @@
1
- import 'jest-styled-components';
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- export interface CheckboxFieldProps {
3
- /** change handler */
4
- onChange: React.ChangeEventHandler;
5
- /** checkbox is checked if value is true */
6
- value?: boolean;
7
- /** name of field in form */
8
- name?: string;
9
- /** label text for checkbox */
10
- label?: React.ReactNode;
11
- /** checkbox is disabled if value is true */
12
- disabled?: boolean;
13
- /** html tabindex property */
14
- tabIndex?: number;
15
- /** props passed into label div. TODO IMMEDIATELY what is the Flow type? */
16
- labelProps?: React.ComponentProps<'div'>;
17
- /** if true, render indeterminate icon */
18
- isIndeterminate?: boolean;
19
- }
20
- export declare function CheckboxField(props: CheckboxFieldProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- interface StepMeterProps {
2
- totalSteps: number;
3
- currentStep: number | null;
4
- }
5
- export declare const StepMeter: (props: StepMeterProps) => JSX.Element;
6
- export {};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const AlertPrimaryButton: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("../../primitives").StyleProps, any>;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const PrimaryButton: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("../../primitives").StyleProps, any>;
@@ -1,7 +0,0 @@
1
- import type { StyleProps } from '../../index';
2
- interface SecondaryButtonProps extends StyleProps {
3
- /** button action is dangerous and may have non-reversible side-effects for user */
4
- isDangerous?: boolean;
5
- }
6
- export declare const SecondaryButton: import("styled-components").StyledComponent<"button", any, SecondaryButtonProps, never>;
7
- export {};
@@ -1 +0,0 @@
1
- import 'jest-styled-components';
@@ -1 +0,0 @@
1
- import 'jest-styled-components';
@@ -1 +0,0 @@
1
- import 'jest-styled-components';
@@ -1,3 +0,0 @@
1
- export * from './AlertPrimaryButton';
2
- export * from './PrimaryButton';
3
- export * from './SecondaryButton';
@@ -1,3 +0,0 @@
1
- export * from './CheckboxField';
2
- export * from './StepMeter';
3
- export * from './buttons';
package/lib/barrel.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './hardware-sim';
2
- export * from './primitives';
3
- export * from './ui-style-constants';
@@ -1,49 +0,0 @@
1
- import * as React from 'react';
2
- import { BUTTON_TYPE_SUBMIT, BUTTON_TYPE_RESET, BUTTON_TYPE_BUTTON } from '../primitives';
3
- import type { IconName } from '../icons';
4
- import type { UseHoverTooltipTargetProps } from '../tooltips';
5
- export interface ButtonProps {
6
- /** id attribute */
7
- id?: string;
8
- /** click handler */
9
- onClick?: React.MouseEventHandler;
10
- /** name attribute */
11
- name?: string;
12
- /** title attribute */
13
- title?: string;
14
- /** disabled attribute (setting disabled removes onClick) */
15
- disabled?: boolean | null | undefined;
16
- /** use hover style even when not hovered */
17
- hover?: boolean | null | undefined;
18
- /** optional Icon name */
19
- iconName?: IconName;
20
- /** classes to apply */
21
- className?: string;
22
- /** inverts the default color/background/border of default button style */
23
- inverted?: boolean;
24
- /** contents of the button */
25
- children?: React.ReactNode;
26
- /** type of button (default "button") */
27
- type?: typeof BUTTON_TYPE_SUBMIT | typeof BUTTON_TYPE_RESET | typeof BUTTON_TYPE_BUTTON;
28
- /** ID of form that button is for */
29
- form?: string;
30
- /** custom element or component to use instead of `<button>` */
31
- Component?: React.ComponentType<any> | keyof JSX.IntrinsicElements;
32
- /** handlers for HoverTooltipComponent */
33
- hoverTooltipHandlers?: UseHoverTooltipTargetProps | null | undefined;
34
- /** html tabindex property */
35
- tabIndex?: number;
36
- /** catch all prop for pass-through props */
37
- [name: string]: any;
38
- }
39
- /**
40
- * Basic, un-styled button. You probably want to use a styled button
41
- * instead. All buttons take the same props.
42
- *
43
- * If you need access to the ButtonProps type, you can:
44
- * ```js
45
- * import {type ButtonProps} from '@opentrons/components'
46
- * ```
47
- * @deprecated Use {@link Btn}
48
- */
49
- export declare function Button(props: ButtonProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from './Button';
3
- /**
4
- * Primary application button. Fills its container and has a dark
5
- * background with white text
6
- *
7
- * @deprecated Use {@link PrimaryButton}
8
- */
9
- export declare function DeprecatedPrimaryButton(props: ButtonProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from './Button';
3
- /**
4
- * Flat-styled button with a default width of `9rem` and no background fill
5
- */
6
- export declare function FlatButton(props: ButtonProps): JSX.Element;
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import type { IconProps } from '../icons';
3
- import type { ButtonProps } from './Button';
4
- interface Props extends ButtonProps {
5
- name: IconProps['name'];
6
- spin?: IconProps['spin'];
7
- }
8
- /**
9
- * FlatButton variant for a button that is a single icon. Takes props of
10
- * both Button _and_ Icon. Use `name` to specify icon name.
11
- *
12
- * @deprecated Use {@link Btn} and {@link Icon}
13
- */
14
- export declare function IconButton(props: Props): JSX.Element;
15
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from './Button';
3
- /**
4
- * Button with no background fill and a dark border.
5
- * Use inverted prop for buttons on dark backgrounds.
6
- *
7
- * @deprecated Use {@link SecondaryBtn}
8
- */
9
- export declare function OutlineButton(props: ButtonProps): JSX.Element;
@@ -1,5 +0,0 @@
1
- export * from './Button';
2
- export * from './FlatButton';
3
- export * from './DeprecatedPrimaryButton';
4
- export * from './IconButton';
5
- export * from './OutlineButton';
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export interface ControlInfoProps {
3
- children: React.ReactNode;
4
- className?: string;
5
- }
6
- export declare function ControlInfo(props: ControlInfoProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { ButtonProps } from '../buttons';
3
- export interface LabeledButtonProps {
4
- label: string;
5
- buttonProps: ButtonProps;
6
- children: React.ReactNode;
7
- }
8
- export declare function LabeledButton(props: LabeledButtonProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export interface LabeledCheckboxProps {
3
- label: string;
4
- name: string;
5
- value: boolean;
6
- className?: string;
7
- children: React.ReactNode;
8
- onChange: React.ChangeEventHandler<HTMLInputElement>;
9
- }
10
- export declare function LabeledCheckbox(props: LabeledCheckboxProps): JSX.Element;
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export interface LabeledControlProps {
3
- label: string;
4
- control: React.ReactNode;
5
- children?: React.ReactNode;
6
- }
7
- export declare function LabeledControl(props: LabeledControlProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { RadioGroupProps } from '../forms';
3
- export interface LabeledRadioGroupProps extends RadioGroupProps {
4
- label: string;
5
- children: React.ReactNode;
6
- 'data-test'?: string;
7
- }
8
- export declare function LabeledRadioGroup(props: LabeledRadioGroupProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import type { DropdownFieldProps } from '../forms';
3
- export interface LabeledSelectProps extends DropdownFieldProps {
4
- label: string;
5
- children: React.ReactNode;
6
- /** optional data test id for the container */
7
- 'data-test'?: string;
8
- }
9
- export declare function LabeledSelect(props: LabeledSelectProps): JSX.Element;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- export interface LabeledToggleProps {
3
- label: string;
4
- toggledOn: boolean;
5
- disabled?: boolean;
6
- children?: React.ReactNode;
7
- onClick: () => unknown;
8
- /** optional data test id for the container */
9
- 'data-test'?: string;
10
- }
11
- export declare function LabeledToggle(props: LabeledToggleProps): JSX.Element;
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export interface StackedLabeledControlProps {
3
- label: string;
4
- control: React.ReactNode;
5
- children?: React.ReactNode;
6
- }
7
- export declare function StackedLabeledControl(props: StackedLabeledControlProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../buttons';
3
- export interface ToggleButtonProps extends ButtonProps {
4
- toggledOn: boolean;
5
- }
6
- export declare function ToggleButton(props: ToggleButtonProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- export * from './ToggleButton';
2
- export * from './LabeledToggle';
3
- export * from './LabeledButton';
4
- export * from './LabeledSelect';
5
- export * from './LabeledCheckbox';
6
- export * from './LabeledRadioGroup';
@@ -1,33 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Checkbox Field Properties.
4
- */
5
- export interface DeprecatedCheckboxFieldProps {
6
- /** change handler */
7
- onChange: React.ChangeEventHandler;
8
- /** checkbox is checked if value is true */
9
- value?: boolean;
10
- /** classes to apply */
11
- className?: string;
12
- /** classes to apply to inner label text div. Deprecated. use labelProps.className */
13
- labelTextClassName?: string | null | undefined;
14
- /** name of field in form */
15
- name?: string;
16
- /** label text for checkbox */
17
- label?: string;
18
- /** if is included, checkbox will use error style. The content of the string is ignored. */
19
- error?: string | null | undefined;
20
- /** checkbox is disabled if value is true */
21
- disabled?: boolean;
22
- /** html tabindex property */
23
- tabIndex?: number;
24
- /** props passed into label div. TODO IMMEDIATELY what is the Flow type? */
25
- labelProps?: React.ComponentProps<'div'>;
26
- /** if true, render indeterminate icon */
27
- isIndeterminate?: boolean;
28
- }
29
- /**
30
- * Checkbox Form Field
31
- * @deprecated
32
- */
33
- export declare function DeprecatedCheckboxField(props: DeprecatedCheckboxFieldProps): JSX.Element;
@@ -1,38 +0,0 @@
1
- import * as React from 'react';
2
- export interface DropdownOption {
3
- name: string;
4
- value: string;
5
- disabled?: boolean;
6
- }
7
- export type Options = DropdownOption[];
8
- export interface DropdownFieldProps {
9
- /** change handler */
10
- onChange: React.ChangeEventHandler<HTMLSelectElement>;
11
- /** focus handler */
12
- onFocus?: React.FocusEventHandler<HTMLSelectElement>;
13
- /** blur handler */
14
- onBlur?: React.FocusEventHandler<HTMLSelectElement>;
15
- /** value that is selected */
16
- value?: string | null | undefined;
17
- /** optional id for the <select> element */
18
- id?: string;
19
- /** name of field in form */
20
- name?: string;
21
- /** Array of {name, value} data */
22
- options: Options;
23
- /** classes to apply */
24
- className?: string;
25
- /** optional caption. hidden when `error` is given */
26
- caption?: string;
27
- /** if included, DropdownField will use error style and display error instead of caption */
28
- error?: string | null | undefined;
29
- /** dropdown is disabled if value is true */
30
- disabled?: boolean;
31
- /** html tabindex property */
32
- tabIndex?: number;
33
- /** automatically focus field on render */
34
- autoFocus?: boolean;
35
- /** if true, render indeterminate unselectable option */
36
- isIndeterminate?: boolean;
37
- }
38
- export declare function DropdownField(props: DropdownFieldProps): JSX.Element;
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import type { HoverTooltipHandlers } from '../tooltips';
3
- export interface FormGroupProps {
4
- /** text label */
5
- label?: string;
6
- /** form content */
7
- children?: React.ReactNode;
8
- /** classes to apply */
9
- className?: string | null | undefined;
10
- /** if is included, FormGroup title will use error style. The content of the string is ignored. */
11
- error?: string | null | undefined;
12
- /** enable disabled style. Overridden by truthy `error` */
13
- disabled?: boolean | null | undefined;
14
- /** handlers for HoverTooltipComponent */
15
- hoverTooltipHandlers?: HoverTooltipHandlers | null | undefined;
16
- /** boolean indicating formGroup used in pipette Settings slideout */
17
- isPipetteSettingsSlideout?: boolean;
18
- }
19
- export declare function FormGroup(props: FormGroupProps): JSX.Element;
@@ -1,51 +0,0 @@
1
- import * as React from 'react';
2
- export declare const INPUT_TYPE_TEXT: 'text';
3
- export declare const INPUT_TYPE_PASSWORD: 'password';
4
- export interface InputFieldProps {
5
- /** field is disabled if value is true */
6
- disabled?: boolean;
7
- /** change handler */
8
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
9
- /** classes to apply to outer element */
10
- className?: string;
11
- /** inline label text. DEPRECATED */
12
- label?: string;
13
- /** classes to apply to inner label text div */
14
- labelTextClassName?: string | null | undefined;
15
- /** name of field in form */
16
- name?: string;
17
- /** optional ID of <input> element */
18
- id?: string;
19
- /** placeholder text */
20
- placeholder?: string;
21
- /** optional suffix component, appears to the right of input text */
22
- units?: React.ReactNode;
23
- /** current value of text in box, defaults to '' */
24
- value?: string | null | undefined;
25
- /** if included, InputField will use error style and display error instead of caption */
26
- error?: string | null | undefined;
27
- /** optional caption. hidden when `error` is given */
28
- caption?: string | null | undefined;
29
- /** appears to the right of the caption. Used for character limits, eg '0/45' */
30
- secondaryCaption?: string | null | undefined;
31
- /** optional input type (default "text") */
32
- type?: typeof INPUT_TYPE_TEXT | typeof INPUT_TYPE_PASSWORD;
33
- /** mouse click handler */
34
- onClick?: (event: React.MouseEvent<HTMLInputElement>) => unknown;
35
- /** focus handler */
36
- onFocus?: (event: React.FocusEvent<HTMLInputElement>) => unknown;
37
- /** blur handler */
38
- onBlur?: (event: React.FocusEvent<HTMLInputElement>) => unknown;
39
- /** makes input field read-only */
40
- readOnly?: boolean | undefined;
41
- /** html tabindex property */
42
- tabIndex?: number;
43
- /** automatically focus field on render */
44
- autoFocus?: boolean;
45
- /** if true, clear out value and add '-' placeholder */
46
- isIndeterminate?: boolean;
47
- }
48
- /**
49
- * @deprecated Use `InputField` in App/atoms instead
50
- */
51
- export declare function InputField(props: InputFieldProps): JSX.Element;
@@ -1,29 +0,0 @@
1
- import * as React from 'react';
2
- export interface RadioOption {
3
- name: string;
4
- value: string;
5
- children?: React.ReactNode;
6
- }
7
- export interface RadioGroupProps {
8
- /** blur handler */
9
- onBlur?: React.FocusEventHandler<HTMLInputElement>;
10
- /** change handler */
11
- onChange: React.ChangeEventHandler;
12
- /** value that is checked */
13
- value?: string;
14
- /** Array of {name, value} data with optional children */
15
- options?: RadioOption[];
16
- /** Show radio buttons inline instead of stacked */
17
- inline?: boolean;
18
- /** classes to apply to outer div */
19
- className?: string;
20
- /** classes to apply to inner label text div */
21
- labelTextClassName?: string | null | undefined;
22
- /** if is included, RadioGroup will use error style. The content of the string is ignored. */
23
- error?: string | null | undefined;
24
- /** 'name' attr of input */
25
- name?: string;
26
- /** optional prop to turn radio field blue when checked */
27
- useBlueChecked?: boolean;
28
- }
29
- export declare function RadioGroup(props: RadioGroupProps): JSX.Element;
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import { components as reactSelectComponents } from 'react-select';
3
- import { POSITION_ABSOLUTE, POSITION_FIXED } from '../styles';
4
- import type { Props as ReactSelectProps } from 'react-select';
5
- export { reactSelectComponents };
6
- export declare const PLACEMENT_AUTO: 'auto';
7
- export declare const PLACEMENT_BOTTOM: 'bottom';
8
- export declare const PLACEMENT_TOP: 'top';
9
- export declare const CONTEXT_MENU: 'menu';
10
- export declare const CONTEXT_VALUE: 'value';
11
- export declare const SELECT_CX_PREFIX = "ot_select";
12
- export type ChangeAction = 'select-option' | 'deselect-option' | 'remove-value' | 'pop-value' | 'set-value' | 'clear' | 'create-option';
13
- export interface SelectOption {
14
- value: string;
15
- label?: string;
16
- isDisabled?: boolean;
17
- }
18
- export interface SelectOptionGroup {
19
- options: SelectOption[];
20
- label?: string;
21
- }
22
- export type SelectOptionOrGroup = SelectOption | SelectOptionGroup;
23
- export type SelectPlacement = typeof PLACEMENT_AUTO | typeof PLACEMENT_BOTTOM | typeof PLACEMENT_TOP;
24
- export type SelectPosition = typeof POSITION_ABSOLUTE | typeof POSITION_FIXED;
25
- export type SelectOptionContext = typeof CONTEXT_MENU | typeof CONTEXT_VALUE;
26
- export type SelectProps = ReactSelectProps<SelectOption>;
27
- export declare function Select(props: SelectProps): JSX.Element;
@@ -1,33 +0,0 @@
1
- import * as React from 'react';
2
- import type { SelectProps } from './Select';
3
- import type { ActionMeta } from 'react-select';
4
- import type { SelectOption } from '.';
5
- export interface SelectFieldProps {
6
- /** optional HTML id for container */
7
- id?: SelectProps['id'];
8
- /** field name */
9
- name: NonNullable<SelectProps['name']>;
10
- /** react-Select option, usually label, value */
11
- options: NonNullable<SelectProps['options']>;
12
- /** currently selected value */
13
- value?: string | null;
14
- /** disable the select */
15
- disabled?: SelectProps['isDisabled'];
16
- /** optional placeholder */
17
- placeholder?: SelectProps['placeholder'];
18
- /** menuPosition prop to send to react-select */
19
- menuPosition?: SelectProps['menuPosition'];
20
- /** render function for the option label passed to react-select */
21
- formatOptionLabel?: SelectProps['formatOptionLabel'];
22
- /** optional className */
23
- className?: string;
24
- /** optional caption. hidden when `error` is given */
25
- caption?: React.ReactNode;
26
- /** if included, use error style and display error instead of caption */
27
- error?: string | null;
28
- /** change handler called with (name, value) */
29
- onValueChange?: (name: string, value: string, actionMeta: ActionMeta<SelectOption>) => void;
30
- /** blur handler called with (name) */
31
- onLoseFocus?: (name: string) => void;
32
- }
33
- export declare function SelectField(props: SelectFieldProps): JSX.Element;