@opentrons/components 0.1.6-alpha.15 → 0.1.6-alpha.16

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 (31) hide show
  1. package/lib/atoms/Checkbox/index.d.ts +1 -0
  2. package/lib/atoms/InputField/index.d.ts +9 -9
  3. package/lib/atoms/ListItem/ListItemChildren/ListItemCustomize.d.ts +2 -2
  4. package/lib/atoms/ListItem/ListItemChildren/ListItemDescriptor.d.ts +1 -0
  5. package/lib/atoms/ListItem/index.d.ts +1 -1
  6. package/lib/atoms/StyledText/StyledText.d.ts +1 -1
  7. package/lib/atoms/Tag/index.d.ts +1 -0
  8. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +6 -6
  9. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +1 -0
  10. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +2 -2
  11. package/lib/hardware-sim/Labware/LabwareRender.d.ts +1 -1
  12. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +1 -1
  13. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +1 -1
  14. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +1 -1
  15. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +1 -1
  16. package/lib/hooks/useMenuHandleClickOutside.d.ts +3 -3
  17. package/lib/index.mjs +12253 -25011
  18. package/lib/instrument/InstrumentDiagram.d.ts +1 -1
  19. package/lib/molecules/DropdownMenu/index.d.ts +2 -2
  20. package/lib/molecules/InfoScreen/index.d.ts +3 -1
  21. package/lib/organisms/Toolbox/index.d.ts +1 -1
  22. package/lib/patches.d.ts +4 -0
  23. package/lib/primitives/Btn.d.ts +1 -1
  24. package/lib/primitives/style-props.d.ts +1 -1
  25. package/lib/primitives/types.d.ts +1 -1
  26. package/lib/styles/typography.d.ts +1 -1
  27. package/package.json +5 -5
  28. package/tsconfig.json +0 -2
  29. package/vite.config.mts +6 -25
  30. package/lib/index.cjs +0 -732
  31. package/lib/style.css +0 -1
@@ -1,4 +1,4 @@
1
- import type { FlattenSimpleInterpolation } from 'styled-components';
1
+ import type { FlattenSimpleInterpolation } from '../patches';
2
2
  import type { PipetteV2Specs } from '@opentrons/shared-data';
3
3
  import type { Mount } from '../robot-types';
4
4
  import type { StyleProps } from '..';
@@ -35,7 +35,7 @@ export interface DropdownMenuProps {
35
35
  onBlur?: React.FocusEventHandler<HTMLButtonElement>;
36
36
  /** optional disabled */
37
37
  disabled?: boolean;
38
- /** force direction for pd after release this will be fixed and remove */
39
- forceDirection?: boolean;
38
+ /** optional placement of the menu */
39
+ menuPlacement?: 'auto' | 'top' | 'bottom';
40
40
  }
41
41
  export declare function DropdownMenu(props: DropdownMenuProps): JSX.Element;
@@ -1,6 +1,8 @@
1
1
  interface InfoScreenProps {
2
2
  content: string;
3
+ subContent?: string;
3
4
  backgroundColor?: string;
5
+ height?: string;
4
6
  }
