@opentrons/components 0.1.6-alpha.12 → 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 -25041
  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 +4 -10
  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.12",
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.12",
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
@@ -10,18 +10,14 @@ import lostCss from 'lost'
10
10
  export default defineConfig({
11
11
  build: {
12
12
  // Relative to the root
13
+ ssr: 'src/index.ts',
13
14
  outDir: 'lib',
14
15
  // do not delete the outdir, typescript types might live there and we dont want to delete them
15
16
  emptyOutDir: false,
16
- lib: {
17
- entry: 'src/index.ts',
18
- formats: ['es', 'cjs'], // Generate both ES Module and CommonJS outputs
19
- fileName: (format) => (format === 'es' ? 'index.mjs' : 'index.cjs'),
17
+ commonjsOptions: {
18
+ transformMixedEsModules: true,
19
+ esmExternals: true,
20
20
  },
21
- rollupOptions: {
22
- external: ['react', 'react-dom', 'styled-components'], // Ensure peer dependencies are not bundled
23
- },
24
- target: 'es2017', // Transpile down to a compatible version for Next.js (for Protocol Library)
25
21
  },
26
22
  plugins: [
27
23
  react({
@@ -36,7 +32,6 @@ export default defineConfig({
36
32
  esbuildOptions: {
37
33
  target: 'es2020',
38
34
  },
39
- exclude: ['styled-components'], // Avoid pre-bundling styled-components
40
35
  },
41
36
  css: {
42
37
  postcss: {
@@ -60,6 +55,5 @@ export default defineConfig({
60
55
  '../components/src/index.module.css'
61
56
  ),
62
57
  },
63
- dedupe: ['styled-components'], // Prevent duplicate styled-components instances
64
58
  },
65
59
  })