@opentrons/components 0.1.6-alpha.7 → 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 (200) hide show
  1. package/lib/alerts/AlertItem.d.ts +1 -1
  2. package/lib/atoms/Checkbox/index.d.ts +24 -0
  3. package/lib/atoms/CheckboxField/index.d.ts +1 -1
  4. package/lib/atoms/Chip/index.d.ts +1 -1
  5. package/lib/atoms/Divider/index.d.ts +5 -0
  6. package/lib/atoms/InputField/index.d.ts +68 -0
  7. package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordion.d.ts +10 -0
  8. package/lib/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.d.ts +7 -0
  9. package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +14 -0
  10. package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +3 -0
  11. package/lib/atoms/ListButton/__tests__/ListButton.test.d.ts +1 -0
  12. package/lib/atoms/ListButton/index.d.ts +11 -0
  13. package/lib/atoms/ListItem/ListItemChildren/ListItemCustomize.d.ts +15 -0
  14. package/lib/atoms/ListItem/ListItemChildren/ListItemDescriptor.d.ts +7 -0
  15. package/lib/atoms/ListItem/ListItemChildren/index.d.ts +2 -0
  16. package/lib/atoms/ListItem/__tests__/ListItem.test.d.ts +1 -0
  17. package/lib/atoms/ListItem/index.d.ts +14 -0
  18. package/lib/atoms/MenuList/MenuItem.d.ts +7 -0
  19. package/lib/atoms/MenuList/OverflowBtn.d.ts +7 -0
  20. package/lib/atoms/MenuList/__tests__/MenuItem.test.d.ts +1 -0
  21. package/lib/atoms/MenuList/__tests__/MenuList.test.d.ts +1 -0
  22. package/lib/atoms/MenuList/__tests__/OverflowBtn.test.d.ts +1 -0
  23. package/lib/atoms/MenuList/index.d.ts +8 -0
  24. package/lib/atoms/Snackbar/__tests__/Snackbar.test.d.ts +1 -0
  25. package/lib/atoms/Snackbar/index.d.ts +7 -0
  26. package/lib/atoms/StyledText/LegacyStyledText.d.ts +6 -0
  27. package/lib/atoms/StyledText/StyledText.d.ts +154 -0
  28. package/lib/atoms/StyledText/index.d.ts +2 -6
  29. package/lib/atoms/Tag/__tests__/Tag.test.d.ts +1 -0
  30. package/lib/atoms/Tag/index.d.ts +13 -0
  31. package/lib/atoms/Toast/__tests__/ODDToast.test.d.ts +1 -0
  32. package/lib/atoms/Toast/__tests__/Toast.test.d.ts +1 -0
  33. package/lib/atoms/Toast/index.d.ts +25 -0
  34. package/lib/atoms/ToggleGroup/__tests__/ToggleGroup.test.d.ts +1 -0
  35. package/lib/atoms/ToggleGroup/index.d.ts +9 -0
  36. package/lib/atoms/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
  37. package/lib/atoms/Tooltip/index.d.ts +11 -0
  38. package/lib/atoms/buttons/AltPrimaryButton.d.ts +1 -0
  39. package/lib/atoms/buttons/EmptySelectorButton.d.ts +10 -0
  40. package/lib/atoms/buttons/LargeButton.d.ts +17 -0
  41. package/lib/atoms/buttons/RadioButton.d.ts +21 -0
  42. package/lib/atoms/buttons/__tests__/AltPrimaryButton.test.d.ts +1 -0
  43. package/lib/atoms/buttons/__tests__/EmptySelectorButton.test.d.ts +1 -0
  44. package/lib/atoms/buttons/__tests__/LargeButton.test.d.ts +1 -0
  45. package/lib/atoms/buttons/__tests__/RadioButton.test.d.ts +1 -0
  46. package/lib/atoms/buttons/index.d.ts +3 -0
  47. package/lib/atoms/index.d.ts +14 -0
  48. package/lib/buttons/Button.d.ts +3 -2
  49. package/lib/controls/ControlInfo.d.ts +1 -1
  50. package/lib/controls/LabeledButton.d.ts +1 -1
  51. package/lib/controls/LabeledCheckbox.d.ts +1 -1
  52. package/lib/controls/LabeledControl.d.ts +1 -1
  53. package/lib/controls/LabeledRadioGroup.d.ts +1 -1
  54. package/lib/controls/LabeledSelect.d.ts +1 -1
  55. package/lib/controls/LabeledToggle.d.ts +1 -1
  56. package/lib/controls/StackedLabeledControl.d.ts +1 -1
  57. package/lib/forms/DeprecatedCheckboxField.d.ts +1 -1
  58. package/lib/forms/DropdownField.d.ts +3 -3
  59. package/lib/forms/FormGroup.d.ts +1 -1
  60. package/lib/forms/{InputField.d.ts → LegacyInputField.d.ts} +4 -4
  61. package/lib/forms/RadioGroup.d.ts +1 -1
  62. package/lib/forms/Select.d.ts +1 -1
  63. package/lib/forms/SelectField.d.ts +1 -1
  64. package/lib/forms/ToggleField.d.ts +1 -1
  65. package/lib/forms/index.d.ts +1 -1
  66. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +9 -2
  67. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +1 -1
  68. package/lib/hardware-sim/BaseDeck/SlotBase.d.ts +1 -1
  69. package/lib/hardware-sim/BaseDeck/SlotClip.d.ts +1 -1
  70. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +1 -1
  71. package/lib/hardware-sim/BaseDeck/WasteChuteFixture.d.ts +2 -3
  72. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +1 -1
  73. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +1 -2
  74. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +1 -1
  75. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +1 -1
  76. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +1 -1
  77. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +1 -1
  78. package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +10 -0
  79. package/lib/hardware-sim/DeckConfigurator/index.d.ts +1 -1
  80. package/lib/hardware-sim/DeckSlotLocation/index.d.ts +1 -1
  81. package/lib/hardware-sim/Labware/Labware.d.ts +39 -0
  82. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsAutoclavableDeckRiser.d.ts +1 -0
  83. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsToughPCRAutoSealingLid.d.ts +1 -0
  84. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +8 -0
  85. package/lib/hardware-sim/Labware/LabwareRender.d.ts +6 -2
  86. package/lib/hardware-sim/Labware/LabwareStackRender.d.ts +20 -0
  87. package/lib/hardware-sim/Labware/__tests__/Labware.test.d.ts +1 -0
  88. package/lib/hardware-sim/Labware/index.d.ts +2 -0
  89. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +1 -0
  90. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +4 -0
  91. package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +15 -0
  92. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +9 -1
  93. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +2 -0
  94. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +1 -1
  95. package/lib/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.d.ts +1 -0
  96. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +1 -0
  97. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +1 -1
  98. package/lib/hardware-sim/Module/ModuleTag.d.ts +1 -1
  99. package/lib/hardware-sim/Module/PlateReader.d.ts +1 -0
  100. package/lib/hardware-sim/Module/Thermocycler/index.d.ts +1 -1
  101. package/lib/hardware-sim/Module/index.d.ts +2 -2
  102. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +1 -1
  103. package/lib/hardware-sim/ProtocolDeck/LabwareInfo.d.ts +2 -2
  104. package/lib/hardware-sim/ProtocolDeck/index.d.ts +4 -2
  105. package/lib/hardware-sim/ProtocolDeck/utils/index.d.ts +1 -0
  106. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +1 -1
  107. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +3 -2
  108. package/lib/hardware-sim/utils.d.ts +1 -1
  109. package/lib/helix-design-system/colors.d.ts +11 -0
  110. package/lib/helix-design-system/index.d.ts +2 -0
  111. package/lib/helix-design-system/product/index.d.ts +1 -0
  112. package/lib/helix-design-system/product/typography.d.ts +79 -0
  113. package/lib/helix-design-system/style.d.ts +1 -0
  114. package/lib/hooks/index.d.ts +1 -0
  115. package/lib/hooks/useConditionalConfirm.d.ts +3 -2
  116. package/lib/hooks/useDrag.d.ts +1 -1
  117. package/lib/hooks/useLongPress.d.ts +1 -1
  118. package/lib/hooks/useMenuHandleClickOutside.d.ts +9 -0
  119. package/lib/hooks/useSelectDeckLocation/index.d.ts +1 -2
  120. package/lib/hooks/useSwipe.d.ts +1 -1
  121. package/lib/icons/Icon.d.ts +1 -1
  122. package/lib/icons/ModuleIcon.d.ts +2 -2
  123. package/lib/icons/icon-data.d.ts +4 -586
  124. package/lib/index.d.ts +1 -1
  125. package/lib/{index.mjs → index.js} +8783 -6217
  126. package/lib/instrument/InstrumentDiagram.d.ts +1 -1
  127. package/lib/instrument/InstrumentInfo.d.ts +1 -1
  128. package/lib/lists/SidePanelGroup.d.ts +1 -1
  129. package/lib/lists/index.d.ts +0 -1
  130. package/lib/modals/AlertModal.d.ts +2 -1
  131. package/lib/modals/ContinueModal.d.ts +1 -0
  132. package/lib/modals/LegacyModal.d.ts +24 -0
  133. package/lib/modals/Modal.d.ts +21 -20
  134. package/lib/modals/ModalHeader.d.ts +13 -0
  135. package/lib/modals/ModalShell.d.ts +11 -2
  136. package/lib/modals/Overlay.d.ts +1 -1
  137. package/lib/modals/SpinnerModal.d.ts +1 -0
  138. package/lib/modals/SpinnerModalPage.d.ts +2 -1
  139. package/lib/modals/__tests__/Modal.test.d.ts +1 -0
  140. package/lib/modals/__tests__/ModalHeader.test.d.ts +1 -0
  141. package/lib/modals/__tests__/ModalShell.test.d.ts +1 -0
  142. package/lib/modals/index.d.ts +5 -5
  143. package/lib/molecules/Banner/__tests__/Banner.test.d.ts +1 -0
  144. package/lib/molecules/Banner/index.d.ts +23 -0
  145. package/lib/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.d.ts +1 -0
  146. package/lib/molecules/DeckInfoLabel/index.d.ts +19 -0
  147. package/lib/molecules/DeckLabel/__tests__/DeckLabel.test.d.ts +1 -0
  148. package/lib/molecules/DeckLabel/index.d.ts +10 -0
  149. package/lib/molecules/DropdownMenu/__tests__/DropdownMenu.test.d.ts +1 -0
  150. package/lib/molecules/DropdownMenu/index.d.ts +41 -0
  151. package/lib/molecules/InfoScreen/__tests__/InfoScreen.test.d.ts +1 -0
  152. package/lib/molecules/InfoScreen/index.d.ts +6 -0
  153. package/lib/molecules/LiquidIcon/__tests__/LiquidIcon.test.d.ts +1 -0
  154. package/lib/molecules/LiquidIcon/index.d.ts +9 -0
  155. package/lib/molecules/Tabs/__tests__/Tabs.test.d.ts +1 -0
  156. package/lib/molecules/Tabs/index.d.ts +10 -0
  157. package/lib/molecules/index.d.ts +7 -3
  158. package/lib/nav/SidePanel.d.ts +1 -1
  159. package/lib/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.d.ts +1 -0
  160. package/lib/organisms/DeckLabelSet/index.d.ts +11 -0
  161. package/lib/organisms/EndUserAgreementFooter/__tests__/EndUserAgreementFooter.test.d.ts +1 -0
  162. package/lib/organisms/EndUserAgreementFooter/index.d.ts +1 -0
  163. package/lib/organisms/Toolbox/__tests__/Toolbox.test.d.ts +1 -0
  164. package/lib/organisms/Toolbox/index.d.ts +20 -0
  165. package/lib/organisms/index.d.ts +3 -0
  166. package/lib/primitives/Btn.d.ts +1 -1
  167. package/lib/structure/Card.d.ts +1 -1
  168. package/lib/structure/LabeledValue.d.ts +1 -1
  169. package/lib/structure/Pill.d.ts +1 -1
  170. package/lib/structure/TitleBar.d.ts +2 -2
  171. package/lib/structure/index.d.ts +0 -1
  172. package/lib/style.css +3786 -0
  173. package/lib/styles/cursor.d.ts +10 -0
  174. package/lib/styles/flexbox.d.ts +5 -0
  175. package/lib/styles/index.d.ts +1 -0
  176. package/lib/styles/layout.d.ts +1 -0
  177. package/lib/testing/utils/renderWithProviders.d.ts +2 -3
  178. package/lib/tooltips/DeprecatedTooltip.d.ts +1 -1
  179. package/lib/tooltips/{Tooltip.d.ts → LegacyTooltip.d.ts} +2 -2
  180. package/lib/tooltips/index.d.ts +1 -1
  181. package/lib/ui-style-constants/responsiveness.d.ts +1 -0
  182. package/lib/ui-style-constants/typography.d.ts +1 -0
  183. package/package.json +5 -7
  184. package/tsconfig.json +5 -2
  185. package/{vite.config.ts → vite.config.mts} +19 -6
  186. package/lib/lists/ListItem.d.ts +0 -37
  187. package/lib/modals/BaseModal.d.ts +0 -26
  188. package/lib/modals/ModalPage.d.ts +0 -16
  189. package/lib/molecules/LocationIcon/index.d.ts +0 -15
  190. package/lib/molecules/ParametersTable/InfoScreen.d.ts +0 -6
  191. package/lib/molecules/RoundTab.d.ts +0 -8
  192. package/lib/structure/PageTabs.d.ts +0 -11
  193. package/lib/tabbedNav/NavTab.d.ts +0 -25
  194. package/lib/tabbedNav/OutsideLinkTab.d.ts +0 -24
  195. package/lib/tabbedNav/TabbedNavBar.d.ts +0 -7
  196. package/lib/tabbedNav/index.d.ts +0 -3
  197. /package/lib/atoms/{StyledText/__tests__/StyledText.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
  198. /package/lib/{modals/__tests__/BaseModal.test.d.ts → atoms/InputField/__tests__/InputField.test.d.ts} +0 -0
  199. /package/lib/{molecules/LocationIcon/__tests__/LocationIcon.test.d.ts → atoms/ListButton/__tests__/ListButtonAccordion.test.d.ts} +0 -0
  200. /package/lib/{molecules/ParametersTable/__tests__/InfoScreen.test.d.ts → atoms/ListButton/__tests__/ListButtonRadioButton.test.d.ts} +0 -0
@@ -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";
@@ -27,3 +27,8 @@ export declare const DIRECTION_COLUMN_REVERSE = "column-reverse";
27
27
  export declare const WRAP = "wrap";
28
28
  export declare const NO_WRAP = "nowrap";
29
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";
@@ -1,5 +1,6 @@
1
1
  export * from './borders';
2
2
  export * from './colors';
3
+ export * from './cursor';
3
4
  export * from './flexbox';
4
5
  export * from './layout';
5
6
  export * from './position';
@@ -6,6 +6,7 @@ export declare const DISPLAY_FLEX = "flex";
6
6
  export declare const DISPLAY_TABLE = "table";
7
7
  export declare const DISPLAY_TABLE_ROW = "table-row";
8
8
  export declare const DISPLAY_TABLE_CELL = "table-cell";
9
+ export declare const DISPLAY_GRID = "grid";
9
10
  export declare const SIZE_AUTO = "auto";
10
11
  export declare const SIZE_1 = "1rem";
11
12
  export declare const SIZE_2 = "2rem";
@@ -1,8 +1,7 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import { I18nextProvider } from 'react-i18next';
3
- import { RenderResult } from '@testing-library/react';
3
+ import type { RenderResult, RenderOptions } from '@testing-library/react';
4
4
  import type { Store } from 'redux';
5
- import type { RenderOptions } from '@testing-library/react';
6
5
  export interface RenderWithProvidersOptions<State> extends RenderOptions {
7
6
  initialState?: State;
8
7
  i18nInstance: React.ComponentProps<typeof I18nextProvider>['i18n'];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import { Popper } from 'react-popper';
3
3
  type PopperProps = React.ComponentProps<typeof Popper>;
4
4
  export interface DeprecatedTooltipProps {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import type { CSSProperties } from 'react';
3
3
  import type { Placement } from './types';
4
4
  import type { StyleProps } from '../primitives';
5
- export interface TooltipProps extends StyleProps {
5
+ export interface LegacyTooltipProps extends StyleProps {
6
6
  /** Whether or not the tooltip should be rendered */
7
7
  visible: boolean;
8
8
  /** Contents of the tooltip */
@@ -25,7 +25,7 @@ export interface TooltipProps extends StyleProps {
25
25
  * Tooltip component that renders based on its `visible` prop. For use with the
26
26
  * `useTooltip` and `useHoverTooltip` hooks. See examples in `Tooltip.md`.
27
27
  */
28
- export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
28
+ export declare const LegacyTooltip: React.ForwardRefExoticComponent<LegacyTooltipProps & React.RefAttributes<HTMLDivElement>>;
29
29
  export interface ArrowProps {
30
30
  placement: Placement | null;
31
31
  arrowRef: React.RefCallback<HTMLElement>;
@@ -1,6 +1,6 @@
1
1
  export * from './DeprecatedTooltip';
2
2
  export * from './HoverTooltip';
3
- export * from './Tooltip';
3
+ export * from './LegacyTooltip';
4
4
  export * from './useTooltip';
5
5
  export * from './useHoverTooltip';
6
6
  export * from './usePopper';
@@ -1,2 +1,3 @@
1
1
  export declare const touchscreenMediaQuerySpecs = "(height: 600px) and (width: 1024px)";
2
+ export declare const isTouchscreenDynamic: () => boolean;
2
3
  export declare const isTouchscreen: boolean;
@@ -26,6 +26,7 @@ export declare const lineHeight20 = "1.25rem";
26
26
  export declare const lineHeight18 = "1.125rem";
27
27
  export declare const lineHeight16 = "1rem";
28
28
  export declare const lineHeight12 = "0.75rem";
29
+ export declare const lineHeightNormal = "normal";
29
30
  export declare const fontStyleNormal = "normal";
30
31
  export declare const fontStyleItalic = "italic";
31
32
  export declare const textTransformNone = "none";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentrons/components",
3
- "version": "0.1.6-alpha.7",
3
+ "version": "0.1.6-alpha.8",
4
4
  "description": "React components library for Opentrons' projects",
5
5
  "source": "src/index.ts",
6
6
  "types": "lib/index.d.ts",
@@ -20,11 +20,10 @@
20
20
  "peerDependencies": {
21
21
  "react": "18.2.0",
22
22
  "react-dom": "18.2.0",
23
- "react-router-dom": "5.3.4",
24
- "@types/react-router-dom": "5.3.3"
23
+ "styled-components": "5.3.6"
25
24
  },
26
25
  "dependencies": {
27
- "@opentrons/shared-data": "0.1.6-alpha.7",
26
+ "@opentrons/shared-data": "0.1.6-alpha.8",
28
27
  "@popperjs/core": "2.1.1",
29
28
  "@react-spring/types": "9.6.1",
30
29
  "@react-spring/web": "9.6.1",
@@ -33,12 +32,11 @@
33
32
  "@types/styled-components": "^5.1.26",
34
33
  "@types/webpack-env": "^1.16.0",
35
34
  "classnames": "2.2.5",
36
- "interactjs": "^1.10.17",
35
+ "interactjs": "^1.10.27",
37
36
  "lodash": "4.17.21",
38
- "react-i18next": "13.5.0",
37
+ "react-i18next": "14.0.0",
39
38
  "react-popper": "1.0.0",
40
39
  "react-remove-scroll": "2.4.3",
41
- "react-router-dom": "5.3.4",
42
40
  "react-select": "5.4.0",
43
41
  "redux": "4.0.5",
44
42
  "styled-components": "5.3.6"
package/tsconfig.json CHANGED
@@ -9,7 +9,10 @@
9
9
  "composite": true,
10
10
  "rootDir": "src",
11
11
  "outDir": "lib",
12
+ "declarationDir": "lib",
13
+ "noEmit": false,
14
+ "jsx": "preserve"
12
15
  },
13
16
  "include": ["typings", "src"],
14
- "exclude": ["**/*.stories.tsx"]
15
- }
17
+ "exclude": ["**/*.stories.tsx", "dist"]
18
+ }
@@ -9,11 +9,21 @@ import lostCss from 'lost'
9
9
 
10
10
  export default defineConfig({
11
11
  build: {
12
- // Relative to the root
13
12
  ssr: 'src/index.ts',
14
13
  outDir: 'lib',
15
- // do not delete the outdir, typescript types might live there and we dont want to delete them
16
- emptyOutDir: false,
14
+ emptyOutDir: false, // Keep the outDir to avoid removing TS types
15
+ lib: {
16
+ entry: 'src/index.ts',
17
+ formats: ['es', 'cjs'],
18
+ fileName: (format) => (format === 'es' ? 'index.mjs' : 'index.cjs'),
19
+ },
20
+ rollupOptions: {
21
+ external: ['react', 'react-dom', 'styled-components'], // Avoid bundling dependencies
22
+ output: {
23
+ assetFileNames: '[name].[ext]', // Ensure asset names are kept clean
24
+ entryFileNames: '[name].js', // Ensure only compiled JS is output
25
+ },
26
+ },
17
27
  commonjsOptions: {
18
28
  transformMixedEsModules: true,
19
29
  esmExternals: true,
@@ -23,7 +33,6 @@ export default defineConfig({
23
33
  react({
24
34
  include: '**/*.tsx',
25
35
  babel: {
26
- // Use babel.config.js files
27
36
  configFile: true,
28
37
  },
29
38
  }),
@@ -32,6 +41,7 @@ export default defineConfig({
32
41
  esbuildOptions: {
33
42
  target: 'es2020',
34
43
  },
44
+ exclude: ['styled-components'],
35
45
  },
36
46
  css: {
37
47
  postcss: {
@@ -45,8 +55,11 @@ export default defineConfig({
45
55
  },
46
56
  },
47
57
  define: {
48
- 'process.env': process.env,
49
- global: 'globalThis',
58
+ 'process.env': {
59
+ NODE_ENV: process.env.NODE_ENV,
60
+ OPENTRONS_PROJECT: process.env.OPENTRONS_PROJECT,
61
+ },
62
+ global: 'globalThis', // Ensure compatibility with global variables
50
63
  },
51
64
  resolve: {
52
65
  alias: {
@@ -1,37 +0,0 @@
1
- import * as React from 'react';
2
- import type { IconName } from '../icons';
3
- interface ListItemProps {
4
- /** click handler */
5
- onClick?: (event: React.SyntheticEvent) => unknown;
6
- /** mouse enter handler */
7
- onMouseEnter?: (event: React.MouseEvent) => unknown;
8
- /** mouse leave handler */
9
- onMouseLeave?: (event: React.MouseEvent) => unknown;
10
- /** mouse enter handler */
11
- onPointerEnter?: (event: React.PointerEvent) => unknown;
12
- /** mouse leave handler */
13
- onPointerLeave?: (event: React.PointerEvent) => unknown;
14
- /** if URL is specified, ListItem is wrapped in a React Router NavLink */
15
- url?: string | null;
16
- /** if URL is specified NavLink can receive an active class name */
17
- activeClassName?: string;
18
- /** if URL is specified NavLink can receive an exact property for matching routes */
19
- exact?: boolean;
20
- /** Additional class name */
21
- className?: string;
22
- /** if disabled, the onClick handler will be disabled */
23
- isDisabled?: boolean;
24
- /** name constant of the icon to display */
25
- iconName?: IconName;
26
- 'aria-describedby'?: string;
27
- ref?: {
28
- current: Element | null;
29
- } | ((current: Element | null) => unknown);
30
- children?: React.ReactNode;
31
- }
32
- /**
33
- * A styled `<li>` with an optional icon, and an optional url for a React Router `NavLink`
34
- *
35
- */
36
- export declare const ListItem: React.ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
37
- export {};
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import type { StyleProps } from '../primitives';
3
- export interface BaseModalProps extends StyleProps {
4
- /** Overlay color, defaults to `OVERLAY_GRAY_90` */
5
- overlayColor?: string;
6
- /** Optional close on outside click **/
7
- onOutsideClick?: React.MouseEventHandler;
8
- /** Optional sticky header */
9
- header?: React.ReactNode;
10
- /** Option to turn off headerStyles */
11
- noHeaderStyles?: boolean;
12
- /** Optional sticky footer */
13
- footer?: React.ReactNode;
14
- /** Modal content */
15
- children?: React.ReactNode;
16
- }
17
- /**
18
- * A BaseModal is a layout component for building more specific modals.
19
- *
20
- * It includes:
21
- * - An overlay, customizable with the `overlayColor` prop
22
- * - A content area, with `overflow-y: auto` and customizable with style props
23
- * - An optional sticky header
24
- * - An optional sticky footer
25
- */
26
- export declare function BaseModal(props: BaseModalProps): JSX.Element;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import { Box } from '../primitives';
3
- import type { TitleBarProps } from '../structure';
4
- export interface ModalPageProps {
5
- /** Props for title bar at top of modal page */
6
- titleBar: TitleBarProps;
7
- contentsClassName?: string;
8
- heading?: React.ReactNode;
9
- children?: React.ReactNode;
10
- innerProps?: React.ComponentProps<typeof Box>;
11
- outerProps?: React.ComponentProps<typeof Box>;
12
- }
13
- /**
14
- * @deprecated Use `Interstitial` instead
15
- */
16
- export declare function ModalPage(props: ModalPageProps): JSX.Element;
@@ -1,15 +0,0 @@
1
- import type { IconName } from '../../icons';
2
- import type { StyleProps } from '../../primitives';
3
- interface SlotLocationProps extends StyleProps {
4
- /** name constant of the slot to display */
5
- slotName: string;
6
- iconName?: undefined;
7
- }
8
- interface HardwareIconProps extends StyleProps {
9
- /** hardware icon name */
10
- iconName: IconName;
11
- slotName?: undefined;
12
- }
13
- type LocationIconProps = SlotLocationProps | HardwareIconProps;
14
- export declare function LocationIcon({ slotName, iconName, color, ...styleProps }: LocationIconProps): JSX.Element;
15
- export {};
@@ -1,6 +0,0 @@
1
- interface InfoScreenProps {
2
- contentType: 'parameters' | 'moduleControls' | 'runNotStarted' | 'labware';
3
- t?: any;
4
- }
5
- export declare function InfoScreen({ contentType, t }: InfoScreenProps): JSX.Element;
6
- export {};
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { Btn } from '../primitives';
3
- interface RoundTabProps extends React.ComponentProps<typeof Btn> {
4
- isCurrent: boolean;
5
- disabled?: boolean;
6
- }
7
- export declare function RoundTab({ isCurrent, children, disabled, ...restProps }: RoundTabProps): JSX.Element;
8
- export {};
@@ -1,11 +0,0 @@
1
- interface TabProps {
2
- title: string;
3
- href: string;
4
- isActive: boolean;
5
- isDisabled: boolean;
6
- }
7
- export interface PageTabProps {
8
- pages: TabProps[];
9
- }
10
- export declare function PageTabs(props: PageTabProps): JSX.Element;
11
- export {};
@@ -1,25 +0,0 @@
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;
@@ -1,24 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- export * from './TabbedNavBar';
2
- export * from './NavTab';
3
- export * from './OutsideLinkTab';