5
- export declare function InfoScreen({ content, backgroundColor, }: InfoScreenProps): JSX.Element;
7
+ export declare function InfoScreen({ content, subContent, backgroundColor, height, }: InfoScreenProps): JSX.Element;
6
8
  export {};
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  export interface ToolboxProps {
3
2
  title: JSX.Element;
4
3
  children: React.ReactNode;
@@ -12,6 +11,7 @@ export interface ToolboxProps {
12
11
  closeButton?: JSX.Element;
13
12
  side?: 'left' | 'right';
14
13
  horizontalSide?: 'top' | 'bottom';
14
+ titlePadding?: string;
15
15
  childrenPadding?: string;
16
16
  subHeader?: JSX.Element | null;
17
17
  secondaryHeaderButton?: JSX.Element;
@@ -0,0 +1,4 @@
1
+ import styled from 'styled-components';
2
+ export * from 'styled-components';
3
+ declare const defaultStyled: typeof styled;
4
+ export { defaultStyled as default };
@@ -1,4 +1,4 @@
1
- import type { StyledComponent } from 'styled-components';
1
+ import type { StyledComponent } from '../patches';
2
2
  import type { StyleProps } from './types';
3
3
  export declare const BUTTON_TYPE_SUBMIT: 'submit';
4
4
  export declare const BUTTON_TYPE_RESET: 'reset';
@@ -1,4 +1,4 @@
1
1
  import type * as Types from './types';
2
- import type { CSSObject } from 'styled-components';
2
+ import type { CSSObject } from '../patches';
3
3
  export declare const styleProps: (props: Types.StyleProps) => CSSObject;
4
4
  export declare const isntStyleProp: (prop: string | React.ReactText) => boolean;
@@ -1,4 +1,4 @@
1
- import type { StyledComponent, CSSProperties } from 'styled-components';
1
+ import type { StyledComponent, CSSProperties } from '../patches';
2
2
  export interface ColorProps {
3
3
  color?: string;
4
4
  backgroundColor?: string;
@@ -1,4 +1,4 @@
1
- import type { FlattenSimpleInterpolation } from 'styled-components';
1
+ import type { FlattenSimpleInterpolation } from '../patches';
2
2
  export declare const FONT_SIZE_HUGE = "3rem";
3
3
  export declare const FONT_SIZE_BIG = "1.5rem";
4
4
  export declare const FONT_SIZE_HEADER = "1.125rem";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentrons/components",
3
- "version": "0.1.6-alpha.15",
3
+ "version": "0.1.6-alpha.16",
4
4
  "description": "React components library for Opentrons' projects",
5
5
  "source": "src/index.ts",
6
6
  "types": "lib/index.d.ts",
@@ -19,11 +19,10 @@
19
19
  "homepage": "https://github.com/Opentrons/opentrons#readme",
20
20
  "peerDependencies": {
21
21
  "react": "18.2.0",
22
- "react-dom": "18.2.0",
23
- "styled-components": "5.3.6"
22
+ "react-dom": "18.2.0"
24
23
  },
25
24
  "dependencies": {
26
- "@opentrons/shared-data": "0.1.6-alpha.15",
25
+ "@opentrons/shared-data": "0.1.6-alpha.16",
27
26
  "@popperjs/core": "2.1.1",
28
27
  "@react-spring/types": "9.6.1",
29
28
  "@react-spring/web": "9.6.1",
@@ -38,7 +37,8 @@
38
37
  "react-popper": "1.0.0",
39
38
  "react-remove-scroll": "2.4.3",
40
39
  "react-select": "5.4.0",
41
- "redux": "4.0.5"
40
+ "redux": "4.0.5",
41
+ "styled-components": "5.3.6"
42
42
  },
43
43
  "devDependencies": {
44
44
  "react-redux": "8.1.2"
package/tsconfig.json CHANGED
@@ -9,8 +9,6 @@
9
9
  "composite": true,
10
10
  "rootDir": "src",
11
11
  "outDir": "lib",
12
- "allowSyntheticDefaultImports": true,
13
- "esModuleInterop": true
14
12
  },
15
13
  "include": ["typings", "src"],
16
14
  "exclude": ["**/*.stories.tsx"]
package/vite.config.mts CHANGED
@@ -6,35 +6,18 @@ import postCssApply from 'postcss-apply'
6
6
  import postColorModFunction from 'postcss-color-mod-function'
7
7
  import postCssPresetEnv from 'postcss-preset-env'
8
8
  import lostCss from 'lost'
9
- import commonjs from '@rollup/plugin-commonjs' // Importing @rollup/plugin-commonjs to handle CJS to ESM conversion
10
9
 
11
10
  export default defineConfig({
12
11
  build: {
13
12
  // Relative to the root
13
+ ssr: 'src/index.ts',
14
14
  outDir: 'lib',
15
- // Do not delete the outdir, TypeScript types might live there, and we don't want to delete them
15
+ // do not delete the outdir, typescript types might live there and we dont want to delete them
16
16
  emptyOutDir: false,
17
- lib: {
18
- entry: 'src/index.ts',
19
- formats: ['es', 'cjs'], // Generate both ES Module and CommonJS outputs
20
- fileName: format => (format === 'es' ? 'index.mjs' : 'index.cjs'),
17
+ commonjsOptions: {
18
+ transformMixedEsModules: true,
19
+ esmExternals: true,
21
20
  },
22
- rollupOptions: {
23
- external: ['react', 'react-dom', 'styled-components'], // Ensure peer dependencies are not bundled
24
- output: {
25
- exports: 'named', // Use named exports for compatibility with styled-components in CJS
26
- globals: {
27
- 'styled-components': 'styled', // Ensure styled-components maps correctly in UMD builds
28
- },
29
- plugins: [
30
- commonjs({
31
- include: /node_modules/, // Include node_modules for CommonJS conversion
32
- transformMixedEsModules: true, // Ensure proper handling of mixed modules
33
- }),
34
- ],
35
- },
36
- },
37
- target: 'es2017', // Transpile down to a compatible version for Next.js
38
21
  },
39
22
  plugins: [
40
23
  react({
@@ -49,7 +32,6 @@ export default defineConfig({
49
32
  esbuildOptions: {
50
33
  target: 'es2020',
51
34
  },
52
- exclude: ['styled-components'], // Avoid pre-bundling styled-components
53
35
  },
54
36
  css: {
55
37
  postcss: {
@@ -64,7 +46,7 @@ export default defineConfig({
64
46
  },
65
47
  define: {
66
48
  'process.env': process.env,
67
- global: 'globalThis', // Fix issues with globalThis in some environments
49
+ global: 'globalThis',
68
50
  },
69
51
  resolve: {
70
52
  alias: {
@@ -73,6 +55,5 @@ export default defineConfig({
73
55
  '../components/src/index.module.css'
74
56
  ),
75
57
  },
76
- dedupe: ['styled-components'], // Prevent duplicate styled-components instances
77
58
  },
78
59
  })